Skip to content

Commit

Permalink
fix: correction in card filters logic (#2818)
Browse files Browse the repository at this point in the history
  • Loading branch information
suyashpatil78 authored Mar 11, 2024
1 parent 60ba154 commit 2c17cea
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/core/services/platform/v1/shared/expenses.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,8 @@ export class ExpensesService {
): Record<string, string | string[] | boolean> {
const newQueryParamsCopy = cloneDeep(newQueryParams);
if (filters.cardNumbers?.length > 0) {
let cardNumberString = '';
cardNumberString = filters.cardNumbers.join(',');
cardNumberString = cardNumberString.slice(0, cardNumberString.length);
newQueryParamsCopy['matched_corporate_card_transactions->0->corporate_card_number'] =
'in.(' + cardNumberString + ')';
const cardNumberString = filters.cardNumbers.map((cardNumber) => `"${cardNumber}"`).join(',');
newQueryParamsCopy['matched_corporate_card_transactions->0->corporate_card_number'] = `in.(${cardNumberString})`;
}

return newQueryParamsCopy;
Expand Down

0 comments on commit 2c17cea

Please sign in to comment.