chore: Sets up store for teams settings page (#1727)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
c61edff189
commit
6a614a520b
12
app/javascript/dashboard/store/modules/teams/getters.js
Normal file
12
app/javascript/dashboard/store/modules/teams/getters.js
Normal file
@@ -0,0 +1,12 @@
|
||||
export const getters = {
|
||||
getTeams($state) {
|
||||
return Object.values($state.records).sort((a, b) => a.id - b.id);
|
||||
},
|
||||
getUIFlags($state) {
|
||||
return $state.uiFlags;
|
||||
},
|
||||
getTeam: $state => id => {
|
||||
const team = $state.records[id];
|
||||
return team || {};
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user