@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
@@ -0,0 +1,62 @@
1
+ import { getUserByUserId } from '../user/userSelector';
2
+ // ── Selectors ──
3
+ export function getAiAccountantCustomers(customerState, userState) {
4
+ return Object.values(customerState.customerByTenantId).map((customer) => toCustomerView(customer, userState));
5
+ }
6
+ export function getAiAccountantJobsByTenantId(customerState, userState, tenantId) {
7
+ const jobs = customerState.jobsByTenantId[tenantId] ?? [];
8
+ return jobs.map((job) => toJobView(job, userState));
9
+ }
10
+ // ── Helpers ──
11
+ function toCustomerView(customer, userState) {
12
+ return {
13
+ averageAccuracy: calcAverageAccuracy(customer),
14
+ companyId: customer.companyId,
15
+ companyName: customer.companyName,
16
+ tenantId: customer.tenantId,
17
+ bookcloseDate: customer.bookcloseDate,
18
+ enrollment: customer.enrollment != null
19
+ ? {
20
+ ...customer.enrollment,
21
+ offboardedBy: customer.enrollment.offboardedBy != null
22
+ ? getUserByUserId(userState, customer.enrollment.offboardedBy)
23
+ : undefined,
24
+ onboardedBy: customer.enrollment.onboardedBy != null
25
+ ? getUserByUserId(userState, customer.enrollment.onboardedBy)
26
+ : undefined,
27
+ }
28
+ : undefined,
29
+ };
30
+ }
31
+ function toJobView(job, userState) {
32
+ return {
33
+ companyId: job.companyId,
34
+ createdAt: job.createdAt,
35
+ jobId: job.jobId,
36
+ operationType: job.operationType,
37
+ status: job.status,
38
+ tenantId: job.tenantId,
39
+ triggeredBy: job.triggeredBy != null
40
+ ? getUserByUserId(userState, job.triggeredBy)
41
+ : undefined,
42
+ companyNamespace: job.companyNamespace,
43
+ completedAt: job.completedAt,
44
+ errorMessage: job.errorMessage,
45
+ parameters: job.parameters,
46
+ retryCount: job.retryCount,
47
+ startedAt: job.startedAt,
48
+ steps: job.steps,
49
+ validationResults: job.validationResults,
50
+ };
51
+ }
52
+ function calcAverageAccuracy(customer) {
53
+ const accuracy = customer.enrollment?.accuracy;
54
+ if (accuracy == null) {
55
+ return 0;
56
+ }
57
+ const values = Object.values(accuracy);
58
+ if (values.length === 0) {
59
+ return 0;
60
+ }
61
+ return values.reduce((sum, value) => sum + value, 0) / values.length;
62
+ }
@@ -0,0 +1,31 @@
1
+ import { stringToUnion } from '../../commonStateTypes/stringToUnion';
2
+ // ── Operation Type ──
3
+ const ALL_OPERATION_TYPES = [
4
+ 'onboard',
5
+ 'offboard',
6
+ 'retrain',
7
+ 'full_pipeline',
8
+ 'cancel_onboarding',
9
+ ];
10
+ export const toAiAccountantOperationType = (v) => stringToUnion(v, ALL_OPERATION_TYPES);
11
+ // ── Enrollment Status ──
12
+ const ALL_ENROLLMENT_STATUSES = [
13
+ 'active',
14
+ 'pending',
15
+ 'onboarding',
16
+ 'offboarding',
17
+ 'offboarded',
18
+ 'failed',
19
+ 'error',
20
+ ];
21
+ export const toAiAccountantEnrollmentStatus = (v) => stringToUnion(v, ALL_ENROLLMENT_STATUSES);
22
+ // ── Job Status ──
23
+ const ALL_JOB_STATUSES = [
24
+ 'queued',
25
+ 'running',
26
+ 'completed',
27
+ 'failed',
28
+ 'cancelled',
29
+ 'retried',
30
+ ];
31
+ export const toAiAccountantJobStatus = (v) => stringToUnion(v, ALL_JOB_STATUSES);
@@ -136,6 +136,81 @@ function toJEScheduleOtherAttributes(payload) {
136
136
  assetId: payload.asset_id ?? undefined,
137
137
  };
138
138
  }
139
+ function toJEScheduleAISummaries(payload) {
140
+ if (payload == null) {
141
+ return undefined;
142
+ }
143
+ const result = {};
144
+ if (payload.debit_account != null) {
145
+ result.debitAccount = {
146
+ confidence: payload.debit_account.confidence,
147
+ reasoning: payload.debit_account.reasoning,
148
+ };
149
+ }
150
+ if (payload.credit_account != null) {
151
+ result.creditAccount = {
152
+ confidence: payload.credit_account.confidence,
153
+ reasoning: payload.credit_account.reasoning,
154
+ };
155
+ }
156
+ if (payload.debit_accounting_class != null) {
157
+ result.debitClass = {
158
+ confidence: payload.debit_accounting_class.confidence,
159
+ reasoning: payload.debit_accounting_class.reasoning,
160
+ };
161
+ }
162
+ if (payload.credit_accounting_class != null) {
163
+ result.creditClass = {
164
+ confidence: payload.credit_accounting_class.confidence,
165
+ reasoning: payload.credit_accounting_class.reasoning,
166
+ };
167
+ }
168
+ if (payload.period != null) {
169
+ result.period = {
170
+ confidence: payload.period.confidence,
171
+ reasoning: payload.period.reasoning,
172
+ };
173
+ }
174
+ if (payload.posting_date != null) {
175
+ result.postingDate = {
176
+ confidence: payload.posting_date.confidence,
177
+ reasoning: payload.posting_date.reasoning,
178
+ };
179
+ }
180
+ if (payload.schedule_type != null) {
181
+ result.scheduleType = {
182
+ confidence: payload.schedule_type.confidence,
183
+ reasoning: payload.schedule_type.reasoning,
184
+ };
185
+ }
186
+ return Object.keys(result).length > 0 ? result : undefined;
187
+ }
188
+ function toJEScheduleRecommendations(payload) {
189
+ if (payload == null) {
190
+ return undefined;
191
+ }
192
+ return {
193
+ creditAccountConfidence: payload.credit_account_confidence,
194
+ creditClassConfidence: payload.credit_class_confidence,
195
+ debitAccountConfidence: payload.debit_account_confidence,
196
+ debitClassConfidence: payload.debit_class_confidence,
197
+ endDate: payload.end_date ?? undefined,
198
+ jeCreditAccountId: payload.je_credit_account_id ?? undefined,
199
+ jeCreditAccountingClassId: payload.je_credit_accounting_class_id ?? undefined,
200
+ jeDebitAccountId: payload.je_debit_account_id ?? undefined,
201
+ jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
202
+ jeScheduleType: payload.je_schedule_type ?? undefined,
203
+ jeScheduleTypeConfidence: payload.je_schedule_type_confidence,
204
+ period: payload.period ?? undefined,
205
+ periodConfidence: payload.period_confidence,
206
+ postingDate: payload.posting_date ?? undefined,
207
+ postingDateConfidence: payload.posting_date_confidence,
208
+ similarTransactions: payload.similar_transactions,
209
+ startDate: payload.start_date ?? undefined,
210
+ startingMonth: payload.starting_month ?? undefined,
211
+ startingMonthConfidence: payload.starting_month_confidence,
212
+ };
213
+ }
139
214
  export function toJEScheduledTransaction(payload) {
140
215
  return {
141
216
  jeScheduleId: payload.je_schedule_id ?? undefined,
@@ -180,6 +255,9 @@ export function toJEScheduledTransaction(payload) {
180
255
  ? toJEScheduleOtherAttributes(payload.other_attributes)
181
256
  : {},
182
257
  scheduledJournalEntry: [],
258
+ aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
259
+ createdByUserID: payload.created_by?.user_id ?? undefined,
260
+ recommendations: toJEScheduleRecommendations(payload.recommendations),
183
261
  };
184
262
  }
185
263
  export function toJEAccruedScheduledTransaction(payload) {
@@ -70,12 +70,13 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
70
70
  export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
71
71
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
72
72
  const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
73
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
73
+ const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
74
74
  const vendorDetails = getVendorByVendorId(vendorState, vendorId);
75
75
  if (vendorDetails == null) {
76
76
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
77
77
  }
78
78
  const userDetails = updatedBy != null ? getUserByUserId(userState, updatedBy) : undefined;
79
+ const createdByUserDetails = createdBy != null ? getUserByUserId(userState, createdBy) : undefined;
79
80
  const baseTransactionObject = getScheduleTransactionById(transactionState, baseTransaction);
80
81
  if (baseTransactionObject == null) {
81
82
  throw Error('Base Schedule transaction cannot be null');
@@ -127,5 +128,8 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
127
128
  account: accountDebit,
128
129
  },
129
130
  scheduledJournalEntry,
131
+ aiSummaries,
132
+ createdByUser: createdByUserDetails,
133
+ recommendations,
130
134
  };
131
135
  };
@@ -0,0 +1,26 @@
1
+ import { date } from '../../zeniDayJS';
2
+ export const mapProjectMetadataPayloadToProject = (payload) => ({
3
+ projectId: payload.zeni_project_id,
4
+ projectName: payload.project_name,
5
+ ...(payload.status != null ? { status: payload.status } : {}),
6
+ ...(payload.start_date != null ? { startDate: date(payload.start_date) } : {}),
7
+ ...(payload.parent_customer_accounting_provider_id != null
8
+ ? {
9
+ parentCustomerAccountingProviderId: payload.parent_customer_accounting_provider_id,
10
+ }
11
+ : {}),
12
+ ...(payload.accounting_provider_project_customer_id != null
13
+ ? {
14
+ accountingProviderProjectCustomerId: payload.accounting_provider_project_customer_id,
15
+ }
16
+ : {}),
17
+ ...(payload.accounting_provider_project_id != null
18
+ ? { accountingProviderProjectId: payload.accounting_provider_project_id }
19
+ : {}),
20
+ ...(payload.zeni_parent_customer_id != null
21
+ ? { zeniParentCustomerId: payload.zeni_parent_customer_id }
22
+ : {}),
23
+ ...(payload.zeni_project_customer_id != null
24
+ ? { zeniProjectCustomerId: payload.zeni_project_customer_id }
25
+ : {}),
26
+ });
@@ -0,0 +1,27 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { mapProjectMetadataPayloadToProject, } from './projectPayload';
3
+ export const initialState = {
4
+ projects: {},
5
+ };
6
+ const projectSlice = createSlice({
7
+ name: 'project',
8
+ initialState,
9
+ reducers: {
10
+ updateProjects: {
11
+ reducer(draft, action) {
12
+ action.payload.forEach((projectPayload) => {
13
+ const project = mapProjectMetadataPayloadToProject(projectPayload);
14
+ draft.projects[project.projectId] = project;
15
+ });
16
+ },
17
+ prepare(payload) {
18
+ return { payload };
19
+ },
20
+ },
21
+ clearAllProjects(draft) {
22
+ Object.assign(draft, initialState);
23
+ },
24
+ },
25
+ });
26
+ export const { updateProjects, clearAllProjects } = projectSlice.actions;
27
+ export default projectSlice.reducer;
@@ -0,0 +1,8 @@
1
+ export function getProjectById(projectState, projectId) {
2
+ return projectState.projects[projectId];
3
+ }
4
+ export function getProjectsByIds(projectState, projectIds) {
5
+ return projectIds
6
+ .map((projectId) => getProjectById(projectState, projectId))
7
+ .filter((project) => project != null);
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export function getSectionProjectViewKey(sectionId, projectId, reportId) {
2
+ return `${sectionId}-${projectId}-${reportId}`;
3
+ }
@@ -0,0 +1,52 @@
1
+ import { from } from 'rxjs';
2
+ import { filter, mergeMap } from 'rxjs/operators';
3
+ import { getAllAccountMetadataRecordsByID, getParentAccountId, } from '../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport';
4
+ import { updateMultipleSubAccountsWithBalances } from '../account/accountReducer';
5
+ import { updateSectionProjectView } from './sectionProjectViewReducer';
6
+ export const updateSectionProjectViewEpic = (actions$) => actions$.pipe(filter(updateSectionProjectView.match), mergeMap((action) => {
7
+ const actions = [];
8
+ const sectionPayload = action.payload.sectionPayload;
9
+ const sectionId = action.payload.sectionId;
10
+ const timeframe = action.payload.timeframe;
11
+ const reportId = action.payload.reportId;
12
+ const currencyPayload = action.payload.currencyPayload;
13
+ const accountsMetadataPayload = action.payload.accountsMetadataPayload;
14
+ const accountMetadataRecordsByID = getAllAccountMetadataRecordsByID(accountsMetadataPayload);
15
+ const accountMetadataWithBalancesPayloads = [];
16
+ if (sectionPayload.projects != null) {
17
+ Object.keys(sectionPayload.projects).forEach((projectId) => {
18
+ const projectAccounts = sectionPayload.projects[projectId].accounts;
19
+ const projectsViewParentID = {
20
+ projectId,
21
+ sectionId,
22
+ };
23
+ getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
24
+ });
25
+ }
26
+ if (accountMetadataWithBalancesPayloads.length > 0) {
27
+ actions.push(updateMultipleSubAccountsWithBalances(accountMetadataWithBalancesPayloads, currencyPayload, reportId, timeframe));
28
+ }
29
+ return from(actions);
30
+ }));
31
+ const getSubAccountsMetadataForProjectAccountList = (accountListWithBalances, accountMetadataRecordsByID, sectionId, projectsViewParentID, result) => {
32
+ if (accountListWithBalances != null) {
33
+ Object.keys(accountListWithBalances).forEach((eachAccountId) => {
34
+ const accountMetadataRecord = accountMetadataRecordsByID[eachAccountId];
35
+ if (accountMetadataRecord != null) {
36
+ const accountId = accountMetadataRecord.nestedAccountId;
37
+ result.push({
38
+ accountsViewParentID: {
39
+ parentAccountId: getParentAccountId(accountId),
40
+ sectionId,
41
+ },
42
+ accountMetadataPayload: accountMetadataRecord.accountMetadataPayload,
43
+ accountBalancesPayload: accountListWithBalances[eachAccountId],
44
+ projectsViewParentID,
45
+ });
46
+ }
47
+ else {
48
+ console.warn(`Account ${eachAccountId} in Section ${sectionId} Project ${projectsViewParentID.projectId} is missing metadata.`);
49
+ }
50
+ });
51
+ }
52
+ };
@@ -0,0 +1,11 @@
1
+ import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod, } from '../../commonPayloadTypes/v2/coaBalancePayload';
2
+ import { getSectionProjectViewKey, } from './sectionProjectView';
3
+ export const mapProjectCOABalanceGroupedPayloadToSectionProjectView = (timeframe, projectBalancesPayload, currencyPayload, id, nestedAccountIds) => {
4
+ return {
5
+ key: getSectionProjectViewKey(id.sectionId, id.projectId, id.reportId),
6
+ projectId: id.projectId,
7
+ sectionId: id.sectionId,
8
+ balancesByPeriod: mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod(projectBalancesPayload, currencyPayload, timeframe),
9
+ nestedAccountIds,
10
+ };
11
+ };
@@ -0,0 +1,60 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod } from '../../commonPayloadTypes/v2/coaBalancePayload';
3
+ import { mapAccountMetadataPayloadToAccountMetadata, } from '../account/accountPayload';
4
+ import { getNestedAccountIDHierarchyForAccounts } from '../sectionAccountsView/getNestedAccountIDHierarchyForSection';
5
+ import { getSectionProjectViewKey } from './sectionProjectView';
6
+ import { mapProjectCOABalanceGroupedPayloadToSectionProjectView } from './sectionProjectViewHelper';
7
+ export const initialState = {
8
+ sectionsByKey: {},
9
+ };
10
+ const sectionProjectView = createSlice({
11
+ name: 'sectionProjectView',
12
+ initialState,
13
+ reducers: {
14
+ updateSectionProjectView: {
15
+ prepare(timeframe, sectionId, reportId, sectionPayload, accountsMetadataPayload, currencyPayload) {
16
+ return {
17
+ payload: {
18
+ timeframe,
19
+ reportId,
20
+ sectionId,
21
+ sectionPayload,
22
+ accountsMetadataPayload,
23
+ currencyPayload,
24
+ },
25
+ };
26
+ },
27
+ reducer(draft, action) {
28
+ const { timeframe, sectionPayload, sectionId, reportId, currencyPayload, accountsMetadataPayload, } = action.payload;
29
+ if (sectionPayload.projects != null) {
30
+ const accountsMetadata = accountsMetadataPayload.map((eachAccount) => mapAccountMetadataPayloadToAccountMetadata(eachAccount));
31
+ Object.keys(sectionPayload.projects).forEach((projectId) => {
32
+ const projectPayload = sectionPayload.projects[projectId];
33
+ const projectAccountIds = projectPayload.accounts != null
34
+ ? Object.keys(projectPayload.accounts)
35
+ : [];
36
+ const nestedAccountIds = getNestedAccountIDHierarchyForAccounts(projectAccountIds, accountsMetadata);
37
+ updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
38
+ });
39
+ }
40
+ },
41
+ },
42
+ clearAllSectionsProjectView(draft) {
43
+ Object.assign(draft, initialState);
44
+ },
45
+ },
46
+ });
47
+ export const { updateSectionProjectView, clearAllSectionsProjectView } = sectionProjectView.actions;
48
+ export default sectionProjectView.reducer;
49
+ const updateSectionProject = (draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds) => {
50
+ const sectionKey = getSectionProjectViewKey(sectionId, projectId, reportId);
51
+ const section = draft.sectionsByKey[sectionKey];
52
+ if (section != null) {
53
+ draft.sectionsByKey[sectionKey].balancesByPeriod = Object.assign({}, draft.sectionsByKey[sectionKey].balancesByPeriod, mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod(projectPayload, currencyPayload, timeframe));
54
+ draft.sectionsByKey[sectionKey].nestedAccountIds = nestedAccountIds;
55
+ }
56
+ else {
57
+ draft.sectionsByKey[sectionKey] =
58
+ mapProjectCOABalanceGroupedPayloadToSectionProjectView(timeframe, projectPayload, currencyPayload, { sectionId, projectId, reportId }, nestedAccountIds);
59
+ }
60
+ };
@@ -0,0 +1,50 @@
1
+ import recordGet from 'lodash/get';
2
+ import { getCOABalances, } from '../../commonStateTypes/coaBalance/coaBalance';
3
+ import { getSumOfBalancesByGroupedByPeriod } from '../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod';
4
+ import { getNestedAccountReportForAccount, } from '../account/subAccountSelector';
5
+ import { getProjectById } from '../project/projectSelector';
6
+ import { getSectionProjectViewKey } from './sectionProjectView';
7
+ export const getSectionProjectViewReport = (accountState, projectState, sectionState, projectIds, id, filter) => {
8
+ const projectIdsToShow = projectIds.filter((projectId) => !filter.projectsToFilterOut.includes(projectId));
9
+ const projectReports = [];
10
+ const sectionBalancesTotalByPeriodArray = [];
11
+ projectIdsToShow.forEach((projectId) => {
12
+ const project = getProjectById(projectState, projectId);
13
+ if (project == null) {
14
+ return;
15
+ }
16
+ const projectSectionKey = getSectionProjectViewKey(id.sectionId, projectId, id.reportId);
17
+ const projectSectionView = recordGet(sectionState.sectionsByKey, projectSectionKey, undefined);
18
+ const nestedAccountHierarchy = projectSectionView?.nestedAccountIds ?? [];
19
+ const nestedAccountReports = [];
20
+ nestedAccountHierarchy.forEach((accountIdHierarchy) => {
21
+ const report = getNestedAccountReportForAccount(accountState, {
22
+ accountIdHierarchy,
23
+ reportId: id.reportId,
24
+ projectsViewParentId: {
25
+ projectId,
26
+ sectionId: id.sectionId,
27
+ },
28
+ }, filter, nestedAccountHierarchy.length > 1);
29
+ if (report != null) {
30
+ nestedAccountReports.push(report);
31
+ }
32
+ });
33
+ const projectBalancesTotalByPeriod = projectSectionView?.balancesByPeriod ?? {};
34
+ const projectReport = {
35
+ projectId,
36
+ projectName: project.projectName,
37
+ accounts: nestedAccountReports,
38
+ ...getCOABalances(projectBalancesTotalByPeriod, filter),
39
+ projectBalancesTotalByPeriod,
40
+ };
41
+ projectReports.push(projectReport);
42
+ sectionBalancesTotalByPeriodArray.push(projectBalancesTotalByPeriod);
43
+ });
44
+ const sectionBalancesTotalByPeriod = getSumOfBalancesByGroupedByPeriod(sectionBalancesTotalByPeriodArray) ?? {};
45
+ return {
46
+ projects: projectReports,
47
+ ...getCOABalances(sectionBalancesTotalByPeriod, filter),
48
+ sectionBalancesTotalByPeriod,
49
+ };
50
+ };
@@ -151,6 +151,7 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
151
151
  'flux_analysis_reviewed',
152
152
  'receipt_match',
153
153
  'receipts_upload',
154
+ 'receipts_bulk_match',
154
155
  'billing_address_view',
155
156
  'express_pay_submit',
156
157
  'exclude_transaction',
@@ -168,6 +169,11 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
168
169
  'treasury_accept_term',
169
170
  'treasury_transfer_money',
170
171
  'treasury_transfer_money_failed',
172
+ 'auto_transfer_rule_create',
173
+ 'auto_transfer_rule_update',
174
+ 'auto_transfer_rule_delete',
175
+ 'auto_transfer_rule_pause',
176
+ 'auto_transfer_rule_resume',
171
177
  'treasury_update_portfolio_allocation',
172
178
  'send_email_magic_link_to_user',
173
179
  'complete_profile_done',
@@ -195,6 +201,10 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
195
201
  'transactionCategorized_transactionsUpdated_transactionFailed',
196
202
  'transactionCategorized_transactionUpdated_transactionsFailed',
197
203
  'transactionCategorized_transactionUpdated_transactionFailed',
204
+ 'accounting_classes_enabled_update',
205
+ 'account_excluded_from_reconciliation',
206
+ 'account_included_in_reconciliation',
207
+ 'ai_accountant_trigger_job',
198
208
  ];
199
209
  export const toSnackbarMessageSection = (v) => stringToUnion(v, ALL_SNACKBAR_MESSAGE_SECTIONS);
200
210
  // Keeping this different from the message type, since we may not have messages in all instances
@@ -1,17 +1,20 @@
1
1
  import { from } from 'rxjs';
2
2
  import { filter, mergeMap } from 'rxjs/operators';
3
+ import { clearAllAiAccountantCustomers } from '../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
3
4
  import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
4
5
  import { clearAllApprovalRules } from '../../entity/approvalRule/approvalRuleReducer';
5
6
  import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
6
7
  import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
7
8
  import { clearAllNotifications } from '../../entity/notification/notificationReducer';
8
9
  import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
10
+ import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
9
11
  import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
10
12
  import { clearAllToastNotifications } from '../../entity/toastNotification/toastNotificationReducer';
11
13
  import { clearAccountList } from '../../view/accountList/accountListReducer';
12
14
  import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
13
15
  import { clearAddressView } from '../../view/addressView/addressViewReducer';
14
16
  import { clearAggregatedReport } from '../../view/aiAgentPerformance/aggregatedReportViewReducer';
17
+ import { clearAiAccountantView } from '../../view/aiAccountantView/aiAccountantViewReducer';
15
18
  import { clearAiCfoView } from '../../view/aiCfoView/aiCfoViewReducer';
16
19
  import { clearApAgingDetail } from '../../view/apAgingView/apAgingDetail/apAgingDetailReducer';
17
20
  import { clearApAging } from '../../view/apAgingView/apAgingReport/apAgingReducer';
@@ -64,6 +67,7 @@ import { clearOwnerList } from '../../view/ownerList/ownerListReducer';
64
67
  import { clearPeople } from '../../view/people/peopleReducer';
65
68
  import { clearProfitAndLoss } from '../../view/profitAndLoss/profitAndLossReducer';
66
69
  import { clearProfitAndLossClassesView } from '../../view/profitAndLossClassesView/profitAndLossClassesViewReducer';
70
+ import { clearProfitAndLossProjectView } from '../../view/profitAndLossProjectView/profitAndLossProjectViewReducer';
67
71
  import { clearRecommendation } from '../../view/recommendation/recommendationReducer';
68
72
  import { clearReferrals } from '../../view/referralView/referralReducer';
69
73
  import { clearReimbursementCard } from '../../view/reimbursementCard/reimbursementCardReducer';
@@ -161,6 +165,7 @@ import { clearAllChargeCardRepayments } from '../chargeCardRepayment/chargeCardR
161
165
  import { clearAllChargeCardTransactions } from '../chargeCardTransaction/chargeCardTransactionReducer';
162
166
  import { clearAllClasses } from '../class/classReducer';
163
167
  import { clearAllCompanies } from '../company/companyReducer';
168
+ import { clearAllProjects } from '../project/projectReducer';
164
169
  import { clearCompanyHealthMetric } from '../companyHealthMetric/companyHealthMetricReducer';
165
170
  import { clearAllConnectedAccounts } from '../connectedAccount/connectedAccountReducer';
166
171
  import { clearCountryList } from '../countryList/countryListReducer';
@@ -207,8 +212,11 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
207
212
  clearActivityHistory(),
208
213
  clearActivityRealTimeApproval(),
209
214
  clearAddressView(),
215
+ clearAiAccountantView(),
216
+ clearAllAiAccountantCustomers(),
210
217
  clearAiCfoView(),
211
218
  clearAllClasses(),
219
+ clearAllProjects(),
212
220
  clearAllMonthEndCloseChecksView(),
213
221
  clearApAging(),
214
222
  clearApAgingDetail(),
@@ -288,6 +296,7 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
288
296
  clearPreviousBills(),
289
297
  clearProfitAndLoss(),
290
298
  clearProfitAndLossClassesView(),
299
+ clearProfitAndLossProjectView(),
291
300
  clearRecommendation(),
292
301
  clearReferrals(),
293
302
  clearReimbursementCard(),
@@ -382,6 +391,7 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
382
391
  clearAllReimbursements(),
383
392
  clearAllSectionsAccountsView(),
384
393
  clearAllSectionsClassesViewV2(),
394
+ clearAllSectionsProjectView(),
385
395
  clearAllSubscriptionAddOns(),
386
396
  clearAllSubscriptionCoupons(),
387
397
  clearAllSubscriptionPlans(),
@@ -125,6 +125,12 @@ const tenant = createSlice({
125
125
  draft.tenantIds = [...new Set([...draft.tenantIds, ...tenantIds])];
126
126
  draft.loggedInUser = assignWith(draft.loggedInUser ?? {}, firstUser, (objValue, srcValue) => srcValue ?? objValue);
127
127
  },
128
+ updateTenantAccountingClassesEnabled(draft, action) {
129
+ const { tenantId, enabled } = action.payload;
130
+ if (draft.tenantsById[tenantId] != null) {
131
+ draft.tenantsById[tenantId].isAccountingClassesEnabled = enabled;
132
+ }
133
+ },
128
134
  updateTenantMasterTOSInfo(draft, action) {
129
135
  const { tenant_id, user_role_id, master_tos_info } = action.payload;
130
136
  if (draft.tenantsById[tenant_id] != null &&
@@ -529,7 +535,7 @@ const tenant = createSlice({
529
535
  },
530
536
  },
531
537
  });
532
- export const { updateTenants, fetchAllTenants, updateTenantsSuccess, updateTenantsFailure, fetchActiveTenant, updateTenantSuccess, updateTenantFailure, updateCurrentTenant, fetchExcludedResources, updateExcludedResourcesSuccess, updateExcludedResourcesFailure, doSignIn, doMagicLinkSignIn, magicLinkSignInSuccess, magicLinkSignInFailure, sendEmailMagicLinkToUser, sendEmailMagicLinkToUserSuccess, sendEmailMagicLinkToUserFailure, updateSignInState, doSignOut, signOutSuccess, updateLoggedInUser, fetchExternalConnections, saveExternalConnection, saveExternalConnectionSuccess, saveExternalConnectionFailure, fetchExternalConnectionsFailure, fetchExternalConnectionsSuccess, clearAll, fetchSubscriptionSummaryForTenant, updateSubscriptionSummaryForTenantSuccess, updateSubscriptionSummaryForTenantFailure, updateOnboardingTenants, removeOnboardingTenant, updateTenantReimbursementInfo, updateReferViewedForLoggedInUser, updateTreasuryVideoViewedForLoggedInUser, resetSignInState, trigger2FA, updateTenantMasterTOSInfo, verifyDeviceWithTwoFA, verifyDeviceWithTwoFASuccess, verifyDeviceWithTwoFAFailure, resendVerifyDeviceOTP, resendVerifyDeviceOTPSuccess, resendVerifyDeviceOTPFailure, } = tenant.actions;
538
+ export const { updateTenants, fetchAllTenants, updateTenantsSuccess, updateTenantsFailure, fetchActiveTenant, updateTenantSuccess, updateTenantFailure, updateCurrentTenant, fetchExcludedResources, updateExcludedResourcesSuccess, updateExcludedResourcesFailure, doSignIn, doMagicLinkSignIn, magicLinkSignInSuccess, magicLinkSignInFailure, sendEmailMagicLinkToUser, sendEmailMagicLinkToUserSuccess, sendEmailMagicLinkToUserFailure, updateSignInState, doSignOut, signOutSuccess, updateLoggedInUser, fetchExternalConnections, saveExternalConnection, saveExternalConnectionSuccess, saveExternalConnectionFailure, fetchExternalConnectionsFailure, fetchExternalConnectionsSuccess, clearAll, fetchSubscriptionSummaryForTenant, updateSubscriptionSummaryForTenantSuccess, updateSubscriptionSummaryForTenantFailure, updateOnboardingTenants, removeOnboardingTenant, updateTenantReimbursementInfo, updateReferViewedForLoggedInUser, updateTreasuryVideoViewedForLoggedInUser, resetSignInState, trigger2FA, updateTenantAccountingClassesEnabled, updateTenantMasterTOSInfo, verifyDeviceWithTwoFA, verifyDeviceWithTwoFASuccess, verifyDeviceWithTwoFAFailure, resendVerifyDeviceOTP, resendVerifyDeviceOTPSuccess, resendVerifyDeviceOTPFailure, } = tenant.actions;
533
539
  export default tenant.reducer;
534
540
  /**
535
541
  * Converts tenants payload to Tenant and User State
@@ -553,6 +559,8 @@ function mapTenantsPayloadToState(tenantsPayload, userTenantPayload) {
553
559
  function mapTenantPayloadToTenant(payload, userTenantPayload) {
554
560
  const tenant = {
555
561
  accountingClassIDs: payload.accounting_class_ids,
562
+ isAccountingClassesEnabled: payload.is_accounting_classes_enabled ?? true,
563
+ isAccountingProjectsEnabled: payload.is_accounting_projects_enabled ?? false,
556
564
  bookCloseDate: payload.book_close_date != null
557
565
  ? date(payload.book_close_date)
558
566
  : undefined,
@@ -265,6 +265,20 @@ export const isTenantCardsOnly = (tenant) => {
265
265
  tenant.productSettings.isSpendManagementEnabled === false
266
266
  : false;
267
267
  };
268
+ export const getIsAccountingClassesEnabled = (state) => {
269
+ const { currentTenantId, tenantsById } = state.tenantState;
270
+ if (currentTenantId == null) {
271
+ return true;
272
+ }
273
+ return tenantsById[currentTenantId]?.isAccountingClassesEnabled ?? true;
274
+ };
275
+ export const getIsAccountingProjectsEnabled = (state) => {
276
+ const { currentTenantId, tenantsById } = state.tenantState;
277
+ if (currentTenantId == null) {
278
+ return false;
279
+ }
280
+ return tenantsById[currentTenantId]?.isAccountingProjectsEnabled ?? false;
281
+ };
268
282
  export const isTenantBookkeepingEnabled = (tenant) => {
269
283
  // if the tenants API takes time, tenant can be non null with productSettings as null
270
284
  return tenant != null && tenant.productSettings != null
@@ -29,5 +29,6 @@ export const toScheduleTransaction = (payload, currency_code, currency_symbol) =
29
29
  currencyCode: currency_code,
30
30
  currencySymbol: currency_symbol,
31
31
  },
32
+ description: payload.transaction_description ?? undefined,
32
33
  };
33
34
  };