change notifications structure from object to array
This commit is contained in:
parent
0d25794b87
commit
20824983a6
8 changed files with 64 additions and 50 deletions
|
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<router-link
|
||||
v-if="currentTab === 'all' || !notification.isRead"
|
||||
:to="notification.page.uri + '?fileUuid=' + notification.file.uuid"
|
||||
:to="notification.page.uri + '?notificationId=' + notification.id"
|
||||
>
|
||||
<article
|
||||
class="notification | bg-white rounded-lg | p-16 | flow"
|
||||
|
|
@ -136,13 +136,7 @@ const tabs = computed(() => {
|
|||
});
|
||||
|
||||
const sortedNotifications = computed(() => {
|
||||
const allNotifications = [
|
||||
...Object.values(notifications.value.comments || {}),
|
||||
...Object.values(notifications.value.content || {}),
|
||||
...Object.values(notifications.value.meetings || {}),
|
||||
];
|
||||
|
||||
const sortedNotifications = allNotifications.sort((a, b) => {
|
||||
const sortedNotifications = notifications.value.sort((a, b) => {
|
||||
dayjs(b.date).diff(dayjs(a.date));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue