2021-02-04 07:49:59 +00:00
|
|
|
export const getters = {
|
|
|
|
getTeams($state) {
|
|
|
|
return Object.values($state.records).sort((a, b) => a.id - b.id);
|
|
|
|
},
|
2021-02-13 09:28:05 +00:00
|
|
|
getMyTeams($state, $getters) {
|
|
|
|
return $getters.getTeams.filter(team => {
|
|
|
|
const { is_member: isMember } = team;
|
|
|
|
return isMember;
|
|
|
|
});
|
|
|
|
},
|
2021-02-04 07:49:59 +00:00
|
|
|
getUIFlags($state) {
|
|
|
|
return $state.uiFlags;
|
|
|
|
},
|
|
|
|
getTeam: $state => id => {
|
|
|
|
const team = $state.records[id];
|
|
|
|
return team || {};
|
|
|
|
},
|
|
|
|
};
|