From 7fecbe57992ad7175c9d8f17a337e008041f92a3 Mon Sep 17 00:00:00 2001 From: Raizaaa <89463672+raizasafeel@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:51:32 +0530 Subject: [PATCH 1/2] fix: update notification count on sidebar after they are read --- frontend/src/pages/Notifications.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/pages/Notifications.vue b/frontend/src/pages/Notifications.vue index cc81c945..146cadf8 100644 --- a/frontend/src/pages/Notifications.vue +++ b/frontend/src/pages/Notifications.vue @@ -169,6 +169,7 @@ import { Button, createListResource, createResource, + getCachedResource, TabButtons, usePageMeta, } from 'frappe-ui' @@ -219,6 +220,10 @@ const readNotifications = createListResource({ cache: 'Read Notifications', }) +const refreshSidebarCount = () => { + getCachedResource('Unread Notifications Count')?.reload() +} + const markAsRead = createResource({ url: 'frappe.desk.doctype.notification_log.notification_log.mark_as_read', makeParams(values) { @@ -229,6 +234,7 @@ const markAsRead = createResource({ onSuccess(data) { unReadNotifications.reload() readNotifications.reload() + refreshSidebarCount() }, }) @@ -237,6 +243,7 @@ const markAllAsRead = createResource({ onSuccess(data) { unReadNotifications.reload() readNotifications.reload() + refreshSidebarCount() }, }) From 8cff1cf916104203a10351f0e9a7a1178d733458 Mon Sep 17 00:00:00 2001 From: Raizaaa <89463672+raizasafeel@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:53:38 +0530 Subject: [PATCH 2/2] fix: render notification count even after sidebar rebuilds --- frontend/src/components/Sidebar/AppSidebar.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/Sidebar/AppSidebar.vue b/frontend/src/components/Sidebar/AppSidebar.vue index 16bbd290..555fb857 100644 --- a/frontend/src/components/Sidebar/AppSidebar.vue +++ b/frontend/src/components/Sidebar/AppSidebar.vue @@ -673,6 +673,7 @@ watch(settingsStore.settings, () => { const updateSidebarLinks = () => { sidebarLinks.value = getSidebarLinks() updateSidebarLinksVisibility() + updateUnreadCount() } const redirectToWebsite = () => {