From cd68062867f1372eca66e53872b4f6a92d364739 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 7 Nov 2024 16:16:46 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B6?= =?UTF-8?q?=E0=B8=81=E0=B8=84=E0=B9=88=E0=B8=B2=20datestart=20#764?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 1703ea7a..f870a28f 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -2015,6 +2015,7 @@ export class CommandController extends Controller { profile.lastUpdateUserId = req.user.sub; profile.lastUpdateFullName = req.user.name; profile.lastUpdatedAt = new Date(); + profile.dateStart = new Date(); if (item.isLeave == true) { await removeProfileInOrganize(profile.id, "OFFICER"); } @@ -2910,6 +2911,7 @@ export class CommandController extends Controller { profile.posLevelId = positionNew.posLevelId; profile.posTypeId = positionNew.posTypeId; profile.position = positionNew.positionName; + profile.dateStart = new Date(); await this.profileRepository.save(profile, { data: req }); setLogDataDiff(req, { before, after: profile }); await this.positionRepository.save(positionNew, { data: req }); @@ -3125,6 +3127,10 @@ export class CommandController extends Controller { profile.employeeClass = "PERM"; const _null: any = null; profile.employeeWage = item.amount == null ? _null : item.amount.toString(); + profile.dateStart = new Date(); + // profile.amount = item.amount == null ? _null : item.amount.toString(); //เผื่อไว้ + // profile.positionSalaryAmount = item.positionSalaryAmount == null ? _null : item.positionSalaryAmount.toString(); + // profile.mouthSalaryAmount = item.mouthSalaryAmount == null ? _null : item.mouthSalaryAmount.toString(); await this.profileEmployeeRepository.save(profile); await this.employeePositionRepository.save(positionNew);