-
- {{ label }}
-
+
+
+ {{ label }}
+
+
+ {{ count }}
+
+
{
const markNotificationAsRead = async notificationItem => {
useTrack(INBOX_EVENTS.MARK_NOTIFICATION_AS_READ);
- const {
- id,
- primary_actor_id: primaryActorId,
- primary_actor_type: primaryActorType,
- } = notificationItem;
-
+ const { id, primaryActorId, primaryActorType } = notificationItem;
try {
await store.dispatch('notifications/read', {
id,
diff --git a/app/javascript/dashboard/store/modules/notifications/getters.js b/app/javascript/dashboard/store/modules/notifications/getters.js
index 4f4cafc9a..8af1d0360 100644
--- a/app/javascript/dashboard/store/modules/notifications/getters.js
+++ b/app/javascript/dashboard/store/modules/notifications/getters.js
@@ -38,4 +38,7 @@ export const getters = {
getHasUnreadNotifications: $state => {
return $state.meta.unreadCount > 0;
},
+ getUnreadCount: $state => {
+ return $state.meta.unreadCount;
+ },
};