Notifications page : mark all as read working

This commit is contained in:
isUnknown 2024-11-18 13:45:40 +01:00
parent cdf663d4ca
commit 5c9f450539
7 changed files with 76 additions and 19 deletions

View file

@ -18,5 +18,11 @@ export const useUserStore = defineStore("user", () => {
});
}
return { user, notifications, readNotification };
function readAllNotifications(notificationId) {
user.value.notifications.forEach((notification) => {
notification.isRead = true;
});
}
return { user, notifications, readNotification, readAllNotifications };
});