@zeniai/client-epic-state 4.10.40 → 4.10.41

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,5 +1,4 @@
1
1
  import { ID } from '../../commonStateTypes/common';
2
- import { Recommendation } from '../../commonStateTypes/recommendationBase';
3
2
  import { AccountBase } from '../../entity/account/accountState';
4
3
  import { ClassBase } from '../../entity/class/classState';
5
4
  import { Entity } from '../../entity/genericEntity/entity';
@@ -15,7 +14,7 @@ export declare const toSetAllLineItemsToCategoryClass: (transaction: SupportedTr
15
14
  } | undefined, chosenClass?: {
16
15
  classBase: ClassBase;
17
16
  updateOrRetain: 'update' | 'retain';
18
- } | undefined, recommendations?: Recommendation[] | undefined) => TransactionDetailLocalData;
17
+ } | undefined) => TransactionDetailLocalData;
19
18
  export declare const toSetAllLineItemsLocalDataIsUpdateAllChecked: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, isUpdateAll: boolean, entity?: Entity | undefined) => TransactionDetailLocalData;
20
19
  export declare const setEntityRecommendationForLineIdInLocalData: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, entity: Entity, recommendationLineIds: ID[], recommendationByLineId?: RecommendationByLineId | undefined, uncategorizedIncomeExpense?: UncategorizedAccounts | undefined) => TransactionDetailLocalData;
21
20
  export declare const removeEntityRecommendationForLineIdInLocalData: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, recommendationLineIds: ID[]) => TransactionDetailLocalData;
@@ -326,7 +326,7 @@ const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionDetailLo
326
326
  return newLocalData;
327
327
  };
328
328
  exports.toUpdateLineItemsOriginalCategoryClass = toUpdateLineItemsOriginalCategoryClass;
329
- const toSetAllLineItemsToCategoryClass = (transaction, transactionDetailLocalData, isUpdateAll, lineEntity, chosenAccount, chosenClass, recommendations) => {
329
+ const toSetAllLineItemsToCategoryClass = (transaction, transactionDetailLocalData, isUpdateAll, lineEntity, chosenAccount, chosenClass) => {
330
330
  const newLineItems = {};
331
331
  const updateAllLines = (0, vendorTransaction_1.isVendorTransaction)(transaction) === true ||
332
332
  (0, customerTransaction_1.isCustomerTransaction)(transaction) === true;
@@ -340,9 +340,6 @@ const toSetAllLineItemsToCategoryClass = (transaction, transactionDetailLocalDat
340
340
  const lineId = line.id;
341
341
  const record = Object.assign({}, transactionDetailLocalData.lineItemById[lineId]);
342
342
  if (updateAllLines === true || isEntityMatching(lineEntity, record)) {
343
- if (updateAllLines !== true) {
344
- record.recommendations = recommendations;
345
- }
346
343
  if ((chosenAccount === null || chosenAccount === void 0 ? void 0 : chosenAccount.account) != null) {
347
344
  record.account = chosenAccount === null || chosenAccount === void 0 ? void 0 : chosenAccount.account;
348
345
  }
@@ -230,7 +230,7 @@ const transactionDetail = (0, toolkit_1.createSlice)({
230
230
  const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
231
231
  const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
232
232
  if (detail != null) {
233
- const newLocalData = (0, transactionDetailLocalDataHelper_1.toSetAllLineItemsToCategoryClass)(action.payload.transaction, detail.transactionDetailLocalData, action.payload.isUpdateAll, action.payload.lineEntity, action.payload.chosenAccount, action.payload.chosenClass, action.payload.recommendations);
233
+ const newLocalData = (0, transactionDetailLocalDataHelper_1.toSetAllLineItemsToCategoryClass)(action.payload.transaction, detail.transactionDetailLocalData, action.payload.isUpdateAll, action.payload.lineEntity, action.payload.chosenAccount, action.payload.chosenClass);
234
234
  draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: newLocalData });
235
235
  }
236
236
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.40",
3
+ "version": "4.10.41",
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
  "types": "lib/index.d.ts",