Remove closed account from sidebar
This commit is contained in:
parent
29f534bf10
commit
c7a8adb3ab
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user