feat(v4): Update Inbox view card design (#10599)

This commit is contained in:
Sivin Varghese
2025-01-07 21:11:54 +05:30
committed by GitHub
parent 918f8e6f8e
commit 3c93cdb8b2
31 changed files with 618 additions and 615 deletions

View File

@@ -1,4 +1,5 @@
import { sortComparator } from './helpers';
import camelcaseKeys from 'camelcase-keys';
export const getters = {
getNotifications($state) {
@@ -11,6 +12,13 @@ export const getters = {
);
return sortedNotifications;
},
getFilteredNotificationsV4: $state => filters => {
const sortOrder = filters.sortOrder === 'desc' ? 'newest' : 'oldest';
const sortedNotifications = Object.values($state.records).sort((n1, n2) =>
sortComparator(n1, n2, sortOrder)
);
return camelcaseKeys(sortedNotifications, { deep: true });
},
getNotificationById: $state => id => {
return $state.records[id] || {};
},