@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS13

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 (411) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  4. package/lib/commonStateTypes/animations.d.ts +1 -1
  5. package/lib/commonStateTypes/animations.js +4 -0
  6. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  7. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  8. package/lib/commonStateTypes/common.d.ts +1 -1
  9. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  10. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  11. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  12. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  13. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  14. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  15. package/lib/entity/account/accountPayload.d.ts +2 -0
  16. package/lib/entity/account/accountReducer.d.ts +5 -2
  17. package/lib/entity/account/accountReducer.js +13 -5
  18. package/lib/entity/account/accountSelector.d.ts +7 -0
  19. package/lib/entity/account/accountSelector.js +4 -2
  20. package/lib/entity/account/accountState.d.ts +3 -1
  21. package/lib/entity/account/accountState.js +4 -1
  22. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  23. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  24. package/lib/entity/account/subAccountSelector.js +2 -0
  25. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  26. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  27. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  28. package/lib/entity/accountRecon/accountReconPayload.js +4 -2
  29. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +52 -0
  30. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +70 -0
  31. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  32. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  33. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  34. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  35. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  36. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  37. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  38. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
  39. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  40. package/lib/entity/class/classReducer.d.ts +4 -4
  41. package/lib/entity/class/classState.d.ts +1 -1
  42. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  43. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  44. package/lib/entity/forecast/forecastState.d.ts +1 -1
  45. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  46. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  47. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  48. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  49. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  50. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  51. package/lib/entity/project/projectPayload.d.ts +13 -0
  52. package/lib/entity/project/projectPayload.js +30 -0
  53. package/lib/entity/project/projectReducer.d.ts +10 -0
  54. package/lib/entity/project/projectReducer.js +31 -0
  55. package/lib/entity/project/projectSelector.d.ts +5 -0
  56. package/lib/entity/project/projectSelector.js +12 -0
  57. package/lib/entity/project/projectState.d.ts +13 -0
  58. package/lib/entity/project/projectState.js +2 -0
  59. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  60. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  61. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  62. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +13 -0
  63. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  64. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  65. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  66. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +11 -0
  67. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +15 -0
  68. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  69. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +64 -0
  70. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  71. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +57 -0
  72. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  73. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  74. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  75. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  76. package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
  77. package/lib/entity/snackbar/snackbarTypes.js +10 -0
  78. package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
  79. package/lib/entity/tenant/clearAllEpic.js +10 -0
  80. package/lib/entity/tenant/tenantPayload.d.ts +2 -0
  81. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  82. package/lib/entity/tenant/tenantReducer.js +10 -2
  83. package/lib/entity/tenant/tenantSelector.d.ts +2 -0
  84. package/lib/entity/tenant/tenantSelector.js +17 -1
  85. package/lib/entity/tenant/tenantState.d.ts +2 -0
  86. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  87. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  88. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +11 -0
  89. package/lib/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  90. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  91. package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
  92. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  93. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  94. package/lib/epic.d.ts +22 -2
  95. package/lib/epic.js +22 -2
  96. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  97. package/lib/esm/commonStateTypes/animations.js +4 -0
  98. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  99. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  100. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  101. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  102. package/lib/esm/entity/account/accountReducer.js +12 -4
  103. package/lib/esm/entity/account/accountSelector.js +4 -2
  104. package/lib/esm/entity/account/accountState.js +4 -1
  105. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  106. package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
  107. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +64 -0
  108. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  109. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  110. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  111. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  112. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  113. package/lib/esm/entity/project/projectPayload.js +26 -0
  114. package/lib/esm/entity/project/projectReducer.js +27 -0
  115. package/lib/esm/entity/project/projectSelector.js +8 -0
  116. package/lib/esm/entity/project/projectState.js +1 -0
  117. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  118. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  119. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +11 -0
  120. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +60 -0
  121. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +50 -0
  122. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  123. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  124. package/lib/esm/entity/snackbar/snackbarTypes.js +10 -0
  125. package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
  126. package/lib/esm/entity/tenant/tenantReducer.js +9 -1
  127. package/lib/esm/entity/tenant/tenantSelector.js +14 -0
  128. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  129. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  130. package/lib/esm/epic.js +22 -2
  131. package/lib/esm/index.js +32 -19
  132. package/lib/esm/reducer.js +20 -2
  133. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  134. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +152 -0
  135. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +77 -0
  136. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  137. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  138. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  139. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  140. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +76 -0
  141. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  142. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  143. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  144. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  145. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  146. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  147. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
  148. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  149. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
  150. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  151. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  152. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  153. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +1 -39
  154. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
  155. package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -6
  156. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +63 -0
  157. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  158. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +65 -0
  159. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  160. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
  161. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
  162. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
  163. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  164. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
  165. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
  166. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  167. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +21 -5
  168. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  169. package/lib/esm/view/expenseAutomationView/helpers/bulkUploadTiming.js +16 -0
  170. package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
  171. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  172. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  173. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  174. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
  175. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +29 -6
  176. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  177. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  178. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  179. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  180. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  181. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  182. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
  183. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
  184. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  185. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  186. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
  187. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  188. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  189. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  190. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
  191. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  192. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  193. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  194. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
  195. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
  196. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
  197. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
  198. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
  199. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
  200. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
  201. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
  202. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
  203. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
  204. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  205. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  206. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  207. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  208. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  209. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  210. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  211. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  212. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  213. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  214. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  215. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  216. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  217. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  218. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  219. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  220. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  221. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
  222. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  223. package/lib/index.d.ts +49 -26
  224. package/lib/index.js +107 -39
  225. package/lib/reducer.d.ts +20 -2
  226. package/lib/reducer.js +20 -2
  227. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +33 -0
  228. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  229. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  230. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +156 -0
  231. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +16 -0
  232. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +83 -0
  233. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
  234. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  235. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  236. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  237. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  238. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  239. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  240. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  241. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  242. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +80 -0
  243. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  244. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  245. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  246. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  247. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  248. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  249. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  250. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  251. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  252. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  253. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  254. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  255. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  256. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  257. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  258. package/lib/view/classList/fetchClassListEpic.js +8 -1
  259. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  260. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  261. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  262. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  263. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  264. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
  265. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
  266. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  267. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
  268. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
  269. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
  270. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  271. package/lib/view/companyView/companyViewReducer.js +28 -2
  272. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  273. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  274. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  275. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  276. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  277. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -36
  278. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +2 -2
  279. package/lib/view/creditAgentView/creditAgentViewReducer.js +2 -40
  280. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
  281. package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
  282. package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -31
  283. package/lib/view/creditAgentView/creditAgentViewState.js +0 -6
  284. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  285. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +9 -0
  286. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +67 -0
  287. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  288. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +10 -0
  289. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +69 -0
  290. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  291. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
  292. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
  293. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  294. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
  295. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  296. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
  297. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
  298. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
  299. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
  300. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  301. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  302. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +20 -4
  303. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  304. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.d.ts +16 -0
  305. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.js +19 -0
  306. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
  307. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
  308. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  309. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
  310. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  311. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  312. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  313. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  314. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  315. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  316. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
  317. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +18 -2
  318. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +30 -7
  319. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  320. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  321. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  322. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
  323. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  324. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  325. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  326. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  327. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  328. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  329. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
  330. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
  331. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
  332. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +5 -1
  333. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  334. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  335. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  336. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  337. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  338. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  339. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
  340. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
  341. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  342. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  343. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  344. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  345. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  346. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  347. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  348. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
  349. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
  350. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  351. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  352. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  353. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  354. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  355. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  356. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  357. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  358. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  359. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
  360. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
  361. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
  362. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
  363. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
  364. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
  365. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
  366. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
  367. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
  368. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
  369. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
  370. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
  371. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
  372. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
  373. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
  374. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
  375. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
  376. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
  377. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
  378. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
  379. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  380. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  381. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  382. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
  383. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  384. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  385. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  386. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  387. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  388. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  389. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  390. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  391. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  392. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  393. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  394. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  395. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  396. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
  397. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  398. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  399. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
  400. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  401. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  402. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  403. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  404. package/lib/view/topEx/topExSelector.d.ts +1 -1
  405. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  406. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  407. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
  408. package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
  409. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  410. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  411. package/package.json +1 -1
@@ -15,11 +15,12 @@ const accountSelector_1 = require("../../../entity/account/accountSelector");
15
15
  const accountReconSelector_1 = require("../../../entity/accountRecon/accountReconSelector");
16
16
  const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
17
17
  const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
18
+ const zeniDayJS_1 = require("../../../zeniDayJS");
18
19
  const accountListSelector_1 = require("../../accountList/accountListSelector");
19
20
  const classListSelector_1 = require("../../classList/classListSelector");
20
21
  const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
21
22
  const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
22
- exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState) => {
23
+ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state) => state.monthEndCloseChecksViewState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState, monthEndCloseChecksViewState) => {
23
24
  const { selectedPeriodByTenantId } = expenseAutomationViewState;
24
25
  const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
25
26
  const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
@@ -41,6 +42,13 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
41
42
  }
42
43
  return acc;
43
44
  }, []);
45
+ const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
46
+ const monthEndFetchState = monthYearPeriodId != null
47
+ ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
48
+ fetchState: 'Not-Started',
49
+ error: undefined,
50
+ })
51
+ : { fetchState: 'Not-Started', error: undefined };
44
52
  if (accountReconForMonthYearPeriod == null) {
45
53
  return {
46
54
  bankAccounts: [],
@@ -50,10 +58,13 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
50
58
  classListNestedAccountHierarchy: [],
51
59
  allAccountList: [],
52
60
  allClassList: [],
53
- fetchStatus: {
54
- fetchState: reconciliationViewState.fetchState,
55
- error: reconciliationViewState.error,
56
- },
61
+ fetchStatus: (0, reduceFetchState_1.reduceAnyFetchState)([
62
+ {
63
+ fetchState: reconciliationViewState.fetchState,
64
+ error: reconciliationViewState.error,
65
+ },
66
+ monthEndFetchState,
67
+ ]),
57
68
  plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
58
69
  .plaidConnectionDetails,
59
70
  completionStatus: 'incomplete',
@@ -86,6 +97,30 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
86
97
  totalVariancePercentage: undefined,
87
98
  },
88
99
  },
100
+ excludedAccountReconciliationByAccountID: {},
101
+ excludedAccountReconciliationBySectionID: {
102
+ assets: {
103
+ sectionId: 'assets',
104
+ accountIDs: [],
105
+ totalBankBalance: undefined,
106
+ totalClearedBalance: undefined,
107
+ totalReconciledBalance: undefined,
108
+ totalVariance: undefined,
109
+ totalVariancePercentage: undefined,
110
+ },
111
+ liabilities: {
112
+ sectionId: 'liabilities',
113
+ accountIDs: [],
114
+ totalBankBalance: undefined,
115
+ totalClearedBalance: undefined,
116
+ totalReconciledBalance: undefined,
117
+ totalVariance: undefined,
118
+ totalVariancePercentage: undefined,
119
+ },
120
+ },
121
+ excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
122
+ includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
123
+ excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
89
124
  };
90
125
  }
91
126
  const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
@@ -223,6 +258,8 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
223
258
  .transactionFetchState,
224
259
  accountListState.byReportId.accountList,
225
260
  ]),
261
+ accountDetectionReason: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
262
+ .accountDetectionReason,
226
263
  };
227
264
  });
228
265
  const accountReconciliationBySectionID = {
@@ -245,6 +282,88 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
245
282
  totalVariancePercentage: liabilityTotals.variancePercentage,
246
283
  },
247
284
  };
285
+ const bankAccountIdSet = new Set(uniqueBankAccounts.map((a) => a.accountId));
286
+ const creditCardIdSet = new Set(uniqueCreditCards.map((a) => a.accountId));
287
+ const excludedAssetAccountIDs = [];
288
+ const excludedLiabilityAccountIDs = [];
289
+ reconciliationViewState.excludedAccountIDs.forEach((accountID) => {
290
+ const isAsset = bankAccountIdSet.has(accountID);
291
+ const isLiability = creditCardIdSet.has(accountID);
292
+ if (!isAsset && !isLiability) {
293
+ return;
294
+ }
295
+ if (isAsset) {
296
+ excludedAssetAccountIDs.push(accountID);
297
+ }
298
+ else {
299
+ excludedLiabilityAccountIDs.push(accountID);
300
+ }
301
+ });
302
+ const excludedAccountReconciliationBySectionID = {
303
+ assets: {
304
+ sectionId: 'assets',
305
+ accountIDs: excludedAssetAccountIDs,
306
+ },
307
+ liabilities: {
308
+ sectionId: 'liabilities',
309
+ accountIDs: excludedLiabilityAccountIDs,
310
+ },
311
+ };
312
+ const excludedAccountReconciliationByAccountID = {};
313
+ const accountsInState = Object.values(accountState.accountsByKey);
314
+ const accountsInStateMap = new Map(accountsInState.map((a) => [a.accountId, a]));
315
+ reconciliationViewState.excludedAccountIDs.forEach((excludedAccountID) => {
316
+ const account = accountsInStateMap.get(excludedAccountID);
317
+ const exclusionInfo = reconciliationViewState.excludedAccountExclusionInfo[excludedAccountID];
318
+ if (account != null) {
319
+ excludedAccountReconciliationByAccountID[excludedAccountID] = {
320
+ refreshStatus: { fetchState: 'Not-Started' },
321
+ statementUpdateStatus: { fetchState: 'Not-Started' },
322
+ statementUploadStatus: { fetchState: 'Not-Started' },
323
+ statementDeleteStatus: { fetchState: 'Not-Started' },
324
+ localData: {},
325
+ connectionInProgress: false,
326
+ statementParseInProgress: false,
327
+ accountConnectionStatus: 'not_connected',
328
+ transactionFetchState: { fetchState: 'Not-Started' },
329
+ accountReconEntity: {
330
+ account: {
331
+ accountId: account.accountId,
332
+ accountName: account.accountName,
333
+ accountType: account.accountType,
334
+ accountSubType: account.accountSubType,
335
+ accountDescription: account.accountDescription,
336
+ qboId: account.qboId,
337
+ coaId: account.coaId,
338
+ labels: account.labels,
339
+ },
340
+ currency: {
341
+ currencyCode: exclusionInfo?.bankBalance?.currencyCode ??
342
+ exclusionInfo?.clearedBalance?.currencyCode ??
343
+ 'USD',
344
+ currencySymbol: exclusionInfo?.bankBalance?.currencySymbol ??
345
+ exclusionInfo?.clearedBalance?.currencySymbol ??
346
+ '$',
347
+ },
348
+ startDate: (0, zeniDayJS_1.date)(new Date().toDateString()),
349
+ endDate: (0, zeniDayJS_1.date)(new Date().toDateString()),
350
+ statementStatus: { code: 'not_found', label: 'Not Found' },
351
+ transactionsToReconcile: [],
352
+ transactionsToReview: [],
353
+ balance: exclusionInfo?.bankBalance,
354
+ clearedBalance: exclusionInfo?.clearedBalance,
355
+ variance: exclusionInfo?.variance,
356
+ variancePercentage: exclusionInfo?.variance != null &&
357
+ exclusionInfo?.bankBalance != null &&
358
+ exclusionInfo?.bankBalance.amount !== 0
359
+ ? Math.abs((exclusionInfo.variance.amount /
360
+ exclusionInfo.bankBalance.amount) *
361
+ 100)
362
+ : undefined,
363
+ },
364
+ };
365
+ }
366
+ });
248
367
  const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
249
368
  const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
250
369
  const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
@@ -276,10 +395,13 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
276
395
  bankAccounts: uniqueBankAccounts,
277
396
  creditCards: uniqueCreditCards,
278
397
  accountReconciliationsByAccountID: reconList,
279
- fetchStatus: {
280
- fetchState: reconciliationViewState.fetchState,
281
- error: reconciliationViewState.error,
282
- },
398
+ fetchStatus: (0, reduceFetchState_1.reduceAnyFetchState)([
399
+ {
400
+ fetchState: reconciliationViewState.fetchState,
401
+ error: reconciliationViewState.error,
402
+ },
403
+ monthEndFetchState,
404
+ ]),
283
405
  plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
284
406
  .plaidConnectionDetails,
285
407
  reconciliationTabsState: reconciliationViewState.reconTabsState,
@@ -302,6 +424,11 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
302
424
  allClassList: allClasses,
303
425
  reviewTabSelectedVendorByTransactionId,
304
426
  reconListUIState: reconciliationViewState.reconListUIState,
427
+ excludedAccountReconciliationBySectionID,
428
+ excludedAccountReconciliationByAccountID,
429
+ excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
430
+ includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
431
+ excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
305
432
  };
306
433
  });
307
434
  const isAccountReconReport = (reportId) => {
@@ -14,7 +14,7 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
14
14
  const classListSelector_1 = require("../../classList/classListSelector");
15
15
  const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
16
16
  function getExpenseAutomationTransactionView(state) {
17
- const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
17
+ const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
18
18
  const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
19
19
  const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
20
20
  const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
@@ -47,10 +47,20 @@ function getExpenseAutomationTransactionView(state) {
47
47
  .filter((transaction) => transaction != null);
48
48
  const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
49
49
  const transactionsWithCOT = transactions.map((transaction) => (0, transactionHelper_1.getTransactionWithCOT)(transaction));
50
- const fetchStatus = (0, reduceFetchState_1.reduceAllFetchState)([
50
+ const monthEndFetchState = monthYearPeriodId != null
51
+ ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
52
+ : { fetchState: 'Not-Started', error: undefined };
53
+ const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state);
54
+ const allFetchStateList = [
51
55
  accountList,
52
- classList,
53
56
  expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
57
+ ];
58
+ if (isAccountingClassesEnabled) {
59
+ allFetchStateList.push(classList);
60
+ }
61
+ const fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
62
+ (0, reduceFetchState_1.reduceAllFetchState)(allFetchStateList),
63
+ monthEndFetchState,
54
64
  ]);
55
65
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
56
66
  .uiState.totalCount;
@@ -1,16 +1,24 @@
1
1
  import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
2
2
  import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
3
3
  import { Recommendation } from '../../../commonStateTypes/recommendationBase';
4
+ import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
4
5
  import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
5
6
  import { AccountBase } from '../../../entity/account/accountState';
6
7
  import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
7
8
  import { VendorBase } from '../../../entity/vendor/vendorState';
9
+ export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
10
+ export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
11
+ export declare const toJEScheduleMainTab: (v: string) => "completed" | "pending_review" | "ongoing";
12
+ export type JEScheduleMainTab = ReturnType<typeof toJEScheduleMainTab>;
8
13
  export interface JESchedulesViewUIState {
9
14
  scrollPosition: {
10
15
  scrollTop: number;
11
16
  scrollLeft?: number;
12
17
  } | undefined;
13
18
  searchString: string;
19
+ selectedMainTab: JEScheduleMainTab;
20
+ sortKey: JEScheduleSortKey;
21
+ sortOrder: SortOrder;
14
22
  totalCount: number;
15
23
  limit?: number;
16
24
  }
@@ -1,2 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toJEScheduleMainTab = exports.toJEScheduleSortKey = void 0;
4
+ const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
+ const JE_SCHEDULE_SORT_KEYS = [
6
+ 'vendor',
7
+ 'category',
8
+ 'class',
9
+ 'depCategory',
10
+ 'scheduleCategory',
11
+ 'startMonth',
12
+ 'type',
13
+ 'amortizationPeriod',
14
+ 'jePostingDate',
15
+ 'remainingMonths',
16
+ 'runningBalance',
17
+ 'totalAmount',
18
+ 'transactionDate',
19
+ 'memo',
20
+ ];
21
+ const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
22
+ exports.toJEScheduleSortKey = toJEScheduleSortKey;
23
+ const JE_SCHEDULE_MAIN_TABS = [
24
+ 'pending_review',
25
+ 'ongoing',
26
+ 'completed',
27
+ ];
28
+ const toJEScheduleMainTab = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_MAIN_TABS);
29
+ exports.toJEScheduleMainTab = toJEScheduleMainTab;
@@ -17,7 +17,7 @@ export interface MissingReceiptsViewUIState {
17
17
  * Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
18
18
  */
19
19
  export declare const MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
20
- export declare const toBatchStatusValue: (v: string) => "pending" | "processing" | "completed";
20
+ export declare const toBatchStatusValue: (v: string) => "pending" | "completed" | "processing";
21
21
  export type BatchStatusValue = ReturnType<typeof toBatchStatusValue>;
22
22
  /** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
23
23
  export declare const BATCH_FILE_STATUSES: readonly ["exact_match", "possible_matches", "no_match", "failed"];
@@ -83,6 +83,8 @@ export interface BatchDetails {
83
83
  files: BatchFile[];
84
84
  status: BatchStatusValue;
85
85
  summary: BatchSummary;
86
+ /** Present when batch-details API includes `user_id` (uploader). */
87
+ userId?: ID;
86
88
  }
87
89
  export interface BatchListItem {
88
90
  batchId: ID;
@@ -93,6 +95,7 @@ export interface BatchListItem {
93
95
  possibleMatchesCount: number;
94
96
  status: string;
95
97
  totalFiles: number;
98
+ userId: ID;
96
99
  }
97
100
  export interface ManualSearchResult {
98
101
  amount: number;
@@ -144,6 +147,7 @@ export interface BulkUploadState {
144
147
  phase: BulkUploadPhase;
145
148
  sortKey: BulkUploadSortKey;
146
149
  sortOrder: SortOrder;
150
+ uploadedFileCount: number;
147
151
  uploadProgress: number;
148
152
  uploadStatus: FetchStateAndError;
149
153
  currentBatchId?: ID;
@@ -74,13 +74,24 @@ export interface ReconciliationReviewTabLocalData {
74
74
  matchedTransactionId?: ID;
75
75
  vendor?: VendorBase;
76
76
  }
77
+ export interface ExcludeAccountFromReconciliationPayload {
78
+ accountId: ID;
79
+ }
80
+ export interface ExclusionInfo {
81
+ bankBalance: Amount | undefined;
82
+ clearedBalance: Amount | undefined;
83
+ variance: Amount | undefined;
84
+ }
77
85
  export interface ActionFetchStates {
86
+ excludeAccountFetch: FetchStateAndError;
78
87
  excludeFetchById: Record<ID, FetchStateAndError>;
88
+ includeAccountFetch: FetchStateAndError;
79
89
  reconcileFetch: FetchStateAndError;
80
90
  saveForLaterFetch: FetchStateAndError;
81
91
  saveReconciliationReviewFetch: Record<ID, FetchStateAndError>;
82
92
  }
83
93
  export interface ReconListUIState {
94
+ nodeCollapseState: Record<ID, boolean>;
84
95
  scrollPosition: {
85
96
  scrollTop: number;
86
97
  scrollLeft?: number;
@@ -90,6 +101,8 @@ export interface ReconciliationViewState extends FetchStateAndError {
90
101
  accountConnectionStatusByAccountID: Record<ID, BankConnectionStatus>;
91
102
  accountReconciliationRecordsBySelectedPeriod: Record<MonthYearPeriodId, AccountReconciliationRecords>;
92
103
  actionFetchState: ActionFetchStates;
104
+ excludedAccountExclusionInfo: Record<ID, ExclusionInfo>;
105
+ excludedAccountIDs: ID[];
93
106
  reconListUIState: ReconListUIState;
94
107
  reconTabsState: ReconciliationTabsState;
95
108
  refreshStatus: FetchStateAndError;
@@ -119,6 +132,7 @@ export interface AccountReconciliationDataWithTransactionFetchState {
119
132
  statementUpdateStatus: FetchStateAndError;
120
133
  statementUploadStatus: FetchStateAndError;
121
134
  transactionFetchState: FetchStateAndError;
135
+ accountDetectionReason?: string;
122
136
  reconciliationId?: ID;
123
137
  }
124
138
  export {};
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
17
17
  firstMonthOfFY: Month;
18
18
  maxNumOfPeriodsToHighlight: number;
19
19
  thisPeriod: TimeframeTick;
20
- }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
+ }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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" | "profit_and_loss_by_projects" | "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", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
21
  additionalBalances: COABalanceType[];
22
22
  coaBalances: COABalance[];
23
23
  firstMonthOfFY: Month;
@@ -10,6 +10,7 @@ import { CashFlowReport } from '../cashFlow/cashFlowSelectorTypes';
10
10
  import { ProfitAndLossReport } from '../profitAndLoss/profitAndLossSelector';
11
11
  import { ProfitAndLossByClassHorizontalReport } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
12
12
  import { ProfitAndLossClassesViewReport } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
13
+ import { ProfitAndLossProjectViewReport } from '../profitAndLossProjectView/profitAndLossProjectViewSelectorTypes';
13
14
  export interface FinanceStatementReport extends SelectorReport {
14
15
  allTimeframeTicks: TimeframeTickWithMetaData[];
15
16
  balanceSheetReport: BalanceSheetReport;
@@ -21,6 +22,7 @@ export interface FinanceStatementReport extends SelectorReport {
21
22
  isCompareModeOn: boolean;
22
23
  profitAndLossByClassHorizontalReport: ProfitAndLossByClassHorizontalReport;
23
24
  profitAndLossByClassReport: ProfitAndLossClassesViewReport;
25
+ profitAndLossByProjectReport: ProfitAndLossProjectViewReport;
24
26
  profitAndLossReport: ProfitAndLossReport;
25
27
  reportFormat: ReportFormat;
26
28
  selectedReportAndTimeframeFetchState: FetchStateAndError;
@@ -12,8 +12,10 @@ const thisPeriodHelpers_1 = require("../../commonStateTypes/viewAndReport/thisPe
12
12
  const balanceSheetSelector_1 = require("../balanceSheet/balanceSheetSelector");
13
13
  const cashFlowSelector_1 = require("../cashFlow/cashFlowSelector");
14
14
  const profitAndLossSelector_1 = require("../profitAndLoss/profitAndLossSelector");
15
+ const coaBalancesFilterProjectView_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilterProjectView");
15
16
  const profitAndLossClassesByClassHorizontalSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector");
16
17
  const profitAndLossClassesViewSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelector");
18
+ const profitAndLossProjectViewSelector_1 = require("../profitAndLossProjectView/profitAndLossProjectViewSelector");
17
19
  function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
18
20
  const datesSorted = [
19
21
  profitAndLossState.dataAvailable?.startDate,
@@ -38,7 +40,7 @@ function getFirstMonthOfFY(profitAndLossState, balanceSheetState, cashFlowState)
38
40
  cashFlowState.firstMonthOfFY ??
39
41
  1);
40
42
  }
41
- exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.accountGroupState, (state) => state.classState, (state) => state.sectionClassesViewStateV2, (state) => state.profitAndLossState, (state) => state.profitAndLossClassesViewState, (state) => state.balanceSheetState, (state) => state.cashFlowState, (state) => state.financeStatementState, (state) => state.sectionAccountsViewState, (state) => state.forecastState, (accountState, accountGroupState, classState, sectionsState, profitAndLossState, profitAndLossClassesViewState, balanceSheetState, cashFlowState, financeStatementState, sectionAccountsViewState, forecastState) => {
43
+ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.accountGroupState, (state) => state.classState, (state) => state.sectionClassesViewStateV2, (state) => state.profitAndLossState, (state) => state.profitAndLossClassesViewState, (state) => state.projectState, (state) => state.sectionProjectViewState, (state) => state.profitAndLossProjectViewState, (state) => state.balanceSheetState, (state) => state.cashFlowState, (state) => state.financeStatementState, (state) => state.sectionAccountsViewState, (state) => state.forecastState, (accountState, accountGroupState, classState, sectionsState, profitAndLossState, profitAndLossClassesViewState, projectState, sectionProjectViewState, profitAndLossProjectViewState, balanceSheetState, cashFlowState, financeStatementState, sectionAccountsViewState, forecastState) => {
42
44
  // to get min and max dates across three reports
43
45
  let allTimeframeTicks = [];
44
46
  let balancesInTimeframe = [];
@@ -72,6 +74,8 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
72
74
  const profitAndLossReport = (0, profitAndLossSelector_1.getProfitAndLossReport)(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
73
75
  const classFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
74
76
  const profitAndLossByClassReport = (0, profitAndLossClassesViewSelector_1.getProfitAndLossClassesView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
77
+ const projectFilter = (0, coaBalancesFilterProjectView_1.newBalancesFilterProjectView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossProjectViewState.uiState.projectsToFilterOut);
78
+ const profitAndLossByProjectReport = (0, profitAndLossProjectViewSelector_1.getProfitAndLossProjectView)(projectFilter, accountState, projectState, sectionProjectViewState, profitAndLossProjectViewState);
75
79
  const profitAndLossByClassHorizontalReport = (0, profitAndLossClassesByClassHorizontalSelector_1.getProfitAndLossClassesHorizontalView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
76
80
  ? thisPeriod
77
81
  : undefined);
@@ -92,6 +96,12 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
92
96
  error: profitAndLossReport.error,
93
97
  };
94
98
  break;
99
+ case 'profit_and_loss_by_projects':
100
+ selectedReportAndTimeframeFetchState = {
101
+ fetchState: profitAndLossByProjectReport.fetchState,
102
+ error: profitAndLossByProjectReport.error,
103
+ };
104
+ break;
95
105
  case 'balance_sheet':
96
106
  selectedReportAndTimeframeFetchState = {
97
107
  fetchState: balanceSheetReport.fetchState,
@@ -122,6 +132,7 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
122
132
  dataAvailable,
123
133
  profitAndLossReport,
124
134
  profitAndLossByClassReport,
135
+ profitAndLossByProjectReport,
125
136
  profitAndLossByClassHorizontalReport,
126
137
  balanceSheetReport,
127
138
  cashFlowReport,
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
4
4
  import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
5
5
  export declare const initialState: GlobalMerchantViewState;
6
- export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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], {
6
+ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | "profit_and_loss_by_projects" | "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], {
7
7
  merchantId: string | undefined;
8
- context: "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;
8
+ context: "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" | "profit_and_loss_by_projects" | "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;
9
9
  }, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  merchantId: ID;
11
11
  }, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -6,6 +6,7 @@ const getSummationBalance_1 = require("../../commonStateTypes/coaBalance/additio
6
6
  const currencyHelper_1 = require("../../commonStateTypes/currencyHelper");
7
7
  const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
8
8
  const sectionClassesViewSelector_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewSelector");
9
+ const profitAndLossClassesByClassHorizontalSelectorTypes_1 = require("./profitAndLossClassesByClassHorizontalSelectorTypes");
9
10
  const profitAndLossHorizontalEnrichment_1 = require("./profitAndLossHorizontalEnrichment");
10
11
  /** Standard class ID returned by the accounting platform for transactions without an assigned class. */
11
12
  exports.NOT_SPECIFIED_CLASS_ID = 'not_specified';
@@ -321,6 +322,7 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
321
322
  startDate,
322
323
  type: 'default',
323
324
  label: col.className,
325
+ id: col.classId,
324
326
  }));
325
327
  // Add a "Total" column
326
328
  balances.push({
@@ -330,6 +332,7 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
330
332
  startDate,
331
333
  type: 'default',
332
334
  label: 'Total',
335
+ id: profitAndLossClassesByClassHorizontalSelectorTypes_1.HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
333
336
  });
334
337
  return balances;
335
338
  }
@@ -0,0 +1,9 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateProjects } from '../../entity/project/projectReducer';
4
+ import { updateSectionProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
5
+ import { RootState } from '../../reducer';
6
+ import { ZeniAPI } from '../../zeniAPI';
7
+ import { fetchProfitAndLossForTimeframeProjectView, updateProfitAndLossForTimeframeProjectView, updateProfitAndLossForTimeframeProjectViewFailure } from './profitAndLossProjectViewReducer';
8
+ export type ActionType = ReturnType<typeof fetchProfitAndLossForTimeframeProjectView> | ReturnType<typeof updateProfitAndLossForTimeframeProjectView> | ReturnType<typeof updateProfitAndLossForTimeframeProjectViewFailure> | ReturnType<typeof updateProjects> | ReturnType<typeof updateSectionProjectView>;
9
+ export declare const fetchProfitAndLossForTimeframeProjectViewEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchProfitAndLossForTimeframeProjectViewEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const projectReducer_1 = require("../../entity/project/projectReducer");
7
+ const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
8
+ const responsePayload_1 = require("../../responsePayload");
9
+ const profitAndLossProjectViewReducer_1 = require("./profitAndLossProjectViewReducer");
10
+ const fetchProfitAndLossForTimeframeProjectViewEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView.match), (0, operators_1.mergeMap)((action) => {
11
+ const getTimeSeriesGroup = (timeframe) => {
12
+ switch (timeframe) {
13
+ case 'month':
14
+ return 'months';
15
+ case 'quarter':
16
+ return 'quarters';
17
+ case 'year':
18
+ return 'years';
19
+ }
20
+ };
21
+ const queryValue = {
22
+ is_full_response: action.payload.fetchFullReport,
23
+ time_series_groups: [getTimeSeriesGroup(action.payload.timeframe)],
24
+ is_group_by_project: true,
25
+ };
26
+ return zeniAPI
27
+ .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/2.0/reports/profit_and_loss?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
28
+ .pipe((0, operators_1.mergeMap)((response) => {
29
+ if (response.data != null && (0, responsePayload_1.isSuccessResponse)(response)) {
30
+ const actions = [];
31
+ const report = response.data.report;
32
+ const currency = report.currency;
33
+ actions.push((0, projectReducer_1.updateProjects)(report.projects));
34
+ actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'cogs', 'profit_and_loss_by_projects', report.cogs, report.accounts, currency));
35
+ actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'expenses', 'profit_and_loss_by_projects', report.expenses, report.accounts, currency));
36
+ actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'income', 'profit_and_loss_by_projects', report.income, report.accounts, currency));
37
+ actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_projects', report.other_expenses, report.accounts, currency));
38
+ actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_projects', report.other_income, report.accounts, currency));
39
+ actions.push((0, profitAndLossProjectViewReducer_1.updateProfitAndLossForTimeframeProjectView)({
40
+ timeframe: action.payload.timeframe,
41
+ report: response.data,
42
+ }));
43
+ return (0, rxjs_1.from)(actions);
44
+ }
45
+ else {
46
+ return (0, rxjs_1.of)((0, profitAndLossProjectViewReducer_1.updateProfitAndLossForTimeframeProjectViewFailure)(response.status, action.payload.timeframe));
47
+ }
48
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, profitAndLossProjectViewReducer_1.updateProfitAndLossForTimeframeProjectViewFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'P&L by Projects REST API call errored out' +
49
+ JSON.stringify(error)), action.payload.timeframe))));
50
+ }));
51
+ exports.fetchProfitAndLossForTimeframeProjectViewEpic = fetchProfitAndLossForTimeframeProjectViewEpic;
@@ -0,0 +1,6 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../reducer';
4
+ import { fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView } from './profitAndLossProjectViewReducer';
5
+ export type ActionType = ReturnType<typeof fetchProfitAndLossProjectView> | ReturnType<typeof fetchProfitAndLossForTimeframeProjectView>;
6
+ export declare const fetchProfitAndLossProjectViewEpic: (actions$: ActionsObservable<ActionType>, state: StateObservable<RootState>) => Observable<ActionType>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchProfitAndLossProjectViewEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const profitAndLossProjectViewReducer_1 = require("./profitAndLossProjectViewReducer");
7
+ const fetchProfitAndLossProjectViewEpic = (actions$, state) => actions$.pipe((0, operators_1.filter)(profitAndLossProjectViewReducer_1.fetchProfitAndLossProjectView.match), (0, operators_1.switchMap)((action) => {
8
+ const { cacheOverride } = action.payload;
9
+ if (cacheOverride === true) {
10
+ return (0, rxjs_1.from)([
11
+ (0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('month'),
12
+ (0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('quarter'),
13
+ (0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('year'),
14
+ ]);
15
+ }
16
+ else {
17
+ const fetchActions = [];
18
+ const projectFetchState = state.value.profitAndLossProjectViewState.fetchState;
19
+ if (projectFetchState['month'].fetchState !== 'In-Progress' &&
20
+ projectFetchState['month'].fetchState !== 'Completed') {
21
+ fetchActions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('month'));
22
+ }
23
+ if (projectFetchState['quarter'].fetchState !== 'In-Progress' &&
24
+ projectFetchState['quarter'].fetchState !== 'Completed') {
25
+ fetchActions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('quarter'));
26
+ }
27
+ if (projectFetchState['year'].fetchState !== 'In-Progress' &&
28
+ projectFetchState['year'].fetchState !== 'Completed') {
29
+ fetchActions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('year'));
30
+ }
31
+ return (0, rxjs_1.from)(fetchActions);
32
+ }
33
+ }));
34
+ exports.fetchProfitAndLossProjectViewEpic = fetchProfitAndLossProjectViewEpic;