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

This commit is contained in:
pradeepkumar
2026-04-12 15:17:58 +05:30
parent e97afd6202
commit dc18236bf0
2 changed files with 2 additions and 0 deletions

View File

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

View File

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