Add Getter for on/offbudget accounts and remove from backend

This commit is contained in:
2022-01-23 22:33:36 +00:00
parent 27298a9860
commit 0e3ece9830
3 changed files with 56 additions and 18 deletions

View File

@ -15,7 +15,13 @@ const budget = {
getters: {
Accounts(state) {
return state.Accounts || [];
}
},
OnBudgetAccounts(state) {
return (state.Accounts || []).filter(x => x.OnBudget);
},
OffBudgetAccounts(state) {
return (state.Accounts || []).filter(x => !x.OnBudget);
},
},
actions: {
fetchBudget ({state, commit, rootState}, budgetid) {