fix ลบคนออกจากอัตรากำลัง

This commit is contained in:
AdisakKanthawilang 2024-07-19 15:51:08 +07:00
parent 85c6093970
commit ac01837c69
3 changed files with 78 additions and 38 deletions

View file

@ -1452,7 +1452,7 @@ export class ProfileController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์");
}
let dateLeave_: any = body.date;
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id,"OFFICER");
profile.isLeave = true;
profile.leaveReason =
"คำสั่งให้ข้าราชการออกจากราชการเพราะผลการทดลองปฏิบัติหน้าที่ราชการต่ำกว่ามาตรฐานที่กำหนด";
@ -1525,7 +1525,7 @@ export class ProfileController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์");
}
let dateLeave_: any = body.date;
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id,"OFFICER");
profile.isLeave = true;
profile.leaveReason = "ได้รับโทษทางวินัย ปลดออกจากราชการ";
profile.dateLeave = dateLeave_;
@ -1597,7 +1597,7 @@ export class ProfileController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์");
}
let dateLeave_: any = body.date;
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id,"OFFICER");
profile.isLeave = true;
profile.leaveReason = "ได้รับโทษทางวินัย ไล่ออกจากราชการ";
profile.dateLeave = dateLeave_;
@ -1683,7 +1683,7 @@ export class ProfileController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์");
}
let dateLeave_: any = body.date;
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id,"OFFICER");
profile.isLeave = true;
profile.leaveReason = "ได้รับโทษทางวินัย พักจากราชการ";
profile.dateLeave = dateLeave_;
@ -1755,7 +1755,7 @@ export class ProfileController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์");
}
let dateLeave_: any = body.date;
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id, "OFFICER");
profile.isLeave = true;
profile.leaveReason = "ได้รับโทษทางวินัย ให้ออกจากราชการไว้ก่อน";
profile.dateLeave = dateLeave_;
@ -4886,7 +4886,7 @@ export class ProfileController extends Controller {
const _null: any = null;
profile.isLeave = requestBody.isLeave;
if (requestBody.isLeave == true) {
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id, "OFFICER");
}
if (requestBody.leaveReason != undefined && requestBody.leaveReason != null) {
profile.leaveReason = requestBody.leaveReason;

View file

@ -2760,7 +2760,7 @@ export class ProfileEmployeeController extends Controller {
profile.leaveReason = requestBody.leaveReason;
profile.dateLeave = requestBody.dateLeave;
if (requestBody.isLeave == true) {
await removeProfileInOrganize(profile.id);
await removeProfileInOrganize(profile.id,"EMPLOYEE");
}
await this.profileRepo.save(profile);