@zeniai/client-epic-state 4.19.99-betaVR3 → 4.19.100

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 (262) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/coaBalance/coaBalanceType.d.ts +0 -2
  3. package/lib/commonStateTypes/coaBalance/coaBalanceType.js +0 -6
  4. package/lib/commonStateTypes/currencyHelper.d.ts +0 -3
  5. package/lib/commonStateTypes/currencyHelper.js +1 -6
  6. package/lib/commonStateTypes/reduceFetchState.d.ts +0 -9
  7. package/lib/commonStateTypes/reduceFetchState.js +0 -26
  8. package/lib/entity/account/accountPayload.d.ts +0 -2
  9. package/lib/entity/account/accountPayload.js +0 -2
  10. package/lib/entity/account/accountState.d.ts +0 -2
  11. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  12. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  13. package/lib/entity/customer/customerState.d.ts +2 -0
  14. package/lib/entity/customer/customerState.js +5 -0
  15. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  16. package/lib/entity/depositAccount/depositAccount.js +1 -8
  17. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  19. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  21. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
  22. package/lib/entity/reimbursement/reimbursementPayload.d.ts +0 -2
  23. package/lib/entity/reimbursement/reimbursementPayload.js +0 -7
  24. package/lib/entity/reimbursement/reimbursementState.d.ts +0 -2
  25. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  26. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  27. package/lib/entity/task/taskPayload.d.ts +0 -1
  28. package/lib/entity/task/taskPayload.js +0 -1
  29. package/lib/entity/task/taskState.d.ts +0 -1
  30. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  31. package/lib/entity/tenant/tenantReducer.js +0 -1
  32. package/lib/entity/tenant/tenantSelector.d.ts +0 -1
  33. package/lib/entity/tenant/tenantSelector.js +1 -9
  34. package/lib/entity/tenant/tenantState.d.ts +0 -1
  35. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
  36. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  37. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
  38. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  39. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
  40. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
  41. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  42. package/lib/epic.d.ts +1 -13
  43. package/lib/epic.js +1 -13
  44. package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +0 -5
  45. package/lib/esm/commonStateTypes/currencyHelper.js +0 -5
  46. package/lib/esm/commonStateTypes/reduceFetchState.js +0 -25
  47. package/lib/esm/entity/account/accountPayload.js +0 -2
  48. package/lib/esm/entity/customer/customerState.js +4 -1
  49. package/lib/esm/entity/depositAccount/depositAccount.js +1 -8
  50. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  51. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  52. package/lib/esm/entity/reimbursement/reimbursementPayload.js +0 -7
  53. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
  54. package/lib/esm/entity/task/taskPayload.js +0 -1
  55. package/lib/esm/entity/tenant/tenantReducer.js +0 -1
  56. package/lib/esm/entity/tenant/tenantSelector.js +0 -7
  57. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  58. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  59. package/lib/esm/epic.js +1 -13
  60. package/lib/esm/index.js +16 -25
  61. package/lib/esm/reducer.js +0 -6
  62. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  63. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  64. package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
  65. package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
  66. package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
  67. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  68. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  69. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  70. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  71. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  72. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  73. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +1 -189
  74. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  75. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -433
  76. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -23
  77. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  78. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  79. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +5 -256
  80. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  81. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +7 -14
  82. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
  83. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -44
  84. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  85. package/lib/esm/view/financeStatement/financeStatementReducer.js +8 -11
  86. package/lib/esm/view/financeStatement/financeStatementSelector.js +9 -24
  87. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
  88. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
  89. package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
  90. package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +7 -9
  91. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  92. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  93. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  94. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  95. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  96. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  97. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  98. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  99. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
  100. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  101. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  102. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  103. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
  104. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -3
  105. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  106. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  107. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  108. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +0 -11
  109. package/lib/esm/zeniAPI.js +2 -0
  110. package/lib/index.d.ts +21 -31
  111. package/lib/index.js +34 -102
  112. package/lib/reducer.d.ts +0 -6
  113. package/lib/reducer.js +0 -6
  114. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  115. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  116. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  117. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  118. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  119. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
  120. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
  121. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
  122. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  123. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  124. package/lib/view/classList/fetchClassListEpic.js +1 -8
  125. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
  126. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  127. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
  128. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  129. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  130. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  131. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  132. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  133. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  134. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -118
  135. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -201
  136. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  137. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  138. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +3 -76
  139. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -434
  140. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -11
  141. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -24
  142. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  143. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -69
  144. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -1
  145. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  146. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  147. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  148. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -255
  149. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  150. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -13
  151. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  152. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
  153. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -142
  154. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -54
  155. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
  156. package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  157. package/lib/view/financeStatement/financeStatementReducer.js +8 -11
  158. package/lib/view/financeStatement/financeStatementSelector.d.ts +0 -2
  159. package/lib/view/financeStatement/financeStatementSelector.js +9 -24
  160. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +2 -4
  161. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +2 -7
  162. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
  163. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +0 -4
  164. package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
  165. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +6 -8
  166. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  167. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  168. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  169. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  170. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  171. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  172. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  173. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  174. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  175. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  176. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  177. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
  178. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  179. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  180. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  181. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  182. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  183. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +0 -1
  184. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
  185. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +0 -2
  186. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -3
  187. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  188. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  189. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  190. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  191. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +1 -3
  192. package/lib/view/userListView/fetchUserListByTypeEpic.js +0 -11
  193. package/lib/view/userListView/userListViewPayload.d.ts +0 -2
  194. package/lib/zeniAPI.js +2 -0
  195. package/package.json +2 -2
  196. package/lib/entity/userGroups/userGroupsPayload.d.ts +0 -7
  197. package/lib/entity/userGroups/userGroupsPayload.js +0 -10
  198. package/lib/entity/userGroups/userGroupsReducer.d.ts +0 -8
  199. package/lib/entity/userGroups/userGroupsReducer.js +0 -29
  200. package/lib/entity/userGroups/userGroupsSelector.d.ts +0 -4
  201. package/lib/entity/userGroups/userGroupsSelector.js +0 -12
  202. package/lib/entity/userGroups/userGroupsState.d.ts +0 -9
  203. package/lib/entity/userGroups/userGroupsState.js +0 -2
  204. package/lib/esm/entity/userGroups/userGroupsPayload.js +0 -7
  205. package/lib/esm/entity/userGroups/userGroupsReducer.js +0 -25
  206. package/lib/esm/entity/userGroups/userGroupsSelector.js +0 -8
  207. package/lib/esm/entity/userGroups/userGroupsState.js +0 -1
  208. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  209. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +0 -10
  210. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -29
  211. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -49
  212. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -40
  213. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -47
  214. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -61
  215. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -33
  216. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -56
  217. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -77
  218. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -80
  219. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -24
  220. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -317
  221. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -9
  222. package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -282
  223. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +0 -65
  224. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +0 -16
  225. package/lib/esm/view/userGroupListView/userGroupListViewState.js +0 -1
  226. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  227. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  228. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
  229. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +0 -10
  230. package/lib/view/expenseAutomationView/bulkUploadTiming.js +0 -13
  231. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +0 -18
  232. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -33
  233. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +0 -7
  234. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -53
  235. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +0 -8
  236. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -44
  237. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +0 -7
  238. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -51
  239. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +0 -8
  240. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -65
  241. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
  242. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -37
  243. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +0 -9
  244. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -61
  245. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -14
  246. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -81
  247. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +0 -25
  248. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -86
  249. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +0 -7
  250. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -28
  251. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +0 -13
  252. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -321
  253. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +0 -111
  254. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -13
  255. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +0 -6
  256. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -285
  257. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +0 -23
  258. package/lib/view/userGroupListView/userGroupListViewReducer.js +0 -69
  259. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +0 -7
  260. package/lib/view/userGroupListView/userGroupListViewSelector.js +0 -20
  261. package/lib/view/userGroupListView/userGroupListViewState.d.ts +0 -8
  262. package/lib/view/userGroupListView/userGroupListViewState.js +0 -2
@@ -1,19 +1,4 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- function removeSessionIdFromPageKeyMap(draft, sessionId) {
3
- const map = draft.uiState.chatSessionIdByPageKey;
4
- for (const key of Object.keys(map)) {
5
- if (map[key] === sessionId) {
6
- delete map[key];
7
- }
8
- }
9
- }
10
- function mirrorCurrentSessionToPageKeyMapIfActive(draft) {
11
- const key = draft.uiState.aiCfoSidePanelHostPageKey;
12
- const sessionId = draft.uiState.currentChatSessionId;
13
- if (key != null && sessionId != null) {
14
- draft.uiState.chatSessionIdByPageKey[key] = sessionId;
15
- }
16
- }
17
2
  export const initialAiCfoViewState = {
18
3
  fetchState: 'Not-Started',
19
4
  error: undefined,
@@ -21,8 +6,6 @@ export const initialAiCfoViewState = {
21
6
  currentInput: '',
22
7
  scrollPositionByChatSessionId: {},
23
8
  currentChatSessionId: undefined,
24
- aiCfoSidePanelHostPageKey: undefined,
25
- chatSessionIdByPageKey: {},
26
9
  agentId: undefined,
27
10
  chatHistoryNextPageToken: {},
28
11
  chatSessionsNextPageToken: { nextPageToken: null, hasMore: false },
@@ -46,7 +29,6 @@ export const initialAiCfoViewState = {
46
29
  fetchChatSessionHistoryByChatSessionId: {},
47
30
  responseStateByChatSessionId: {},
48
31
  stopSubmitStateByChatSessionId: {},
49
- suggestedQuestionsByPageContext: {},
50
32
  };
51
33
  const aiCfoView = createSlice({
52
34
  name: 'aiCfoView',
@@ -180,7 +162,6 @@ const aiCfoView = createSlice({
180
162
  setSession(draft, action) {
181
163
  draft.uiState.currentChatSessionId = action.payload.sessionId;
182
164
  draft.uiState.agentId = action.payload.agentId;
183
- mirrorCurrentSessionToPageKeyMapIfActive(draft);
184
165
  },
185
166
  createSession: {
186
167
  reducer(draft, action) {
@@ -204,7 +185,6 @@ const aiCfoView = createSlice({
204
185
  nextPageToken: null,
205
186
  hasMore: false,
206
187
  };
207
- mirrorCurrentSessionToPageKeyMapIfActive(draft);
208
188
  },
209
189
  createSessionFailure(draft, action) {
210
190
  draft.createSessionState.fetchState = 'Error';
@@ -242,7 +222,6 @@ const aiCfoView = createSlice({
242
222
  nextPageToken: null,
243
223
  hasMore: false,
244
224
  };
245
- mirrorCurrentSessionToPageKeyMapIfActive(draft);
246
225
  },
247
226
  createSessionAndSubmitSuccess(draft) {
248
227
  // Note: currentChatSessionId, agentId, and chatHistoryNextPageToken are set by initializeNewSessionState
@@ -359,7 +338,6 @@ const aiCfoView = createSlice({
359
338
  draft.uiState.currentChatSessionId = undefined;
360
339
  draft.uiState.agentId = undefined;
361
340
  }
362
- removeSessionIdFromPageKeyMap(draft, chatSessionId);
363
341
  delete draft.uiState.chatHistoryNextPageToken[chatSessionId];
364
342
  delete draft.uiState.scrollPositionByChatSessionId[chatSessionId];
365
343
  delete draft.fetchChatSessionHistoryByChatSessionId[chatSessionId];
@@ -382,65 +360,6 @@ const aiCfoView = createSlice({
382
360
  },
383
361
  clearCurrentSessionId(draft) {
384
362
  draft.uiState.currentChatSessionId = undefined;
385
- const key = draft.uiState.aiCfoSidePanelHostPageKey;
386
- if (key != null) {
387
- delete draft.uiState.chatSessionIdByPageKey[key];
388
- }
389
- },
390
- applyAiCfoSidePanelHostPageTransition(draft, action) {
391
- const { newAiCfoSidePanelHostPageKey, nextCurrentChatSessionId } = action.payload;
392
- const prevKey = draft.uiState.aiCfoSidePanelHostPageKey;
393
- const curId = draft.uiState.currentChatSessionId;
394
- if (prevKey != null &&
395
- prevKey !== newAiCfoSidePanelHostPageKey &&
396
- curId != null) {
397
- draft.uiState.chatSessionIdByPageKey[prevKey] = curId;
398
- }
399
- draft.uiState.aiCfoSidePanelHostPageKey = newAiCfoSidePanelHostPageKey;
400
- draft.uiState.currentChatSessionId =
401
- nextCurrentChatSessionId != null ? nextCurrentChatSessionId : undefined;
402
- draft.uiState.currentInput = '';
403
- mirrorCurrentSessionToPageKeyMapIfActive(draft);
404
- },
405
- clearAiCfoSidePanelHostPageContext(draft) {
406
- const key = draft.uiState.aiCfoSidePanelHostPageKey;
407
- const curId = draft.uiState.currentChatSessionId;
408
- if (key != null && curId != null) {
409
- draft.uiState.chatSessionIdByPageKey[key] = curId;
410
- }
411
- draft.uiState.aiCfoSidePanelHostPageKey = undefined;
412
- },
413
- fetchSuggestedQuestions(draft, action) {
414
- const { pageContext } = action.payload;
415
- const prev = draft.suggestedQuestionsByPageContext[pageContext];
416
- draft.suggestedQuestionsByPageContext[pageContext] = {
417
- fetchState: 'In-Progress',
418
- pageContext,
419
- suggestedQuestions: prev?.suggestedQuestions ?? [],
420
- generatedAt: prev?.generatedAt,
421
- error: undefined,
422
- };
423
- },
424
- fetchSuggestedQuestionsSuccess(draft, action) {
425
- const { pageContext, generatedAt, suggestedQuestions } = action.payload;
426
- draft.suggestedQuestionsByPageContext[pageContext] = {
427
- fetchState: 'Completed',
428
- pageContext,
429
- generatedAt,
430
- suggestedQuestions,
431
- error: undefined,
432
- };
433
- },
434
- fetchSuggestedQuestionsFailure(draft, action) {
435
- const { pageContext, error } = action.payload;
436
- const prev = draft.suggestedQuestionsByPageContext[pageContext];
437
- draft.suggestedQuestionsByPageContext[pageContext] = {
438
- fetchState: 'Error',
439
- pageContext,
440
- suggestedQuestions: prev?.suggestedQuestions ?? [],
441
- generatedAt: prev?.generatedAt,
442
- error,
443
- };
444
363
  },
445
364
  clearAiCfoView(draft) {
446
365
  Object.assign(draft, initialAiCfoViewState);
@@ -452,5 +371,5 @@ const aiCfoView = createSlice({
452
371
  },
453
372
  },
454
373
  });
455
- export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, clearInput, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, clearAiCfoView, updateCotCollapsedState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } = aiCfoView.actions;
374
+ export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, clearInput, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, clearAiCfoView, updateCotCollapsedState, } = aiCfoView.actions;
456
375
  export default aiCfoView.reducer;
@@ -1,8 +1,6 @@
1
- import { initialAiCfoState } from '../../entity/aiCfo/aiCfoReducer';
2
1
  import { getAiCfoSelectorView, } from '../../entity/aiCfo/aiCfoSelector';
3
- import { initialAiCfoViewState } from './aiCfoViewReducer';
4
2
  export const getAiCfoView = (state) => {
5
- const { fetchState, error, uiState, createSessionState, createSessionAndSubmitState, deleteChatSessionStateByChatSessionId, stopSubmitStateByChatSessionId, responseStateByChatSessionId, fetchChatSessionHistoryByChatSessionId, masterTOSAcceptanceState, suggestedQuestionsByPageContext, } = state.aiCfoViewState ?? initialAiCfoViewState;
3
+ const { fetchState, error, uiState, createSessionState, createSessionAndSubmitState, deleteChatSessionStateByChatSessionId, stopSubmitStateByChatSessionId, responseStateByChatSessionId, fetchChatSessionHistoryByChatSessionId, masterTOSAcceptanceState, } = state.aiCfoViewState;
6
4
  return {
7
5
  fetchState,
8
6
  error,
@@ -14,11 +12,7 @@ export const getAiCfoView = (state) => {
14
12
  uiState,
15
13
  fetchChatSessionHistoryByChatSessionId,
16
14
  masterTOSAcceptanceState,
17
- suggestedQuestionsByPageContext,
18
- ...getAiCfoSelectorView(state.aiCfoState ?? initialAiCfoState),
15
+ ...getAiCfoSelectorView(state.aiCfoState),
19
16
  version: 1,
20
17
  };
21
18
  };
22
- export function getSuggestedQuestionsForPageContext(state, pageContext) {
23
- return state.aiCfoViewState?.suggestedQuestionsByPageContext?.[pageContext];
24
- }
@@ -1,9 +1,9 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
2
  import { mapReportPayloadV2ToReportV2 } from '../../../commonPayloadTypes/v2/viewAndReportPayloadv2';
3
3
  import { getAgingBalancesKey, toAgingPeriod, } from '../../../commonStateTypes/agingBalance/agingBalance';
4
- import { defaultCustomerCurrency } from '../../../commonStateTypes/currencyHelper';
5
4
  import { getNestedCustomerHierarchy } from '../../../commonStateTypes/customerView/getNestedCustomerHierarchy';
6
5
  import { toCustomer } from '../../../entity/customer/customerPayload';
6
+ import { defaultCustomerCurrency } from '../../../entity/customer/customerState';
7
7
  import { dateNow } from '../../../zeniDayJS';
8
8
  import { toArAgingDataByCustomerId, toArAgingTotals, } from './arAgingPayload';
9
9
  export const inititalUIState = {
@@ -1,8 +1,8 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
2
  import orderBy from 'lodash/orderBy';
3
3
  import { getAgingBalancesKey, } from '../../../commonStateTypes/agingBalance/agingBalance';
4
- import { defaultCustomerCurrency } from '../../../commonStateTypes/currencyHelper';
5
4
  import { getCustomer } from '../../../entity/customer/customerSelector';
5
+ import { defaultCustomerCurrency, } from '../../../entity/customer/customerState';
6
6
  export const getArAgingReport = createSelector((state) => state.arAgingState, (state) => state.customerState, (arAgingState, customerState) => {
7
7
  const { reportId, reportTitle, fetchState, uiState, firstMonthOfFY, agingPeriods, } = arAgingState;
8
8
  const { searchString, sortOrder, sortKey, selectedDate } = uiState;
@@ -1,16 +1,9 @@
1
1
  import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap, withLatestFrom, } from 'rxjs/operators';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
3
  import { updateClasses } from '../../entity/class/classReducer';
4
- import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
5
4
  import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
6
5
  import { fetchClassList, updateClassList, updateClassListFailure, } from './classListReducer';
7
- export const fetchClassListEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchClassList.match), withLatestFrom(state$), switchMap(([action, state]) => {
8
- if (!getIsAccountingClassesEnabled(state)) {
9
- return of(updateClassList({
10
- status: createZeniAPIStatus('Success', ''),
11
- data: { accounting_classes: [] },
12
- }));
13
- }
6
+ export const fetchClassListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchClassList.match), switchMap((action) => {
14
7
  const { isIncludeDeleted } = action.payload;
15
8
  const queryParams = isIncludeDeleted === true
16
9
  ? `?query=${encodeURIComponent(JSON.stringify({ is_include_deleted: true }))}`
@@ -6,7 +6,6 @@ import { getContactsByIds } from '../../../entity/billPay/contact/contactSelecto
6
6
  import { getClassById } from '../../../entity/class/classSelector';
7
7
  import { getFilesByFileIds } from '../../../entity/file/fileSelector';
8
8
  import { getPaymentInstrumentsByIds } from '../../../entity/paymentInstrument/paymentInstrumentSelector';
9
- import { getIsAccountingClassesEnabled } from '../../../entity/tenant/tenantSelector';
10
9
  import { getUserByUserId, getUsersByUserIds, } from '../../../entity/user/userSelector';
11
10
  import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
12
11
  import { getAccountList, getNestedAccountListHierarchy, } from '../../accountList/accountListSelector';
@@ -61,17 +60,13 @@ export const getVendorView = (state, vendorIdFromUrl) => {
61
60
  ?.vendorDetailLocalData,
62
61
  supportedCountries: billPayConfigState.vendor.supportedCountries,
63
62
  };
64
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
65
- const editFetchStateList = [
63
+ fetchState = reduceFetchState([
66
64
  accountList,
65
+ classList,
67
66
  vendorTypeListState,
68
67
  vendorViewState.editVendorStateById[vendorIdFromUrl]?.fetchStatus ??
69
68
  vendorViewInitialState.newVendorState.fetchStatus,
70
- ];
71
- if (isAccountingClassesEnabled) {
72
- editFetchStateList.push(classList);
73
- }
74
- fetchState = reduceFetchState(editFetchStateList);
69
+ ]);
75
70
  }
76
71
  else {
77
72
  const basicVendorDetails = getBasicVendorDetailsForNewVendor(state, vendorViewState.newVendorState);
@@ -100,17 +95,11 @@ export const getVendorView = (state, vendorIdFromUrl) => {
100
95
  if (tentativeName != null) {
101
96
  entityRecommendations = getRecommendationsForEntity(state, tentativeName, 'vendor');
102
97
  }
103
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
104
98
  const fetchStateList = [
105
99
  { fetchState: accountList.fetchState, error: accountList.error },
100
+ { fetchState: classList.fetchState, error: classList.error },
106
101
  vendorTypeListState,
107
102
  ];
108
- if (isAccountingClassesEnabled) {
109
- fetchStateList.push({
110
- fetchState: classList.fetchState,
111
- error: classList.error,
112
- });
113
- }
114
103
  if (entityRecommendations != null &&
115
104
  entityRecommendations.recommendations != null &&
116
105
  entityRecommendations.recommendations.length > 0) {
@@ -155,7 +144,6 @@ export const getVendorView = (state, vendorIdFromUrl) => {
155
144
  fetchState: fetchState.fetchState,
156
145
  hasWireTransfer,
157
146
  hasInternationalWireTransfer,
158
- isAccountingClassesEnabled: getIsAccountingClassesEnabled(state),
159
147
  deleteFileStatusById,
160
148
  updateFileStatusById,
161
149
  loggedInUserVerification,
@@ -231,10 +219,9 @@ const getBasicVendorDetailsForNewVendor = (state, newVendor) => {
231
219
  };
232
220
  export const getVendorDetailPageView = (state, vendorId, entity) => {
233
221
  const trendWithTransactions = getTrendWithTransactions(state, entity, 'EntityDetail');
234
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
235
222
  const reducedFetchState = reduceAnyFetchState([
236
223
  state.accountListState.byReportId.accountList,
237
- ...(isAccountingClassesEnabled ? [state.classListState] : []),
224
+ state.classListState,
238
225
  state.vendorTypeListState,
239
226
  state.ownerListState,
240
227
  state.vendorViewState.editVendorStateById[vendorId]?.fetchStatus ?? {
@@ -6,7 +6,6 @@ import { getAccountBase } from '../../../entity/account/accountSelector';
6
6
  import { getAddressByAddressId } from '../../../entity/address/addressSelector';
7
7
  import { getContactsByIds } from '../../../entity/billPay/contact/contactSelector';
8
8
  import { getClassById } from '../../../entity/class/classSelector';
9
- import { getIsAccountingClassesEnabled } from '../../../entity/tenant/tenantSelector';
10
9
  import { getUserByUserId, getUsersByUserIds, } from '../../../entity/user/userSelector';
11
10
  import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
12
11
  import { dateNow } from '../../../zeniDayJS';
@@ -21,7 +20,6 @@ const ALL_VENDOR_DETAIL_TABS_TYPES = [
21
20
  export const toVendorDetailTabsType = (v) => stringToUnion(v, ALL_VENDOR_DETAIL_TABS_TYPES);
22
21
  export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
23
22
  const { accountListState, accountState, classListState, classState, vendorState, userState, vendorsTabVendorViewState, vendorTypeListState, addressState, addressViewState, contactState, } = state;
24
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
25
23
  const accountList = getAccountList(accountState, accountListState, 'accountList');
26
24
  const classList = getClassList(classState, classListState);
27
25
  const ownerList = getUsersByUserIds(state.userState, state.ownerListState.ownerIds);
@@ -53,7 +51,7 @@ export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
53
51
  }
54
52
  fetchState = reduceFetchState([
55
53
  accountList,
56
- ...(isAccountingClassesEnabled ? [classList] : []),
54
+ classList,
57
55
  vendorTypeListState,
58
56
  vendorsTabVendorViewState.vendorStateById[vendorIdFromUrl]?.fetchStatus ?? {
59
57
  fetchState: 'Not-Started',
@@ -64,7 +62,6 @@ export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
64
62
  return {
65
63
  accountList: accountList,
66
64
  classList: classList,
67
- isAccountingClassesEnabled,
68
65
  vendorTypeList: vendorTypeList,
69
66
  accountsHierarchyList,
70
67
  classHierarchyList,
@@ -105,10 +102,9 @@ export const getVendorsTabDetailPageView = (state, vendorId, entity) => {
105
102
  ? getTransactionListByEntityForSinglePeriod(state, entity, state.vendorsTabVendorViewState.allTransactionsTabData
106
103
  .numberOfQuartersFetched)
107
104
  : undefined;
108
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
109
105
  const reducedFetchState = reduceAnyFetchState([
110
106
  state.accountListState.byReportId.accountList,
111
- ...(isAccountingClassesEnabled ? [state.classListState] : []),
107
+ state.classListState,
112
108
  state.ownerListState,
113
109
  state.vendorTypeListState,
114
110
  state.vendorsTabVendorViewState.vendorStateById[vendorId]?.fetchStatus ?? {
@@ -12,13 +12,11 @@ export const uploadMissingReceiptSuccessEpic = (actions$, state$) => actions$.pi
12
12
  updateActions.push(updateTransaction(transactionPayload.transaction_id, transactionPayload, updateType));
13
13
  if (currentTenant != null) {
14
14
  const monthEndChecksPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
15
- if (monthEndChecksPeriod != null) {
16
- updateActions.push(fetchMonthEndCloseChecks({
17
- tenantId: currentTenant.tenantId,
18
- period: monthEndChecksPeriod,
19
- refreshViewInBackground: true,
20
- }));
21
- }
15
+ updateActions.push(fetchMonthEndCloseChecks({
16
+ tenantId: currentTenant.tenantId,
17
+ period: monthEndChecksPeriod,
18
+ refreshViewInBackground: true,
19
+ }));
22
20
  }
23
21
  return from(updateActions);
24
22
  }));
@@ -91,6 +91,7 @@ export function getExpenseAutomationView(state) {
91
91
  const fetchStateVariables = [
92
92
  expenseAutomationMissingReceiptsViewState,
93
93
  expenseAutomationJESchedulesViewState,
94
+ monthEndCloseChecksView,
94
95
  expenseAutomationTransactionsView,
95
96
  expenseAutomationReconciliationViewState,
96
97
  ];
@@ -64,8 +64,8 @@ export const toTransactionUpdatesFromTransactionCategorizationLocalData = (trans
64
64
  lineItem.account?.qboId !== accountLine.account.qboId &&
65
65
  Boolean(lineItem.account?.qboId);
66
66
  hasClassChanged =
67
- (lineItem.class?.qboId != null || accountLine.class?.qboId != null) &&
68
- lineItem.class?.qboId !== accountLine.class?.qboId;
67
+ Boolean(lineItem.class?.qboId) &&
68
+ lineItem.class?.qboId !== accountLine.class.qboId;
69
69
  const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
70
70
  const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
71
71
  if (entityDetails != null &&
@@ -234,7 +234,7 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
234
234
  isPreFilled: true,
235
235
  };
236
236
  }
237
- if (Boolean(accountLine.class?.classId) === false &&
237
+ if (accountLine.class.classId === '' &&
238
238
  higherPreferenceRecommendation?.class != null) {
239
239
  record.class = {
240
240
  ...higherPreferenceRecommendation.class,
@@ -464,7 +464,7 @@ export const setEntityRecommendationForLineIdInLocalData = (draft, transaction,
464
464
  }
465
465
  : accountLine.account;
466
466
  record.class =
467
- Boolean(accountLine.class?.classId) !== false
467
+ accountLine.class.classId !== ''
468
468
  ? accountLine.class
469
469
  : recommendations?.[0]?.class
470
470
  ? {
@@ -1,189 +1 @@
1
- import { toURL } from '../../../commonPayloadTypes/urlPayload';
2
- import { toAmount } from '../../../commonStateTypes/amount';
3
- import { getTransactionPayloadAmount, } from '../../../entity/transaction/payloadTypes/transactionPayload';
4
- import { toBatchFileStatus, toBatchStatusValue, toMatchSource, } from '../types/missingReceiptsViewState';
5
- // -- Converter functions --
6
- /**
7
- * Maps batch-details API `files[].status` strings to canonical {@link BatchFileStatus}.
8
- * Legacy aliases are supported during rollout; unknown strings map to `failed` so Redux never
9
- * holds untyped status values.
10
- */
11
- export function parseBatchFileStatus(raw) {
12
- const normalizedStatus = raw.trim().toLowerCase().replace(/-/g, '_');
13
- switch (normalizedStatus) {
14
- case 'exact_match':
15
- case 'matched':
16
- return 'exact_match';
17
- case 'possible_matches':
18
- case 'possible_match':
19
- case 'possiblematch':
20
- case 'un_matched':
21
- case 'unmatched':
22
- return 'possible_matches';
23
- case 'no_match':
24
- case 'nomatch':
25
- return 'no_match';
26
- case 'failed':
27
- return 'failed';
28
- default:
29
- return 'failed';
30
- }
31
- }
32
- export function toBatchFile(payload, filesEndPoint) {
33
- return {
34
- attachmentId: payload.attachment_id,
35
- candidates: payload.candidates?.map((candidate) => ({
36
- transactionId: candidate.transaction_id,
37
- matchScore: candidate.match_score,
38
- })),
39
- fileDownloadUrl: payload.file_id != null && filesEndPoint != null
40
- ? `${filesEndPoint}/1.0/files/${payload.file_id}?query=${encodeURIComponent(JSON.stringify({ download_file: true }))}`
41
- : null,
42
- fileId: payload.file_id,
43
- filePreviewUrl: payload.file_preview_url,
44
- filename: payload.filename,
45
- matchSource: payload.match_source != null
46
- ? toMatchSource(payload.match_source)
47
- : undefined,
48
- matchedTransactionId: payload.matched_transaction?.transaction_id,
49
- status: toBatchFileStatus(payload.status),
50
- };
51
- }
52
- export function extractTransactionPayloadsFromBatchFiles(files) {
53
- const seen = new Set();
54
- const payloads = [];
55
- for (const file of files) {
56
- if (file.matched_transaction != null) {
57
- const id = file.matched_transaction.transaction_id;
58
- if (!seen.has(id)) {
59
- seen.add(id);
60
- payloads.push(matchedTransactionPayloadToSupportedTransactionPayload(file.matched_transaction));
61
- }
62
- }
63
- if (file.candidates != null) {
64
- for (const candidate of file.candidates) {
65
- const id = candidate.transaction_id;
66
- if (!seen.has(id)) {
67
- seen.add(id);
68
- payloads.push(matchedTransactionPayloadToSupportedTransactionPayload(candidate));
69
- }
70
- }
71
- }
72
- }
73
- return payloads;
74
- }
75
- function matchedTransactionPayloadToSupportedTransactionPayload(payload) {
76
- return {
77
- transaction_id: payload.transaction_id,
78
- transaction_type: payload.transaction_type ?? 'expense',
79
- transaction_date: payload.transaction_date ?? '',
80
- currency_code: payload.currency_code,
81
- total_amount: payload.amount,
82
- vendor_name: payload.vendor_name,
83
- logo: payload.vendor_logo == null ? undefined : toURL(payload.vendor_logo),
84
- };
85
- }
86
- export function toBatchSummary(payload) {
87
- return {
88
- failed: payload.failed,
89
- matched: payload.matched,
90
- noMatch: payload.no_match,
91
- possibleMatches: payload.possible_matches,
92
- total: payload.total,
93
- };
94
- }
95
- export function toBatchDetails(payload, filesEndPoint) {
96
- return {
97
- batchId: payload.batch_id,
98
- createdAt: payload.created_at,
99
- files: payload.files.map((file) => toBatchFile(file, filesEndPoint)),
100
- status: toBatchStatusValue(payload.status),
101
- summary: toBatchSummary(payload.summary),
102
- };
103
- }
104
- /** Batch list `status` is a string from the API — compare case-insensitively. */
105
- export function isBatchListStatusCompleted(status) {
106
- return status.toLowerCase() === 'completed';
107
- }
108
- /**
109
- * Subset of the get-all-batches (`/batches?query=...`) list that is eligible for
110
- * `GET /batches/:batchId` details fetches. The stored list may include pending, failed, or other
111
- * statuses for UI; only `completed` rows should trigger batch-details requests.
112
- */
113
- export function filterBatchListItemsForBatchDetailsFetch(batches) {
114
- return batches.filter((batch) => isBatchListStatusCompleted(batch.status));
115
- }
116
- /**
117
- * Batch details API response `status` field — only completed payloads should be stored from
118
- * multi-batch fetch paths (list can be briefly stale vs. live processing state).
119
- */
120
- export function isBatchDetailsApiStatusCompleted(status) {
121
- return status.toLowerCase() === 'completed';
122
- }
123
- export function findBatchListItemForBatchId(batchListByPeriod, batchId) {
124
- for (const list of Object.values(batchListByPeriod)) {
125
- const found = list.find((batch) => batch.batchId === batchId);
126
- if (found != null) {
127
- return found;
128
- }
129
- }
130
- return undefined;
131
- }
132
- /**
133
- * Whether it is appropriate to call `GET .../batches/:id` for details.
134
- * Skips when live batch status or batch list row indicates the batch is not completed yet.
135
- * When status is unknown in both sources, allows the request (e.g. dispatch before list refresh).
136
- */
137
- export function shouldFetchBatchDetailsForBatchId(batchStatusById, batchListByPeriod, batchId) {
138
- const live = batchStatusById[batchId]?.status;
139
- if (live === 'completed') {
140
- return true;
141
- }
142
- if (live === 'pending' || live === 'processing') {
143
- return false;
144
- }
145
- const listItem = findBatchListItemForBatchId(batchListByPeriod, batchId);
146
- if (listItem != null && !isBatchListStatusCompleted(listItem.status)) {
147
- return false;
148
- }
149
- return true;
150
- }
151
- export function toBatchListItem(payload) {
152
- return {
153
- batchId: payload.batch_id,
154
- createdAt: payload.created_at,
155
- failedCount: payload.failed_count,
156
- matchedCount: payload.matched_count,
157
- noMatchCount: payload.no_match_count,
158
- possibleMatchesCount: payload.possible_matches_count,
159
- status: payload.status,
160
- totalFiles: payload.total_files,
161
- };
162
- }
163
- /**
164
- * Amount shown in the Unmatched tab manual-search list: **first line only** when `lines` exist.
165
- * Falls back to transaction-level totals via {@link getTransactionPayloadAmount} when there is
166
- * no line or no line amount (same currency fields as the rest of the transaction payload).
167
- */
168
- function getManualSearchListAmountFromPayload(payload) {
169
- const lineAmount = payload.lines?.[0]?.amount;
170
- if (lineAmount != null) {
171
- return toAmount(lineAmount, payload.currency_code, payload.currency_symbol);
172
- }
173
- return getTransactionPayloadAmount(payload);
174
- }
175
- /** Maps expense-automation transaction rows to manual-search list rows (Unmatched tab). */
176
- export function supportedTransactionPayloadToManualSearchResult(payload) {
177
- const amountPayload = getManualSearchListAmountFromPayload(payload);
178
- return {
179
- amount: amountPayload.amount,
180
- currencyCode: amountPayload.currencyCode,
181
- entityId: payload.vendor_id ?? payload.customer_id ?? '',
182
- memo: payload.transaction_memo ?? '',
183
- transactionDate: payload.transaction_date,
184
- transactionId: payload.transaction_id,
185
- transactionType: payload.transaction_type,
186
- vendorName: payload.vendor_name ?? '',
187
- vendorLogo: toURL(payload.logo)?.href,
188
- };
189
- }
1
+ export {};
@@ -44,8 +44,6 @@ export const initialState = {
44
44
  uiState: {
45
45
  searchString: '',
46
46
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
47
- sortKey: 'startMonth',
48
- sortOrder: 'descending',
49
47
  totalCount: 0,
50
48
  limit: 10,
51
49
  },
@@ -367,26 +365,12 @@ const expenseAutomationJESchedulesView = createSlice({
367
365
  clearJeAccountSettingsLocalData(draft) {
368
366
  draft.accountSettings.localData = accountSettingsInitialState.localData;
369
367
  },
370
- updateJESchedulesUIState(draft, action) {
371
- if (action.payload.sortKey != null) {
372
- draft.uiState.sortKey = action.payload.sortKey;
373
- }
374
- if (action.payload.sortOrder != null) {
375
- draft.uiState.sortOrder = action.payload.sortOrder;
376
- }
377
- if (action.payload.searchString != null) {
378
- draft.uiState.searchString = action.payload.searchString;
379
- }
380
- if (action.payload.scrollPosition != null) {
381
- draft.uiState.scrollPosition = action.payload.scrollPosition;
382
- }
383
- },
384
368
  clearExpenseAutomationJESchedulesView(draft) {
385
369
  Object.assign(draft, initialState);
386
370
  },
387
371
  },
388
372
  });
389
- export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
373
+ export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
390
374
  export default expenseAutomationJESchedulesView.reducer;
391
375
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
392
376
  const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = mapAccountTypeRecommendationPayloadToAccountRecommendationByType(payload);