diff --git a/web/src/pages/Budgeting.vue b/web/src/pages/Budgeting.vue index a232588..9d8907d 100644 --- a/web/src/pages/Budgeting.vue +++ b/web/src/pages/Budgeting.vue @@ -18,16 +18,9 @@ const props = defineProps<{ const budgetsStore = useBudgetsStore(); const CurrentBudgetID = computed(() => budgetsStore.CurrentBudgetID); -const accountStore = useAccountStore(); -//const categoriesForMonth = accountStore.CategoriesForMonth; +const categoriesForMonth = useAccountStore().CategoriesForMonth; const Categories = computed(() => { - const yearMap = accountStore.Months.get(selected.value.Year); - const monthMap = yearMap?.get(selected.value.Month); - console.log("MTH", monthMap) - const CategoriesForMonth = [ ...monthMap?.values() || [] ]; - console.log("YAY?") - return CategoriesForMonth; - //return [...categoriesForMonth(selected.value.Year, selected.value.Month)]; + return [...categoriesForMonth(selected.value.Year, selected.value.Month)]; }); const previous = computed(() => ({ Year: new Date(selected.value.Year, selected.value.Month - 1, 1).getFullYear(), @@ -39,7 +32,7 @@ const current = computed(() => ({ })); const selected = computed(() => ({ Year: Number(props.year) ?? current.value.Year, - Month: Number(props.month ?? current.value.Month) + 1 + Month: Number(props.month ?? current.value.Month) })); const next = computed(() => ({ Year: new Date(selected.value.Year, Number(props.month) + 1, 1).getFullYear(), @@ -57,7 +50,7 @@ watchEffect(() => {