From 31c470de076076d9fb62fd4a0d8c19d4349f5709 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 15 Jul 2022 11:35:29 +0200 Subject: [PATCH] change(ui) - reload alert count on ignore --- frontend/app/mstore/notificationStore.ts | 2 ++ frontend/app/services/UserService.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/mstore/notificationStore.ts b/frontend/app/mstore/notificationStore.ts index e2e4fbe5e..13124ca62 100644 --- a/frontend/app/mstore/notificationStore.ts +++ b/frontend/app/mstore/notificationStore.ts @@ -44,6 +44,7 @@ export default class NotificationStore { notification.viewed = true; return notification; }); + this.fetchNotificationsCount(); resolve(response); }).catch((error: any) => { reject(error); @@ -63,6 +64,7 @@ export default class NotificationStore { } return notification; }); + this.fetchNotificationsCount(); resolve(response); }).catch((error: any) => { reject(error); diff --git a/frontend/app/services/UserService.ts b/frontend/app/services/UserService.ts index 5ab27bd30..7a515d910 100644 --- a/frontend/app/services/UserService.ts +++ b/frontend/app/services/UserService.ts @@ -74,7 +74,7 @@ export default class UserService { .then((response: { data: any; }) => response.data || {}); } - ignoreNotification(notificationId: string) { + ignoreNotification(notificationId: number) { return this.client.get(`/notifications/${notificationId}/view`) .then((response: { json: () => any; }) => response.json()) .then((response: { data: any; }) => response.data || {});