create user keycloak เมื่อกลับเข้ารับราชการ
This commit is contained in:
parent
1b3f42fd85
commit
08706f57ed
2 changed files with 39 additions and 0 deletions
|
|
@ -175,6 +175,20 @@ export async function removeProfileInOrganize(profileId: string, type: string) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function checkReturnCommandType(commandId: string) {
|
||||
const commandRepository = AppDataSource.getRepository(Command);
|
||||
const _type = await commandRepository.findOne({
|
||||
where: {
|
||||
id: commandId
|
||||
},
|
||||
relations: ["commandType"],
|
||||
});
|
||||
if (!["C-PM-08", "C-PM-09"].includes(String(_type?.commandType.code))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export async function checkExceptCommandType(commandId: string) {
|
||||
const commandRepository = AppDataSource.getRepository(Command);
|
||||
const _type = await commandRepository.findOne({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue