Move logic for hidden categories to client

This commit is contained in:
jacob1123 committed 2022-02-23 21:56:20 +00:00
1 parent 674bef667b
commit f93888cbbc
3 files changed
+34 -18

No files matched your search

+7 -1
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)