diff --git a/web/src/dialogs/EditAccount.vue b/web/src/dialogs/EditAccount.vue index e2b33b4..5c5aa53 100644 --- a/web/src/dialogs/EditAccount.vue +++ b/web/src/dialogs/EditAccount.vue @@ -13,7 +13,7 @@ const accountOnBudget = ref(true); const accountOpen = ref(true); function editAccount(e : any) { - accountStore.EditAccount(CurrentAccount.value?.ID ?? "", accountName.value, accountOnBudget.value); + accountStore.EditAccount(CurrentAccount.value?.ID ?? "", accountName.value, accountOnBudget.value, accountOpen.value); } function openEditAccount(e : any) { diff --git a/web/src/stores/budget-account.ts b/web/src/stores/budget-account.ts index bf440a2..c8e64d8 100644 --- a/web/src/stores/budget-account.ts +++ b/web/src/stores/budget-account.ts @@ -124,8 +124,8 @@ export const useAccountStore = defineStore("budget/account", { return; this.addCategoriesForMonth(year, month, response.Categories); }, - async EditAccount(accountid: string, name: string, onBudget: boolean) { - const result = await POST("/account/" + accountid, JSON.stringify({ name: name, onBudget: onBudget })); + async EditAccount(accountid: string, name: string, onBudget: boolean, isOpen: boolean) { + const result = await POST("/account/" + accountid, JSON.stringify({ name: name, onBudget: onBudget, isOpen: isOpen })); const response = await result.json(); useBudgetsStore().MergeBudgetingData(response); },