Skip to content

Commit

Permalink
fix: principal recipient sub type filter
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Oct 29, 2024
1 parent 5c5210e commit fa978c4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/utils/filtering/financialIndicators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ export function filterFinancialIndicators(
}(${principalRecipients.join(filtering.multi_param_separator)})`;
}

const principalRecipientSubTypes = _.filter(
_.get(params, 'principalRecipientSubTypes', '').split(','),
(o: string) => o.length > 0,
).map(
(principalRecipientSubType: string) => `'${principalRecipientSubType}'`,
);
if (principalRecipientSubTypes.length > 0) {
str += `${str.length > 0 ? ' AND ' : ''}${
MAPPING.principalRecipientSubType
}${filtering.in}(${principalRecipientSubTypes.join(
filtering.multi_param_separator,
)})`;
}

const principalRecipientTypes = _.filter(
_.get(params, 'principalRecipientTypes', '').split(','),
(o: string) => o.length > 0,
Expand Down

0 comments on commit fa978c4

Please sign in to comment.