create-categories #79

Open
jacob1123 wants to merge 31 commits from create-categories into master
2 changed files with 1 additions and 3 deletions
Showing only changes of commit 6a5bf419e2 - Show all commits

View File

@ -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(

View File

@ -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[] {