fix: Bank rules conditions column

This commit is contained in:
Ahmed Bouhuolia
2024-07-01 10:48:11 +02:00
parent 5bbcb7913d
commit da0fab9a58
4 changed files with 84 additions and 13 deletions

View File

@@ -13,14 +13,16 @@ export class GetBankRulesService {
/**
* Retrieves the bank rules of the given account.
* @param {number} tenantId
* @param {number} accountId
* @param {number} tenantId
* @param {number} accountId
* @returns {Promise<any>}
*/
public async getBankRules(tenantId: number): Promise<any> {
const { BankRule } = this.tenancy.models(tenantId);
const bankRule = await BankRule.query();
const bankRule = await BankRule.query()
.withGraphFetched('conditions')
.withGraphFetched('assignAccount');
return this.transformer.transform(
tenantId,