team invitation notification with broadcasting

This commit is contained in:
Čarodej
2022-03-10 16:23:13 +01:00
parent 64e80d387b
commit 9ae2d54a5e
50 changed files with 331 additions and 201 deletions

View File

@@ -180,6 +180,23 @@ const mutations = {
state.user.data.relationships.readNotifications.data = []
state.user.data.relationships.unreadNotifications.data = []
},
CLEAR_NOTIFICATION_ACTION_DATA(state, notificationId) {
if (state.user.data.relationships.readNotifications.data.length) {
state.user.data.relationships.readNotifications.data.map(notification => {
if (notification.data.id === notificationId) {
notification.data.attributes.action = undefined
}
})
}
if (state.user.data.relationships.unreadNotifications.data.length) {
state.user.data.relationships.unreadNotifications.data.map(notification => {
if (notification.data.id === notificationId) {
notification.data.attributes.action = undefined
}
})
}
},
}
const getters = {