From e2332d49dfa94137f0ad3d570b48286ca2a35b1b Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 4 Sep 2025 15:53:19 +0700 Subject: [PATCH] update save position history --- src/controllers/CommandController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index be14db4c..cd0785e4 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3601,7 +3601,7 @@ export class CommandController extends Controller { positionNew.positionIsSelected = true; await this.positionRepository.save(positionNew, { data: req }); } - await CreatePosMasterHistoryOfficer(posMaster.id, req); + // await CreatePosMasterHistoryOfficer(posMaster.id, req); } const newMapProfileSalary = { profileId: profile.id, @@ -3706,6 +3706,9 @@ export class CommandController extends Controller { profile.isActive = true; } await this.profileRepository.save(profile); + if (item.posmasterId && clearProfile.LeaveType != "RETIRE_OUT_EMP") { + await CreatePosMasterHistoryOfficer(item.posmasterId, req); + } }), );