#2345
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m14s

This commit is contained in:
Adisak 2026-03-09 14:44:38 +07:00
parent 91887ec63d
commit 060ac81532
4 changed files with 201 additions and 123 deletions

View file

@ -43,6 +43,7 @@ import permission from "../interfaces/permission";
import { setLogDataDiff } from "../interfaces/utils";
import { CreatePosMasterHistoryEmployeeTemp } from "../services/PositionService";
import { PosMasterEmployeeTempHistory } from "../entities/PosMasterEmployeeTempHistory";
import { KeycloakAttributeService } from "../services/KeycloakAttributeService";
@Route("api/v1/org/employee-temp/pos")
@Tags("Employee")
@Security("bearerAuth")
@ -65,6 +66,7 @@ export class EmployeeTempPositionController extends Controller {
private child3Repository = AppDataSource.getRepository(OrgChild3);
private child4Repository = AppDataSource.getRepository(OrgChild4);
private authRoleRepo = AppDataSource.getRepository(AuthRole);
private keycloakAttributeService = new KeycloakAttributeService();
/**
* API
@ -2141,6 +2143,13 @@ export class EmployeeTempPositionController extends Controller {
// }
// }
if (dataMaster.current_holderId) {
await this.keycloakAttributeService.clearOrgDnaAttributes(
[dataMaster.current_holderId],
"PROFILE_EMPLOYEE",
);
}
await this.employeeTempPosMasterRepository.update(id, {
isSit: false,
next_holderId: null,