แก้ค้นหาคนครอง

This commit is contained in:
Kittapath 2024-03-19 12:24:29 +07:00
parent 6ba3236994
commit 9c7072c128
3 changed files with 9 additions and 4 deletions

View file

@ -379,8 +379,10 @@ export class ProfileEmployeeController extends Controller {
)
.andWhere(
new Brackets((qb) => {
qb.where("next_holders.id IS NULL").orWhere("next_holders.id NOT IN (:...ids)", {
ids: orgRevision.posMasters.map((x) => x.next_holderId),
qb.where("profile.id NOT IN (:...ids)", {
ids: orgRevision.posMasters
.filter((x) => x.next_holderId != null)
.map((x) => x.next_holderId),
});
}),
)