@zeniai/client-epic-state 4.15.36 → 4.15.37

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.
Files changed (178) hide show
  1. package/lib/commonPayloadTypes/recommendationPayload.d.ts +0 -1
  2. package/lib/commonStateTypes/timePeriod.d.ts +1 -1
  3. package/lib/commonStateTypes/timePeriod.js +2 -2
  4. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +1 -1
  5. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  6. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
  7. package/lib/configureStore.js +1 -2
  8. package/lib/entity/account/accountState.d.ts +1 -1
  9. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  10. package/lib/entity/class/classReducer.d.ts +4 -4
  11. package/lib/entity/class/classState.d.ts +1 -1
  12. package/lib/entity/company/companyReducer.js +1 -0
  13. package/lib/entity/customer/customerPayload.d.ts +1 -1
  14. package/lib/entity/customer/customerPayload.js +6 -16
  15. package/lib/entity/forecast/forecastState.d.ts +1 -1
  16. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  17. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  18. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  19. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  20. package/lib/entity/snackbar/snackbarTypes.js +0 -4
  21. package/lib/entity/task/taskState.d.ts +1 -1
  22. package/lib/entity/tenant/clearAllEpic.d.ts +2 -4
  23. package/lib/entity/tenant/clearAllEpic.js +0 -4
  24. package/lib/entity/tenant/tenantReducer.js +1 -0
  25. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
  26. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +2 -1
  27. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -2
  28. package/lib/entity/transaction/payloadTypes/transactionPayload.js +6 -9
  29. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +1 -9
  30. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -23
  31. package/lib/entity/transaction/stateTypes/transaction.d.ts +1 -3
  32. package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
  33. package/lib/entity/transaction/stateTypes/transactionType.js +1 -1
  34. package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +0 -5
  35. package/lib/entity/transaction/stateTypes/vendorTransaction.js +1 -5
  36. package/lib/entity/transaction/toSupportedTransaction.js +1 -6
  37. package/lib/entity/transaction/transactionReducer.d.ts +0 -17
  38. package/lib/entity/transaction/transactionReducer.js +2 -47
  39. package/lib/entity/transaction/transactionSelector.d.ts +0 -2
  40. package/lib/entity/transaction/transactionSelector.js +0 -5
  41. package/lib/entity/transaction/transactionState.d.ts +4 -6
  42. package/lib/entity/vendorExpense/vendorExpenseReducer.js +1 -0
  43. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  44. package/lib/epic.d.ts +1 -6
  45. package/lib/epic.js +1 -6
  46. package/lib/index.d.ts +12 -20
  47. package/lib/index.js +27 -56
  48. package/lib/init.d.ts +1 -2
  49. package/lib/init.js +2 -9
  50. package/lib/reducer.d.ts +1 -7
  51. package/lib/reducer.js +0 -6
  52. package/lib/view/accountList/accountListReducer.js +3 -1
  53. package/lib/view/accountMappingView/accountMappingReducer.js +1 -0
  54. package/lib/view/apAgingView/apAgingDetail/apAgingDetailReducer.js +2 -1
  55. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  56. package/lib/view/balanceSheet/balanceSheetReducer.js +6 -1
  57. package/lib/view/bankAccountView/bankAccountViewReducer.js +1 -0
  58. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  59. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  60. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  61. package/lib/view/cashFlow/cashFlowReducer.js +4 -1
  62. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  63. package/lib/view/cashPosition/cashPositionReducer.js +1 -0
  64. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  65. package/lib/view/commonVendorView/vendorView/epics/fetchAndUpdateVendorRecommendationsEpic.js +3 -1
  66. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  67. package/lib/view/companyView/companyViewReducer.js +10 -1
  68. package/lib/view/dashboard/dashboardEpic.js +2 -0
  69. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  70. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +1 -2
  71. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +10 -24
  72. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +1 -2
  73. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -14
  74. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +5 -32
  75. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
  76. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +5 -1
  77. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +2 -17
  78. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
  79. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
  80. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +35 -111
  81. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  82. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +10 -84
  83. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -12
  84. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +7 -66
  85. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -2
  86. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
  87. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -10
  88. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  89. package/lib/view/financeStatement/financeStatementReducer.js +4 -1
  90. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  91. package/lib/view/netBurnOrIncome/netBurnOrIncomeReducer.js +10 -3
  92. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +6 -1
  93. package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer.js +1 -0
  94. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +3 -0
  95. package/lib/view/opEx/opExForTimeFrameEpic.js +1 -1
  96. package/lib/view/opEx/opExReducer.js +14 -4
  97. package/lib/view/opExByVendor/opExByVendorReducer.js +3 -1
  98. package/lib/view/opExClassesView/opExClassesViewReducer.js +6 -1
  99. package/lib/view/people/fetchPeopleEpic.js +3 -1
  100. package/lib/view/people/invitePeopleEpic.js +3 -1
  101. package/lib/view/people/inviteZeniPeopleEpic.js +3 -1
  102. package/lib/view/people/peopleReducer.js +1 -0
  103. package/lib/view/people/peopleSaveUpdatesEpic.js +1 -1
  104. package/lib/view/profitAndLoss/profitAndLossReducer.js +6 -1
  105. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
  106. package/lib/view/recommendation/recommendationReducer.js +4 -1
  107. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  108. package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.js +3 -1
  109. package/lib/view/revenue/revenueReducer.js +10 -3
  110. package/lib/view/revenueClassesView/revenueClassesViewReducer.js +6 -1
  111. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  112. package/lib/view/settingsView/settingsViewReducer.js +1 -0
  113. package/lib/view/spendManagement/billPay/billList/billListReducer.js +1 -0
  114. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +6 -0
  115. package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +3 -4
  116. package/lib/view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic.js +3 -1
  117. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +3 -11
  118. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +1 -2
  119. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +1 -3
  120. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
  121. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.js +6 -2
  122. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +3 -1
  123. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +1 -0
  124. package/lib/view/subscriptionView/subscriptionViewReducer.js +1 -0
  125. package/lib/view/subscriptionView/types/subscriptionTypes.js +1 -0
  126. package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +3 -1
  127. package/lib/view/tasksCard/fetchTasksCardEpic.js +2 -1
  128. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  129. package/lib/view/tasksCard/tasksCardSelector.js +1 -1
  130. package/lib/view/topEx/topExSelector.d.ts +1 -1
  131. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +15 -45
  132. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +4 -22
  133. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +13 -69
  134. package/lib/view/transactionDetail/transactionDetailReducer.d.ts +2 -11
  135. package/lib/view/transactionDetail/transactionDetailReducer.js +21 -51
  136. package/lib/view/transactionDetail/transactionDetailState.d.ts +0 -1
  137. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -8
  138. package/lib/view/transactionList/transactionListByEntitySelector.js +2 -0
  139. package/lib/view/transactionList/transactionListReducer.js +6 -4
  140. package/lib/view/trendWithTransactions/trendWithTransactionsReducer.js +1 -0
  141. package/lib/view/userFinancialAccount/userFinancialAccountReducer.js +3 -1
  142. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
  143. package/lib/zeniAPI.d.ts +0 -1
  144. package/package.json +3 -8
  145. package/lib/entity/accountRecon/accountReconPayload.d.ts +0 -70
  146. package/lib/entity/accountRecon/accountReconPayload.js +0 -125
  147. package/lib/entity/accountRecon/accountReconReducer.d.ts +0 -16
  148. package/lib/entity/accountRecon/accountReconReducer.js +0 -71
  149. package/lib/entity/accountRecon/accountReconSelector.d.ts +0 -28
  150. package/lib/entity/accountRecon/accountReconSelector.js +0 -44
  151. package/lib/entity/accountRecon/accountReconState.d.ts +0 -70
  152. package/lib/entity/accountRecon/accountReconState.js +0 -28
  153. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +0 -35
  154. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +0 -53
  155. package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +0 -32
  156. package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +0 -10
  157. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +0 -15
  158. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +0 -118
  159. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +0 -10
  160. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +0 -49
  161. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +0 -14
  162. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +0 -169
  163. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +0 -9
  164. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +0 -154
  165. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +0 -6
  166. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +0 -110
  167. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +0 -7
  168. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +0 -18
  169. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -28
  170. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +0 -51
  171. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +0 -66
  172. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +0 -384
  173. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +0 -51
  174. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +0 -7
  175. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +0 -5
  176. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -250
  177. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -103
  178. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +0 -38
@@ -6,75 +6,23 @@ const customerTransaction_1 = require("../../entity/transaction/stateTypes/custo
6
6
  const vendorTransaction_1 = require("../../entity/transaction/stateTypes/vendorTransaction");
7
7
  const transactionDetailState_1 = require("./transactionDetailState");
8
8
  const toTransactionDetailLocalData = (transaction, vendorId, uncategorizedIncomeExpense) => {
9
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
9
+ var _a, _b, _c, _d, _e, _f, _g;
10
10
  const transactionLocal = Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData);
11
- const customerId = (_a = transaction.customer) === null || _a === void 0 ? void 0 : _a.id;
12
11
  transactionLocal.memo = transaction.memo;
13
12
  transactionLocal.vendorUpdates =
14
13
  (0, vendorTransaction_1.isVendorTransaction)(transaction) && vendorId != null
15
14
  ? {
16
15
  id: vendorId,
17
- name: (_c = (_b = transaction.vendor) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '',
18
- qboId: (_d = transaction.vendor) === null || _d === void 0 ? void 0 : _d.id,
16
+ name: (_b = (_a = transaction.vendor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '',
17
+ qboId: (_c = transaction.vendor) === null || _c === void 0 ? void 0 : _c.id,
19
18
  }
20
19
  : undefined;
21
- transactionLocal.customerUpdates =
22
- (0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) && customerId != null
23
- ? {
24
- id: customerId,
25
- name: (_f = (_e = transaction.customer) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : '',
26
- qboId: (_h = (_g = transaction.customer) === null || _g === void 0 ? void 0 : _g.id) !== null && _h !== void 0 ? _h : '',
27
- }
28
- : undefined;
29
- const vendorName = (_k = (_j = transaction.vendor) === null || _j === void 0 ? void 0 : _j.name) !== null && _k !== void 0 ? _k : '';
30
- const customerName = (_m = (_l = transaction.customer) === null || _l === void 0 ? void 0 : _l.name) !== null && _m !== void 0 ? _m : '';
31
- if ((0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) === true &&
32
- customerId != null &&
33
- customerName != null &&
34
- Boolean(customerName) === true) {
35
- transactionLocal.selectedEntity = {
36
- id: customerId,
37
- name: customerName,
38
- type: (0, entity_1.toEntityType)('customer'),
39
- qboId: customerId,
40
- zeniId: customerId,
41
- };
42
- }
43
- else if ((0, vendorTransaction_1.isVendorTransaction)(transaction) === true &&
44
- vendorId != null &&
45
- vendorName &&
46
- Boolean(vendorName) === true) {
47
- transactionLocal.selectedEntity = {
48
- id: vendorId,
49
- name: vendorName,
50
- type: (0, entity_1.toEntityType)('vendor'),
51
- qboId: vendorId,
52
- zeniId: vendorId,
53
- };
54
- }
55
- else {
56
- transactionLocal.selectedEntity = undefined;
57
- }
58
20
  transactionLocal.vendorDetails =
59
- (0, vendorTransaction_1.isVendorTransaction)(transaction) &&
60
- vendorId != null &&
61
- vendorName != null &&
62
- Boolean(vendorName) === true
21
+ (0, vendorTransaction_1.isVendorTransaction)(transaction) && vendorId != null
63
22
  ? {
64
23
  id: vendorId,
65
- qboId: vendorId,
66
- name: vendorName,
67
- }
68
- : undefined;
69
- transactionLocal.customerDetails =
70
- (0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) &&
71
- customerId != null &&
72
- customerName != null &&
73
- Boolean(customerName) === true
74
- ? {
75
- id: customerId,
76
- qboId: customerId,
77
- name: customerName,
24
+ qboId: (_e = (_d = transaction.vendor) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : '',
25
+ name: (_g = (_f = transaction.vendor) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : '',
78
26
  }
79
27
  : undefined;
80
28
  transactionLocal.lineItemById =
@@ -102,7 +50,6 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
102
50
  ? line.vendor != null ||
103
51
  line.customer != null
104
52
  : transaction.vendor != null ||
105
- transaction.customer != null ||
106
53
  transaction.customer != null;
107
54
  record.account = accountLine.account;
108
55
  record.class = accountLine.class;
@@ -377,7 +324,7 @@ const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionDetailLo
377
324
  }
378
325
  });
379
326
  }
380
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerDetails: transactionDetailLocalData.customerDetails, customerUpdates: transactionDetailLocalData.customerUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
327
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
381
328
  return newLocalData;
382
329
  };
383
330
  exports.toUpdateLineItemsOriginalCategoryClass = toUpdateLineItemsOriginalCategoryClass;
@@ -453,7 +400,6 @@ const toSetAllLineItemsToCategoryClass = (transaction, transactionDetailLocalDat
453
400
  record.postingType = lineRecord.postingType;
454
401
  record.postingTypeName = lineRecord.postingTypeName;
455
402
  record.lineEntity = (0, exports.toLineEntity)(lineRecord);
456
- record.selectedEntityLine = (0, exports.toLineEntity)(lineRecord);
457
403
  }
458
404
  newLineItems[lineId] = record;
459
405
  }
@@ -466,7 +412,7 @@ const toSetAllLineItemsToCategoryClass = (transaction, transactionDetailLocalDat
466
412
  }
467
413
  });
468
414
  }
469
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
415
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
470
416
  return newLocalData;
471
417
  };
472
418
  exports.toSetAllLineItemsToCategoryClass = toSetAllLineItemsToCategoryClass;
@@ -492,7 +438,7 @@ const toSetAllLineItemsLocalDataIsUpdateAllChecked = (transaction, transactionDe
492
438
  }
493
439
  });
494
440
  }
495
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
441
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
496
442
  return newLocalData;
497
443
  };
498
444
  exports.toSetAllLineItemsLocalDataIsUpdateAllChecked = toSetAllLineItemsLocalDataIsUpdateAllChecked;
@@ -520,10 +466,8 @@ const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDet
520
466
  if (checkIfNotJEAndDeposit === true) {
521
467
  record.customer = accountLine.customer;
522
468
  record.vendor = accountLine.vendor;
523
- record.selectedEntityLine = entity;
524
469
  }
525
470
  else {
526
- record.selectedEntityLine = entity;
527
471
  record.lineEntity = entity;
528
472
  record.vendor = undefined;
529
473
  record.customer = undefined;
@@ -616,7 +560,7 @@ const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDet
616
560
  newLineItems[matchingEntityLineId] = Object.assign(Object.assign({}, newLineItem), { isUpdateAllChecked: true, isCategoryUpdateSelected: matchingRecord.isCategoryUpdateSelected, isClassUpdateSelected: matchingRecord.isClassUpdateSelected, isRecommendedCategorySelected: matchingRecord.isRecommendedCategorySelected, isRecommendedClassSelected: matchingRecord.isRecommendedClassSelected, isRetainedCategorySelected: matchingRecord.isRetainedCategorySelected, isRetainedClassSelected: matchingRecord.isRetainedCategorySelected, class: matchingRecord.class, account: matchingRecord.account, lineEntity: matchingRecord.lineEntity });
617
561
  }
618
562
  }
619
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, vendorBulkUpdateCategoryClassRecommendationsFetchStatus: transactionDetailLocalData.vendorBulkUpdateCategoryClassRecommendationsFetchStatus, selectedEntity: transactionDetailLocalData.selectedEntity });
563
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, vendorBulkUpdateCategoryClassRecommendationsFetchStatus: transactionDetailLocalData.vendorBulkUpdateCategoryClassRecommendationsFetchStatus });
620
564
  return newLocalData;
621
565
  };
622
566
  exports.setEntityRecommendationForLineIdInLocalData = setEntityRecommendationForLineIdInLocalData;
@@ -653,7 +597,7 @@ const removeEntityRecommendationForLineIdInLocalData = (transaction, transaction
653
597
  }
654
598
  });
655
599
  }
656
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
600
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
657
601
  return newLocalData;
658
602
  };
659
603
  exports.removeEntityRecommendationForLineIdInLocalData = removeEntityRecommendationForLineIdInLocalData;
@@ -717,12 +661,12 @@ const toSetAllLineItemsToVendor = (transaction, transactionDetailLocalData, enti
717
661
  ? toVendorBaseFromLineEntity(entity)
718
662
  : undefined;
719
663
  if (line.type === 'transaction_with_product_or_service_line') {
720
- const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor, customer: record.customer });
664
+ const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor });
721
665
  record.item = lineRecord.item;
722
666
  record.lineDetailType = lineRecord.lineDetailType;
723
667
  }
724
668
  if (line.type === 'journal_entry_transaction_line') {
725
- const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor, customer: record.customer });
669
+ const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor });
726
670
  record.lineTransactionType = lineRecord.lineTransactionType;
727
671
  record.postingType = lineRecord.postingType;
728
672
  record.postingTypeName = lineRecord.postingTypeName;
@@ -63,7 +63,6 @@ export declare const downloadAccountingProviderAttachment: import("@reduxjs/tool
63
63
  }, "transactionDetail/saveTransactionDetail">, initializeTransactionDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
64
64
  transactionId: TransactionID;
65
65
  vendorId?: ID;
66
- customerId?: ID;
67
66
  }, "transactionDetail/initializeTransactionDetailLocalData">, saveTransactionDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
68
67
  transactionId: TransactionID;
69
68
  transactionLocalData: TransactionDetailLocalData;
@@ -116,18 +115,10 @@ export declare const downloadAccountingProviderAttachment: import("@reduxjs/tool
116
115
  }, "transactionDetail/removeEntityRecommendationForLineIdForTransactionDetail", never, never>, updateSelectedVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
117
116
  transactionId: TransactionID;
118
117
  vendorUpdates: TransactionVendorUpdates;
119
- entity?: Entity;
120
118
  resetRecommendations?: boolean;
121
- }, "transactionDetail/updateSelectedVendor">, updateSelectedCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
119
+ }, "transactionDetail/updateSelectedVendor">, resetVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
122
120
  transactionId: TransactionID;
123
- customerUpdates: TransactionVendorUpdates;
124
- entity?: Entity;
125
- resetRecommendations?: boolean;
126
- }, "transactionDetail/updateSelectedCustomer">, resetVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
127
- transactionId: TransactionID;
128
- }, "transactionDetail/resetVendor">, resetSelectedCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
129
- transactionId: TransactionID;
130
- }, "transactionDetail/resetSelectedCustomer">, updateLocalDataWithTransactionsUpdateWithVendorCheckbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
121
+ }, "transactionDetail/resetVendor">, updateLocalDataWithTransactionsUpdateWithVendorCheckbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
131
122
  transactionId: TransactionID;
132
123
  isUpdateEnabled: boolean;
133
124
  }, "transactionDetail/updateLocalDataWithTransactionsUpdateWithVendorCheckbox">, updateVendorToAllLineItems: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, entity: Entity], {
@@ -4,10 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  var _a;
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.setIsVendorUpdateAllChecked = exports.updateVendorBulkRecommendationsFetchStatus = exports.updateLatestSelectedEntity = exports.resetAllLineItemsToVendor = exports.updateVendorToAllLineItems = exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = exports.resetSelectedCustomer = exports.resetVendor = exports.updateSelectedCustomer = exports.updateSelectedVendor = exports.removeEntityRecommendationForLineIdForTransactionDetail = exports.setEntityRecommendationForLineIdsForTransactionDetail = exports.setAllLineItemsLocalDataIsUpdateAllChecked = exports.setAllLineItemsToCategoryClassInLocalData = exports.resetLineItemsCategoryClassInLocalData = exports.clearTransactionDetailLocalData = exports.saveTransactionDetailLocalData = exports.initializeTransactionDetailLocalData = exports.saveTransactionDetail = exports.updateTransactionStateIfUpdateActionNotAllowed = exports.updateStatusConsolidatedSaveTransactionDetail = exports.updateStatusForTransactionNotMiscategorizedUpdate = exports.deleteTransactionAttachmentSuccess = exports.deleteTransactionAttachmentFailure = exports.deleteTransactionAttachment = exports.markTransactionAsNotMiscategorized = exports.clearTransactionDetailSaveStatus = exports.updateTransactionDetailSaveStatus = exports.updateTransactionDetail = exports.uploadMissingAttachmentSuccess = exports.clearTransactionDetail = exports.removeTransactionDetail = exports.updateTransactionDetailFetchState = exports.fetchTransactionDetail = exports.downloadAccountingProviderAttachmentFailure = exports.downloadAccountingProviderAttachmentSuccess = exports.downloadAccountingProviderAttachment = exports.initialState = void 0;
7
+ exports.setIsVendorUpdateAllChecked = exports.updateVendorBulkRecommendationsFetchStatus = exports.updateLatestSelectedEntity = exports.resetAllLineItemsToVendor = exports.updateVendorToAllLineItems = exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = exports.resetVendor = exports.updateSelectedVendor = exports.removeEntityRecommendationForLineIdForTransactionDetail = exports.setEntityRecommendationForLineIdsForTransactionDetail = exports.setAllLineItemsLocalDataIsUpdateAllChecked = exports.setAllLineItemsToCategoryClassInLocalData = exports.resetLineItemsCategoryClassInLocalData = exports.clearTransactionDetailLocalData = exports.saveTransactionDetailLocalData = exports.initializeTransactionDetailLocalData = exports.saveTransactionDetail = exports.updateTransactionStateIfUpdateActionNotAllowed = exports.updateStatusConsolidatedSaveTransactionDetail = exports.updateStatusForTransactionNotMiscategorizedUpdate = exports.deleteTransactionAttachmentSuccess = exports.deleteTransactionAttachmentFailure = exports.deleteTransactionAttachment = exports.markTransactionAsNotMiscategorized = exports.clearTransactionDetailSaveStatus = exports.updateTransactionDetailSaveStatus = exports.updateTransactionDetail = exports.uploadMissingAttachmentSuccess = exports.clearTransactionDetail = exports.removeTransactionDetail = exports.updateTransactionDetailFetchState = exports.fetchTransactionDetail = exports.downloadAccountingProviderAttachmentFailure = exports.downloadAccountingProviderAttachmentSuccess = exports.downloadAccountingProviderAttachment = exports.initialState = void 0;
8
8
  const toolkit_1 = require("@reduxjs/toolkit");
9
9
  const get_1 = __importDefault(require("lodash/get"));
10
- const entity_1 = require("../../entity/genericEntity/entity");
11
10
  const transactionDetailLocalDataHelper_1 = require("./transactionDetailLocalDataHelper");
12
11
  const transactionDetailState_1 = require("./transactionDetailState");
13
12
  exports.initialState = {
@@ -338,32 +337,35 @@ const transactionDetail = (0, toolkit_1.createSlice)({
338
337
  };
339
338
  },
340
339
  },
341
- updateSelectedCustomer(draft, action) {
342
- const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
343
- const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
344
- if (detail != null) {
345
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getUpdatedEntityLocalData(detail.transactionDetailLocalData, action.payload.customerUpdates, action.payload.entity, action.payload.resetRecommendations, 'customer') });
346
- }
347
- },
348
- resetSelectedCustomer(draft, action) {
349
- const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
350
- const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
351
- if (detail != null) {
352
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getResetEntityLocalData(detail.transactionDetailLocalData, 'customer') });
353
- }
354
- },
355
340
  updateSelectedVendor(draft, action) {
356
341
  const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
357
342
  const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
358
343
  if (detail != null) {
359
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getUpdatedEntityLocalData(detail.transactionDetailLocalData, action.payload.vendorUpdates, action.payload.entity, action.payload.resetRecommendations, 'vendor') });
344
+ const transactionDetailLocalData = Object.assign(Object.assign({}, detail.transactionDetailLocalData), { vendorUpdates: {
345
+ name: action.payload.vendorUpdates.name,
346
+ id: action.payload.vendorUpdates.id,
347
+ qboId: action.payload.vendorUpdates.qboId,
348
+ } });
349
+ // on creation success, we have to reset the recommendations
350
+ if (action.payload.resetRecommendations === true) {
351
+ for (const key in transactionDetailLocalData.lineItemById) {
352
+ transactionDetailLocalData.lineItemById[key].recommendedAccount =
353
+ undefined;
354
+ transactionDetailLocalData.lineItemById[key].recommendedClass =
355
+ undefined;
356
+ }
357
+ }
358
+ const transactionDetails = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: transactionDetailLocalData });
359
+ draft.transactionDetailById[key] = transactionDetails;
360
360
  }
361
361
  },
362
362
  resetVendor(draft, action) {
363
363
  const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
364
364
  const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
365
365
  if (detail != null) {
366
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getResetEntityLocalData(detail.transactionDetailLocalData, 'vendor') });
366
+ const transactionDetailLocalData = Object.assign(Object.assign({}, detail.transactionDetailLocalData), { vendorUpdates: detail.transactionDetailLocalData.vendorDetails, updatePreviousTransactionsWithUpdatedVendor: false });
367
+ const transactionDetails = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: transactionDetailLocalData });
368
+ draft.transactionDetailById[key] = transactionDetails;
367
369
  }
368
370
  },
369
371
  updateLocalDataWithTransactionsUpdateWithVendorCheckbox(draft, action) {
@@ -525,37 +527,5 @@ const transactionDetail = (0, toolkit_1.createSlice)({
525
527
  },
526
528
  },
527
529
  });
528
- _a = transactionDetail.actions, exports.downloadAccountingProviderAttachment = _a.downloadAccountingProviderAttachment, exports.downloadAccountingProviderAttachmentSuccess = _a.downloadAccountingProviderAttachmentSuccess, exports.downloadAccountingProviderAttachmentFailure = _a.downloadAccountingProviderAttachmentFailure, exports.fetchTransactionDetail = _a.fetchTransactionDetail, exports.updateTransactionDetailFetchState = _a.updateTransactionDetailFetchState, exports.removeTransactionDetail = _a.removeTransactionDetail, exports.clearTransactionDetail = _a.clearTransactionDetail, exports.uploadMissingAttachmentSuccess = _a.uploadMissingAttachmentSuccess, exports.updateTransactionDetail = _a.updateTransactionDetail, exports.updateTransactionDetailSaveStatus = _a.updateTransactionDetailSaveStatus, exports.clearTransactionDetailSaveStatus = _a.clearTransactionDetailSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.deleteTransactionAttachment = _a.deleteTransactionAttachment, exports.deleteTransactionAttachmentFailure = _a.deleteTransactionAttachmentFailure, exports.deleteTransactionAttachmentSuccess = _a.deleteTransactionAttachmentSuccess, exports.updateStatusForTransactionNotMiscategorizedUpdate = _a.updateStatusForTransactionNotMiscategorizedUpdate, exports.updateStatusConsolidatedSaveTransactionDetail = _a.updateStatusConsolidatedSaveTransactionDetail, exports.updateTransactionStateIfUpdateActionNotAllowed = _a.updateTransactionStateIfUpdateActionNotAllowed, exports.saveTransactionDetail = _a.saveTransactionDetail, exports.initializeTransactionDetailLocalData = _a.initializeTransactionDetailLocalData, exports.saveTransactionDetailLocalData = _a.saveTransactionDetailLocalData, exports.clearTransactionDetailLocalData = _a.clearTransactionDetailLocalData, exports.resetLineItemsCategoryClassInLocalData = _a.resetLineItemsCategoryClassInLocalData, exports.setAllLineItemsToCategoryClassInLocalData = _a.setAllLineItemsToCategoryClassInLocalData, exports.setAllLineItemsLocalDataIsUpdateAllChecked = _a.setAllLineItemsLocalDataIsUpdateAllChecked, exports.setEntityRecommendationForLineIdsForTransactionDetail = _a.setEntityRecommendationForLineIdsForTransactionDetail, exports.removeEntityRecommendationForLineIdForTransactionDetail = _a.removeEntityRecommendationForLineIdForTransactionDetail, exports.updateSelectedVendor = _a.updateSelectedVendor, exports.updateSelectedCustomer = _a.updateSelectedCustomer, exports.resetVendor = _a.resetVendor, exports.resetSelectedCustomer = _a.resetSelectedCustomer, exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = _a.updateLocalDataWithTransactionsUpdateWithVendorCheckbox, exports.updateVendorToAllLineItems = _a.updateVendorToAllLineItems, exports.resetAllLineItemsToVendor = _a.resetAllLineItemsToVendor, exports.updateLatestSelectedEntity = _a.updateLatestSelectedEntity, exports.updateVendorBulkRecommendationsFetchStatus = _a.updateVendorBulkRecommendationsFetchStatus, exports.setIsVendorUpdateAllChecked = _a.setIsVendorUpdateAllChecked;
530
+ _a = transactionDetail.actions, exports.downloadAccountingProviderAttachment = _a.downloadAccountingProviderAttachment, exports.downloadAccountingProviderAttachmentSuccess = _a.downloadAccountingProviderAttachmentSuccess, exports.downloadAccountingProviderAttachmentFailure = _a.downloadAccountingProviderAttachmentFailure, exports.fetchTransactionDetail = _a.fetchTransactionDetail, exports.updateTransactionDetailFetchState = _a.updateTransactionDetailFetchState, exports.removeTransactionDetail = _a.removeTransactionDetail, exports.clearTransactionDetail = _a.clearTransactionDetail, exports.uploadMissingAttachmentSuccess = _a.uploadMissingAttachmentSuccess, exports.updateTransactionDetail = _a.updateTransactionDetail, exports.updateTransactionDetailSaveStatus = _a.updateTransactionDetailSaveStatus, exports.clearTransactionDetailSaveStatus = _a.clearTransactionDetailSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.deleteTransactionAttachment = _a.deleteTransactionAttachment, exports.deleteTransactionAttachmentFailure = _a.deleteTransactionAttachmentFailure, exports.deleteTransactionAttachmentSuccess = _a.deleteTransactionAttachmentSuccess, exports.updateStatusForTransactionNotMiscategorizedUpdate = _a.updateStatusForTransactionNotMiscategorizedUpdate, exports.updateStatusConsolidatedSaveTransactionDetail = _a.updateStatusConsolidatedSaveTransactionDetail, exports.updateTransactionStateIfUpdateActionNotAllowed = _a.updateTransactionStateIfUpdateActionNotAllowed, exports.saveTransactionDetail = _a.saveTransactionDetail, exports.initializeTransactionDetailLocalData = _a.initializeTransactionDetailLocalData, exports.saveTransactionDetailLocalData = _a.saveTransactionDetailLocalData, exports.clearTransactionDetailLocalData = _a.clearTransactionDetailLocalData, exports.resetLineItemsCategoryClassInLocalData = _a.resetLineItemsCategoryClassInLocalData, exports.setAllLineItemsToCategoryClassInLocalData = _a.setAllLineItemsToCategoryClassInLocalData, exports.setAllLineItemsLocalDataIsUpdateAllChecked = _a.setAllLineItemsLocalDataIsUpdateAllChecked, exports.setEntityRecommendationForLineIdsForTransactionDetail = _a.setEntityRecommendationForLineIdsForTransactionDetail, exports.removeEntityRecommendationForLineIdForTransactionDetail = _a.removeEntityRecommendationForLineIdForTransactionDetail, exports.updateSelectedVendor = _a.updateSelectedVendor, exports.resetVendor = _a.resetVendor, exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = _a.updateLocalDataWithTransactionsUpdateWithVendorCheckbox, exports.updateVendorToAllLineItems = _a.updateVendorToAllLineItems, exports.resetAllLineItemsToVendor = _a.resetAllLineItemsToVendor, exports.updateLatestSelectedEntity = _a.updateLatestSelectedEntity, exports.updateVendorBulkRecommendationsFetchStatus = _a.updateVendorBulkRecommendationsFetchStatus, exports.setIsVendorUpdateAllChecked = _a.setIsVendorUpdateAllChecked;
529
531
  exports.default = transactionDetail.reducer;
530
- function getUpdatedEntityLocalData(detail, updates, entity, resetRecommendations, type) {
531
- const key = type === 'customer' ? 'customerUpdates' : 'vendorUpdates';
532
- const transactionDetailLocalData = Object.assign(Object.assign({}, detail), { [key]: {
533
- name: updates.name,
534
- id: updates.id,
535
- qboId: updates.qboId,
536
- }, selectedEntity: entity });
537
- if (resetRecommendations === true) {
538
- for (const key in transactionDetailLocalData.lineItemById) {
539
- transactionDetailLocalData.lineItemById[key].recommendedAccount =
540
- undefined;
541
- transactionDetailLocalData.lineItemById[key].recommendedClass = undefined;
542
- }
543
- }
544
- return transactionDetailLocalData;
545
- }
546
- function getResetEntityLocalData(detail, type) {
547
- const detailsKey = type === 'customer' ? 'customerDetails' : 'vendorDetails';
548
- const updatesKey = type === 'customer' ? 'customerUpdates' : 'vendorUpdates';
549
- const details = detail[detailsKey];
550
- return Object.assign(Object.assign(Object.assign({}, detail), { [updatesKey]: details, selectedEntity: details != null
551
- ? {
552
- id: details.id,
553
- name: details.name,
554
- qboId: details.qboId,
555
- type: (0, entity_1.toEntityType)(type),
556
- zeniId: details.id,
557
- }
558
- : undefined }), (type === 'vendor' && {
559
- updatePreviousTransactionsWithUpdatedVendor: false,
560
- }));
561
- }
@@ -59,7 +59,6 @@ export interface TransactionUpdates {
59
59
  memo?: string;
60
60
  updatesByLineId: Record<ID, TransactionLineUpdates>;
61
61
  vendorId?: ID;
62
- customerId?: ID;
63
62
  }
64
63
  export interface EntityRelatedRecommendationUpdates {
65
64
  entityId: ID;
@@ -35,7 +35,6 @@ export interface TransactionDetailLineItemData extends TransactionLineBase {
35
35
  recommendations?: Recommendation[];
36
36
  isCategoryMiscategorized: boolean;
37
37
  isClassMiscategorized: boolean;
38
- selectedEntityLine?: Entity;
39
38
  }
40
39
  export interface TransactionDetailLocalData {
41
40
  memo?: string;
@@ -45,13 +44,6 @@ export interface TransactionDetailLocalData {
45
44
  name: string;
46
45
  qboId: ID;
47
46
  };
48
- customerDetails?: {
49
- id: ID;
50
- name: string;
51
- qboId: ID;
52
- };
53
- selectedEntity?: Entity;
54
- customerUpdates?: TransactionVendorUpdates;
55
47
  vendorUpdates?: TransactionVendorUpdates;
56
48
  updatePreviousTransactionsWithUpdatedVendor?: boolean;
57
49
  isVendorUpdateAllChecked: boolean;
@@ -25,6 +25,7 @@ const getTransactionListByEntity = (transactionState, transactionListState, filt
25
25
  .filter((eTransaction) => eTransaction != null);
26
26
  const fetchState = (0, reduceTransactionListFetchState_1.reduceFetchState)(entityTransactions);
27
27
  let transactions = [];
28
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
28
29
  if ((0, reduceTransactionListFetchState_1.isAnyFetchCompleted)(entityTransactions)) {
29
30
  const allTransactionIDs = (0, flatMap_1.default)(entityTransactions, (value) => value.transactionIDs);
30
31
  const transactionsUnsorted = allTransactionIDs
@@ -74,6 +75,7 @@ const getTransactionListByEntityForSinglePeriod = (state, entity, numberOfQuarte
74
75
  .filter((eTransaction) => eTransaction != null);
75
76
  const fetchState = (0, reduceTransactionListFetchState_1.reduceFetchState)(entityTransactions);
76
77
  let transactions = [];
78
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
77
79
  if ((0, reduceTransactionListFetchState_1.isAnyFetchCompleted)(entityTransactions)) {
78
80
  const allTransactionIDs = (0, flatMap_1.default)(entityTransactions, (value) => value.transactionIDs);
79
81
  const transactionsUnsorted = allTransactionIDs
@@ -303,8 +303,9 @@ exports.default = transactionList.reducer;
303
303
  function doUpdateTransactionListByAccount(draft, payload) {
304
304
  const transactionIDs = payload.account.transactions.map((transactionPaylod) => transactionPaylod.transaction_id);
305
305
  const account = (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(payload.account);
306
- const start = (0, timePeriod_1.toAbsoluteDay)(payload.query.start_date);
307
- const end = (0, timePeriod_1.toAbsoluteDay)(payload.query.end_date);
306
+ const start = (0, timePeriod_1.toAbsoluteDay)(payload.query.start_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
307
+ const end = (0, timePeriod_1.toAbsoluteDay)(payload.query.end_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
308
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
308
309
  const key = (0, transactionListState_1.getAcTranKey)(account.accountId, account.accountType, {
309
310
  start,
310
311
  end,
@@ -324,8 +325,9 @@ function doUpdateTransactionListByClass(draft, payload) {
324
325
  const transactionIDs = payload.account.transactions.map((transactionPaylod) => transactionPaylod.transaction_id);
325
326
  const account = (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(payload.account);
326
327
  const classId = payload.query.accounting_class_id;
327
- const start = (0, timePeriod_1.toAbsoluteDay)(payload.query.start_date);
328
- const end = (0, timePeriod_1.toAbsoluteDay)(payload.query.end_date);
328
+ const start = (0, timePeriod_1.toAbsoluteDay)(payload.query.start_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
329
+ const end = (0, timePeriod_1.toAbsoluteDay)(payload.query.end_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
330
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
329
331
  const key = (0, transactionListState_1.getClassAcTranKey)(account.accountId, account.accountType, classId, {
330
332
  start,
331
333
  end,
@@ -48,6 +48,7 @@ const trendWithTransactions = (0, toolkit_1.createSlice)({
48
48
  },
49
49
  },
50
50
  clearTrendWithTransactions: {
51
+ // eslint-disable-next-line @typescript-eslint/no-inferrable-types
51
52
  prepare(keepUiState = true) {
52
53
  return { payload: { keepUiState } };
53
54
  },
@@ -11,7 +11,9 @@ const userFinancialAccount = (0, toolkit_1.createSlice)({
11
11
  initialState: exports.initialState,
12
12
  reducers: {
13
13
  fetchUserFinancialAccount: {
14
- reducer(draft, action) {
14
+ reducer(draft,
15
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
+ action) {
15
17
  const { userId } = action.payload;
16
18
  draft.financialAccountByUserId[userId] = {
17
19
  hasValidState() {
@@ -3,7 +3,7 @@ import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderType
3
3
  import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
4
4
  import { GlobalVendorReviewRowCurrentSelection } from '../common/state/commonTypes';
5
5
  import { RecommendedNonExistingGlobalMerchant } from '../vendorFirstReviewView/vendorFirstReviewViewState';
6
- export declare const toVendorGlobalReviewColumnSortKeyType: (v: string) => "tenants" | "recommended" | "originalVendor" | "requestedVendor";
6
+ export declare const toVendorGlobalReviewColumnSortKeyType: (v: string) => "tenants" | "originalVendor" | "recommended" | "requestedVendor";
7
7
  export type VendorGlobalReviewViewColumnSortKey = ReturnType<typeof toVendorGlobalReviewColumnSortKeyType>;
8
8
  export interface GlobalReviewPageCurrentSelectionByColumn {
9
9
  requested: boolean;
package/lib/zeniAPI.d.ts CHANGED
@@ -18,7 +18,6 @@ export interface RESTAPIEndpoints {
18
18
  readonly cardMicroServiceBaseUrl: string;
19
19
  readonly taskMicroServiceBaseUrl: string;
20
20
  readonly notificationMicroServiceBaseUrl: string;
21
- readonly reconciliationMicroServiceBaseUrl: string;
22
21
  }
23
22
  export interface ZeniAPI<ResponseType = FetchResponse> {
24
23
  readonly apiEndPoints: RESTAPIEndpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.15.36",
3
+ "version": "4.15.37",
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",
@@ -25,8 +25,6 @@
25
25
  },
26
26
  "homepage": "https://github.com/zeni-ai/client-epic-state#readme",
27
27
  "devDependencies": {
28
- "@eslint/eslintrc": "^3.3.1",
29
- "@eslint/js": "^9.24.0",
30
28
  "@liveblocks/client": "^2.23.0",
31
29
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
32
30
  "@types/chai": "^5.0.1",
@@ -39,11 +37,10 @@
39
37
  "chai": "^4.5.0",
40
38
  "chai-better-shallow-deep-equal": "^1.1.1",
41
39
  "concurrently": "^9.1.2",
42
- "eslint": "^9.24.0",
40
+ "eslint": "^8.57.1",
43
41
  "eslint-config-prettier": "^10.0.2",
44
42
  "eslint-plugin-prettier": "^5.2.3",
45
43
  "eslint-plugin-unused-imports": "^4.1.4",
46
- "globals": "^16.0.0",
47
44
  "jest": "^29.7.0",
48
45
  "prettier": "^3.5.3",
49
46
  "prettier-plugin-import-sort": "^0.0.7",
@@ -80,9 +77,7 @@
80
77
  "@babel/traverse": ">=7.23.2",
81
78
  "cross-spawn": ">=7.0.5",
82
79
  "@babel/runtime": ">=7.26.10",
83
- "@babel/helpers": ">=7.26.10",
84
- "minimatch": ">=10.0.1",
85
- "minimatch@3.1.2": "3.1.2"
80
+ "@babel/helpers": ">=7.26.10"
86
81
  },
87
82
  "scripts": {
88
83
  "clean": "rimraf lib",
@@ -1,70 +0,0 @@
1
- import { StatusCodeWithLabelPayload } from '../../commonPayloadTypes/statusPayload';
2
- import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
3
- import { ID } from '../../commonStateTypes/common';
4
- import { MatchedTransactionPayload } from '../transaction/payloadTypes/reconciliationTransactionPayloads';
5
- import { AccountReconciliationData, RecommendedReviewTransaction, TransactionsToReview } from './accountReconState';
6
- export interface ReconciliationDataPayload {
7
- reconciliation_id: string | null;
8
- account_id: ID;
9
- transactions: ReconcileReviewTransactionsPayload;
10
- bank_status: StatusCodeWithLabelPayload;
11
- currency: CurrencyPayload;
12
- start_date: string;
13
- end_date: string;
14
- reconciliation_status: StatusCodeWithLabelPayload | null;
15
- variance: number | null;
16
- bank_balance: number | null;
17
- cleared_balance: number | null;
18
- initial_cleared_balance: number | null;
19
- error_message: string | null;
20
- source: string | null;
21
- created_at: string | null;
22
- updated_at: string | null;
23
- payment_account_updated_at: string | null;
24
- user_id: ID | null;
25
- retry_count: number | null;
26
- }
27
- export interface RecommendedReviewTransactionPayload {
28
- transaction_date: string;
29
- amount: number;
30
- transaction_memo: string;
31
- confidence_score: number;
32
- recommendation_reasons: string[];
33
- transaction_id?: string | null;
34
- transaction_type?: string;
35
- account_id?: ID | null;
36
- account_name?: string | null;
37
- class_id?: ID | null;
38
- class_name?: string | null;
39
- merchant_id?: ID | null;
40
- merchant_name?: string | null;
41
- merchant_type?: string | null;
42
- books_transaction_id?: string | null;
43
- }
44
- interface RecommendedActionPayload {
45
- recommended_actions: string;
46
- recommended_action_description: string;
47
- recommended_transactions: RecommendedReviewTransactionPayload[];
48
- }
49
- export interface TransactionsToReviewPayload {
50
- amount: number;
51
- transaction_direction: string;
52
- transaction_memo: string;
53
- recommended_action: RecommendedActionPayload;
54
- status: string;
55
- transaction_date: string;
56
- transaction_id: string;
57
- merchant_id?: ID | null;
58
- merchant_name?: string | null;
59
- merchant_type?: string | null;
60
- }
61
- export interface ReconcileReviewTransactionsPayload {
62
- reconcile: MatchedTransactionPayload[];
63
- review: TransactionsToReviewPayload[];
64
- }
65
- export declare const toTransactionsToReview: (payload: TransactionsToReviewPayload, currencyPayload: CurrencyPayload) => TransactionsToReview;
66
- export declare const toTransactionsToReviewPayload: (payload: TransactionsToReview) => TransactionsToReviewPayload;
67
- export declare const toAccountReconciliationData: (payload: ReconciliationDataPayload) => AccountReconciliationData;
68
- export declare const toRecommendedReviewTransaction: (payload: RecommendedReviewTransactionPayload, currencyPayload: CurrencyPayload) => RecommendedReviewTransaction;
69
- export declare const toRecommendedReviewTransactionPayload: (payload: RecommendedReviewTransaction) => RecommendedReviewTransactionPayload;
70
- export {};