@zeniai/client-epic-state 5.0.31-betaAR6 → 5.0.31-betaAR7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -332,33 +332,22 @@ const getCategoryValueForTransaction = (key, transaction) => {
332
332
  return undefined;
333
333
  }
334
334
  case 'payment_account_name': {
335
- // Get from transaction.account or from lines
336
- if (transaction.transaction.account?.accountName) {
337
- return transaction.transaction.account.accountName;
338
- }
339
- // Get from first line's account
340
- const firstLine = transaction.transaction.lines?.[0];
341
- if (firstLine?.type === 'transaction_with_account_and_class_line' ||
342
- firstLine?.type === 'transaction_with_product_or_service_line' ||
343
- firstLine?.type === 'journal_entry_transaction_line') {
344
- const accountLine = firstLine;
345
- return accountLine.account?.accountName;
346
- }
347
- return undefined;
335
+ // Match the value the row renders: TransactionCategorizationListRow reads
336
+ // `currentTransaction?.account?.accountName` for the Payment Account Name
337
+ // column. Returning the same field here keeps filter-match parity with the
338
+ // visible cell, so any row a user can see is also a row the filter can match.
339
+ return transaction.transaction.account?.accountName;
348
340
  }
349
341
  case 'payment_account_type': {
350
- // Similar to payment_account_name but for type
351
- if (transaction.transaction.account?.accountType) {
352
- return transaction.transaction.account.accountType;
353
- }
354
- const firstLineForType = transaction.transaction.lines?.[0];
355
- if (firstLineForType?.type === 'transaction_with_account_and_class_line' ||
356
- firstLineForType?.type === 'transaction_with_product_or_service_line' ||
357
- firstLineForType?.type === 'journal_entry_transaction_line') {
358
- const accountLineForType = firstLineForType;
359
- return accountLineForType.account?.accountType;
360
- }
361
- return undefined;
342
+ // Match the value the row renders: TransactionCategorizationListRow reads
343
+ // `currentTransaction?.paymentTypeName` for the Payment Type column
344
+ // (e.g. "Credit Card", "Check"). NOTE: the Payment Account Type filter
345
+ // dropdown options are currently derived from raw `account.accountType`
346
+ // values (e.g. "credit_card", "bank") in
347
+ // `ExpenseAutomationPage.filterOptions`. With this matcher change, the
348
+ // dropdown options must be aligned to also emit `paymentTypeName` values,
349
+ // otherwise the filter will silently match nothing.
350
+ return transaction.transaction.paymentTypeName;
362
351
  }
363
352
  case 'category': {
364
353
  // Get from transactionLocalData (preferred) or from transaction lines