From 7eb1471edb5b587c428ecfff470c6113de4cad05 Mon Sep 17 00:00:00 2001 From: Nicolas Drolet Date: Mon, 29 Dec 2025 08:56:22 -0500 Subject: [PATCH] fix(pay-periods): specify that is_approved can be null in controller, to not confuse false with null --- src/time-and-attendance/pay-period/pay-periods.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/time-and-attendance/pay-period/pay-periods.controller.ts b/src/time-and-attendance/pay-period/pay-periods.controller.ts index 8104c69..dfcde18 100644 --- a/src/time-and-attendance/pay-period/pay-periods.controller.ts +++ b/src/time-and-attendance/pay-period/pay-periods.controller.ts @@ -52,7 +52,7 @@ export class PayPeriodsController { ): Promise> { if (!email) return {success: false, error: 'EMAIL_REQUIRED'}; if (!timesheet_ids || timesheet_ids.length < 1) return {success: false, error: 'TIMESHEET_ID_REQUIRED'}; - if (!is_approved) return {success: false, error: 'APPROVAL_STATUS_REQUIRED'} + if (is_approved === null) return {success: false, error: 'APPROVAL_STATUS_REQUIRED'} return this.commandService.bulkApproveEmployee(email, timesheet_ids, is_approved); }