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);