feat: get bank account meta summary

This commit is contained in:
Ahmed Bouhuolia
2024-07-02 19:21:26 +02:00
parent 8a09de9771
commit 91730d204e
22 changed files with 476 additions and 69 deletions

View File

@@ -32,11 +32,16 @@ export class GetUncategorizedTransactions {
};
const { results, pagination } =
await UncategorizedCashflowTransaction.query()
.where('accountId', accountId)
.where('categorized', false)
.modify('notExcluded')
.withGraphFetched('account')
.orderBy('date', 'DESC')
.onBuild((q) => {
q.where('accountId', accountId);
q.where('categorized', false);
q.modify('notExcluded');
q.withGraphFetched('account');
q.withGraphFetched('recognizedTransaction.assignAccount');
q.orderBy('date', 'DESC');
})
.pagination(_query.page - 1, _query.pageSize);
const data = await this.transformer.transform(