fix คำสั่งให้โอนไม่ปลดตำแหน่ง

This commit is contained in:
Bright 2024-11-07 13:53:52 +07:00
parent 41c8b8263b
commit 3c651fe419

View file

@ -2170,6 +2170,7 @@ export class CommandController extends Controller {
refCommandNo: string | null;
templateDoc: string | null;
commandId?: string | null;
isLeave?: boolean;
}[];
},
) {
@ -2196,6 +2197,9 @@ export class CommandController extends Controller {
createdAt: new Date(),
lastUpdatedAt: new Date(),
};
if(item.isLeave != undefined && item.isLeave == true) {
await removeProfileInOrganize(profile.id, "OFFICER");
}
const clearProfile = await checkCommandType(String(item.commandId));
const _null: any = null;
if (clearProfile) {