Remove unused account.Transactions
This commit is contained in:
parent
b55744aad7
commit
6a5bf419e2
@ -22,7 +22,6 @@ export interface Account {
|
||||
ClearedBalance: number;
|
||||
WorkingBalance: number;
|
||||
ReconciledBalance: number;
|
||||
Transactions: string[];
|
||||
LastReconciled: NullDate;
|
||||
}
|
||||
|
||||
@ -190,7 +189,6 @@ export const useAccountStore = defineStore("budget/account", {
|
||||
transactionsStore.AddTransactions(
|
||||
response.Transactions
|
||||
);
|
||||
account.Transactions = response.Transactions.map((x : Transaction) =>x.ID);
|
||||
},
|
||||
async FetchMonthBudget(budgetid: string, year: number, month: number) {
|
||||
const result = await GET(
|
||||
|
@ -52,7 +52,7 @@ export const useTransactionsStore = defineStore("budget/transactions", {
|
||||
const account = accountsStore.CurrentAccount;
|
||||
if(account === undefined)
|
||||
return undefined;
|
||||
const allTransactions = account!.Transactions.map(x => this.Transactions.get(x) ?? {} as Transaction);
|
||||
const allTransactions = [...this.Transactions.values()].filter(x => x.AccountID == account.ID);
|
||||
return groupBy(allTransactions, x => formatDate(x.Date));
|
||||
},
|
||||
TransactionsList(state) : Transaction[] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user