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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/coaBalance/coaBalanceType.d.ts +0 -2
  3. package/lib/commonStateTypes/coaBalance/coaBalanceType.js +0 -6
  4. package/lib/commonStateTypes/currencyHelper.d.ts +0 -3
  5. package/lib/commonStateTypes/currencyHelper.js +1 -6
  6. package/lib/commonStateTypes/reduceFetchState.d.ts +0 -9
  7. package/lib/commonStateTypes/reduceFetchState.js +0 -26
  8. package/lib/entity/account/accountPayload.d.ts +0 -2
  9. package/lib/entity/account/accountPayload.js +0 -2
  10. package/lib/entity/account/accountState.d.ts +0 -2
  11. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  12. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  13. package/lib/entity/customer/customerState.d.ts +2 -0
  14. package/lib/entity/customer/customerState.js +5 -0
  15. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  16. package/lib/entity/depositAccount/depositAccount.js +1 -8
  17. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  19. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  21. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
  22. package/lib/entity/reimbursement/reimbursementPayload.d.ts +0 -2
  23. package/lib/entity/reimbursement/reimbursementPayload.js +0 -7
  24. package/lib/entity/reimbursement/reimbursementState.d.ts +0 -2
  25. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  26. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  27. package/lib/entity/task/taskPayload.d.ts +0 -1
  28. package/lib/entity/task/taskPayload.js +0 -1
  29. package/lib/entity/task/taskState.d.ts +0 -1
  30. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  31. package/lib/entity/tenant/tenantReducer.js +0 -1
  32. package/lib/entity/tenant/tenantSelector.d.ts +0 -1
  33. package/lib/entity/tenant/tenantSelector.js +1 -9
  34. package/lib/entity/tenant/tenantState.d.ts +0 -1
  35. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
  36. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  37. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
  38. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  39. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
  40. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
  41. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  42. package/lib/epic.d.ts +1 -13
  43. package/lib/epic.js +1 -13
  44. package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +0 -5
  45. package/lib/esm/commonStateTypes/currencyHelper.js +0 -5
  46. package/lib/esm/commonStateTypes/reduceFetchState.js +0 -25
  47. package/lib/esm/entity/account/accountPayload.js +0 -2
  48. package/lib/esm/entity/customer/customerState.js +4 -1
  49. package/lib/esm/entity/depositAccount/depositAccount.js +1 -8
  50. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  51. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  52. package/lib/esm/entity/reimbursement/reimbursementPayload.js +0 -7
  53. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
  54. package/lib/esm/entity/task/taskPayload.js +0 -1
  55. package/lib/esm/entity/tenant/tenantReducer.js +0 -1
  56. package/lib/esm/entity/tenant/tenantSelector.js +0 -7
  57. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  58. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  59. package/lib/esm/epic.js +1 -13
  60. package/lib/esm/index.js +16 -25
  61. package/lib/esm/reducer.js +0 -6
  62. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  63. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  64. package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
  65. package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
  66. package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
  67. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  68. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  69. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  70. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  71. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  72. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  73. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +1 -189
  74. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  75. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -433
  76. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -23
  77. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  78. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  79. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +5 -256
  80. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  81. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +7 -14
  82. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
  83. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -44
  84. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  85. package/lib/esm/view/financeStatement/financeStatementReducer.js +8 -11
  86. package/lib/esm/view/financeStatement/financeStatementSelector.js +9 -24
  87. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
  88. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
  89. package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
  90. package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +7 -9
  91. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  92. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  93. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  94. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  95. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  96. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  97. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  98. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  99. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
  100. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  101. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  102. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  103. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
  104. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -3
  105. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  106. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  107. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  108. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +0 -11
  109. package/lib/esm/zeniAPI.js +2 -0
  110. package/lib/index.d.ts +21 -31
  111. package/lib/index.js +34 -102
  112. package/lib/reducer.d.ts +0 -6
  113. package/lib/reducer.js +0 -6
  114. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  115. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  116. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  117. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  118. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  119. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
  120. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
  121. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
  122. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  123. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  124. package/lib/view/classList/fetchClassListEpic.js +1 -8
  125. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
  126. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  127. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
  128. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  129. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  130. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  131. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  132. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  133. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  134. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -118
  135. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -201
  136. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  137. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  138. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +3 -76
  139. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -434
  140. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -11
  141. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -24
  142. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  143. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -69
  144. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -1
  145. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  146. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  147. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  148. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -255
  149. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  150. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -13
  151. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  152. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
  153. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -142
  154. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -54
  155. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
  156. package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  157. package/lib/view/financeStatement/financeStatementReducer.js +8 -11
  158. package/lib/view/financeStatement/financeStatementSelector.d.ts +0 -2
  159. package/lib/view/financeStatement/financeStatementSelector.js +9 -24
  160. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +2 -4
  161. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +2 -7
  162. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
  163. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +0 -4
  164. package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
  165. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +6 -8
  166. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  167. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  168. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  169. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  170. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  171. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  172. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  173. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  174. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  175. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  176. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  177. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
  178. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  179. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  180. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  181. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  182. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  183. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +0 -1
  184. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
  185. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +0 -2
  186. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -3
  187. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  188. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  189. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  190. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  191. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +1 -3
  192. package/lib/view/userListView/fetchUserListByTypeEpic.js +0 -11
  193. package/lib/view/userListView/userListViewPayload.d.ts +0 -2
  194. package/lib/zeniAPI.js +2 -0
  195. package/package.json +2 -2
  196. package/lib/entity/userGroups/userGroupsPayload.d.ts +0 -7
  197. package/lib/entity/userGroups/userGroupsPayload.js +0 -10
  198. package/lib/entity/userGroups/userGroupsReducer.d.ts +0 -8
  199. package/lib/entity/userGroups/userGroupsReducer.js +0 -29
  200. package/lib/entity/userGroups/userGroupsSelector.d.ts +0 -4
  201. package/lib/entity/userGroups/userGroupsSelector.js +0 -12
  202. package/lib/entity/userGroups/userGroupsState.d.ts +0 -9
  203. package/lib/entity/userGroups/userGroupsState.js +0 -2
  204. package/lib/esm/entity/userGroups/userGroupsPayload.js +0 -7
  205. package/lib/esm/entity/userGroups/userGroupsReducer.js +0 -25
  206. package/lib/esm/entity/userGroups/userGroupsSelector.js +0 -8
  207. package/lib/esm/entity/userGroups/userGroupsState.js +0 -1
  208. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  209. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +0 -10
  210. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -29
  211. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -49
  212. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -40
  213. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -47
  214. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -61
  215. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -33
  216. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -56
  217. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -77
  218. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -80
  219. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -24
  220. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -317
  221. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -9
  222. package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -282
  223. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +0 -65
  224. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +0 -16
  225. package/lib/esm/view/userGroupListView/userGroupListViewState.js +0 -1
  226. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  227. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  228. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
  229. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +0 -10
  230. package/lib/view/expenseAutomationView/bulkUploadTiming.js +0 -13
  231. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +0 -18
  232. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -33
  233. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +0 -7
  234. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -53
  235. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +0 -8
  236. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -44
  237. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +0 -7
  238. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -51
  239. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +0 -8
  240. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -65
  241. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
  242. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -37
  243. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +0 -9
  244. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -61
  245. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -14
  246. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -81
  247. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +0 -25
  248. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -86
  249. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +0 -7
  250. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -28
  251. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +0 -13
  252. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -321
  253. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +0 -111
  254. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -13
  255. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +0 -6
  256. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -285
  257. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +0 -23
  258. package/lib/view/userGroupListView/userGroupListViewReducer.js +0 -69
  259. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +0 -7
  260. package/lib/view/userGroupListView/userGroupListViewSelector.js +0 -20
  261. package/lib/view/userGroupListView/userGroupListViewState.d.ts +0 -8
  262. package/lib/view/userGroupListView/userGroupListViewState.js +0 -2
@@ -1,14 +1,10 @@
1
1
  import orderBy from 'lodash/orderBy';
2
- import { reduceAnyFetchState } from '../../../commonStateTypes/reduceFetchState';
3
2
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
3
  import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
5
- import { getSupportedTransactionById, getSupportedTransactionsByIds, } from '../../../entity/transaction/transactionSelector';
6
- import { isBatchListStatusCompleted } from '../payload/missingReceiptsPayload';
7
- import { getCompletedTransactionsCacheKey } from '../reducers/missingReceiptsViewReducer';
4
+ import { getSupportedTransactionsByIds } from '../../../entity/transaction/transactionSelector';
8
5
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
9
- import { isUnmatchedTabFileStatus, } from '../types/missingReceiptsViewState';
10
6
  export function getExpenseAutomationMissingReceiptsView(state) {
11
- const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
7
+ const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
12
8
  const currentTenant = getCurrentTenant(state);
13
9
  const { selectedPeriodByTenantId } = expenseAutomationViewState;
14
10
  const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
@@ -37,7 +33,7 @@ export function getExpenseAutomationMissingReceiptsView(state) {
37
33
  transaction.lines.length > 0 &&
38
34
  transaction.lines[0]
39
35
  ?.class != null
40
- ? transaction.lines[0].class?.className.toLowerCase()
36
+ ? transaction.lines[0].class.className.toLowerCase()
41
37
  : null;
42
38
  case 'vendor':
43
39
  default:
@@ -51,260 +47,13 @@ export function getExpenseAutomationMissingReceiptsView(state) {
51
47
  const completionStatus = missingReceiptsCompletionStatus != null
52
48
  ? missingReceiptsCompletionStatus
53
49
  : 'incomplete';
54
- const { bulkUpload, pendingMissingReceiptsTabNavigation } = expenseAutomationMissingReceiptsViewState;
55
- const currentBatchStatus = bulkUpload.currentBatchId != null
56
- ? bulkUpload.batchStatusById[bulkUpload.currentBatchId]
57
- : undefined;
58
- const batchList = monthYearPeriodId != null
59
- ? (bulkUpload.batchListByPeriod[monthYearPeriodId] ?? [])
60
- : [];
61
- /**
62
- * Primary "Unmatched" batch = first completed batch in platform list order, preferring the
63
- * first batch that still has possible_matches/no_match work when any completed batch has such work.
64
- * Batches without details yet: wait if the list row still reports unmatched work; otherwise skip
65
- * so we do not block the whole tab while other rows are not fetched yet.
66
- */
67
- const primaryBatchIdFromDetailsOrder = getPrimaryBatchIdFromBatchListOrder(batchList, bulkUpload.batchDetailsById, bulkUpload.failedBatchDetailIds);
68
- /**
69
- * During upload/matching, prefer `currentBatchId` only when its batch details are loaded,
70
- * completed, and still have unmatched-tab work. Otherwise keep `primaryBatchIdFromDetailsOrder`.
71
- *
72
- * If we pinned to `currentBatchId` as soon as it was absent from the batch list (in-flight
73
- * upload), details are often not loaded yet — `unmatchedFiles` would empty while older batches
74
- * moved to "past", so the primary "Unmatched Receipts" section vanished during auto-matching.
75
- */
76
- const unmatchedSectionBatchId = (() => {
77
- const phase = bulkUpload.phase;
78
- if (phase !== 'matching' && phase !== 'uploading') {
79
- return primaryBatchIdFromDetailsOrder;
80
- }
81
- const currentId = bulkUpload.currentBatchId;
82
- if (currentId == null) {
83
- return primaryBatchIdFromDetailsOrder;
84
- }
85
- const currentDetails = bulkUpload.batchDetailsById[currentId];
86
- if (currentDetails != null &&
87
- currentDetails.status === 'completed' &&
88
- batchDetailsHasUnmatchedWork(currentDetails)) {
89
- return currentId;
90
- }
91
- return primaryBatchIdFromDetailsOrder;
92
- })();
93
- const completedBatchesInApiOrder = batchList.filter((batchListItem) => isBatchListStatusCompleted(batchListItem.status));
94
- const currentBatchDetails = unmatchedSectionBatchId != null
95
- ? bulkUpload.batchDetailsById[unmatchedSectionBatchId]
96
- : undefined;
97
- const resolvedFiles = currentBatchDetails?.files.map((file) => resolveBatchFile(file, currentBatchDetails.batchId, transactionState));
98
- const failedIds = new Set(bulkUpload.failedBatchDetailIds);
99
- const hasMoreBatchDetails = completedBatchesInApiOrder.some((batchListItem) => bulkUpload.batchDetailsById[batchListItem.batchId] == null &&
100
- !failedIds.has(batchListItem.batchId));
101
- const getSortValue = (file) => {
102
- const matchedTransaction = file.matchedTransaction;
103
- if (matchedTransaction == null) {
104
- return null;
105
- }
106
- switch (bulkUpload.sortKey) {
107
- case 'vendor':
108
- return ((matchedTransaction.vendorName ?? matchedTransaction.description)?.toLowerCase() ?? null);
109
- case 'category': {
110
- const line = matchedTransaction.lines?.[0];
111
- return line?.account?.accountName?.toLowerCase() ?? null;
112
- }
113
- case 'class': {
114
- const line = matchedTransaction.lines?.[0];
115
- return line?.class?.className?.toLowerCase() ?? null;
116
- }
117
- case 'date':
118
- return matchedTransaction.date.valueOf();
119
- case 'amount':
120
- return matchedTransaction.amount.amount;
121
- default:
122
- return null;
123
- }
124
- };
125
- const bulkUploadSortDirection = bulkUpload.sortOrder === 'ascending' ? 'asc' : 'desc';
126
- const matchedFiles = orderBy(resolvedFiles?.filter((resolvedFile) => resolvedFile.status === 'exact_match') ?? [], getSortValue, bulkUploadSortDirection);
127
- const unmatchedFiles = orderBy(resolvedFiles?.filter((resolvedFile) => isUnmatchedTabFileStatus(resolvedFile.status)) ?? [], getSortValue, bulkUploadSortDirection);
128
- const progress = currentBatchStatus != null
129
- ? {
130
- ...currentBatchStatus.progress,
131
- percentage: currentBatchStatus.progress.total > 0
132
- ? Math.round((currentBatchStatus.progress.processed /
133
- currentBatchStatus.progress.total) *
134
- 100)
135
- : 0,
136
- }
137
- : { total: 0, processed: 0, percentage: 0 };
138
- const batchListFetchState = bulkUpload.batchListFetchState;
139
- /**
140
- * When primary batch is not resolved yet, still aggregate unmatched files from every batch
141
- * that has details loaded (otherwise past is empty and receipts vanish from the UI).
142
- */
143
- const pastBatches = unmatchedSectionBatchId != null
144
- ? batchList.filter((batchListItem) => batchListItem.batchId !== unmatchedSectionBatchId)
145
- : batchList;
146
- const pastUnmatchedFiles = pastBatches.flatMap((pastBatch) => {
147
- const details = bulkUpload.batchDetailsById[pastBatch.batchId];
148
- if (details == null) {
149
- return [];
150
- }
151
- return details.files
152
- .filter((batchFile) => isUnmatchedTabFileStatus(batchFile.status))
153
- .map((batchFile) => resolveBatchFile(batchFile, pastBatch.batchId, transactionState));
154
- });
155
- const completedTransactionsCacheKey = monthYearPeriodId != null
156
- ? getCompletedTransactionsCacheKey(monthYearPeriodId, bulkUpload.sortKey, bulkUpload.sortOrder, bulkUpload.completedSubTab)
157
- : undefined;
158
- const completedTransactionsForPeriod = completedTransactionsCacheKey != null
159
- ? bulkUpload.completedTransactionsByPeriod[completedTransactionsCacheKey]
160
- : undefined;
161
- const completedTransactionIds = completedTransactionsForPeriod?.transactionIds ?? [];
162
- const resolvedCompletedTransactions = getSupportedTransactionsByIds(transactionState, completedTransactionIds);
163
- const resolvedBatchDetails = currentBatchDetails != null && resolvedFiles != null
164
- ? {
165
- batchId: currentBatchDetails.batchId,
166
- createdAt: currentBatchDetails.createdAt,
167
- files: resolvedFiles,
168
- status: currentBatchDetails.status,
169
- summary: currentBatchDetails.summary,
170
- }
171
- : undefined;
172
- const manualSearchResults = bulkUpload.manualSearch.results.map((result) => {
173
- const transaction = getSupportedTransactionById(transactionState, result.transactionId);
174
- return {
175
- ...result,
176
- vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
177
- };
178
- });
179
- const monthEndFetchState = monthYearPeriodId != null
180
- ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
181
- : { fetchState: 'Not-Started', error: undefined };
182
- const reducedFetchStatus = reduceAnyFetchState([
183
- { fetchState, error },
184
- monthEndFetchState,
185
- ]);
186
50
  return {
187
- fetchState: reducedFetchStatus.fetchState,
188
- error: reducedFetchStatus.error,
51
+ fetchState,
52
+ error,
189
53
  uploadReceiptStatusById,
190
54
  uiState,
191
55
  refreshStatus,
192
56
  transactions: sortedTransactions,
193
57
  completionStatus,
194
- pendingMissingReceiptsTabNavigation: pendingMissingReceiptsTabNavigation ?? null,
195
- bulkUpload: {
196
- phase: bulkUpload.phase,
197
- uploadStatus: bulkUpload.uploadStatus,
198
- batchStatus: currentBatchStatus,
199
- batchDetails: resolvedBatchDetails,
200
- completedSubTab: bulkUpload.completedSubTab,
201
- completedTransactions: {
202
- fetchState: completedTransactionsForPeriod?.fetchState ?? {
203
- fetchState: 'Not-Started',
204
- error: undefined,
205
- },
206
- nextPageToken: completedTransactionsForPeriod?.nextPageToken ?? null,
207
- totalCount: completedTransactionsForPeriod?.totalCount ?? 0,
208
- transactions: resolvedCompletedTransactions,
209
- },
210
- matchedFiles,
211
- unmatchedFiles,
212
- progress,
213
- currentResultsTab: bulkUpload.currentResultsTab,
214
- sortKey: bulkUpload.sortKey,
215
- sortOrder: bulkUpload.sortOrder,
216
- batchList,
217
- batchListFetchState,
218
- pastBatches,
219
- pastUnmatchedFiles,
220
- confirmMatchStatus: bulkUpload.confirmMatchStatus,
221
- manualSearchUiResetKey: bulkUpload.manualSearchUiResetKey,
222
- hasMoreBatchDetails,
223
- batchDetailsPaginationState: bulkUpload.batchDetailsPaginationState,
224
- manualSearch: {
225
- ...bulkUpload.manualSearch,
226
- results: manualSearchResults,
227
- },
228
- uploadProgress: bulkUpload.uploadProgress,
229
- },
230
- };
231
- }
232
- function batchDetailsHasUnmatchedWork(details) {
233
- return details.files.some((file) => isUnmatchedTabFileStatus(file.status));
234
- }
235
- /** List row summary before batch details load — aligns with unmatched / possible-match work. */
236
- function batchListItemHasUnmatchedWork(batch) {
237
- return batch.noMatchCount > 0 || batch.possibleMatchesCount > 0;
238
- }
239
- /**
240
- * `batchList` must match platform order (same sequence as the bulk-upload batches API). Picks the
241
- * primary batch for the top "Unmatched" section. Skips failed detail fetches.
242
- *
243
- * If details are not loaded for an earlier list row but that row reports no unmatched work, we
244
- * skip it so later rows with loaded details can be primary (avoids an empty tab when the first
245
- * fetch page only loaded later batches). If the list reports unmatched work but details are still
246
- * loading, we wait (undefined) so primary order stays correct once details arrive.
247
- */
248
- function getPrimaryBatchIdFromBatchListOrder(batchListInPlatformOrder, batchDetailsById, failedBatchDetailIds) {
249
- const failedIds = new Set(failedBatchDetailIds);
250
- const anyCompletedBatchHasUnmatchedWork = batchListInPlatformOrder.some((batch) => {
251
- if (failedIds.has(batch.batchId)) {
252
- return false;
253
- }
254
- const details = batchDetailsById[batch.batchId];
255
- if (details != null &&
256
- details.status === 'completed' &&
257
- batchDetailsHasUnmatchedWork(details)) {
258
- return true;
259
- }
260
- return details == null && batchListItemHasUnmatchedWork(batch);
261
- });
262
- for (const batch of batchListInPlatformOrder) {
263
- if (failedIds.has(batch.batchId)) {
264
- continue;
265
- }
266
- const details = batchDetailsById[batch.batchId];
267
- if (details == null) {
268
- if (batchListItemHasUnmatchedWork(batch)) {
269
- return undefined;
270
- }
271
- continue;
272
- }
273
- if (details.status !== 'completed') {
274
- continue;
275
- }
276
- if (anyCompletedBatchHasUnmatchedWork) {
277
- if (batchDetailsHasUnmatchedWork(details)) {
278
- return batch.batchId;
279
- }
280
- continue;
281
- }
282
- return batch.batchId;
283
- }
284
- return undefined;
285
- }
286
- function resolveBatchFile(file, batchId, transactionState) {
287
- const matchedTransaction = file.matchedTransactionId != null
288
- ? getSupportedTransactionById(transactionState, file.matchedTransactionId)
289
- : undefined;
290
- const candidates = file.candidates
291
- ?.map((ref) => {
292
- const transaction = getSupportedTransactionById(transactionState, ref.transactionId);
293
- return transaction != null
294
- ? { transaction, matchScore: ref.matchScore }
295
- : undefined;
296
- })
297
- .filter((candidate) => candidate != null);
298
- return {
299
- attachmentId: file.attachmentId,
300
- batchId,
301
- fileDownloadUrl: file.fileDownloadUrl,
302
- fileId: file.fileId,
303
- filename: file.filename,
304
- filePreviewUrl: file.filePreviewUrl,
305
- status: file.status,
306
- matchedTransaction,
307
- candidates: candidates != null && candidates.length > 0 ? candidates : undefined,
308
- matchSource: file.matchSource,
309
58
  };
310
59
  }
@@ -13,7 +13,7 @@ import { getAccountList, getNestedAccountListHierarchy, } from '../../accountLis
13
13
  import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
14
14
  import { initialActionFetchState, initialReconciliationTabsState, initialState, } from '../reducers/reconciliationViewReducer';
15
15
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
16
- export const getExpenseAutomationReconciliationView = createSelector((state) => state, (state) => 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) => {
16
+ export const getExpenseAutomationReconciliationView = createSelector((state) => state, (state) => 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) => {
17
17
  const { selectedPeriodByTenantId } = expenseAutomationViewState;
18
18
  const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
19
19
  const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
@@ -35,13 +35,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
35
35
  }
36
36
  return acc;
37
37
  }, []);
38
- const monthYearPeriodId = selectedPeriod != null ? toMonthYearPeriodId(selectedPeriod) : null;
39
- const monthEndFetchState = monthYearPeriodId != null
40
- ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
41
- fetchState: 'Not-Started',
42
- error: undefined,
43
- })
44
- : { fetchState: 'Not-Started', error: undefined };
45
38
  if (accountReconForMonthYearPeriod == null) {
46
39
  return {
47
40
  bankAccounts: [],
@@ -51,13 +44,10 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
51
44
  classListNestedAccountHierarchy: [],
52
45
  allAccountList: [],
53
46
  allClassList: [],
54
- fetchStatus: reduceAnyFetchState([
55
- {
56
- fetchState: reconciliationViewState.fetchState,
57
- error: reconciliationViewState.error,
58
- },
59
- monthEndFetchState,
60
- ]),
47
+ fetchStatus: {
48
+ fetchState: reconciliationViewState.fetchState,
49
+ error: reconciliationViewState.error,
50
+ },
61
51
  plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
62
52
  .plaidConnectionDetails,
63
53
  completionStatus: 'incomplete',
@@ -280,13 +270,10 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
280
270
  bankAccounts: uniqueBankAccounts,
281
271
  creditCards: uniqueCreditCards,
282
272
  accountReconciliationsByAccountID: reconList,
283
- fetchStatus: reduceAnyFetchState([
284
- {
285
- fetchState: reconciliationViewState.fetchState,
286
- error: reconciliationViewState.error,
287
- },
288
- monthEndFetchState,
289
- ]),
273
+ fetchStatus: {
274
+ fetchState: reconciliationViewState.fetchState,
275
+ error: reconciliationViewState.error,
276
+ },
290
277
  plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
291
278
  .plaidConnectionDetails,
292
279
  reconciliationTabsState: reconciliationViewState.reconTabsState,
@@ -1,5 +1,5 @@
1
1
  import omit from 'lodash/omit';
2
- import { reduceAllFetchState, reduceAnyFetchState, } from '../../../commonStateTypes/reduceFetchState';
2
+ import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
3
3
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
4
  import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
5
5
  import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
@@ -8,9 +8,9 @@ import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts
8
8
  import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
9
9
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
10
10
  export function getExpenseAutomationTransactionView(state) {
11
- const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
11
+ const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
12
12
  const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
13
- const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
13
+ const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
14
14
  const uncategorizedIncomeExpense = getUncategorizedAccounts(accountState, accountListState, 'accountList');
15
15
  const accountList = getAccountList(accountState, accountListState, 'accountList');
16
16
  const classList = getClassList(classState, classListState);
@@ -41,16 +41,10 @@ export function getExpenseAutomationTransactionView(state) {
41
41
  .filter((transaction) => transaction != null);
42
42
  const transactions = getSupportedTransactionsByIds(transactionState, transactionIds);
43
43
  const transactionsWithCOT = transactions.map((transaction) => getTransactionWithCOT(transaction));
44
- const monthEndFetchState = monthYearPeriodId != null
45
- ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
46
- : { fetchState: 'Not-Started', error: undefined };
47
- const fetchStatus = reduceAnyFetchState([
48
- reduceAllFetchState([
49
- accountList,
50
- classList,
51
- expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
52
- ]),
53
- monthEndFetchState,
44
+ const fetchStatus = reduceAllFetchState([
45
+ accountList,
46
+ classList,
47
+ expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
54
48
  ]);
55
49
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
56
50
  .uiState.totalCount;
@@ -100,7 +94,6 @@ export function getExpenseAutomationTransactionView(state) {
100
94
  completionStatus,
101
95
  totalCountByTab,
102
96
  fetchStateByTransactionTabs: fetchStateByTab,
103
- uploadReceiptStatusById,
104
97
  selectedTransactionId,
105
98
  selectedTransactionLineId,
106
99
  };
@@ -1,18 +1 @@
1
- import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
2
- const JE_SCHEDULE_SORT_KEYS = [
3
- 'vendor',
4
- 'category',
5
- 'class',
6
- 'depCategory',
7
- 'scheduleCategory',
8
- 'startMonth',
9
- 'type',
10
- 'amortizationPeriod',
11
- 'jePostingDate',
12
- 'remainingMonths',
13
- 'runningBalance',
14
- 'totalAmount',
15
- 'transactionDate',
16
- 'memo',
17
- ];
18
- export const toJEScheduleSortKey = (v) => stringToUnion(v, JE_SCHEDULE_SORT_KEYS);
1
+ export {};
@@ -7,47 +7,3 @@ const MISSING_RECEIPTS_SORT_KEYS = [
7
7
  'amount',
8
8
  ];
9
9
  export const toMissingReceiptsSortKey = (v) => stringToUnion(v, MISSING_RECEIPTS_SORT_KEYS);
10
- // -- Bulk Receipt Upload Types --
11
- /**
12
- * Minimum trimmed query length before manual-match search calls the expense-automation API.
13
- * Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
14
- */
15
- export const MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
16
- const BATCH_STATUS_VALUES = ['pending', 'processing', 'completed'];
17
- export const toBatchStatusValue = (v) => stringToUnion(v.trim().toLowerCase(), BATCH_STATUS_VALUES);
18
- /** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
19
- export const BATCH_FILE_STATUSES = [
20
- 'exact_match',
21
- 'possible_matches',
22
- 'no_match',
23
- 'failed',
24
- ];
25
- export const toBatchFileStatus = (v) => stringToUnion(v.trim().toLowerCase().replace(/-/g, '_'), BATCH_FILE_STATUSES);
26
- const UNMATCHED_TAB_FILE_STATUSES = ['possible_matches', 'no_match'];
27
- /** True for files that belong in the Unmatched tab (possible matches or no match). */
28
- export function isUnmatchedTabFileStatus(status) {
29
- return UNMATCHED_TAB_FILE_STATUSES.includes(status);
30
- }
31
- const BULK_UPLOAD_PHASES = [
32
- 'idle',
33
- 'uploading',
34
- 'matching',
35
- 'completed',
36
- ];
37
- export const toBulkUploadPhase = (v) => stringToUnion(v.trim().toLowerCase(), BULK_UPLOAD_PHASES);
38
- const BULK_UPLOAD_RESULTS_TABS = ['completed', 'unmatched'];
39
- export const toBulkUploadResultsTab = (v) => stringToUnion(v.trim().toLowerCase(), BULK_UPLOAD_RESULTS_TABS);
40
- const MISSING_RECEIPTS_TABS = ['missing', 'completed', 'unmatched'];
41
- export const toMissingReceiptsTab = (v) => stringToUnion(v.trim().toLowerCase(), MISSING_RECEIPTS_TABS);
42
- const COMPLETED_SUB_TABS = ['all', 'ai_accountant', 'manual'];
43
- export const toCompletedSubTab = (v) => stringToUnion(v.trim().toLowerCase(), COMPLETED_SUB_TABS);
44
- const MATCH_SOURCES = ['ai', 'manual'];
45
- export const toMatchSource = (v) => stringToUnion(v.trim().toLowerCase(), MATCH_SOURCES);
46
- const BULK_UPLOAD_SORT_KEYS = [
47
- 'amount',
48
- 'category',
49
- 'class',
50
- 'date',
51
- 'vendor',
52
- ];
53
- export const toBulkUploadSortKey = (v) => stringToUnion(v.trim().toLowerCase(), BULK_UPLOAD_SORT_KEYS);
@@ -4,11 +4,10 @@ const TRANSACTIONS_SORT_KEYS = [
4
4
  'vendor',
5
5
  'amount',
6
6
  'transaction_type',
7
- 'payment_account',
8
7
  'date',
9
8
  'category',
10
9
  'class',
11
- 'memo_and_receipt',
10
+ 'memo',
12
11
  ];
13
12
  export const toTransactionsSortKey = (v) => stringToUnion(v, TRANSACTIONS_SORT_KEYS);
14
13
  export const TRANSACTIONS_TABS = ['review', 'autoCategorized'];
@@ -44,20 +44,19 @@ const financeStatement = createSlice({
44
44
  updateFinanceStatementThisPeriod(draft, action) {
45
45
  const { firstMonthOfFY, coaBalances, maxNumOfPeriodsToHighlight } = action.payload;
46
46
  const { timeframe, selectedCOABalancesRange } = draft;
47
- const safeCoaBalances = coaBalances != null ? coaBalances : [];
48
- if (safeCoaBalances.length > 0) {
49
- const prevThisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
47
+ if (coaBalances.length > 0) {
48
+ const prevThisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
50
49
  if (prevThisPeriod != null) {
51
50
  const selectedCoaBalancesRangeWithThisPeriod = {
52
51
  ...selectedCOABalancesRange,
53
52
  thisPeriod: prevThisPeriod,
54
53
  };
55
- const newThisPeriod = getMatchingThisPeriod(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, safeCoaBalances);
54
+ const newThisPeriod = getMatchingThisPeriod(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, coaBalances);
56
55
  if (newThisPeriod != null) {
57
56
  const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
58
57
  firstMonthOfFY,
59
58
  thisPeriod: newThisPeriod,
60
- coaBalances: safeCoaBalances,
59
+ coaBalances,
61
60
  timeframe,
62
61
  maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
63
62
  currentSelection: {
@@ -76,9 +75,7 @@ const financeStatement = createSlice({
76
75
  draft.selectedReportId = action.payload;
77
76
  },
78
77
  updateFinanceStatementAdditionalBalancesSelection(draft, action) {
79
- const { firstMonthOfFY, additionalBalances: additionalBalancesPayload, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
80
- const safeCoaBalances = coaBalances != null ? coaBalances : [];
81
- const additionalBalances = additionalBalancesPayload ?? [];
78
+ const { firstMonthOfFY, additionalBalances, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
82
79
  let tempAdditionalBalances = [...additionalBalances];
83
80
  if (additionalBalances.includes('this_period_vs_last_period') ||
84
81
  additionalBalances.includes('this_period_vs_last_period_percent')) {
@@ -94,8 +91,8 @@ const financeStatement = createSlice({
94
91
  draft.isAdditionalBalancesShown =
95
92
  additionalBalances.length != 0 ? true : false;
96
93
  const { timeframe, selectedCOABalancesRange } = draft;
97
- if (safeCoaBalances.length > 0) {
98
- const thisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
94
+ if (coaBalances.length > 0) {
95
+ const thisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
99
96
  if (thisPeriod != null) {
100
97
  const selectedCoaBalancesRangeWithThisPeriod = {
101
98
  ...selectedCOABalancesRange,
@@ -104,7 +101,7 @@ const financeStatement = createSlice({
104
101
  const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
105
102
  firstMonthOfFY,
106
103
  thisPeriod: thisPeriod,
107
- coaBalances: safeCoaBalances,
104
+ coaBalances,
108
105
  timeframe,
109
106
  maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
110
107
  currentSelection: {
@@ -1,5 +1,4 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
- import { stripCompareAdditionalBalanceTypes } from '../../commonStateTypes/coaBalance/coaBalanceType';
3
2
  import { newBalancesFilter, newBalancesFilterForDateRange, } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
4
3
  import { newBalancesFilterClassesView } from '../../commonStateTypes/coaBalance/coaBalancesFilterClassesView';
5
4
  import { getNumberOfPeriods, } from '../../commonStateTypes/dataAvailable';
@@ -9,7 +8,6 @@ import { extractThisPeriod } from '../../commonStateTypes/viewAndReport/thisPeri
9
8
  import { getBalanceSheet } from '../balanceSheet/balanceSheetSelector';
10
9
  import { getCashFlow } from '../cashFlow/cashFlowSelector';
11
10
  import { getProfitAndLossReport, } from '../profitAndLoss/profitAndLossSelector';
12
- import { getProfitAndLossClassesHorizontalView } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
13
11
  import { getProfitAndLossClassesView } from '../profitAndLossClassesView/profitAndLossClassesViewSelector';
14
12
  function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
15
13
  const datesSorted = [
@@ -44,11 +42,11 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
44
42
  if (dataAvailable != null) {
45
43
  const noFilter = newBalancesFilterForDateRange(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
46
44
  const profitAndLossForTimeframeTicks = getProfitAndLossReport(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
47
- const expensesBalances = profitAndLossForTimeframeTicks.sections.expenses?.balances ?? [];
48
- const incomeBalances = profitAndLossForTimeframeTicks.sections.income?.balances ?? [];
49
- balancesInTimeframe =
50
- expensesBalances.length > 0 ? expensesBalances : incomeBalances;
51
- if (balancesInTimeframe.length > 0) {
45
+ if (profitAndLossForTimeframeTicks.sections.expenses != null) {
46
+ balancesInTimeframe =
47
+ profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
48
+ ? profitAndLossForTimeframeTicks.sections['expenses'].balances
49
+ : profitAndLossForTimeframeTicks.sections['income'].balances;
52
50
  allTimeframeTicks = balancesInTimeframe.map((balance) => toTimeframeTick(balance));
53
51
  }
54
52
  }
@@ -56,22 +54,12 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
56
54
  if (thisPeriod == null && balancesInTimeframe.length > 0) {
57
55
  thisPeriod = toTimeframeTick(balancesInTimeframe[balancesInTimeframe.length - 1]);
58
56
  }
59
- const rawAdditionalBalances = financeStatementState.isAdditionalBalancesShown === true
57
+ const filter = newBalancesFilter(firstMonthOfFY, financeStatementState.timeframe, Math.min(getNumberOfPeriods(firstMonthOfFY, financeStatementState.timeframe, dataAvailable) ?? financeStatementState.selectedCOABalancesRange.numberOfPeriods, financeStatementState.selectedCOABalancesRange.numberOfPeriods), thisPeriod, 'ascending_date', financeStatementState.isAdditionalBalancesShown === true
60
58
  ? financeStatementState.selectedAdditionalBalances
61
- : [];
62
- const useHorizontalClassesLayout = profitAndLossClassesViewState.uiState.classViewLayout ===
63
- 'horizontal' &&
64
- financeStatementState.selectedReportId === 'profit_and_loss_by_classes';
65
- const additionalBalancesForFilter = useHorizontalClassesLayout
66
- ? stripCompareAdditionalBalanceTypes(rawAdditionalBalances)
67
- : rawAdditionalBalances;
68
- const filter = newBalancesFilter(firstMonthOfFY, financeStatementState.timeframe, Math.min(getNumberOfPeriods(firstMonthOfFY, financeStatementState.timeframe, dataAvailable) ?? financeStatementState.selectedCOABalancesRange.numberOfPeriods, financeStatementState.selectedCOABalancesRange.numberOfPeriods), thisPeriod, 'ascending_date', additionalBalancesForFilter);
59
+ : []);
69
60
  const profitAndLossReport = getProfitAndLossReport(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
70
61
  const classFilter = newBalancesFilterClassesView(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
71
62
  const profitAndLossByClassReport = getProfitAndLossClassesView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
72
- const profitAndLossByClassHorizontalReport = getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
73
- ? thisPeriod
74
- : undefined);
75
63
  const balanceSheetReport = getBalanceSheet(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
76
64
  const cashFlowReport = getCashFlow(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
77
65
  const allReports = [
@@ -119,15 +107,12 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
119
107
  dataAvailable,
120
108
  profitAndLossReport,
121
109
  profitAndLossByClassReport,
122
- profitAndLossByClassHorizontalReport,
123
110
  balanceSheetReport,
124
111
  cashFlowReport,
125
112
  filter,
126
113
  selectedReportId: financeStatementState.selectedReportId,
127
114
  downloadState: financeStatementState.downloadState,
128
- isCompareModeOn: useHorizontalClassesLayout
129
- ? false
130
- : financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period') ||
131
- financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period_percent'),
115
+ isCompareModeOn: financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period') ||
116
+ financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period_percent'),
132
117
  };
133
118
  });
@@ -23,7 +23,6 @@ export const initialState = {
23
23
  nodeCollapseState: {},
24
24
  scrollPosition: undefined,
25
25
  accountViewMode: 'account_group',
26
- classViewLayout: 'vertical',
27
26
  classesToFilterOut: [],
28
27
  },
29
28
  firstMonthOfFY: 1,
@@ -95,9 +94,6 @@ const profitAndLossClassesView = createSlice({
95
94
  updateAccountViewMode(draft, action) {
96
95
  draft.uiState.accountViewMode = action.payload.viewMode;
97
96
  },
98
- updateClassViewLayout(draft, action) {
99
- draft.uiState.classViewLayout = action.payload.classViewLayout;
100
- },
101
97
  resetProfitAndLossClassesNodeCollapseState(draft) {
102
98
  draft.uiState.nodeCollapseState = {};
103
99
  },
@@ -106,11 +102,10 @@ const profitAndLossClassesView = createSlice({
106
102
  },
107
103
  },
108
104
  });
109
- export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, updateClassViewLayout, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
105
+ export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
110
106
  export default profitAndLossClassesView.reducer;
111
107
  const doUpdatedProfitAndLossClassesView = (draft, timeframe, pandLReport) => {
112
108
  const report = mapReportPayloadV2ToReportV2(pandLReport.report);
113
- draft.currency = report.currency;
114
109
  draft.dataAvailable = report.dataAvailable;
115
110
  draft.firstMonthOfFY = report.firstMonthOfFY;
116
111
  draft.bookCloseDate = report.bookCloseDate;