diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index f640b697..82d0ed8c 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -1740,10 +1740,13 @@ export class ProfileController extends Controller { }, }); if (!posMaster) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลการครองตำแหน่ง"); + posMaster.current_holderId = ""; // return new HttpSuccess({ data: [], total: 0 }); } else if ((posMaster?.current_holder?.posLevel?.posLevelAuthority ?? null) == "GOVERNOR") { return new HttpSuccess({ data: [], total: 0 }); } + console.log(posMaster); + console.log(posMaster.id); let condition: any = { orgRootId: posMaster.orgRootId, id: Not(posMaster.current_holderId || ""), @@ -1773,6 +1776,9 @@ export class ProfileController extends Controller { condition.isDirector = true; conditionNow.isDirector = true; } + console.log(condition); + console.log("------------------"); + console.log(conditionNow); if (body.isAct == true) { const [lists, total] = await AppDataSource.getRepository(viewDirectorActing) .createQueryBuilder("viewDirectorActing")