create-categories #79
@ -22,7 +22,6 @@ export interface Account {
|
|||||||
ClearedBalance: number;
|
ClearedBalance: number;
|
||||||
WorkingBalance: number;
|
WorkingBalance: number;
|
||||||
ReconciledBalance: number;
|
ReconciledBalance: number;
|
||||||
Transactions: string[];
|
|
||||||
LastReconciled: NullDate;
|
LastReconciled: NullDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +189,6 @@ export const useAccountStore = defineStore("budget/account", {
|
|||||||
transactionsStore.AddTransactions(
|
transactionsStore.AddTransactions(
|
||||||
response.Transactions
|
response.Transactions
|
||||||
);
|
);
|
||||||
account.Transactions = response.Transactions.map((x : Transaction) =>x.ID);
|
|
||||||
},
|
},
|
||||||
async FetchMonthBudget(budgetid: string, year: number, month: number) {
|
async FetchMonthBudget(budgetid: string, year: number, month: number) {
|
||||||
const result = await GET(
|
const result = await GET(
|
||||||
|
@ -52,7 +52,7 @@ export const useTransactionsStore = defineStore("budget/transactions", {
|
|||||||
const account = accountsStore.CurrentAccount;
|
const account = accountsStore.CurrentAccount;
|
||||||
if(account === undefined)
|
if(account === undefined)
|
||||||
return 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));
|
return groupBy(allTransactions, x => formatDate(x.Date));
|
||||||
},
|
},
|
||||||
TransactionsList(state) : Transaction[] {
|
TransactionsList(state) : Transaction[] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user