From b70f447174c1e05f5eb78ebb019340da958339e2 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Fri, 19 Apr 2024 16:18:24 +0700 Subject: [PATCH] fix unkwons field Projectname --- src/controllers/KpiPlanController.ts | 3 --- src/controllers/KpiRoleController.ts | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/controllers/KpiPlanController.ts b/src/controllers/KpiPlanController.ts index d7ea759..d863b2b 100644 --- a/src/controllers/KpiPlanController.ts +++ b/src/controllers/KpiPlanController.ts @@ -275,9 +275,6 @@ export class kpiPlanController extends Controller { round: `${round?.trim().toUpperCase()}`, }, ) - .andWhere(keyword != undefined ? "kpiPlan.projectName LIKE :keyword" : "1=1", { - keyword: `%${keyword}%`, - }) .select([ "kpiPlan.id", "kpiPlan.year", diff --git a/src/controllers/KpiRoleController.ts b/src/controllers/KpiRoleController.ts index 84bfbaf..25703ff 100644 --- a/src/controllers/KpiRoleController.ts +++ b/src/controllers/KpiRoleController.ts @@ -220,10 +220,7 @@ export class kpiRoleController extends Controller { round: `${round?.trim().toUpperCase()}`, }, ) - .andWhere(keyword != undefined ? "kpiRole.projectName LIKE :keyword" : "1=1", { - keyword: `%${keyword}%`, - }) - .andWhere(position != undefined ? "kpiRole.projectName LIKE :position" : "1=1", { + .andWhere(position != undefined ? "kpiRole.position LIKE :position" : "1=1", { position: `%${position}%`, }) .select([