Chatwoot/app/javascript/dashboard/store/modules/contacts/getters.js

19 lines
419 B
JavaScript
Raw Normal View History

export const getters = {
getContacts($state) {
return $state.sortOrder.map(contactId => $state.records[contactId]);
},
getUIFlags($state) {
return $state.uiFlags;
},
getContact: $state => id => {
const contact = $state.records[id];
return contact || {};
},
getMeta: $state => {
return $state.meta;
},
getAppliedContactFilters: _state => {
return _state.appliedFilters;
},
};