feat: mark notifications as read when clicking action links in agent and user dashboards

This commit is contained in:
pradeepkumar committed 2026-04-12 15:17:58 +05:30
1 parent e97afd6202
commit dc18236bf0
2 files changed
+2

No files matched your search

@@ -245,6 +245,7 @@ export default function AgentNotificationsPage() {
{notification.actionUrl && ( {notification.actionUrl && (
<Link <Link
href={notification.actionUrl} href={notification.actionUrl}
onClick={() => { if (!notification.read) markAsRead(notification.id); }}
className="font-serif text-[13px] text-[#e58625] hover:text-[#d47720] transition-colors" className="font-serif text-[13px] text-[#e58625] hover:text-[#d47720] transition-colors"
> >
View details View details
@@ -237,6 +237,7 @@ export default function UserNotificationsPage() {
{notification.actionUrl && ( {notification.actionUrl && (
<Link <Link
href={notification.actionUrl} href={notification.actionUrl}
onClick={() => { if (!notification.read) markAsRead(notification.id); }}
className="font-serif text-[13px] text-[#e58625] hover:text-[#d47720] transition-colors" className="font-serif text-[13px] text-[#e58625] hover:text-[#d47720] transition-colors"
> >
View details View details