From 269f4f05d6a767f76bd93394510274b6364fcfe2 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Tue, 23 Sep 2025 01:41:14 +0800 Subject: [PATCH] update checkbox and target date for online payment --- src/pages/GFMIS/TransactionDataGrid.js | 10 ++++++++-- src/utils/Utils.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pages/GFMIS/TransactionDataGrid.js b/src/pages/GFMIS/TransactionDataGrid.js index 74ba17e..8a91666 100644 --- a/src/pages/GFMIS/TransactionDataGrid.js +++ b/src/pages/GFMIS/TransactionDataGrid.js @@ -96,7 +96,7 @@ export default function SearchPaymentTable({ searchCriteria, applyGridOnReady, a
{ - onSelectionChange?.(responseData.records.map(r => r.id)); + const newIds = responseData.records.map(r => r.id); + if (selectedIds.length === 0) { + onSelectionChange(newIds); + } else { + const stillValid = selectedIds.filter(id => newIds.includes(id)); + onSelectionChange(stillValid); + } } }), [_searchCriteria])} /> diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 9f7e467..c142f49 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -194,7 +194,7 @@ export const isPasswordExpiry = () =>{ } export const checkIsOnlyOnlinePaymentByIssueDate = (date) => { - const targetDate = new Date(2025, 7, 1, 0, 0, 0) //2026-01-28T08:00:00.000Z hardcode + const targetDate = new Date(2026, 1, 6, 0, 0, 0); // 6 Feb 2026, 00:00:00 // const targetDate = new Date(2025, 6, 13, 8, 0, 0); //2025-07-13T08:00:00.000Z const checkDate = DateUtils.convertToDate(date) if (isDummyLoggedIn()){