@zeniai/client-epic-state 4.20.11 → 5.0.0-beta0ND

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 (277) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonStateTypes/animations.d.ts +1 -1
  4. package/lib/commonStateTypes/animations.js +3 -0
  5. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  6. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  7. package/lib/coreEpics.js +2 -1
  8. package/lib/entity/account/accountPayload.d.ts +2 -0
  9. package/lib/entity/account/accountReducer.d.ts +5 -2
  10. package/lib/entity/account/accountReducer.js +7 -2
  11. package/lib/entity/account/accountState.d.ts +1 -1
  12. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  13. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  14. package/lib/entity/accountRecon/accountReconPayload.js +4 -2
  15. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  16. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  17. package/lib/entity/class/classReducer.d.ts +4 -4
  18. package/lib/entity/class/classState.d.ts +1 -1
  19. package/lib/entity/forecast/forecastState.d.ts +1 -1
  20. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  21. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  22. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  23. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  24. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  25. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  26. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  27. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  28. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  29. package/lib/entity/snackbar/snackbarTypes.js +7 -0
  30. package/lib/entity/tenant/SessionManager.d.ts +38 -0
  31. package/lib/entity/tenant/SessionManager.js +171 -0
  32. package/lib/entity/tenant/epic/sessionHeartbeatEpic.d.ts +16 -0
  33. package/lib/entity/tenant/epic/sessionHeartbeatEpic.js +16 -0
  34. package/lib/entity/tenant/sessionTypes.d.ts +26 -0
  35. package/lib/entity/tenant/sessionTypes.js +12 -0
  36. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  37. package/lib/entity/tenant/tenantReducer.d.ts +10 -3
  38. package/lib/entity/tenant/tenantReducer.js +30 -2
  39. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  40. package/lib/entity/tenant/tenantSelector.js +9 -1
  41. package/lib/entity/tenant/tenantState.d.ts +2 -0
  42. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  43. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  44. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +9 -0
  45. package/lib/entity/transaction/payloadTypes/transactionPayload.js +79 -1
  46. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  47. package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
  48. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  49. package/lib/epic.d.ts +15 -1
  50. package/lib/epic.js +15 -1
  51. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  52. package/lib/esm/commonStateTypes/animations.js +3 -0
  53. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  54. package/lib/esm/coreEpics.js +2 -1
  55. package/lib/esm/entity/account/accountReducer.js +6 -1
  56. package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
  57. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  58. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  59. package/lib/esm/entity/snackbar/snackbarTypes.js +7 -0
  60. package/lib/esm/entity/tenant/SessionManager.js +167 -0
  61. package/lib/esm/entity/tenant/epic/sessionHeartbeatEpic.js +12 -0
  62. package/lib/esm/entity/tenant/sessionTypes.js +9 -0
  63. package/lib/esm/entity/tenant/tenantReducer.js +28 -1
  64. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  65. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  66. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +79 -1
  67. package/lib/esm/epic.js +15 -1
  68. package/lib/esm/index.js +22 -16
  69. package/lib/esm/reducer.js +3 -0
  70. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  71. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  72. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  73. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  74. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  75. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  76. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
  77. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  78. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
  79. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  80. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  81. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  82. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +44 -0
  83. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  84. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +44 -0
  85. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  86. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
  87. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
  88. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
  89. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
  90. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
  91. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  92. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +13 -5
  93. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  94. package/lib/esm/view/expenseAutomationView/{bulkUploadTiming.js → helpers/bulkUploadTiming.js} +6 -0
  95. package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
  96. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  97. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  98. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  99. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
  100. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +26 -3
  101. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  102. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  103. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  104. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  105. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  106. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  107. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
  108. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
  109. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  110. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
  111. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
  112. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
  113. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
  114. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
  115. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
  116. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
  117. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
  118. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
  119. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
  120. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  121. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  122. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  123. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  124. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  125. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  126. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  127. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  128. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  129. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  130. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  131. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  132. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  133. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  134. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  135. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  136. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
  137. package/lib/index.d.ts +32 -22
  138. package/lib/index.js +72 -33
  139. package/lib/reducer.d.ts +3 -0
  140. package/lib/reducer.js +3 -0
  141. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  142. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  143. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  144. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  145. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  146. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  147. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  148. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  149. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  150. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  151. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  152. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  153. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  154. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  155. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  156. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  157. package/lib/view/classList/fetchClassListEpic.js +8 -1
  158. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  159. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  160. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  161. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  162. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  163. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
  164. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
  165. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  166. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
  167. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
  168. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
  169. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  170. package/lib/view/companyView/companyViewReducer.js +28 -2
  171. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  172. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  173. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  174. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  175. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  176. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +8 -0
  177. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +48 -0
  178. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  179. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +9 -0
  180. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +48 -0
  181. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  182. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
  183. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
  184. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  185. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
  186. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
  187. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
  188. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
  189. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
  190. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  191. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  192. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +12 -4
  193. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  194. package/lib/view/expenseAutomationView/{bulkUploadTiming.d.ts → helpers/bulkUploadTiming.d.ts} +6 -0
  195. package/lib/view/expenseAutomationView/{bulkUploadTiming.js → helpers/bulkUploadTiming.js} +7 -1
  196. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
  197. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
  198. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  199. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  200. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  201. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  202. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  203. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  204. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  205. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  206. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
  207. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +12 -2
  208. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +27 -4
  209. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  210. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  211. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  212. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
  213. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  214. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  215. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  216. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  217. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  218. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  219. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
  220. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
  221. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
  222. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +4 -0
  223. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  224. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  225. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  226. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  227. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  228. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  229. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  230. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  231. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
  232. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
  233. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
  234. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
  235. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
  236. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
  237. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
  238. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
  239. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
  240. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
  241. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
  242. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
  243. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
  244. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
  245. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
  246. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
  247. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
  248. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
  249. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
  250. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
  251. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  252. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  253. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  254. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  255. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  256. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  257. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  258. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  259. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  260. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  261. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  262. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  263. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  264. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  265. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  266. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  267. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  268. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
  269. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  270. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  271. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  272. package/lib/view/topEx/topExSelector.d.ts +1 -1
  273. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  274. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  275. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
  276. package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
  277. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearCompanyTaskManagerView = exports.updateCompanyTaskManagerViewOnFailure = exports.updateCompanyTaskManagerViewOnSuccess = exports.fetchCompanyTaskManagerView = exports.initialState = exports.initialUIState = void 0;
4
+ exports.clearCompanyTaskManagerView = exports.updateTaskManagerMetricsOnFailure = exports.updateTaskManagerMetrics = exports.fetchTaskManagerMetrics = exports.updateCompanyTaskManagerViewOnFailure = exports.updateCompanyTaskManagerViewOnSuccess = exports.fetchCompanyTaskManagerView = exports.initialState = exports.initialUIState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  exports.initialUIState = {
7
7
  filterText: '',
@@ -9,10 +9,18 @@ exports.initialUIState = {
9
9
  sortOrder: 'descending',
10
10
  pageToken: null,
11
11
  };
12
+ const initialMetrics = {
13
+ closed: 0,
14
+ open: 0,
15
+ overdue: 0,
16
+ total: 0,
17
+ };
12
18
  exports.initialState = {
13
19
  taskIds: [],
14
20
  fetchState: 'Not-Started',
15
21
  error: undefined,
22
+ metrics: initialMetrics,
23
+ metricsFetchState: 'Not-Started',
16
24
  uiState: exports.initialUIState,
17
25
  hasValidState() {
18
26
  return this.fetchState == 'Completed';
@@ -71,10 +79,20 @@ const companyTaskManagerView = (0, toolkit_1.createSlice)({
71
79
  return { payload: { error } };
72
80
  },
73
81
  },
82
+ fetchTaskManagerMetrics(draft) {
83
+ draft.metricsFetchState = 'In-Progress';
84
+ },
85
+ updateTaskManagerMetrics(draft, action) {
86
+ draft.metrics = action.payload;
87
+ draft.metricsFetchState = 'Completed';
88
+ },
89
+ updateTaskManagerMetricsOnFailure(draft) {
90
+ draft.metricsFetchState = 'Error';
91
+ },
74
92
  clearCompanyTaskManagerView(draft) {
75
93
  Object.assign(draft, exports.initialState);
76
94
  },
77
95
  },
78
96
  });
79
- _a = companyTaskManagerView.actions, exports.fetchCompanyTaskManagerView = _a.fetchCompanyTaskManagerView, exports.updateCompanyTaskManagerViewOnSuccess = _a.updateCompanyTaskManagerViewOnSuccess, exports.updateCompanyTaskManagerViewOnFailure = _a.updateCompanyTaskManagerViewOnFailure, exports.clearCompanyTaskManagerView = _a.clearCompanyTaskManagerView;
97
+ _a = companyTaskManagerView.actions, exports.fetchCompanyTaskManagerView = _a.fetchCompanyTaskManagerView, exports.updateCompanyTaskManagerViewOnSuccess = _a.updateCompanyTaskManagerViewOnSuccess, exports.updateCompanyTaskManagerViewOnFailure = _a.updateCompanyTaskManagerViewOnFailure, exports.fetchTaskManagerMetrics = _a.fetchTaskManagerMetrics, exports.updateTaskManagerMetrics = _a.updateTaskManagerMetrics, exports.updateTaskManagerMetricsOnFailure = _a.updateTaskManagerMetricsOnFailure, exports.clearCompanyTaskManagerView = _a.clearCompanyTaskManagerView;
80
98
  exports.default = companyTaskManagerView.reducer;
@@ -4,7 +4,8 @@ import { Tag } from '../../entity/tag/tagState';
4
4
  import { Task } from '../../entity/task/taskState';
5
5
  import { User } from '../../entity/user/userState';
6
6
  import { RootState } from '../../reducer';
7
- import { CompanyTaskManagerViewUIState } from './companyTaskManagerViewState';
7
+ import { CompanyTaskManagerViewUIState, TaskManagerMetrics } from './companyTaskManagerViewState';
8
+ import { FetchState } from '../../commonStateTypes/common';
8
9
  export interface TaskWithCompanyDetail {
9
10
  assignees: User[];
10
11
  company: Company;
@@ -13,6 +14,8 @@ export interface TaskWithCompanyDetail {
13
14
  task: Task;
14
15
  }
15
16
  export interface CompanyTaskManagerSelectorView extends SelectorView {
17
+ metrics: TaskManagerMetrics;
18
+ metricsFetchState: FetchState;
16
19
  tasksList: TaskWithCompanyDetail[];
17
20
  totalTaskCount: number;
18
21
  uiState: CompanyTaskManagerViewUIState;
@@ -7,7 +7,7 @@ const tagSelector_1 = require("../../entity/tag/tagSelector");
7
7
  const taskSelector_1 = require("../../entity/task/taskSelector");
8
8
  const userSelector_1 = require("../../entity/user/userSelector");
9
9
  exports.getCompanyTaskManagerView = (0, toolkit_1.createSelector)((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
10
- const { taskIds, uiState, fetchState, error, totalTaskCount } = companyTaskManagerViewState;
10
+ const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
11
11
  const tasksList = [];
12
12
  taskIds.forEach((taskId) => {
13
13
  const task = (0, taskSelector_1.getTaskById)(taskState, taskId);
@@ -30,6 +30,8 @@ exports.getCompanyTaskManagerView = (0, toolkit_1.createSelector)((state) => sta
30
30
  }
31
31
  });
32
32
  return {
33
+ metrics,
34
+ metricsFetchState,
33
35
  tasksList,
34
36
  uiState,
35
37
  fetchState,
@@ -1,7 +1,13 @@
1
- import { FetchedState, ID } from '../../commonStateTypes/common';
1
+ import { FetchState, FetchedState, ID } from '../../commonStateTypes/common';
2
2
  import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
3
3
  import { PageToken } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
4
  import { TaskManagerViewSortKey } from '../companyView/types/cockpitTypes';
5
+ export interface TaskManagerMetrics {
6
+ closed: number;
7
+ open: number;
8
+ overdue: number;
9
+ total: number;
10
+ }
5
11
  export interface CompanyTaskManagerViewUIState {
6
12
  filterText: string;
7
13
  pageToken: PageToken;
@@ -9,6 +15,8 @@ export interface CompanyTaskManagerViewUIState {
9
15
  sortOrder: SortOrder;
10
16
  }
11
17
  export interface CompanyTaskManagerViewState extends FetchedState {
18
+ metrics: TaskManagerMetrics;
19
+ metricsFetchState: FetchState;
12
20
  taskIds: ID[];
13
21
  totalTaskCount: number;
14
22
  uiState: CompanyTaskManagerViewUIState;
@@ -0,0 +1,7 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure } from '../companyTaskManagerViewReducer';
6
+ export type ActionType = ReturnType<typeof fetchTaskManagerMetrics> | ReturnType<typeof updateTaskManagerMetrics> | ReturnType<typeof updateTaskManagerMetricsOnFailure>;
7
+ export declare const fetchTaskManagerMetricsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchTaskManagerMetricsEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const companyTaskManagerViewReducer_1 = require("../companyTaskManagerViewReducer");
8
+ const fetchTaskManagerMetricsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyTaskManagerViewReducer_1.fetchTaskManagerMetrics.match), (0, operators_1.switchMap)(() => {
9
+ const query = JSON.stringify({ is_filter_by_logged_in_user: true });
10
+ return zeniAPI
11
+ .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks-es-metrics?query=${encodeURIComponent(query)}`)
12
+ .pipe((0, operators_1.mergeMap)((response) => {
13
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
14
+ return (0, rxjs_1.of)((0, companyTaskManagerViewReducer_1.updateTaskManagerMetrics)(response.data.summary));
15
+ }
16
+ else {
17
+ return (0, rxjs_1.of)((0, companyTaskManagerViewReducer_1.updateTaskManagerMetricsOnFailure)());
18
+ }
19
+ }), (0, operators_1.catchError)(() => (0, rxjs_1.of)((0, companyTaskManagerViewReducer_1.updateTaskManagerMetricsOnFailure)())));
20
+ }));
21
+ exports.fetchTaskManagerMetricsEpic = fetchTaskManagerMetricsEpic;
@@ -63,7 +63,12 @@ export declare const fetchCompanyPassportView: import("@reduxjs/toolkit").Action
63
63
  }, "companyView/companyPassportUpdateCompanyDetailsSuccess", never, never>, companyPassportUpdateCompanyDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
64
64
  companyId: ID;
65
65
  status: ZeniAPIStatus;
66
- }, "companyView/companyPassportUpdateCompanyDetailsFailure">, companyPassportUpdatePrimaryContact: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, primaryContact: PrimaryContactLocalData], {
66
+ }, "companyView/companyPassportUpdateCompanyDetailsFailure">, updateAccountingClassesEnabled: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, enabled: boolean], {
67
+ companyId: string;
68
+ enabled: boolean;
69
+ }, "companyView/updateAccountingClassesEnabled", never, never>, updateAccountingClassesEnabledSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"companyView/updateAccountingClassesEnabledSuccess">, updateAccountingClassesEnabledFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
70
+ status: ZeniAPIStatus;
71
+ }, "companyView/updateAccountingClassesEnabledFailure">, companyPassportUpdatePrimaryContact: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, primaryContact: PrimaryContactLocalData], {
67
72
  companyId: string;
68
73
  primaryContact: PrimaryContactLocalData;
69
74
  }, "companyView/companyPassportUpdatePrimaryContact", never, never>, companyPassportUpdatePrimaryContactSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateMetaDataOnSendMonthEndReport = exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
4
+ exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.updateAccountingClassesEnabledFailure = exports.updateAccountingClassesEnabledSuccess = exports.updateAccountingClassesEnabled = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
5
+ exports.updateMetaDataOnSendMonthEndReport = void 0;
5
6
  const toolkit_1 = require("@reduxjs/toolkit");
6
7
  const parentSubsidiaryViewState_1 = require("./parentSubsidiaryView/parentSubsidiaryViewState");
7
8
  const companyManagementViewState_1 = require("./types/companyManagementViewState");
@@ -288,6 +289,31 @@ const companyView = (0, toolkit_1.createSlice)({
288
289
  error: status,
289
290
  };
290
291
  },
292
+ updateAccountingClassesEnabled: {
293
+ reducer(draft,
294
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
295
+ _action) {
296
+ draft.passportView.accountingClassesUpdateStatus = {
297
+ fetchState: 'In-Progress',
298
+ error: undefined,
299
+ };
300
+ },
301
+ prepare(companyId, enabled) {
302
+ return { payload: { companyId, enabled } };
303
+ },
304
+ },
305
+ updateAccountingClassesEnabledSuccess(draft) {
306
+ draft.passportView.accountingClassesUpdateStatus = {
307
+ fetchState: 'Completed',
308
+ error: undefined,
309
+ };
310
+ },
311
+ updateAccountingClassesEnabledFailure(draft, action) {
312
+ draft.passportView.accountingClassesUpdateStatus = {
313
+ fetchState: 'Error',
314
+ error: action.payload.status,
315
+ };
316
+ },
291
317
  companyPassportUpdatePrimaryContact: {
292
318
  reducer(draft, action) {
293
319
  const { primaryContact } = action.payload;
@@ -561,5 +587,5 @@ const companyView = (0, toolkit_1.createSlice)({
561
587
  },
562
588
  },
563
589
  });
564
- _a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
590
+ _a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.updateAccountingClassesEnabled = _a.updateAccountingClassesEnabled, exports.updateAccountingClassesEnabledSuccess = _a.updateAccountingClassesEnabledSuccess, exports.updateAccountingClassesEnabledFailure = _a.updateAccountingClassesEnabledFailure, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
565
591
  exports.default = companyView.reducer;
@@ -0,0 +1,10 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateCompanies } from '../../../../entity/company/companyReducer';
4
+ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
5
+ import { updateTenantAccountingClassesEnabled } from '../../../../entity/tenant/tenantReducer';
6
+ import { RootState } from '../../../../reducer';
7
+ import { ZeniAPI } from '../../../../zeniAPI';
8
+ import { updateAccountingClassesEnabled, updateAccountingClassesEnabledFailure, updateAccountingClassesEnabledSuccess } from '../../companyViewReducer';
9
+ export type ActionType = ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantAccountingClassesEnabled> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateAccountingClassesEnabled> | ReturnType<typeof updateAccountingClassesEnabledSuccess> | ReturnType<typeof updateAccountingClassesEnabledFailure>;
10
+ export declare const updateAccountingClassesEnabledEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateAccountingClassesEnabledEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const companyReducer_1 = require("../../../../entity/company/companyReducer");
7
+ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
8
+ const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
9
+ const responsePayload_1 = require("../../../../responsePayload");
10
+ const companyViewReducer_1 = require("../../companyViewReducer");
11
+ const updateAccountingClassesEnabledEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateAccountingClassesEnabled.match), (0, operators_1.switchMap)((action) => {
12
+ const { companyId, enabled } = action.payload;
13
+ const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
14
+ return zeniAPI
15
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_classes_enabled: enabled })
16
+ .pipe((0, operators_1.mergeMap)((response) => {
17
+ const companies = response.data?.companies ?? [];
18
+ if ((0, responsePayload_1.isSuccessResponse)(response) && companies.length > 0) {
19
+ const actions = [
20
+ (0, companyReducer_1.updateCompanies)({
21
+ payload: companies,
22
+ schema: {},
23
+ }),
24
+ ];
25
+ if (tenantId != null) {
26
+ actions.push((0, tenantReducer_1.updateTenantAccountingClassesEnabled)({
27
+ enabled,
28
+ tenantId,
29
+ }));
30
+ }
31
+ actions.push((0, companyViewReducer_1.updateAccountingClassesEnabledSuccess)());
32
+ actions.push((0, snackbarReducer_1.openSnackbar)({
33
+ messageSection: 'accounting_classes_enabled_update',
34
+ messageText: 'success',
35
+ type: 'success',
36
+ }));
37
+ return (0, rxjs_1.from)(actions);
38
+ }
39
+ else {
40
+ return (0, rxjs_1.from)([
41
+ (0, companyViewReducer_1.updateAccountingClassesEnabledFailure)({
42
+ status: response.status,
43
+ }),
44
+ (0, snackbarReducer_1.openSnackbar)({
45
+ messageSection: 'accounting_classes_enabled_update',
46
+ messageText: 'failed',
47
+ type: 'error',
48
+ }),
49
+ ]);
50
+ }
51
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
52
+ (0, companyViewReducer_1.updateAccountingClassesEnabledFailure)({
53
+ status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update Accounting Classes Enabled errored out' +
54
+ (error instanceof Error
55
+ ? error.message
56
+ : JSON.stringify(error))),
57
+ }),
58
+ (0, snackbarReducer_1.openSnackbar)({
59
+ messageSection: 'accounting_classes_enabled_update',
60
+ messageText: 'failed',
61
+ type: 'error',
62
+ }),
63
+ ])));
64
+ }));
65
+ exports.updateAccountingClassesEnabledEpic = updateAccountingClassesEnabledEpic;
@@ -4,6 +4,7 @@ import { CompanyDetailsLocalData } from '../companyPassport/companyDetailsLocalD
4
4
  import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData } from '../companyPassport/companyUsersLocalData';
5
5
  export type UpdateActionType = 'company_update' | 'user_create' | 'user_update';
6
6
  export interface CompanyPassportViewState extends CommonState, FetchedState {
7
+ accountingClassesUpdateStatus: FetchStateAndError;
7
8
  companyDetails: {
8
9
  updateStatus: FetchStateAndError;
9
10
  localData?: CompanyDetailsLocalData;
@@ -4,6 +4,10 @@ exports.initialCompanyPassportView = void 0;
4
4
  const commonState_1 = require("../commonState");
5
5
  exports.initialCompanyPassportView = {
6
6
  ...commonState_1.initialCommonState,
7
+ accountingClassesUpdateStatus: {
8
+ fetchState: 'Not-Started',
9
+ error: undefined,
10
+ },
7
11
  companyDetails: {
8
12
  localData: undefined,
9
13
  updateStatus: {
@@ -1,12 +1,12 @@
1
1
  import { DashboardState } from './dashboardState';
2
2
  export declare const initialState: DashboardState;
3
- export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[] | undefined], {
3
+ export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation")[] | undefined], {
4
4
  userId: string;
5
5
  companyId: string;
6
6
  tenantId: string;
7
7
  fetchFullReport: any;
8
8
  cacheOverride: any;
9
- excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[];
9
+ excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation")[];
10
10
  }, "dashboard/fetchDashboard", never, never>, updateTreasuryVideoClosed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/updateTreasuryVideoClosed">, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
11
11
  declare const _default: import("redux").Reducer<DashboardState>;
12
12
  export default _default;
@@ -0,0 +1,8 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { changeAccountKey } from '../../../../entity/account/accountReducer';
4
+ import { RootState } from '../../../../reducer';
5
+ import { ZeniAPI } from '../../../../zeniAPI';
6
+ import { excludeAccountFromReconciliation, excludeAccountFromReconciliationFailure, excludeAccountFromReconciliationSuccess } from '../../reducers/reconciliationViewReducer';
7
+ export type ActionType = ReturnType<typeof excludeAccountFromReconciliation> | ReturnType<typeof changeAccountKey> | ReturnType<typeof excludeAccountFromReconciliationSuccess> | ReturnType<typeof excludeAccountFromReconciliationFailure>;
8
+ export declare const excludeAccountFromReconciliationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.excludeAccountFromReconciliationEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const accountReducer_1 = require("../../../../entity/account/accountReducer");
7
+ const accountState_1 = require("../../../../entity/account/accountState");
8
+ const accountReconSelector_1 = require("../../../../entity/accountRecon/accountReconSelector");
9
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
10
+ const responsePayload_1 = require("../../../../responsePayload");
11
+ const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
12
+ const excludeAccountFromReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.excludeAccountFromReconciliation.match), (0, operators_1.mergeMap)((action) => {
13
+ const { accountId } = action.payload;
14
+ const state = state$.value;
15
+ const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
16
+ const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
17
+ const reconciliationData = (0, accountReconSelector_1.getAccountReconByAccountIdAndSelectedPeriod)(state, accountId, selectedPeriod);
18
+ const payload = {
19
+ account_id: accountId,
20
+ bank_balance: reconciliationData?.balance?.amount ?? null,
21
+ cleared_balance: reconciliationData?.clearedBalance?.amount ?? null,
22
+ variance: reconciliationData?.variance?.amount ?? null,
23
+ };
24
+ const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts`;
25
+ return zeniAPI
26
+ .postAndGetJSON(apiUrl, payload)
27
+ .pipe((0, operators_1.mergeMap)((response) => {
28
+ if ((0, responsePayload_1.isSuccessResponse)(response)) {
29
+ const newAccountKey = (0, accountState_1.getAccountKey)('excluded_account_reconciliation', accountId);
30
+ const oldAccountKey = (0, accountState_1.getAccountKey)('account_reconciliation', accountId);
31
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationSuccess)({
32
+ account: response.data?.excluded_account ?? undefined,
33
+ selectedPeriod,
34
+ }), (0, accountReducer_1.changeAccountKey)({
35
+ oldKey: oldAccountKey,
36
+ newKey: newAccountKey,
37
+ }));
38
+ }
39
+ else {
40
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationFailure)({
41
+ error: response.status,
42
+ }));
43
+ }
44
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationFailure)({
45
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Exclude account from reconciliation REST API call errored out ${JSON.stringify(error)}`),
46
+ }))));
47
+ }));
48
+ exports.excludeAccountFromReconciliationEpic = excludeAccountFromReconciliationEpic;
@@ -56,22 +56,17 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
56
56
  return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.mergeMap)((response) => {
57
57
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
58
58
  const updateActions = [];
59
- updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'));
60
- updateActions.push((0, userReducer_1.updateAllUsers)({
59
+ const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
60
+ updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'), (0, accountReducer_1.updateAccounts)(response.data.excluded_accounts ?? [], 'excluded_account_reconciliation'), (0, userReducer_1.updateAllUsers)({
61
61
  users: response.data.users ?? [],
62
62
  updateType: 'merge',
63
- }));
64
- updateActions.push((0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }));
65
- const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
66
- updateActions.push((0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'));
67
- updateActions.push((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
63
+ }), (0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }), (0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'), (0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
68
64
  const reviewTabLocalData = (0, exports.prepareReviewTabLocalData)(response.data.reconciliation[0]?.transactions?.review ?? []);
69
65
  if (accountId != null) {
70
66
  const selectedTransactionIds = (0, saveReconciliationDetailEpic_1.getTransactionIdFromCheckedMatchedTransactionPayload)(response.data.reconciliation[0].transactions.reconcile);
71
67
  updateActions.push((0, reconciliationViewReducer_1.updateReconcileTabLocalData)({
72
68
  selectedTransactionIds: selectedTransactionIds,
73
- }));
74
- updateActions.push((0, reconciliationViewReducer_1.initializeReconciliationReviewTabLocalData)(reviewTabLocalData));
69
+ }), (0, reconciliationViewReducer_1.initializeReconciliationReviewTabLocalData)(reviewTabLocalData));
75
70
  }
76
71
  updateActions.push((0, reconciliationViewReducer_1.fetchReconciliationSuccess)(selectedPeriod, response.data, refreshViewInBackground, accountId));
77
72
  return (0, rxjs_1.from)(updateActions);
@@ -0,0 +1,9 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { changeAccountKey } from '../../../../entity/account/accountReducer';
4
+ import { updateAccountRecon } from '../../../../entity/accountRecon/accountReconReducer';
5
+ import { RootState } from '../../../../reducer';
6
+ import { ZeniAPI } from '../../../../zeniAPI';
7
+ import { includeAccountInReconciliation, includeAccountInReconciliationFailure, includeAccountInReconciliationSuccess } from '../../reducers/reconciliationViewReducer';
8
+ export type ActionType = ReturnType<typeof includeAccountInReconciliation> | ReturnType<typeof includeAccountInReconciliationSuccess> | ReturnType<typeof includeAccountInReconciliationFailure> | ReturnType<typeof changeAccountKey> | ReturnType<typeof updateAccountRecon>;
9
+ export declare const includeAccountInReconciliationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.includeAccountInReconciliationEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
7
+ const accountReducer_1 = require("../../../../entity/account/accountReducer");
8
+ const accountState_1 = require("../../../../entity/account/accountState");
9
+ const accountReconReducer_1 = require("../../../../entity/accountRecon/accountReconReducer");
10
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
11
+ const responsePayload_1 = require("../../../../responsePayload");
12
+ const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
13
+ const includeAccountInReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.includeAccountInReconciliation.match), (0, operators_1.mergeMap)((action) => {
14
+ const { accountId } = action.payload;
15
+ const state = state$.value;
16
+ const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
17
+ const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
18
+ const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod, true);
19
+ const query = JSON.stringify({
20
+ start_date: period.start,
21
+ end_date: period.end,
22
+ });
23
+ const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts/${accountId}?query=${encodeURIComponent(query)}`;
24
+ return zeniAPI
25
+ .deleteAndGetJSON(apiUrl)
26
+ .pipe((0, operators_1.mergeMap)((response) => {
27
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
28
+ const reconciliation = response.data.reconciliation;
29
+ const oldAccountKey = (0, accountState_1.getAccountKey)('excluded_account_reconciliation', reconciliation.account_id);
30
+ const newAccountKey = (0, accountState_1.getAccountKey)('account_reconciliation', reconciliation.account_id);
31
+ return (0, rxjs_1.of)((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, [reconciliation]), (0, reconciliationViewReducer_1.includeAccountInReconciliationSuccess)({
32
+ reconciliation,
33
+ selectedPeriod,
34
+ }), (0, accountReducer_1.changeAccountKey)({
35
+ oldKey: oldAccountKey,
36
+ newKey: newAccountKey,
37
+ }));
38
+ }
39
+ else {
40
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.includeAccountInReconciliationFailure)({
41
+ error: response.status,
42
+ }));
43
+ }
44
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.includeAccountInReconciliationFailure)({
45
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Include account in reconciliation REST API call errored out ${JSON.stringify(error)}`),
46
+ }))));
47
+ }));
48
+ exports.includeAccountInReconciliationEpic = includeAccountInReconciliationEpic;
@@ -24,13 +24,13 @@ const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
24
24
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
25
25
  const updateActions = [];
26
26
  updateActions.push((0, jeSchedulesReducer_1.updateJESchedules)([
27
- ...response.data.draft_je_schedules,
27
+ ...response.data.je_schedules,
28
28
  ...response.data.failed_je_postings.je_schedules,
29
29
  ]), (0, jeSchedulesReducer_1.updateJESchedulesDetails)([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), (0, jeSchedulesViewReducer_1.initializeJeScheduleLocalData)([
30
30
  ...response.data.failed_je_postings.je_schedules,
31
31
  ]));
32
32
  updateActions.push((0, jeSchedulesViewReducer_1.fetchJeSchedulesSuccess)({
33
- jeSchedules: [...response.data.draft_je_schedules],
33
+ jeSchedules: [...response.data.je_schedules],
34
34
  failedJeSchedules: [
35
35
  ...response.data.failed_je_postings.je_schedules,
36
36
  ],
@@ -0,0 +1,13 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
+ import { bulkUploadReceiptsSuccess, clearBulkUpload, fetchBulkUploadBatchDetailsSuccess, restoreBulkUploadMatchingState, storeBatchDetails } from '../../reducers/missingReceiptsViewReducer';
5
+ export type ActionType = ReturnType<typeof bulkUploadReceiptsSuccess> | ReturnType<typeof restoreBulkUploadMatchingState> | ReturnType<typeof fetchBulkUploadBatchDetailsSuccess> | ReturnType<typeof storeBatchDetails> | ReturnType<typeof clearBulkUpload> | ReturnType<typeof openSnackbar>;
6
+ /**
7
+ * Show a success toast when batch details arrive for the current upload batch,
8
+ * e.g. "17 out of 20 Receipts Matched". Scoped per upload session so it fires
9
+ * only once: starts on `bulkUploadReceiptsSuccess` (or `restoreBulkUploadMatchingState`
10
+ * for a restored session), waits for the first batch-details action for that batch,
11
+ * emits the toast, then stops. `clearBulkUpload` cancels the in-flight wait.
12
+ */
13
+ export declare const bulkUploadMatchResultToastEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bulkUploadMatchResultToastEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
7
+ const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
8
+ /**
9
+ * Show a success toast when batch details arrive for the current upload batch,
10
+ * e.g. "17 out of 20 Receipts Matched". Scoped per upload session so it fires
11
+ * only once: starts on `bulkUploadReceiptsSuccess` (or `restoreBulkUploadMatchingState`
12
+ * for a restored session), waits for the first batch-details action for that batch,
13
+ * emits the toast, then stops. `clearBulkUpload` cancels the in-flight wait.
14
+ */
15
+ const bulkUploadMatchResultToastEpic = (actions$) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
16
+ missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.switchMap)((uploadAction) => {
17
+ const { batchId } = uploadAction.payload;
18
+ return (0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.storeBatchDetails.match))).pipe((0, operators_1.filter)((a) => a.payload.batchId === batchId), (0, operators_1.take)(1), (0, operators_1.mergeMap)((action) => {
19
+ const { summary } = action.payload;
20
+ return (0, rxjs_1.of)((0, snackbarReducer_1.openSnackbar)({
21
+ messageSection: 'receipts_bulk_match',
22
+ messageText: 'success',
23
+ type: 'success',
24
+ variables: [
25
+ {
26
+ variableName: '_matched_',
27
+ variableValue: String(summary.matched),
28
+ },
29
+ {
30
+ variableName: '_total_',
31
+ variableValue: String(summary.total),
32
+ },
33
+ ],
34
+ }));
35
+ }), (0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match))));
36
+ }));
37
+ exports.bulkUploadMatchResultToastEpic = bulkUploadMatchResultToastEpic;
@@ -4,9 +4,9 @@ exports.bulkUploadReceiptsEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../../responsePayload");
7
- const bulkUploadTiming_1 = require("../../bulkUploadTiming");
7
+ const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
8
8
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
9
- const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceipts.match), (0, operators_1.mergeMap)((action) => {
9
+ const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceipts.match), (0, operators_1.switchMap)((action) => {
10
10
  const { files } = action.payload;
11
11
  const formData = new FormData();
12
12
  for (const file of files) {