This commit is contained in:
parent
238c4c092f
commit
59c5cfb9bf
1 changed files with 5 additions and 5 deletions
|
|
@ -7560,13 +7560,13 @@ export class CommandController extends Controller {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
|
||||||
|
profile.posMasterNo = getPosMasterNo(posMaster);
|
||||||
|
profile.org = getOrgFullName(posMaster);
|
||||||
// ถ้าไม่ใช่ตำแหน่งนั่งทับ (isSit = false) ถึงจะอัพเดทตำแหน่งในทะเบียนประวัติ
|
// ถ้าไม่ใช่ตำแหน่งนั่งทับ (isSit = false) ถึงจะอัพเดทตำแหน่งในทะเบียนประวัติ
|
||||||
if (positionNew != null) {
|
if (positionNew != null) {
|
||||||
console.log("[Excexute/CreateOfficerProfile] Final position assignment, isSit:", posMaster.isSit, "positionId:", positionNew.id);
|
console.log("[Excexute/CreateOfficerProfile] Final position assignment, isSit:", posMaster.isSit, "positionId:", positionNew.id);
|
||||||
positionNew.positionIsSelected = true;
|
positionNew.positionIsSelected = true;
|
||||||
// อัพเดท org และ posMasterNo ตลอดไม่ต้องดัก isSit
|
|
||||||
profile.posMasterNo = getPosMasterNo(posMaster);
|
|
||||||
profile.org = getOrgFullName(posMaster);
|
|
||||||
if (!posMaster.isSit) {
|
if (!posMaster.isSit) {
|
||||||
profile.posLevelId = positionNew.posLevelId;
|
profile.posLevelId = positionNew.posLevelId;
|
||||||
profile.posTypeId = positionNew.posTypeId;
|
profile.posTypeId = positionNew.posTypeId;
|
||||||
|
|
@ -7577,10 +7577,10 @@ export class CommandController extends Controller {
|
||||||
profile.positionExecutiveField = positionNew.positionExecutiveField ?? null;
|
profile.positionExecutiveField = positionNew.positionExecutiveField ?? null;
|
||||||
// profile.dateStart = new Date();
|
// profile.dateStart = new Date();
|
||||||
}
|
}
|
||||||
await this.profileRepository.save(profile, { data: req });
|
|
||||||
setLogDataDiff(req, { before, after: profile });
|
|
||||||
await this.positionRepository.save(positionNew, { data: req });
|
await this.positionRepository.save(positionNew, { data: req });
|
||||||
}
|
}
|
||||||
|
await this.profileRepository.save(profile, { data: req });
|
||||||
|
setLogDataDiff(req, { before, after: profile });
|
||||||
// await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
// await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||||
await CreatePosMasterHistoryOfficer(posMaster.id, req, null, {
|
await CreatePosMasterHistoryOfficer(posMaster.id, req, null, {
|
||||||
positionId: positionNew?.id,
|
positionId: positionNew?.id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue