feat: Add inbox view under feature flag on the sidebar (#9049)
Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -11,6 +11,9 @@ export const getters = {
|
||||
);
|
||||
return sortedNotifications;
|
||||
},
|
||||
getNotificationById: $state => id => {
|
||||
return $state.records[id] || {};
|
||||
},
|
||||
getUIFlags($state) {
|
||||
return $state.uiFlags;
|
||||
},
|
||||
|
||||
@@ -44,6 +44,16 @@ describe('#getters', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('getNotificationById', () => {
|
||||
const state = {
|
||||
records: {
|
||||
1: { id: 1 },
|
||||
},
|
||||
};
|
||||
expect(getters.getNotificationById(state)(1)).toEqual({ id: 1 });
|
||||
expect(getters.getNotificationById(state)(2)).toEqual({});
|
||||
});
|
||||
|
||||
it('getUIFlags', () => {
|
||||
const state = {
|
||||
uiFlags: {
|
||||
|
||||
Reference in New Issue
Block a user