diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index c6a5faac..d5d33b3b 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -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) {