Chatwoot/app/javascript/dashboard/store/modules/contacts/getters.js
Nithin David Thomas f214c9c47c
feat: Add Contacts page (#1335)
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-10 15:25:26 +05:30

15 lines
309 B
JavaScript

export const getters = {
getContacts($state) {
return Object.values($state.records);
},
getUIFlags($state) {
return $state.uiFlags;
},
getContact: $state => id => {
const contact = $state.records[id];
return contact || {};
},
getMeta: $state => {
return $state.meta;
},
};