From d6371b2907a06e3fbf12f2dfbd1f05153f94891b Mon Sep 17 00:00:00 2001 From: John Russel Fontillas Date: Tue, 19 Nov 2024 16:33:45 +0800 Subject: [PATCH] [HRIS - 446] - [BUGTASK]Notification Filter Reset --- .../molecules/NotificationList/NotificationItem.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/molecules/NotificationList/NotificationItem.tsx b/client/src/components/molecules/NotificationList/NotificationItem.tsx index 759ad501..66b19c4f 100644 --- a/client/src/components/molecules/NotificationList/NotificationItem.tsx +++ b/client/src/components/molecules/NotificationList/NotificationItem.tsx @@ -50,6 +50,7 @@ const NotificationItem: FC = ({ table, isLoading }): JSX.Element => { const handleViewDetails = (row: INotification): void => { const { startDate, endDate, specificType, id } = row const isSummary = specificType === SpecificType.SUMMARY + if (isSummary) { void router.push(`/overtime-management?startDate=${startDate}&endDate=${endDate}`) } else { @@ -64,7 +65,8 @@ const NotificationItem: FC = ({ table, isLoading }): JSX.Element => { // eslint-disable-next-line @typescript-eslint/promise-function-async onSuccess: () => { if (!row.isRead || row.readAt == null) { - void refetch() + row.isRead = true + row.readAt = new Date().toISOString() } } }