@zeniai/client-epic-state 5.0.31-betaAR6 → 5.0.31-betaAR8
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.
- package/lib/entity/transaction/stateTypes/paymentType.d.ts +13 -0
- package/lib/entity/transaction/stateTypes/paymentType.js +27 -4
- package/lib/esm/entity/transaction/stateTypes/paymentType.js +23 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +11 -25
- package/lib/index.d.ts +2 -0
- package/lib/index.js +30 -25
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +11 -25
- package/package.json +1 -1
|
@@ -339,33 +339,19 @@ const getCategoryValueForTransaction = (key, transaction) => {
|
|
|
339
339
|
return undefined;
|
|
340
340
|
}
|
|
341
341
|
case 'payment_account_name': {
|
|
342
|
-
//
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
const firstLine = transaction.transaction.lines?.[0];
|
|
348
|
-
if (firstLine?.type === 'transaction_with_account_and_class_line' ||
|
|
349
|
-
firstLine?.type === 'transaction_with_product_or_service_line' ||
|
|
350
|
-
firstLine?.type === 'journal_entry_transaction_line') {
|
|
351
|
-
const accountLine = firstLine;
|
|
352
|
-
return accountLine.account?.accountName;
|
|
353
|
-
}
|
|
354
|
-
return undefined;
|
|
342
|
+
// Match the value the row renders: TransactionCategorizationListRow reads
|
|
343
|
+
// `currentTransaction?.account?.accountName` for the Payment Account Name
|
|
344
|
+
// column. Returning the same field here keeps filter-match parity with the
|
|
345
|
+
// visible cell, so any row a user can see is also a row the filter can match.
|
|
346
|
+
return transaction.transaction.account?.accountName;
|
|
355
347
|
}
|
|
356
348
|
case 'payment_account_type': {
|
|
357
|
-
//
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
firstLineForType?.type === 'transaction_with_product_or_service_line' ||
|
|
364
|
-
firstLineForType?.type === 'journal_entry_transaction_line') {
|
|
365
|
-
const accountLineForType = firstLineForType;
|
|
366
|
-
return accountLineForType.account?.accountType;
|
|
367
|
-
}
|
|
368
|
-
return undefined;
|
|
349
|
+
// Compare against the raw `paymentType` enum (e.g. "credit_card", "check",
|
|
350
|
+
// "cash"). The same enum is what TransactionCategorizationListRow uses for
|
|
351
|
+
// its icon switch on line ~1675, and it's what the dropdown options below
|
|
352
|
+
// emit as `value`. Display labels come from PAYMENT_TYPE_LABELS in
|
|
353
|
+
// entity/transaction/stateTypes/paymentType.ts.
|
|
354
|
+
return transaction.transaction.paymentType;
|
|
369
355
|
}
|
|
370
356
|
case 'category': {
|
|
371
357
|
// Get from transactionLocalData (preferred) or from transaction lines
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.31-
|
|
3
|
+
"version": "5.0.31-betaAR8",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|