@zeniai/client-epic-state 4.19.97 → 4.19.99-beta0ND

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/coaBalance/coaBalanceType.d.ts +2 -0
  3. package/lib/commonStateTypes/coaBalance/coaBalanceType.js +6 -0
  4. package/lib/commonStateTypes/currencyHelper.d.ts +3 -0
  5. package/lib/commonStateTypes/currencyHelper.js +6 -1
  6. package/lib/commonStateTypes/reduceFetchState.d.ts +9 -0
  7. package/lib/commonStateTypes/reduceFetchState.js +26 -0
  8. package/lib/entity/account/accountPayload.d.ts +2 -0
  9. package/lib/entity/account/accountPayload.js +2 -0
  10. package/lib/entity/account/accountState.d.ts +2 -0
  11. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  12. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  13. package/lib/entity/customer/customerState.d.ts +0 -2
  14. package/lib/entity/customer/customerState.js +0 -5
  15. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  16. package/lib/entity/depositAccount/depositAccount.js +8 -1
  17. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +35 -0
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.js +44 -0
  19. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -1
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  21. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +13 -0
  22. package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -0
  23. package/lib/entity/reimbursement/reimbursementPayload.js +7 -0
  24. package/lib/entity/reimbursement/reimbursementState.d.ts +2 -0
  25. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  26. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  27. package/lib/entity/task/taskPayload.d.ts +1 -0
  28. package/lib/entity/task/taskPayload.js +1 -0
  29. package/lib/entity/task/taskState.d.ts +1 -0
  30. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  31. package/lib/entity/tenant/tenantReducer.js +1 -0
  32. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  33. package/lib/entity/tenant/tenantSelector.js +9 -1
  34. package/lib/entity/tenant/tenantState.d.ts +1 -0
  35. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
  36. package/lib/entity/transaction/payloadTypes/transactionPayload.js +11 -0
  37. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  38. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  39. package/lib/entity/userGroups/userGroupsPayload.d.ts +7 -0
  40. package/lib/entity/userGroups/userGroupsPayload.js +10 -0
  41. package/lib/entity/userGroups/userGroupsReducer.d.ts +8 -0
  42. package/lib/entity/userGroups/userGroupsReducer.js +29 -0
  43. package/lib/entity/userGroups/userGroupsSelector.d.ts +4 -0
  44. package/lib/entity/userGroups/userGroupsSelector.js +12 -0
  45. package/lib/entity/userGroups/userGroupsState.d.ts +9 -0
  46. package/lib/entity/userGroups/userGroupsState.js +2 -0
  47. package/lib/epic.d.ts +13 -1
  48. package/lib/epic.js +13 -1
  49. package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +5 -0
  50. package/lib/esm/commonStateTypes/currencyHelper.js +5 -0
  51. package/lib/esm/commonStateTypes/reduceFetchState.js +25 -0
  52. package/lib/esm/entity/account/accountPayload.js +2 -0
  53. package/lib/esm/entity/customer/customerState.js +1 -4
  54. package/lib/esm/entity/depositAccount/depositAccount.js +8 -1
  55. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +44 -0
  56. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  57. package/lib/esm/entity/reimbursement/reimbursementPayload.js +7 -0
  58. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  59. package/lib/esm/entity/task/taskPayload.js +1 -0
  60. package/lib/esm/entity/tenant/tenantReducer.js +1 -0
  61. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  62. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +11 -0
  63. package/lib/esm/entity/userGroups/userGroupsPayload.js +7 -0
  64. package/lib/esm/entity/userGroups/userGroupsReducer.js +25 -0
  65. package/lib/esm/entity/userGroups/userGroupsSelector.js +8 -0
  66. package/lib/esm/entity/userGroups/userGroupsState.js +1 -0
  67. package/lib/esm/epic.js +13 -1
  68. package/lib/esm/index.js +25 -16
  69. package/lib/esm/reducer.js +6 -0
  70. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  71. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  72. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  73. package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
  74. package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
  75. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  76. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  77. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  78. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +10 -0
  79. package/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
  80. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +29 -0
  81. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +49 -0
  82. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +40 -0
  83. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +47 -0
  84. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +61 -0
  85. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +33 -0
  86. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +56 -0
  87. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +77 -0
  88. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  89. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +79 -0
  90. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +24 -0
  91. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  92. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  93. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +189 -1
  94. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +17 -1
  95. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +433 -2
  96. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +23 -1
  97. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +50 -3
  98. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +245 -2
  99. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  100. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +17 -1
  101. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +44 -0
  102. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  103. package/lib/esm/view/financeStatement/financeStatementReducer.js +11 -8
  104. package/lib/esm/view/financeStatement/financeStatementSelector.js +24 -9
  105. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +322 -0
  106. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +9 -0
  107. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
  108. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
  109. package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
  110. package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +201 -0
  111. package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +9 -7
  112. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  113. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  114. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  115. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  116. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  117. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  118. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  119. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  120. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  121. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  122. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  123. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  124. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
  125. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +3 -1
  126. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  127. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  128. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +65 -0
  129. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +16 -0
  130. package/lib/esm/view/userGroupListView/userGroupListViewState.js +1 -0
  131. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +11 -0
  132. package/lib/esm/zeniAPI.js +0 -2
  133. package/lib/index.d.ts +31 -21
  134. package/lib/index.js +102 -34
  135. package/lib/reducer.d.ts +6 -0
  136. package/lib/reducer.js +6 -0
  137. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  138. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  139. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  140. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  141. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  142. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  143. package/lib/view/aiCfoView/aiCfoViewState.d.ts +18 -1
  144. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  145. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  146. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
  147. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
  148. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  149. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  150. package/lib/view/classList/fetchClassListEpic.js +8 -1
  151. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  152. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  153. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  154. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  155. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +10 -0
  156. package/lib/view/expenseAutomationView/bulkUploadTiming.js +13 -0
  157. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
  158. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +18 -0
  159. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +33 -0
  160. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +7 -0
  161. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +53 -0
  162. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
  163. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +44 -0
  164. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +7 -0
  165. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +51 -0
  166. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
  167. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +65 -0
  168. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +8 -0
  169. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +37 -0
  170. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +9 -0
  171. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +61 -0
  172. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +14 -0
  173. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +81 -0
  174. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  175. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +25 -0
  176. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +85 -0
  177. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +7 -0
  178. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +28 -0
  179. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  180. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  181. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  182. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +118 -0
  183. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +201 -0
  184. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  185. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +18 -2
  186. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +76 -3
  187. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +434 -2
  188. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +11 -3
  189. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +24 -2
  190. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  191. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +69 -1
  192. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -0
  193. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +50 -3
  194. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  195. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +244 -1
  196. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  197. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +5 -0
  198. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +19 -0
  199. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +142 -0
  200. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +54 -1
  201. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
  202. package/lib/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  203. package/lib/view/financeStatement/financeStatementReducer.js +11 -8
  204. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  205. package/lib/view/financeStatement/financeStatementSelector.js +24 -9
  206. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +13 -0
  207. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +326 -0
  208. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +111 -0
  209. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +13 -0
  210. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +4 -2
  211. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +7 -2
  212. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
  213. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +4 -0
  214. package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
  215. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +6 -0
  216. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +204 -0
  217. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +8 -6
  218. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  219. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  220. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  221. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  222. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  223. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  224. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  225. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  226. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  227. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  228. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  229. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  230. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  231. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  232. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  233. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  234. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  235. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +1 -0
  236. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
  237. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +2 -0
  238. package/lib/view/taskManager/taskListView/taskListSelector.js +3 -1
  239. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  240. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  241. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +23 -0
  242. package/lib/view/userGroupListView/userGroupListViewReducer.js +69 -0
  243. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +7 -0
  244. package/lib/view/userGroupListView/userGroupListViewSelector.js +20 -0
  245. package/lib/view/userGroupListView/userGroupListViewState.d.ts +8 -0
  246. package/lib/view/userGroupListView/userGroupListViewState.js +2 -0
  247. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +3 -1
  248. package/lib/view/userListView/fetchUserListByTypeEpic.js +11 -0
  249. package/lib/view/userListView/userListViewPayload.d.ts +2 -0
  250. package/lib/zeniAPI.js +0 -2
  251. package/package.json +2 -2
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enrichProfitAndLossByClassHorizontalReport = enrichProfitAndLossByClassHorizontalReport;
4
+ const currencyHelper_1 = require("../../commonStateTypes/currencyHelper");
5
+ const profitAndLossClassesByClassHorizontalSelectorTypes_1 = require("./profitAndLossClassesByClassHorizontalSelectorTypes");
6
+ /**
7
+ * Populates `sectionHeaderBalancesSlice`, and per-account `accountReportData`, so the
8
+ * web layer only maps selector output to tree nodes.
9
+ */
10
+ function enrichProfitAndLossByClassHorizontalReport(report) {
11
+ if (report.fetchState !== 'Completed' || report.selectedPeriod == null) {
12
+ return;
13
+ }
14
+ for (const section of Object.values(report.sections)) {
15
+ if (section != null) {
16
+ enrichHorizontalSection(report, section);
17
+ }
18
+ }
19
+ for (const calc of Object.values(report.calculatedSections)) {
20
+ if (calc != null) {
21
+ enrichHorizontalCalculatedSection(report, calc);
22
+ }
23
+ }
24
+ }
25
+ function enrichHorizontalSection(report, section) {
26
+ const classAmounts = report.classColumns.map((col) => {
27
+ const total = section.classTotals.find((ct) => ct.classId === col.classId);
28
+ return total?.balance.amount ?? 0;
29
+ });
30
+ section.sectionHeaderBalancesSlice = buildHorizontalClassColumnBalancesSlice(report, classAmounts, section.sectionTotal.amount);
31
+ const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(section.accounts);
32
+ const childrenRecord = {};
33
+ childrenRowIndicesByParent.forEach((childIndices, parentIndex) => {
34
+ childrenRecord[parentIndex] = childIndices;
35
+ });
36
+ section.treeLayout = {
37
+ rootAccountRowIndices: section.accounts
38
+ .map((_, i) => findHorizontalAccountParentIndex(section.accounts, i) === -1 ? i : -1)
39
+ .filter((i) => i >= 0),
40
+ childrenRowIndicesByParent: childrenRecord,
41
+ };
42
+ for (let i = 0; i < section.accounts.length; i++) {
43
+ const row = section.accounts[i];
44
+ const classRowAmounts = report.classColumns.map((col) => {
45
+ const cb = row.classBalances.find((b) => b.classId === col.classId);
46
+ return cb?.balance.amount ?? 0;
47
+ });
48
+ row.accountReportData = {
49
+ accountId: row.accountId,
50
+ accountName: row.accountName,
51
+ accountType: row.accountType,
52
+ depth: row.depth,
53
+ balancesInTimeframe: buildHorizontalClassColumnBalancesSlice(report, classRowAmounts, row.rowTotal.amount),
54
+ horizontalTreeView: buildHorizontalTreeView(section.accounts, i),
55
+ };
56
+ }
57
+ }
58
+ function enrichHorizontalCalculatedSection(report, calcSection) {
59
+ const classAmounts = report.classColumns.map((col) => {
60
+ const total = calcSection.classTotals.find((ct) => ct.classId === col.classId);
61
+ return total?.balance.amount ?? 0;
62
+ });
63
+ calcSection.sectionHeaderBalancesSlice =
64
+ buildHorizontalClassColumnBalancesSlice(report, classAmounts, calcSection.sectionTotal.amount);
65
+ }
66
+ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmount) {
67
+ const fallback = currencyHelper_1.defaultCustomerCurrency;
68
+ const firstHeader = report.headerBalances[0];
69
+ const currencyCode = firstHeader?.balance.currencyCode ?? fallback.currencyCode;
70
+ const currencySymbol = firstHeader?.balance.currencySymbol ?? fallback.currencySymbol;
71
+ const timeframe = firstHeader?.balanceTimeFrame ?? 'month';
72
+ const emptySlice = {
73
+ balances: [],
74
+ additionalBalances: [],
75
+ filter: {
76
+ firstMonthOfFY: report.firstMonthOfFY,
77
+ timeframe,
78
+ balancesRange: { numberOfPeriods: 0, orderBy: 'ascending_date' },
79
+ additionalBalances: [],
80
+ },
81
+ };
82
+ if (report.selectedPeriod == null) {
83
+ return emptySlice;
84
+ }
85
+ const { startDate, endDate } = report.selectedPeriod;
86
+ const balances = report.classColumns.map((col, i) => ({
87
+ balance: {
88
+ amount: classAmounts[i] ?? 0,
89
+ currencyCode,
90
+ currencySymbol,
91
+ },
92
+ balanceTimeFrame: timeframe,
93
+ startDate,
94
+ endDate,
95
+ type: 'default',
96
+ id: col.classId,
97
+ label: col.className,
98
+ }));
99
+ balances.push({
100
+ balance: {
101
+ amount: totalAmount,
102
+ currencyCode,
103
+ currencySymbol,
104
+ },
105
+ balanceTimeFrame: timeframe,
106
+ startDate,
107
+ endDate,
108
+ type: 'default',
109
+ id: profitAndLossClassesByClassHorizontalSelectorTypes_1.HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
110
+ label: 'Total',
111
+ });
112
+ return {
113
+ balances,
114
+ additionalBalances: [],
115
+ filter: {
116
+ firstMonthOfFY: report.firstMonthOfFY,
117
+ timeframe,
118
+ balancesRange: {
119
+ numberOfPeriods: balances.length,
120
+ orderBy: 'ascending_date',
121
+ },
122
+ additionalBalances: [],
123
+ },
124
+ };
125
+ }
126
+ function findHorizontalAccountParentIndex(dfsOrderedAccountRows, childRowIndex) {
127
+ const childDepth = dfsOrderedAccountRows[childRowIndex].depth;
128
+ if (childDepth <= 2) {
129
+ return -1;
130
+ }
131
+ for (let earlierRowIndex = childRowIndex - 1; earlierRowIndex >= 0; earlierRowIndex--) {
132
+ const earlierDepth = dfsOrderedAccountRows[earlierRowIndex].depth;
133
+ if (earlierDepth < childDepth) {
134
+ if (earlierDepth === childDepth - 1) {
135
+ return earlierRowIndex;
136
+ }
137
+ return -1;
138
+ }
139
+ }
140
+ return -1;
141
+ }
142
+ function getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, rowIndex) {
143
+ const parentRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex);
144
+ const rowDepth = dfsOrderedAccountRows[rowIndex].depth;
145
+ const siblings = [];
146
+ for (let i = 0; i < dfsOrderedAccountRows.length; i++) {
147
+ if (dfsOrderedAccountRows[i].depth === rowDepth &&
148
+ findHorizontalAccountParentIndex(dfsOrderedAccountRows, i) ===
149
+ parentRowIndex) {
150
+ siblings.push(i);
151
+ }
152
+ }
153
+ return siblings;
154
+ }
155
+ function horizontalAccountHasChildRows(dfsOrderedAccountRows, parentRowIndex) {
156
+ return dfsOrderedAccountRows.some((_, rowIndex) => findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex) ===
157
+ parentRowIndex);
158
+ }
159
+ function buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex) {
160
+ const ancestorRowIndicesRootToLeaf = [];
161
+ let walkRowIndex = currentRowIndex;
162
+ while (walkRowIndex >= 0) {
163
+ ancestorRowIndicesRootToLeaf.unshift(walkRowIndex);
164
+ walkRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, walkRowIndex);
165
+ }
166
+ return ancestorRowIndicesRootToLeaf.map((rowIndex) => {
167
+ const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, rowIndex);
168
+ return {
169
+ depth: dfsOrderedAccountRows[rowIndex].depth - 2,
170
+ hasSibling: siblingIndices.length > 1,
171
+ hasChildren: horizontalAccountHasChildRows(dfsOrderedAccountRows, rowIndex),
172
+ isLastNode: rowIndex === siblingIndices[siblingIndices.length - 1],
173
+ name: dfsOrderedAccountRows[rowIndex].accountName,
174
+ };
175
+ });
176
+ }
177
+ function buildHorizontalAccountChildIndicesByParent(dfsOrderedAccountRows) {
178
+ const childIndicesByParentRowIndex = new Map();
179
+ for (let rowIndex = 0; rowIndex < dfsOrderedAccountRows.length; rowIndex++) {
180
+ const parentRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex);
181
+ if (parentRowIndex >= 0) {
182
+ let childRowIndices = childIndicesByParentRowIndex.get(parentRowIndex);
183
+ if (childRowIndices === undefined) {
184
+ childRowIndices = [];
185
+ childIndicesByParentRowIndex.set(parentRowIndex, childRowIndices);
186
+ }
187
+ childRowIndices.push(rowIndex);
188
+ }
189
+ }
190
+ return childIndicesByParentRowIndex;
191
+ }
192
+ function buildHorizontalTreeView(dfsOrderedAccountRows, currentRowIndex) {
193
+ const treeDepth = Math.max(0, dfsOrderedAccountRows[currentRowIndex].depth - 2);
194
+ const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, currentRowIndex);
195
+ const hasChildren = horizontalAccountHasChildRows(dfsOrderedAccountRows, currentRowIndex);
196
+ return {
197
+ subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex),
198
+ treeDepth,
199
+ hasChildren,
200
+ hasSiblings: siblingIndices.length > 1,
201
+ isLeaf: !hasChildren,
202
+ isLastNode: currentRowIndex === siblingIndices[siblingIndices.length - 1],
203
+ };
204
+ }
@@ -11,9 +11,13 @@ const opExReducer_1 = require("../opEx/opExReducer");
11
11
  const revenueReducer_1 = require("../revenue/revenueReducer");
12
12
  const reportUIOptionsReducer_1 = require("./reportUIOptionsReducer");
13
13
  const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(reportUIOptionsReducer_1.updateReportUIOptionCOABalancesRange.match), (0, operators_1.switchMap)((action) => {
14
- const thisPeriod = action.payload.selectedCOABalancesRange.thisPeriod;
15
- const orderBy = action.payload.selectedCOABalancesRange.orderBy;
16
- const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true ? 4 : 1;
14
+ const selectedRange = action.payload.selectedCOABalancesRange;
15
+ const thisPeriod = selectedRange.thisPeriod;
16
+ const orderBy = selectedRange.orderBy;
17
+ const numberOfPeriodsFromSelection = selectedRange.numberOfPeriods;
18
+ const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true
19
+ ? numberOfPeriodsFromSelection
20
+ : 1;
17
21
  const highlightedCOABalancesRange = action.payload.highlightedCOABalancesRange == null && thisPeriod != null
18
22
  ? {
19
23
  numberOfPeriods: highlightedNoOfPeriods,
@@ -65,9 +69,7 @@ const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.
65
69
  thisPeriod: action.payload.highlightedCOABalancesRange != null
66
70
  ? action.payload.highlightedCOABalancesRange.thisPeriod
67
71
  : thisPeriod,
68
- numberOfPeriods: state$.value.reportUIOptionsState.isCompareModeOn === true
69
- ? 4
70
- : financeStatementReducer_1.initialFinanceStatementState.maxNumOfPeriodsToHighlight,
72
+ numberOfPeriods: numberOfPeriodsFromSelection,
71
73
  orderBy,
72
74
  }));
73
75
  }));
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
9
9
  export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
10
+ declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  categoryId: ID;
@@ -424,6 +424,14 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
424
424
  transactionsWithNoSortKeyValue.push(transaction);
425
425
  }
426
426
  break;
427
+ case 'invoiceNumber':
428
+ if (transaction.documentId != null) {
429
+ transactionsWithSortKeyValue.push(transaction);
430
+ }
431
+ else {
432
+ transactionsWithNoSortKeyValue.push(transaction);
433
+ }
434
+ break;
427
435
  case 'dueDate':
428
436
  if (currentTab === 'draft') {
429
437
  if (Boolean(transaction.dueDate) === true) {
@@ -526,6 +534,8 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
526
534
  return transaction.totalAmountInUSD?.amount ?? 0;
527
535
  case 'paymentMethod':
528
536
  return transaction.billPayInfo.billPaymentMethodType.name;
537
+ case 'invoiceNumber':
538
+ return transaction.documentId;
529
539
  }
530
540
  }, getColumnWiseSortOrder(sortOrder));
531
541
  return [
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
37
37
  export type BillTab = ReturnType<typeof toBillTabType>;
38
38
  declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
39
39
  export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
40
- declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
40
+ declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceNumber" | "invoiceDate";
41
41
  export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
42
42
  export interface BillPayFilters {
43
43
  categories: BillPayFilterCategory[];
@@ -47,6 +47,7 @@ const ALL_BILL_PAY_SORT_KEYS = [
47
47
  'invoiceDate',
48
48
  'name',
49
49
  'paymentMethod',
50
+ 'invoiceNumber',
50
51
  ];
51
52
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
52
53
  const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
@@ -8,6 +8,7 @@ const get_1 = __importDefault(require("lodash/get"));
8
8
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
9
9
  const contactSelector_1 = require("../../../../entity/billPay/contact/contactSelector");
10
10
  const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
11
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
11
12
  const vendorSelector_1 = require("../../../../entity/vendor/vendorSelector");
12
13
  const accountListSelector_1 = require("../../../accountList/accountListSelector");
13
14
  const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
@@ -80,11 +81,14 @@ const getReviewPageBillDetail = (state, billId) => {
80
81
  }
81
82
  }
82
83
  if (sourceBillDetail != null) {
83
- sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)([
84
+ const fetchStateList = [
84
85
  sourceBillDetail.fetchStatus,
85
86
  accountListState.byReportId['billPayAccountList'],
86
- classListState,
87
- ]).fetchState;
87
+ ];
88
+ if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
89
+ fetchStateList.push(classListState);
90
+ }
91
+ sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
88
92
  }
89
93
  }
90
94
  else {
@@ -9,6 +9,7 @@ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
9
9
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
10
10
  const approvalRuleSelector_1 = require("../../../../entity/approvalRule/approvalRuleSelector");
11
11
  const classSelector_1 = require("../../../../entity/class/classSelector");
12
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
12
13
  const userSelector_1 = require("../../../../entity/user/userSelector");
13
14
  const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
14
15
  exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
@@ -50,7 +51,7 @@ exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => s
50
51
  newApprovalRuleId,
51
52
  };
52
53
  });
53
- exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
54
+ exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (state) => (0, tenantSelector_1.getIsAccountingClassesEnabled)(state), (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState, isAccountingClassesEnabled) => {
54
55
  const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
55
56
  const { approverIds, attributes } = approverListState;
56
57
  const allApprovalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, approvalRuleIds);
@@ -98,10 +99,9 @@ exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((s
98
99
  allAttributes,
99
100
  filteredAttributes,
100
101
  billPaySetupApproverViewUpdateData,
101
- approverListFetchStatus: (0, reduceFetchState_1.reduceAllFetchState)([
102
- approverListState.fetchStatus,
103
- classListState,
104
- ]),
102
+ approverListFetchStatus: isAccountingClassesEnabled
103
+ ? (0, reduceFetchState_1.reduceAllFetchState)([approverListState.fetchStatus, classListState])
104
+ : approverListState.fetchStatus,
105
105
  fetchState,
106
106
  allAccountingClasses,
107
107
  error,
@@ -3,23 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchBillPayApproversDetailsEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
+ const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
6
7
  const classListReducer_1 = require("../../../../classList/classListReducer");
7
8
  const billPaySetupApproverViewReducer_1 = require("../billPaySetupApproverViewReducer");
8
9
  const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(billPaySetupApproverViewReducer_1.fetchBillPayApproversDetails.match), (0, operators_1.mergeMap)((action) => {
9
10
  const { cacheOverride, includeUserRoles } = action.payload;
10
11
  const { billPaySetupApproverViewState, classListState } = state$.value;
11
12
  const { approverListState } = billPaySetupApproverViewState;
13
+ const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
12
14
  const actions = [];
13
15
  if (cacheOverride === true) {
14
16
  actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(cacheOverride, includeUserRoles));
15
- actions.push((0, classListReducer_1.fetchClassList)());
17
+ if (isAccountingClassesEnabled) {
18
+ actions.push((0, classListReducer_1.fetchClassList)());
19
+ }
16
20
  }
17
21
  else {
18
22
  if (billPaySetupApproverViewState.hasValidState() === false &&
19
23
  approverListState.fetchStatus.fetchState !== 'In-Progress') {
20
24
  actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(true, includeUserRoles));
21
25
  }
22
- if (classListState.hasValidState() === false &&
26
+ if (isAccountingClassesEnabled &&
27
+ classListState.hasValidState() === false &&
23
28
  classListState.fetchState !== 'In-Progress') {
24
29
  actions.push((0, classListReducer_1.fetchClassList)());
25
30
  }
@@ -16,6 +16,7 @@ const companySelector_1 = require("../../../../entity/company/companySelector");
16
16
  const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
17
17
  const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
18
18
  const paymentInstrumentSelector_1 = require("../../../../entity/paymentInstrument/paymentInstrumentSelector");
19
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
19
20
  const userSelector_1 = require("../../../../entity/user/userSelector");
20
21
  const vendorSelector_1 = require("../../../../entity/vendor/vendorSelector");
21
22
  const zeniDayJS_1 = require("../../../../zeniDayJS");
@@ -181,12 +182,15 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
181
182
  isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
182
183
  billStage = billPayInfo?.stage.code ?? 'draft';
183
184
  if (billViewState != null) {
184
- fetchState = (0, reduceFetchState_1.reduceFetchState)([
185
+ const fetchStateList = [
185
186
  sourceBillDetail.fetchStatus,
186
187
  accountListState.byReportId.billPayAccountList,
187
- classListState,
188
188
  billPaySetupApproverViewState,
189
- ]).fetchState;
189
+ ];
190
+ if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
191
+ fetchStateList.push(classListState);
192
+ }
193
+ fetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
190
194
  deleteStatus = billViewState.deleteStatus;
191
195
  billActivities = (0, billDetailViewSelector_1.getBillActivities)(state, billId, billPayInfo?.stage.code);
192
196
  }
@@ -200,11 +204,14 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
200
204
  }
201
205
  }
202
206
  else {
203
- fetchState = (0, reduceFetchState_1.reduceFetchState)([
207
+ const newBillFetchStateList = [
204
208
  accountListState.byReportId.billPayAccountList,
205
- classListState,
206
209
  billPaySetupApproverViewState,
207
- ]).fetchState;
210
+ ];
211
+ if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
212
+ newBillFetchStateList.push(classListState);
213
+ }
214
+ fetchState = (0, reduceFetchState_1.reduceFetchState)(newBillFetchStateList).fetchState;
208
215
  }
209
216
  if (sourceBillDetail != null && fetchState == 'Completed') {
210
217
  const updatedRecord = sourceBillDetail.billDetailLocalData;
@@ -61,7 +61,7 @@ export declare const initialCreditAcc: CreditAccount;
61
61
  export declare const initialDebitCardSummaries: DebitCardSummaries;
62
62
  export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
63
63
  export declare const initialCreditAccountRepayment: CreditAccountRepayment;
64
- export declare const toChargeCardSortKeyType: (v: string) => "status" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
64
+ export declare const toChargeCardSortKeyType: (v: string) => "status" | "accountType" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
65
65
  export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
66
66
  export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
67
67
  export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
@@ -78,6 +78,7 @@ const ALL_CHARGE_CARD_SORT_KEYS = [
78
78
  'cardName',
79
79
  'department',
80
80
  'cardType',
81
+ 'accountType',
81
82
  'status',
82
83
  'utilisation',
83
84
  'limit',
@@ -233,6 +233,8 @@ const getCardsBySortKey = (card, sortKey) => {
233
233
  return card.cardName.toLowerCase();
234
234
  case 'cardType':
235
235
  return card.type.code;
236
+ case 'accountType':
237
+ return card.type.code.includes('credit') ? 'credit' : 'debit';
236
238
  case 'status':
237
239
  return card.status.code;
238
240
  case 'utilisation':
@@ -69,13 +69,16 @@ const getEditRemiDetail = (state, reimbursementId) => {
69
69
  paymentTo: reimbursementInfo?.toAccount.billAccountId,
70
70
  };
71
71
  if (sourceRemiDetail != null) {
72
- fetchState = (0, reduceFetchState_1.reduceFetchState)([
72
+ const fetchStateList = [
73
73
  sourceRemiDetail.fetchStatus,
74
74
  accountListState.byReportId.reimbursementAccountList,
75
- classListState,
76
75
  merchantListState,
77
76
  reimbursementConfigState,
78
- ]).fetchState;
77
+ ];
78
+ if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
79
+ fetchStateList.push(classListState);
80
+ }
81
+ fetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
79
82
  remiStage = reimbursementInfo?.stage.code ?? 'draft';
80
83
  createdBy = (0, userSelector_1.getUserByUserId)(userState, reimbursement?.createdBy ?? '');
81
84
  createTime = reimbursement?.createTime;
@@ -42,6 +42,7 @@ export interface ReimbursementView extends Reimbursement {
42
42
  approvers: Approvers;
43
43
  submittedBy: User | undefined;
44
44
  bulkSelectInfo?: RemiBulkSelectInfo;
45
+ createdByUser?: User;
45
46
  }
46
47
  export declare const getRemiList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean) => RemiListReport;
47
48
  export declare const getApproversOrRejectors: (reimbursement: Reimbursement, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
@@ -51,6 +51,7 @@ const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
51
51
  return {
52
52
  ...reimbursement,
53
53
  submittedBy: (0, userSelector_1.getUserByUserId)(userState, reimbursement.reimburseeUserId),
54
+ createdByUser: (0, userSelector_1.getUserByUserId)(userState, reimbursement.createdBy),
54
55
  approvers: approvers,
55
56
  };
56
57
  });
@@ -423,6 +424,14 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
423
424
  reimbursementsWithNoSortKeyValue.push(reimbursement);
424
425
  }
425
426
  break;
427
+ case 'createdBy':
428
+ if (reimbursement.createdByUser != null) {
429
+ reimbursementsWithSortKeyValue.push(reimbursement);
430
+ }
431
+ else {
432
+ reimbursementsWithNoSortKeyValue.push(reimbursement);
433
+ }
434
+ break;
426
435
  }
427
436
  });
428
437
  const getColumnWiseSortOrder = (sortOrder) => {
@@ -430,6 +439,7 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
430
439
  case 'reportName':
431
440
  case 'type':
432
441
  case 'status':
442
+ case 'createdBy':
433
443
  return sortOrder === 'ascending' ? 'asc' : 'desc';
434
444
  default:
435
445
  return sortOrder === 'ascending' ? 'desc' : 'asc';
@@ -449,6 +459,8 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
449
459
  return getStatusPerTab(reimbursement);
450
460
  case 'amount':
451
461
  return reimbursement.amount.amount ?? 0;
462
+ case 'createdBy':
463
+ return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
452
464
  }
453
465
  }, getColumnWiseSortOrder(sortOrder));
454
466
  return [
@@ -38,7 +38,7 @@ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed
38
38
  export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
39
39
  export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
40
40
  export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
41
- declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "submittedOn" | "reportName";
41
+ declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
42
42
  export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
43
43
  export interface ReimbursementFilters {
44
44
  categories: ReimbursementFilterCategory[];
@@ -64,6 +64,7 @@ exports.toRemiSubTabUnderScoreType = toRemiSubTabUnderScoreType;
64
64
  const ALL_REIMBURSEMENT_SORT_KEYS = [
65
65
  'reportName',
66
66
  'submittedOn',
67
+ 'createdBy',
67
68
  'type',
68
69
  'status',
69
70
  'amount',
@@ -98,11 +98,11 @@ exports.allTaskStatus = [
98
98
  },
99
99
  {
100
100
  code: 'done',
101
- name: 'Done',
101
+ name: 'In Review',
102
102
  },
103
103
  {
104
104
  code: 'resolved',
105
- name: 'Resolved',
105
+ name: 'Complete',
106
106
  },
107
107
  ];
108
108
  exports.allTaskPriority = [
@@ -116,7 +116,7 @@ exports.allTaskPriority = [
116
116
  },
117
117
  {
118
118
  code: 'medium',
119
- name: 'Normal',
119
+ name: 'Medium',
120
120
  },
121
121
  {
122
122
  code: 'low',
@@ -16,6 +16,7 @@ interface UpdateTaskPayload {
16
16
  description: string;
17
17
  due_date: string | null;
18
18
  file_ids: ID[];
19
+ group_assignees: string[];
19
20
  name: string;
20
21
  priority: string;
21
22
  recurring_end_date: string | null;
@@ -79,6 +79,7 @@ const toTaskPayload = (state, task) => {
79
79
  name: task.name,
80
80
  assignees: task.assignees,
81
81
  description: task.description,
82
+ group_assignees: task.groupAssignees,
82
83
  due_date: task.dueDate != null ? task.dueDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT) : null,
83
84
  priority: task.priority.code,
84
85
  status: task.status.code,
@@ -8,6 +8,7 @@ import { UserState } from '../../../entity/user/userState';
8
8
  import { UserRoleState } from '../../../entity/userRole/userRoleState';
9
9
  import { RootState } from '../../../reducer';
10
10
  import { UserAndRole } from '../../companyView/types/userAndRole';
11
+ import { UserGroupListSelectorView } from '../../userGroupListView/userGroupListViewSelector';
11
12
  import { UserListSelectorView } from '../../userListView/userListViewSelector';
12
13
  import { TaskListFilters, TaskListLocalData, TaskListState, TaskListUIState } from './taskList';
13
14
  export interface TaskWithUserDetails extends Task {
@@ -30,6 +31,7 @@ export interface TaskListSelectorView extends SelectorView {
30
31
  taskGroupUpdateStatus: FetchStateAndError;
31
32
  uiState: TaskListUIState;
32
33
  updateTasksFetchState: FetchStateAndError;
34
+ userGroupList: UserGroupListSelectorView;
33
35
  userList: UserListSelectorView;
34
36
  }
35
37
  export declare const getTaskListGroupedByAssignees: ({ taskListState, taskState, userState, userRoleState, addressState, tagState, }: {
@@ -17,6 +17,7 @@ const taskGroupTemplateSelector_1 = require("../../../entity/taskGroupTemplate/t
17
17
  const userSelector_1 = require("../../../entity/user/userSelector");
18
18
  const userAndRole_1 = require("../../companyView/types/userAndRole");
19
19
  const spendManagementFilterHelpers_1 = require("../../spendManagement/spendManagementFilterHelpers");
20
+ const userGroupListViewSelector_1 = require("../../userGroupListView/userGroupListViewSelector");
20
21
  const userListViewSelector_1 = require("../../userListView/userListViewSelector");
21
22
  const taskDetailSelector_1 = require("../taskDetailView/taskDetailSelector");
22
23
  const taskList_1 = require("./taskList");
@@ -316,7 +317,7 @@ const getTaskGroupsWithTaskList = ({ taskListState, taskState, userState, userRo
316
317
  tagState,
317
318
  });
318
319
  };
319
- exports.getAllTasks = (0, toolkit_1.createSelector)((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, isTaskTemplatesEnabled) => {
320
+ exports.getAllTasks = (0, toolkit_1.createSelector)((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (state) => state.userGroupsState, (state) => state.userGroupListViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, userGroupsState, userGroupListViewState, isTaskTemplatesEnabled) => {
320
321
  const { localData } = taskListState;
321
322
  const taskGroupsWithTasksList = getTaskGroupsWithTaskList({
322
323
  taskListState,
@@ -344,6 +345,7 @@ exports.getAllTasks = (0, toolkit_1.createSelector)((state) => state.taskListSta
344
345
  taskGroupTemplates,
345
346
  fetchState: fetchState,
346
347
  userList: (0, userListViewSelector_1.getUserList)(userState, userRoleState, userListViewState, 'taskManagerCandidate'),
348
+ userGroupList: (0, userGroupListViewSelector_1.getUserGroupList)(userGroupsState, userGroupListViewState, 'taskManagerCandidate'),
347
349
  error: error,
348
350
  version: 0,
349
351
  taskGroupsWithTasksList,