adapt readAllNotifications

This commit is contained in:
isUnknown 2025-01-15 15:09:58 +01:00
parent f2758679d5
commit f582bf847a

View file

@ -41,9 +41,13 @@ export const useUserStore = defineStore("user", () => {
} }
function readAllNotifications(notificationId) { function readAllNotifications(notificationId) {
user.value.notifications.forEach((notification) => { projects.value = projects.value.map((project) => ({
notification.isRead = true; ...project,
}); notifications: project.notifications.map((notification) => ({
...notification,
readby: [...new Set([...notification.readby, user.value.uuid])],
})),
}));
} }
function canEditComment(comment) { function canEditComment(comment) {