fix เมนูรักษาการแทน

This commit is contained in:
AdisakKanthawilang 2024-09-06 11:58:55 +07:00
parent 7c78545613
commit 25690f222e
2 changed files with 62 additions and 85 deletions

View file

@ -3321,18 +3321,7 @@ export class PositionController extends Controller {
isAll: boolean;
},
) {
// let _data = {
// root: null,
// child1: null,
// child2: null,
// child3: null,
// child4: null,
// }
// if (!request.user.role.includes("SUPER_ADMIN")) {
// _data = await new permission().PermissionOrgList(request, "SYS_ORG");
// }
await new permission().PermissionGet(request,"SYS_ACTING");
const posMasterMain = await this.posMasterRepository.findOne({
where: { id: body.posmasterId },
relations: ["posMasterActs"],
@ -3363,21 +3352,8 @@ export class PositionController extends Controller {
current_holderId: Not(IsNull()),
id: Not(In(posId)),
};
// console.log("ddddd",_data);
// typeCondition = {
// orgRoot: _data.root && _data.root[0] ? { id: In(_data.root) } : { id: IsNull() },
// orgChild1: _data.child1 && _data.child1[0] ? { id: In(_data.child1) } : { id: IsNull() },
// orgChild2: _data.child2 && _data.child2[0] ? { id: In(_data.child2) } : { id: IsNull() },
// orgChild3: _data.child3 && _data.child3[0] ? { id: In(_data.child3) } : { id: IsNull() },
// orgChild4: _data.child4 && _data.child4[0] ? { id: In(_data.child4) } : { id: IsNull() },
// current_holderId: Not(IsNull()),
// id: Not(In(posId)),
// };
}
// console.log("typeCondition>>>",typeCondition);
const posMaster = await this.posMasterRepository.find({
where: typeCondition,
relations: [