Skip to content

Commit

Permalink
[HRIS - 446] - [BUGTASK]Notification Filter Reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Fontilllas committed Nov 19, 2024
1 parent a0fab50 commit d6371b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const NotificationItem: FC<Props> = ({ 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 {
Expand All @@ -64,7 +65,8 @@ const NotificationItem: FC<Props> = ({ 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()
}
}
}
Expand Down

0 comments on commit d6371b2

Please sign in to comment.