From 83de71c40cd7e553ad913beef54616f8534cb745 Mon Sep 17 00:00:00 2001 From: Adisak Date: Wed, 12 Nov 2025 14:39:44 +0700 Subject: [PATCH] #1945 fix --- src/controllers/ProfileController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 57d618c6..f4769367 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -86,7 +86,7 @@ import { ProfileSalaryHistory } from "../entities/ProfileSalaryHistory"; import { ProfileAssistance } from "../entities/ProfileAssistance"; import { CommandRecive } from "../entities/CommandRecive"; import { EmployeePosMaster } from "../entities/EmployeePosMaster"; -import { getTopDegrees } from "../services/PositionService"; +import { CreatePosMasterHistoryOfficer, getTopDegrees } from "../services/PositionService"; import { ProfileLeaveService } from "../services/ProfileLeaveService"; @Route("api/v1/org/profile") @@ -10789,6 +10789,9 @@ export class ProfileController extends Controller { await this.profileRepo.save(profile, { data: request }); setLogDataDiff(request, { before, after: profile }); if (requestBody.isLeave == true) { + if(orgRevisionRef){ + await CreatePosMasterHistoryOfficer(orgRevisionRef.id, request); + } await removeProfileInOrganize(profile.id, "OFFICER"); } return new HttpSuccess();