From e6f285ad3a62666ace9b3f469061a6133ad5fe78 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Wed, 7 May 2025 13:31:07 +0700 Subject: [PATCH] filter pos emp --- src/controllers/EmployeeTempPositionController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controllers/EmployeeTempPositionController.ts b/src/controllers/EmployeeTempPositionController.ts index 3ede0b3e..a7f875a1 100644 --- a/src/controllers/EmployeeTempPositionController.ts +++ b/src/controllers/EmployeeTempPositionController.ts @@ -248,7 +248,7 @@ export class EmployeeTempPositionController extends Controller { switch (type) { case "positionName": findData = await this.employeePosDictRepository.find({ - where: { posDictName: Like(`%${keyword}%`) }, + where: { posDictName: Like(`%${keyword}%`), posLevel: { posLevelName: 1 } }, relations: ["posType", "posLevel"], order: { posDictName: "ASC", @@ -271,7 +271,7 @@ export class EmployeeTempPositionController extends Controller { select: ["id"], }); findData = await this.employeePosDictRepository.find({ - where: { posTypeId: In(findEmpTypes.map((x) => x.id)) }, + where: { posTypeId: In(findEmpTypes.map((x) => x.id)), posLevel: { posLevelName: 1 } }, relations: ["posType", "posLevel"], order: { posDictName: "ASC", @@ -340,6 +340,7 @@ export class EmployeeTempPositionController extends Controller { default: findData = await this.employeePosDictRepository.find({ + where: { posLevel: { posLevelName: 1 } }, relations: ["posType", "posLevel"], order: { posDictName: "ASC",