Move logic for hidden categories to client

This commit is contained in:
2022-02-23 13:42:33 +00:00
parent 674bef667b
commit f93888cbbc
3 changed files with 34 additions and 18 deletions

View File

@ -58,7 +58,13 @@ export const useAccountStore = defineStore("budget/account", {
const yearMap = state.Months.get(year);
const monthMap = yearMap?.get(month);
console.log("MTH", monthMap)
return [...monthMap?.values() || []];
return [...monthMap?.values() || []].filter(x => x.Group != "Hidden Categories");
},
HiddenCategoriesForMonth: (state) => (year: number, month: number) => {
const yearMap = state.Months.get(year);
const monthMap = yearMap?.get(month);
console.log("MTH", monthMap)
return [...monthMap?.values() || []].filter(x => x.Group == "Hidden Categories");
},
CurrentAccount(state): Account | undefined {
if (state.CurrentAccountID == null)