Pass is_open to API from EditAccount
This commit is contained in:
parent
f26ee8f472
commit
a0cabbf4f7
@ -13,7 +13,7 @@ const accountOnBudget = ref(true);
|
|||||||
const accountOpen = ref(true);
|
const accountOpen = ref(true);
|
||||||
|
|
||||||
function editAccount(e : any) {
|
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) {
|
function openEditAccount(e : any) {
|
||||||
|
@ -124,8 +124,8 @@ export const useAccountStore = defineStore("budget/account", {
|
|||||||
return;
|
return;
|
||||||
this.addCategoriesForMonth(year, month, response.Categories);
|
this.addCategoriesForMonth(year, month, response.Categories);
|
||||||
},
|
},
|
||||||
async EditAccount(accountid: string, name: string, onBudget: boolean) {
|
async EditAccount(accountid: string, name: string, onBudget: boolean, isOpen: boolean) {
|
||||||
const result = await POST("/account/" + accountid, JSON.stringify({ name: name, onBudget: onBudget }));
|
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);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user