From 074bbe2d2f744c1f79e636971101d086aa613726 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 19 Mar 2024 15:36:46 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=84=E0=B9=89=E0=B8=99=E0=B8=AB=E0=B8=B2?= =?UTF-8?q?=E0=B8=9C=E0=B8=B1=E0=B8=87=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/SalaryEmployeeController.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/controllers/SalaryEmployeeController.ts b/src/controllers/SalaryEmployeeController.ts index c8a295a..141507a 100644 --- a/src/controllers/SalaryEmployeeController.ts +++ b/src/controllers/SalaryEmployeeController.ts @@ -216,18 +216,10 @@ export class SalaryEmployeeController extends Controller { @Query("pageSize") pageSize: number = 10, @Query("keyword") keyword?: string, ) { - let whereClause : any = {}; + let whereClause: any = {}; if (keyword != undefined && keyword !== "") { whereClause = { - where: [ - { name: Like(`%${keyword}%`) }, - { group: Like(`%${keyword}%`) }, - { isActive: Like(`%${keyword}%`) }, - { date: Like(`%${keyword}%`) }, - { startDate: Like(`%${keyword}%`) }, - { endDate: Like(`%${keyword}%`) }, - { details: Like(`%${keyword}%`) }, - ] + where: [{ name: Like(`%${keyword}%`) }, { group: Like(`%${keyword}%`) }], }; } const [salary, total] = await this.salaryEmployeeRepository.findAndCount({