no message

This commit is contained in:
kittapath 2025-01-28 11:48:29 +07:00
parent a27dbaf3aa
commit 9b17b2c018

View file

@ -1681,7 +1681,7 @@ export class ProfileController extends Controller {
relations: ["current_holder", "current_holder.posLevel"],
});
if (!posMaster) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลการครองตำแหน่ง");
if (posMaster?.current_holder?.posLevel?.posLevelAuthority ?? null == "DEPUTY") {
if ((posMaster?.current_holder?.posLevel?.posLevelAuthority ?? null) == "DEPUTY") {
posMaster = await this.posMasterRepo.findOne({
where: {
orgRoot: { isDeputy: true },
@ -1690,7 +1690,7 @@ export class ProfileController extends Controller {
},
});
return new HttpSuccess({ data: [], total: 0 });
} else if (posMaster?.current_holder?.posLevel?.posLevelAuthority ?? null == "GOVERNOR") {
} else if ((posMaster?.current_holder?.posLevel?.posLevelAuthority ?? null) == "GOVERNOR") {
return new HttpSuccess({ data: [], total: 0 });
}
let condition: any = {
@ -1722,6 +1722,8 @@ export class ProfileController extends Controller {
condition.isDirector = true;
conditionNow.isDirector = true;
}
console.log(condition);
console.log(conditionNow);
if (body.isAct == true) {
const [lists, total] = await AppDataSource.getRepository(viewDirectorActing)
.createQueryBuilder("viewDirectorActing")