From 3b087b00320d5efded0f4b5f92981bcc86a24ac3 Mon Sep 17 00:00:00 2001 From: Bright Date: Thu, 20 Feb 2025 12:59:22 +0700 Subject: [PATCH] fix --- src/controllers/ProfileController.ts | 2 +- src/controllers/ProfileEmployeeController.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 4d83dd14..a9d160da 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -4795,7 +4795,7 @@ export class ProfileController extends Controller { isRetire != undefined && isRetire != null ? isRetire == false // ? `profile.dateLeave IS NULL` - ? `profile.isLeave IS FALSE ` + ? `profile.isLeave IS FALSE` : isRetire == true && retireType != undefined && retireType != null // ? `profile.dateLeave IS NOT NULL AND profile.leaveType = '${retireType}'` // : `profile.dateLeave IS NOT NULL` diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index df51bef8..0d39aea0 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -1839,10 +1839,10 @@ export class ProfileEmployeeController extends Controller { .andWhere( isRetire != undefined && isRetire != null ? isRetire == false - ? `profileEmployee.dateLeave IS NULL` + ? `profileEmployee.isLeave IS FALSE` : isRetire == true && retireType != undefined && retireType != null - ? `profileEmployee.dateLeave IS NOT NULL AND profileEmployee.leaveType = '${retireType}'` - : `profileEmployee.dateLeave IS NOT NULL` + ? `profileEmployee.isLeave IS TRUE AND profileEmployee.leaveType = '${retireType}'` + : `profileEmployee.isLeave IS TRUE` : "1=1", ) .andWhere("profileEmployee.employeeClass LIKE :type", {