This commit is contained in:
parent
91887ec63d
commit
060ac81532
4 changed files with 201 additions and 123 deletions
|
|
@ -44,6 +44,7 @@ import { Assign } from "../entities/Assign";
|
|||
import { ProfileEmployee } from "../entities/ProfileEmployee";
|
||||
import { PosMasterHistory } from "../entities/PosMasterHistory";
|
||||
import { CreatePosMasterHistoryOfficer } from "../services/PositionService";
|
||||
import { KeycloakAttributeService } from "../services/KeycloakAttributeService";
|
||||
@Route("api/v1/org/pos")
|
||||
@Tags("Position")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -73,6 +74,7 @@ export class PositionController extends Controller {
|
|||
private authRoleRepo = AppDataSource.getRepository(AuthRole);
|
||||
private posMasterAssignRepo = AppDataSource.getRepository(PosMasterAssign);
|
||||
private assignRepo = AppDataSource.getRepository(Assign);
|
||||
private keycloakAttributeService = new KeycloakAttributeService();
|
||||
|
||||
/**
|
||||
* API เพิ่มตำแหน่ง
|
||||
|
|
@ -3868,6 +3870,13 @@ export class PositionController extends Controller {
|
|||
await CreatePosMasterHistoryOfficer(dataMaster.id, request, "DELETE");
|
||||
}
|
||||
|
||||
if (dataMaster.current_holderId) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[dataMaster.current_holderId],
|
||||
"PROFILE",
|
||||
);
|
||||
}
|
||||
|
||||
let _profileId: string = "";
|
||||
if (dataMaster?.current_holderId) {
|
||||
_profileId = dataMaster?.current_holderId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue