From 5207572da14a984ddb4408e1e0732177f77bc71b Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 28 Oct 2024 11:48:00 +0700 Subject: [PATCH] edit path 40 --- src/controllers/CommandController.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 4ef9ad24..8215ffdc 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -39,7 +39,7 @@ import { commandTypePath, removeProfileInOrganize, setLogDataDiff, - checkCommandType + checkCommandType, } from "../interfaces/utils"; import { Position } from "../entities/Position"; import { PosMaster } from "../entities/PosMaster"; @@ -1828,8 +1828,8 @@ export class CommandController extends Controller { await removeProfileInOrganize(profile.id, "OFFICER"); } const clearProfile = await checkCommandType(String(item.commandId)); - if(clearProfile) { - if(profile.keycloak != null) { + if (clearProfile) { + if (profile.keycloak != null) { const delUserKeycloak = await deleteUser(profile.keycloak); if (delUserKeycloak) profile.keycloak = _null; } @@ -1918,8 +1918,8 @@ export class CommandController extends Controller { await removeProfileInOrganize(profile.id, "EMPLOYEE"); } const clearProfile = await checkCommandType(String(item.commandId)); - if(clearProfile) { - if(profile.keycloak != null) { + if (clearProfile) { + if (profile.keycloak != null) { const delUserKeycloak = await deleteUser(profile.keycloak); if (delUserKeycloak) profile.keycloak = _null; } @@ -1983,15 +1983,15 @@ export class CommandController extends Controller { }; const clearProfile = await checkCommandType(String(item.commandId)); const _null: any = null; - if(clearProfile) { - if(profile.keycloak != null) { + if (clearProfile) { + if (profile.keycloak != null) { const delUserKeycloak = await deleteUser(profile.keycloak); if (delUserKeycloak) profile.keycloak = _null; } profile.position = _null; profile.posTypeId = _null; profile.posLevelId = _null; - await this.profileRepository.save(profile, {data: req}); + await this.profileRepository.save(profile, { data: req }); } Object.assign(data, { ...item, ...meta }); const history = new ProfileSalaryHistory(); @@ -2189,8 +2189,8 @@ export class CommandController extends Controller { await removeProfileInOrganize(profile.id, "OFFICER"); } const clearProfile = await checkCommandType(String(item.commandId)); - if(clearProfile) { - if(profile.keycloak != null) { + if (clearProfile) { + if (profile.keycloak != null) { const delUserKeycloak = await deleteUser(profile.keycloak); if (delUserKeycloak) profile.keycloak = _null; } @@ -2372,8 +2372,8 @@ export class CommandController extends Controller { }); const clearProfile = await checkCommandType(String(item.commandId)); const _null: any = null; - if(clearProfile) { - if(_profile.keycloak != null) { + if (clearProfile) { + if (_profile.keycloak != null) { const delUserKeycloak = await deleteUser(_profile.keycloak); if (delUserKeycloak) _profile.keycloak = _null; } @@ -2809,7 +2809,7 @@ export class CommandController extends Controller { await this.posMasterActRepository.save(data); return new HttpSuccess(); } - @Post("command40/officer/delete") + @Post("command40/officer/report/delete") public async command40SalaryOfficerDelete( @Request() req: RequestWithUser, @Body()