@zeniai/client-epic-state 5.2.85 → 5.2.86

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.
@@ -1,3 +1,4 @@
1
+ import { isCustomerTransaction, } from '../../../entity/transaction/stateTypes/customerTransaction';
1
2
  import { isVendorTransaction } from '../../../entity/transaction/stateTypes/vendorTransaction';
2
3
  import { isEntityMatching, mergeTransactionAndEntityRecommendationsWithCOT, toLineEntity, } from '../../transactionDetail/transactionDetailLocalDataHelper';
3
4
  import { isAccountUncategorized } from '../../transactionDetail/transactionDetailLocalDataHelper';
@@ -208,7 +209,10 @@ const buildLineItemById = (transaction, recommendations) => {
208
209
  logo: accountLine.vendor.logo,
209
210
  }
210
211
  : undefined;
211
- const customer = accountLine.customer;
212
+ const customer = accountLine.customer ??
213
+ (isCustomerTransaction(transaction) === true
214
+ ? transaction.customer
215
+ : undefined);
212
216
  record.customer =
213
217
  customer != null && Boolean(customer.id) && Boolean(customer.name)
214
218
  ? {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hasTransactionLocalDataChanges = exports.isAnyItemWithUncategorizedExpenseAccount = exports.getSnackbarMessageForTransactionReview = exports.mergeTabSpecificLineItems = exports.getLineItemsByTransactionIdsFromLocalData = exports.getLineItemsByTransactionsIdsFromResponse = exports.checkIfAllLineItemsAreCategoryClassFilled = exports.setEntityRecommendationForLineIdInLocalData = exports.toSetAllLineItemsToCategoryClass = exports.toTransactionDetailLocalData = exports.shouldAutoSelectAndAdd = exports.MAX_SELECTION_LIMIT = exports.filterAutoTabLineItems = exports.removeTransactionFromTabView = exports.getPendingReviewLineIdsFromTransaction = void 0;
4
+ const customerTransaction_1 = require("../../../entity/transaction/stateTypes/customerTransaction");
4
5
  const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
5
6
  const transactionDetailLocalDataHelper_1 = require("../../transactionDetail/transactionDetailLocalDataHelper");
6
7
  const transactionDetailLocalDataHelper_2 = require("../../transactionDetail/transactionDetailLocalDataHelper");
@@ -216,7 +217,10 @@ const buildLineItemById = (transaction, recommendations) => {
216
217
  logo: accountLine.vendor.logo,
217
218
  }
218
219
  : undefined;
219
- const customer = accountLine.customer;
220
+ const customer = accountLine.customer ??
221
+ ((0, customerTransaction_1.isCustomerTransaction)(transaction) === true
222
+ ? transaction.customer
223
+ : undefined);
220
224
  record.customer =
221
225
  customer != null && Boolean(customer.id) && Boolean(customer.name)
222
226
  ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.85",
3
+ "version": "5.2.86",
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",