adapt readAllNotifications
This commit is contained in:
parent
f2758679d5
commit
f582bf847a
1 changed files with 7 additions and 3 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue