diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 008d39b3a06dcc27fef1f9d20ea18e595054d277..7bfad512cb98ec185e6fb6b1dec95196d5ec9f61 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_. Unreleased ---------- +Fixed +~~~~~ + +* Notifications were not properly shown in the frontend. + `3.1.1` - 2023-07-01 -------------------- diff --git a/aleksis/core/frontend/components/notifications/NotificationList.vue b/aleksis/core/frontend/components/notifications/NotificationList.vue index 09b27197e5d62c5a5f15f7836d5b741925d21cc8..e48d9f2c203a2d2730af1a7208f3590667ede7bf 100644 --- a/aleksis/core/frontend/components/notifications/NotificationList.vue +++ b/aleksis/core/frontend/components/notifications/NotificationList.vue @@ -20,7 +20,7 @@ v-if=" myNotifications && myNotifications.person && - myNotifications.person.notifications.length > 0 + unreadNotifications.length > 0 " > mdi-bell-badge-outline @@ -38,7 +38,7 @@ v-if=" myNotifications.person && myNotifications.person.notifications && - unreadNotifications.length + myNotifications.person.notifications.length " > <v-subheader>{{ $t("notifications.notifications") }}</v-subheader> @@ -88,7 +88,9 @@ export default { }, computed: { unreadNotifications() { - return this.myNotifications.filter((n) => !n.read); + return this.myNotifications.person.notifications + ? this.myNotifications.person.notifications.filter((n) => !n.read) + : []; }, }, };