Implement closing of accounts #36

Merged
jacob1123 merged 11 commits from closed-accounts into master 2022-03-02 22:54:02 +01:00
Showing only changes of commit c7a8adb3ab - Show all commits

View File

@ -128,6 +128,10 @@ export const useAccountStore = defineStore("budget/account", {
const result = await POST("/account/" + accountid, JSON.stringify({ name: name, onBudget: onBudget, isOpen: isOpen })); const result = await POST("/account/" + accountid, JSON.stringify({ name: name, onBudget: onBudget, isOpen: isOpen }));
const response = await result.json(); const response = await result.json();
useBudgetsStore().MergeBudgetingData(response); useBudgetsStore().MergeBudgetingData(response);
if(!isOpen) {
this.Accounts.delete(accountid);
}
}, },
addCategoriesForMonth(year: number, month: number, categories: Category[]): void { addCategoriesForMonth(year: number, month: number, categories: Category[]): void {
this.$patch((state) => { this.$patch((state) => {