Add column and use instead of last transactions date
This commit is contained in:
@ -21,7 +21,12 @@ export interface Account {
|
||||
WorkingBalance: number
|
||||
ReconciledBalance: number
|
||||
Transactions: string[]
|
||||
LastReconciled: Date
|
||||
LastReconciled: NullDate
|
||||
}
|
||||
|
||||
interface NullDate {
|
||||
Valid: boolean
|
||||
Time: Date
|
||||
}
|
||||
|
||||
export interface Category {
|
||||
|
@ -58,7 +58,8 @@ export const useBudgetsStore = defineStore('budget', {
|
||||
for (const account of response.Accounts || []) {
|
||||
const existingAccount = accounts.Accounts.get(account.ID);
|
||||
account.Transactions = existingAccount?.Transactions ?? [];
|
||||
account.LastReconciled = new Date(account.LastReconciled);
|
||||
if(account.LastReconciled.Valid)
|
||||
account.LastReconciled.Time = new Date(account.LastReconciled.Time);
|
||||
accounts.Accounts.set(account.ID, account);
|
||||
}
|
||||
for (const category of response.Categories || []) {
|
||||
|
Reference in New Issue
Block a user