diff --git a/src/stores/notification/index.js b/src/stores/notification/index.js
index 306946bb..a61104ac 100644
--- a/src/stores/notification/index.js
+++ b/src/stores/notification/index.js
@@ -478,6 +478,20 @@ export const useNotificationStore = defineStore('Notification', () => {
processSeeQueue();
}
+ /**
+ *
+ */
+ function markAllAsSeen() {
+ const unseenIds = [...unseenNotifications.value];
+ for (const id of unseenIds) {
+ const ref = notificationTable.value.data.find((n) => n.id === id);
+ const version = ref?.version || 1;
+ queueMarkAsSeen(id, version);
+ }
+ unseenNotifications.value = [];
+ uiStore.removeNotify('notification');
+ }
+
/**
*
* @param args
@@ -1459,6 +1473,7 @@ export const useNotificationStore = defineStore('Notification', () => {
getNotificationCategory,
isNotificationExpired,
openNotificationLink,
- queueMarkAsSeen
+ queueMarkAsSeen,
+ markAllAsSeen
};
});
diff --git a/src/views/Sidebar/Sidebar.vue b/src/views/Sidebar/Sidebar.vue
index 101fbb29..52a32a49 100644
--- a/src/views/Sidebar/Sidebar.vue
+++ b/src/views/Sidebar/Sidebar.vue
@@ -26,18 +26,27 @@
-
-
-
+
+
+
+
+
+
+
+
+ {{ t('nav_menu.mark_all_read') }}
+
+
+