fix
This commit is contained in:
parent
81882a66a5
commit
381b9088ac
1 changed files with 8 additions and 8 deletions
|
|
@ -10038,7 +10038,7 @@ export class ProfileController extends Controller {
|
||||||
orgChild3: orgChild3Ref?.orgChild3Name,
|
orgChild3: orgChild3Ref?.orgChild3Name,
|
||||||
orgChild4: orgChild4Ref?.orgChild4Name,
|
orgChild4: orgChild4Ref?.orgChild4Name,
|
||||||
commandYear: new Date().getFullYear() + 543,
|
commandYear: new Date().getFullYear() + 543,
|
||||||
commandDateSign: new Date(),
|
// commandDateSign: new Date(),
|
||||||
commandDateAffect: new Date(),
|
commandDateAffect: new Date(),
|
||||||
commandCode: "16",
|
commandCode: "16",
|
||||||
commandName: "พ้นจากราชการ",
|
commandName: "พ้นจากราชการ",
|
||||||
|
|
@ -10051,6 +10051,7 @@ export class ProfileController extends Controller {
|
||||||
lastUpdateFullName: request.user.name,
|
lastUpdateFullName: request.user.name,
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
|
remark: "ถึงแก่กรรม",
|
||||||
};
|
};
|
||||||
delete data.id;
|
delete data.id;
|
||||||
|
|
||||||
|
|
@ -10066,13 +10067,10 @@ export class ProfileController extends Controller {
|
||||||
profile.isLeave = requestBody.isLeave;
|
profile.isLeave = requestBody.isLeave;
|
||||||
profile.leaveReason = requestBody.leaveReason;
|
profile.leaveReason = requestBody.leaveReason;
|
||||||
profile.dateLeave = requestBody.dateLeave;
|
profile.dateLeave = requestBody.dateLeave;
|
||||||
if (requestBody.isLeave == true) {
|
|
||||||
await removeProfileInOrganize(profile.id, "OFFICER");
|
|
||||||
}
|
|
||||||
profile.leaveType = "RETIRE_DECEASED";
|
profile.leaveType = "RETIRE_DECEASED";
|
||||||
profile.position = _null;
|
// profile.position = _null;
|
||||||
profile.posLevelId = _null;
|
// profile.posLevelId = _null;
|
||||||
profile.posTypeId = _null;
|
// profile.posTypeId = _null;
|
||||||
if (profile.keycloak != null) {
|
if (profile.keycloak != null) {
|
||||||
const delUserKeycloak = await deleteUser(profile.keycloak);
|
const delUserKeycloak = await deleteUser(profile.keycloak);
|
||||||
if (delUserKeycloak) {
|
if (delUserKeycloak) {
|
||||||
|
|
@ -10083,7 +10081,9 @@ export class ProfileController extends Controller {
|
||||||
}
|
}
|
||||||
await this.profileRepo.save(profile, { data: request });
|
await this.profileRepo.save(profile, { data: request });
|
||||||
setLogDataDiff(request, { before, after: profile });
|
setLogDataDiff(request, { before, after: profile });
|
||||||
await removeProfileInOrganize(profile.id, "OFFICER");
|
if (requestBody.isLeave == true) {
|
||||||
|
await removeProfileInOrganize(profile.id, "OFFICER");
|
||||||
|
}
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue