Revert
This commit is contained in:
parent
0a030eaee1
commit
87a70ee5fa
@ -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(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>Budget for {{ selected.Month }}/{{ selected.Year }}</h1>
|
||||
<h1>Budget for {{ selected.Month + 1 }}/{{ selected.Year }}</h1>
|
||||
<div>
|
||||
<router-link
|
||||
:to="'/budget/' + CurrentBudgetID + '/budgeting/' + previous.Year + '/' + previous.Month"
|
||||
|
Loading…
x
Reference in New Issue
Block a user