Delete transaction when amount is zero

This commit is contained in:
2022-02-25 22:33:58 +00:00
parent ae9e9d34c9
commit 05099e469f
4 changed files with 21 additions and 11 deletions

View File

@ -163,6 +163,11 @@ export const useAccountStore = defineStore("budget/account", {
const result = await POST("/transaction/new", payload);
const response = await result.json();
this.CurrentAccount?.Transactions.unshift(response);
},
async editTransaction(transactionid : string, payload: string) {
const result = await POST("/transaction/" + transactionid, payload);
const response = await result.json();
this.CurrentAccount?.Transactions.unshift(response);
}
}