Improve editing and creating of transactions
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
jacob1123 committed 2022-02-27 21:15:46 +00:00
1 parent faef975f1a
commit 4c6d21c2b4
7 files changed
+32 -22

No files matched your search

+3 -2
View File
@@ -206,12 +206,13 @@ export const useAccountStore = defineStore("budget/account", {
async saveTransaction(payload: string) {
const result = await POST("/transaction/new", payload);
const response = await result.json();
this.CurrentAccount?.Transactions.unshift(response);
this.AddTransaction(this.CurrentAccount!, response);
this.CurrentAccount?.Transactions.unshift(response.ID);
},
async editTransaction(transactionid: string, payload: string) {
const result = await POST("/transaction/" + transactionid, payload);
const response = await result.json();
this.CurrentAccount?.Transactions.unshift(response);
this.AddTransaction(this.CurrentAccount!, response);
}
}