[Fix] กรณีพ้นราชการแก้ไขเป็นไม่ต้อง clear ฟิลด์ keycloak #228
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m7s

This commit is contained in:
harid 2026-04-01 17:50:38 +07:00
parent dc31ec0d7d
commit d553c1406c
5 changed files with 48 additions and 31 deletions

View file

@ -5560,9 +5560,9 @@ export class ProfileEmployeeController extends Controller {
}
/**
* API
* API
*
* @summary (ADMIN)
* @summary (ADMIN)
*
* @param {string} id Id
*/
@ -5687,7 +5687,8 @@ export class ProfileEmployeeController extends Controller {
if (profile.keycloak != null) {
const delUserKeycloak = await deleteUser(profile.keycloak);
if (delUserKeycloak) {
profile.keycloak = _null;
// Task #228
// profile.keycloak = _null;
profile.roleKeycloaks = [];
profile.isActive = false;
}
@ -6161,7 +6162,7 @@ export class ProfileEmployeeController extends Controller {
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.where("profile.keycloak IS NULL")
.where("profile.isActive = :isActive", { isActive: false })
.andWhere(
new Brackets((qb) => {
qb.orWhere(body.keyword ? queryLike : "1=1", { keyword: `%${body.keyword}%` });