@zeniai/client-epic-state 5.0.95-betaML1 → 5.0.96

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 (238) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/entity/aiCfo/aiCfoPayload.d.ts +5 -63
  3. package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
  4. package/lib/entity/aiCfo/aiCfoReducer.js +9 -249
  5. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -4
  6. package/lib/entity/aiCfo/aiCfoSelector.js +1 -19
  7. package/lib/entity/aiCfo/aiCfoState.d.ts +4 -97
  8. package/lib/entity/aiCfo/aiCfoState.js +1 -18
  9. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
  10. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -7
  11. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -2
  12. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  13. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  14. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  15. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  16. package/lib/entity/task/taskPayload.d.ts +1 -3
  17. package/lib/entity/task/taskPayload.js +0 -2
  18. package/lib/entity/task/taskState.d.ts +0 -2
  19. package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
  20. package/lib/entity/tenant/clearAllEpic.js +0 -8
  21. package/lib/epic.d.ts +3 -18
  22. package/lib/epic.js +3 -18
  23. package/lib/esm/entity/aiCfo/aiCfoReducer.js +9 -249
  24. package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -17
  25. package/lib/esm/entity/aiCfo/aiCfoState.js +0 -15
  26. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -7
  27. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
  28. package/lib/esm/entity/task/taskPayload.js +0 -2
  29. package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
  30. package/lib/esm/epic.js +3 -18
  31. package/lib/esm/index.js +12 -42
  32. package/lib/esm/reducer.js +0 -12
  33. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
  34. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  35. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
  36. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  37. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +11 -39
  38. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +4 -14
  39. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
  40. package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  41. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
  42. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
  43. package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +3 -12
  44. package/lib/esm/view/recommendation/recommendationReducer.js +1 -18
  45. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
  46. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  47. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -42
  48. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -35
  49. package/lib/esm/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
  50. package/lib/esm/view/transactionDetail/transactionDetailReducer.js +3 -44
  51. package/lib/index.d.ts +14 -49
  52. package/lib/index.js +22 -194
  53. package/lib/reducer.d.ts +0 -12
  54. package/lib/reducer.js +0 -12
  55. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
  56. package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
  57. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  58. package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
  59. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
  60. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  61. package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +11 -19
  62. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +4 -10
  63. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +12 -40
  64. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +0 -2
  65. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -13
  66. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +3 -11
  67. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +3 -1
  68. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
  69. package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  70. package/lib/view/companyView/types/cockpitTypes.d.ts +1 -2
  71. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.d.ts +1 -2
  72. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
  73. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  74. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
  75. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  76. package/lib/view/people/peopleTypes.d.ts +1 -1
  77. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +2 -2
  78. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +1 -10
  79. package/lib/view/recommendation/recommendationReducer.d.ts +1 -3
  80. package/lib/view/recommendation/recommendationReducer.js +2 -19
  81. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  82. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  83. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
  84. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
  85. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  86. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  87. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +2 -12
  88. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -43
  89. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -7
  90. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -42
  91. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -5
  92. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  93. package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.d.ts +1 -2
  94. package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
  95. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
  96. package/lib/view/transactionDetail/transactionDetailReducer.js +3 -44
  97. package/package.json +1 -1
  98. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
  99. package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
  100. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
  101. package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -175
  102. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
  103. package/lib/entity/cardPolicy/cardPolicySelector.js +0 -99
  104. package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
  105. package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
  106. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
  107. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
  108. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
  109. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
  110. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
  111. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
  112. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -24
  113. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -105
  114. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
  115. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -171
  116. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -75
  117. package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
  118. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
  119. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
  120. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
  121. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -101
  122. package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -38
  123. package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -16
  124. package/lib/esm/view/recommendation/recommendationStaleResponseHelper.js +0 -26
  125. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -52
  126. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
  127. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
  128. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -36
  129. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -39
  130. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -34
  131. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -58
  132. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
  133. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
  134. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -38
  135. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -289
  136. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -109
  137. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -44
  138. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -111
  139. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -25
  140. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -363
  141. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -36
  142. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -19
  143. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -6
  144. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -119
  145. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -154
  146. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -22
  147. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
  148. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -39
  149. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -140
  150. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -20
  151. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -100
  152. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -96
  153. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -59
  154. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -24
  155. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -1
  156. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -34
  157. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -57
  158. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -35
  159. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -62
  160. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -44
  161. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +0 -10
  162. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -42
  163. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +0 -6
  164. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -20
  165. package/lib/view/recommendation/recommendationStaleResponseHelper.d.ts +0 -7
  166. package/lib/view/recommendation/recommendationStaleResponseHelper.js +0 -30
  167. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
  168. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -56
  169. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -15
  170. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
  171. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -8
  172. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
  173. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -8
  174. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -40
  175. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -8
  176. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -43
  177. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -8
  178. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -38
  179. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
  180. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -62
  181. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -15
  182. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
  183. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -7
  184. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
  185. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -8
  186. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -42
  187. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +0 -8
  188. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -294
  189. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +0 -8
  190. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -113
  191. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +0 -9
  192. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -48
  193. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +0 -8
  194. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -115
  195. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +0 -13
  196. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -29
  197. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +0 -14
  198. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -369
  199. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +0 -6
  200. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -40
  201. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +0 -7
  202. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -26
  203. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +0 -116
  204. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -10
  205. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +0 -33
  206. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -126
  207. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -52
  208. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -158
  209. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -11
  210. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -31
  211. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -12
  212. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
  213. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -8
  214. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -43
  215. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +0 -10
  216. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -144
  217. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -7
  218. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -24
  219. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +0 -11
  220. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -104
  221. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +0 -22
  222. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -100
  223. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +0 -8
  224. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -63
  225. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +0 -3
  226. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -28
  227. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +0 -34
  228. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -2
  229. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +0 -7
  230. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -38
  231. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +0 -12
  232. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -61
  233. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +0 -9
  234. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -39
  235. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +0 -11
  236. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -66
  237. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +0 -3
  238. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -48
@@ -3,8 +3,7 @@ export const initialUIState = {
3
3
  filterText: '',
4
4
  sortKey: 'dueDate',
5
5
  sortOrder: 'descending',
6
- from: 0,
7
- filters: {},
6
+ pageToken: null,
8
7
  };
9
8
  const initialMetrics = {
10
9
  closed: 0,
@@ -19,13 +18,6 @@ export const initialState = {
19
18
  metrics: initialMetrics,
20
19
  metricsFetchState: 'Not-Started',
21
20
  uiState: initialUIState,
22
- cockpitContext: {
23
- fetchState: 'Not-Started',
24
- error: undefined,
25
- companyIds: [],
26
- userIds: [],
27
- userGroupIds: [],
28
- },
29
21
  hasValidState() {
30
22
  return this.fetchState == 'Completed';
31
23
  },
@@ -36,11 +28,10 @@ const companyTaskManagerView = createSlice({
36
28
  initialState,
37
29
  reducers: {
38
30
  fetchCompanyTaskManagerView: {
39
- prepare(from, sortKey, sortOrder, keepExistingListItems = true, searchString, filters) {
31
+ prepare(pageToken, sortKey, sortOrder, keepExistingListItems = true, searchString) {
40
32
  return {
41
33
  payload: {
42
- from,
43
- filters,
34
+ pageToken,
44
35
  searchString,
45
36
  sortKey,
46
37
  sortOrder,
@@ -49,10 +40,10 @@ const companyTaskManagerView = createSlice({
49
40
  };
50
41
  },
51
42
  reducer(draft, action) {
52
- const { from, searchString, sortKey, sortOrder, keepExistingListItems } = action.payload;
43
+ const { pageToken, searchString, sortKey, sortOrder, keepExistingListItems, } = action.payload;
53
44
  draft.uiState.sortKey = sortKey;
54
45
  draft.uiState.sortOrder = sortOrder;
55
- draft.uiState.from = from;
46
+ draft.uiState.pageToken = pageToken;
56
47
  if (keepExistingListItems === false) {
57
48
  draft.taskIds = [];
58
49
  }
@@ -65,14 +56,15 @@ const companyTaskManagerView = createSlice({
65
56
  },
66
57
  updateCompanyTaskManagerViewOnSuccess(draft, action) {
67
58
  const { data } = action.payload;
68
- const tasks = data.aggregations.group_by_company_name.buckets.flatMap((bucket) => bucket.tasks);
59
+ const { tasks, query, total_count } = data;
69
60
  draft.fetchState = 'Completed';
70
61
  draft.error = undefined;
71
62
  draft.taskIds = [...draft.taskIds, ...tasks.map((task) => task.task_id)];
72
- if (draft.uiState.filterText === '' && draft.uiState.from === 0) {
73
- draft.totalTaskCount = data.total;
63
+ // consider total count only when fetching for first time
64
+ if (draft.uiState.filterText === '' && draft.uiState.pageToken == null) {
65
+ draft.totalTaskCount = total_count;
74
66
  }
75
- draft.uiState.from = data.from + data.limit;
67
+ draft.uiState.pageToken = query.page_token;
76
68
  },
77
69
  updateCompanyTaskManagerViewOnFailure: {
78
70
  reducer(draft, action) {
@@ -93,30 +85,10 @@ const companyTaskManagerView = createSlice({
93
85
  updateTaskManagerMetricsOnFailure(draft) {
94
86
  draft.metricsFetchState = 'Error';
95
87
  },
96
- updateCompanyTaskManagerViewFilters(draft, action) {
97
- if (action.payload.filters != null) {
98
- draft.uiState.filters = action.payload.filters;
99
- }
100
- },
101
- fetchCockpitContext(draft) {
102
- draft.cockpitContext.fetchState = 'In-Progress';
103
- draft.cockpitContext.error = undefined;
104
- },
105
- updateCockpitContextOnSuccess(draft, action) {
106
- draft.cockpitContext.fetchState = 'Completed';
107
- draft.cockpitContext.error = undefined;
108
- draft.cockpitContext.companyIds = action.payload.companyIds;
109
- draft.cockpitContext.userIds = action.payload.userIds;
110
- draft.cockpitContext.userGroupIds = action.payload.userGroupIds;
111
- },
112
- updateCockpitContextOnFailure(draft, action) {
113
- draft.cockpitContext.fetchState = 'Error';
114
- draft.cockpitContext.error = action.payload;
115
- },
116
88
  clearCompanyTaskManagerView(draft) {
117
89
  Object.assign(draft, initialState);
118
90
  },
119
91
  },
120
92
  });
121
- export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView, updateCompanyTaskManagerViewFilters, fetchCockpitContext, updateCockpitContextOnSuccess, updateCockpitContextOnFailure, } = companyTaskManagerView.actions;
93
+ export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView, } = companyTaskManagerView.actions;
122
94
  export default companyTaskManagerView.reducer;
@@ -1,11 +1,10 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
- import { reduceAnyFetchState } from '../../commonStateTypes/reduceFetchState';
3
- import { getCompanyByCompanyId, getCompanyByCompanyIds, } from '../../entity/company/companySelector';
2
+ import { getCompanyByCompanyId } from '../../entity/company/companySelector';
4
3
  import { getTagsByIds } from '../../entity/tag/tagSelector';
5
4
  import { getTaskById } from '../../entity/task/taskSelector';
6
5
  import { getUserByUserId, getUsersByUserIds, } from '../../entity/user/userSelector';
7
6
  export const getCompanyTaskManagerView = createSelector((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
8
- const { taskIds, uiState, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
7
+ const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState, } = companyTaskManagerViewState;
9
8
  const tasksList = [];
10
9
  taskIds.forEach((taskId) => {
11
10
  const task = getTaskById(taskState, taskId);
@@ -27,22 +26,13 @@ export const getCompanyTaskManagerView = createSelector((state) => state.company
27
26
  }
28
27
  }
29
28
  });
30
- const allCompanyIds = companyTaskManagerViewState.cockpitContext.companyIds;
31
- const companies = getCompanyByCompanyIds(companyState, allCompanyIds).map((c) => c.company);
32
- const users = getUsersByUserIds(userState, companyTaskManagerViewState.cockpitContext.userIds);
33
- const fetchStateAndError = reduceAnyFetchState([
34
- companyTaskManagerViewState,
35
- companyTaskManagerViewState.cockpitContext,
36
- ]);
37
29
  return {
38
- companies,
39
30
  metrics,
40
31
  metricsFetchState,
41
32
  tasksList,
42
33
  uiState,
43
- fetchState: fetchStateAndError.fetchState,
44
- error: fetchStateAndError.error,
34
+ fetchState,
35
+ error,
45
36
  totalTaskCount,
46
- users,
47
37
  };
48
38
  });
@@ -1,35 +1,51 @@
1
1
  import { from } from 'rxjs';
2
2
  import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
3
  import { getSortOrder } from '../../../commonPayloadTypes/sortOrderPayload';
4
+ import { updateCompanies } from '../../../entity/company/companyReducer';
4
5
  import { updateTags } from '../../../entity/tag/tagReducer';
5
6
  import { updateTasks } from '../../../entity/task/taskReducer';
7
+ import { updateAllUsers } from '../../../entity/user/userReducer';
6
8
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
7
9
  import { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnFailure, updateCompanyTaskManagerViewOnSuccess, } from '../companyTaskManagerViewReducer';
8
- const DEFAULT_PAGE_SIZE = 100;
10
+ const toSortKeyPayload = (sortKey) => {
11
+ switch (sortKey) {
12
+ case 'taskName':
13
+ return 'name';
14
+ case 'dueDate':
15
+ return 'due_date';
16
+ case 'createdBy':
17
+ return 'created_by';
18
+ case 'name':
19
+ return 'company_name';
20
+ default:
21
+ return sortKey;
22
+ }
23
+ };
9
24
  export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCompanyTaskManagerView.match), switchMap((action) => {
10
- const { from: fromOffset, searchString, sortKey, sortOrder, filters, } = action.payload;
25
+ const { pageToken, sortKey, sortOrder, searchString } = action.payload;
11
26
  const queryValue = {
12
- size: DEFAULT_PAGE_SIZE,
13
- from: fromOffset,
14
- global_search: searchString ?? '',
27
+ page_token: pageToken,
15
28
  sort_by: toSortKeyPayload(sortKey),
16
29
  sort_order: getSortOrder(sortOrder),
17
- filter_join: filters?.categoryCombinationOperator === 'AND' ? 'and' : 'or',
18
- ...(filters?.categories != null && filters.categories.length > 0
19
- ? { filter_by: toFilterByPayload(filters) }
20
- : {}),
30
+ search_text: searchString ?? '',
31
+ view: 'cockpit_task_manager_view',
21
32
  };
22
33
  return zeniAPI
23
- .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks-es?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
34
+ .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
24
35
  .pipe(mergeMap((response) => {
25
36
  if (isSuccessResponse(response) && response.data != null) {
26
- const tasksList = response.data.aggregations.group_by_company_name.buckets.flatMap((bucket) => bucket.tasks);
37
+ const tasksList = response.data.tasks;
27
38
  const actions = [
28
39
  updateCompanyTaskManagerViewOnSuccess({
29
40
  data: response.data,
30
41
  }),
31
42
  updateTasks(tasksList),
32
- updateTags(tasksList.flatMap((task) => task.tags)),
43
+ updateCompanies({
44
+ payload: response.data.companies,
45
+ schema: {},
46
+ }),
47
+ updateTags(tasksList.map((task) => task.tags).flat()),
48
+ updateAllUsers({ users: response.data.users }),
33
49
  ];
34
50
  return from(actions);
35
51
  }
@@ -46,28 +62,3 @@ export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => a
46
62
  return from(actions);
47
63
  }));
48
64
  }));
49
- const toSortKeyPayload = (sortKey) => {
50
- switch (sortKey) {
51
- case 'taskName':
52
- return 'name';
53
- case 'dueDate':
54
- return 'due_date';
55
- case 'createdBy':
56
- return 'created_by';
57
- case 'name':
58
- return 'company_name';
59
- default:
60
- return sortKey;
61
- }
62
- };
63
- const toFilterByPayload = (filters) => {
64
- if (filters.categories == null) {
65
- return [];
66
- }
67
- return filters.categories.map((category) => ({
68
- field: category.field ?? '',
69
- operator: category.matchingOperator === 'equal' ? 'is' : 'is_not',
70
- values: category.values.map((v) => String(v)),
71
- join: category.valuesCombinationOperator === 'ALL' ? 'and' : 'or',
72
- }));
73
- };
@@ -21,7 +21,7 @@ export const fetchAllCockpitViewsEpic = (actions$, state$) => actions$.pipe(filt
21
21
  fetchReviewCompanyView(),
22
22
  fetchCompanyHealthMetricView(),
23
23
  fetchCompanyMetaData(),
24
- fetchCompanyTaskManagerView(0, 'dueDate', 'descending', false),
24
+ fetchCompanyTaskManagerView(null, 'dueDate', 'descending', false),
25
25
  fetchCompanyHealthMetricConfig(),
26
26
  ]);
27
27
  }
@@ -74,7 +74,7 @@ export const fetchAllCockpitViewsEpic = (actions$, state$) => actions$.pipe(filt
74
74
  }
75
75
  if (state.companyTaskManagerViewState.fetchState !== 'In-Progress' &&
76
76
  state.companyTaskManagerViewState.hasValidState() === false) {
77
- fetchActions.push(fetchCompanyTaskManagerView(0, 'dueDate', 'descending', false));
77
+ fetchActions.push(fetchCompanyTaskManagerView(null, 'dueDate', 'descending', false));
78
78
  }
79
79
  return from(fetchActions);
80
80
  }
@@ -3,7 +3,6 @@ import { filter, mergeMap } from 'rxjs/operators';
3
3
  import { getTransactionWithCOT } from '../../../../entity/transaction/transactionHelper';
4
4
  import { getSupportedTransactionsByIds } from '../../../../entity/transaction/transactionSelector';
5
5
  import { getUncategorizedAccounts } from '../../../accountList/accountListSelector';
6
- import { cancelEntityRecommendationsForLineUpdate } from '../../../recommendation/recommendationReducer';
7
6
  import { mergeTabSpecificLineItems, toTransactionDetailLocalData, } from '../../helpers/transactionCategorizationLocalDataHelper';
8
7
  import { initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, } from '../../reducers/transactionsViewReducer';
9
8
  import { initialSupportedTransactionCategorization, } from '../../types/transactionsViewState';
@@ -52,20 +51,6 @@ export const initializeTransactionCategorizationViewLocalDataEpic = (actions$, s
52
51
  };
53
52
  }
54
53
  });
55
- // Cancel any in-flight line-update recommendations fetch for the
56
- // transactions whose local data is about to be wiped. Only runs
57
- // for the destructive `keepExistingListItems === false` branch
58
- // (list-page Cancel footer, modal confirm-reset, and the silent
59
- // `backgroundRefetchReviewTab` path); the merge branch keeps
60
- // existing per-line state intact and races no fetches.
61
- if (keepExistingListItems === false) {
62
- transactions.forEach((transaction) => {
63
- fetchActions.push(cancelEntityRecommendationsForLineUpdate({
64
- id: transaction.id,
65
- type: transaction.type,
66
- }));
67
- });
68
- }
69
54
  fetchActions.push(saveTransactionCategorizationLocalData({
70
55
  selectedTab,
71
56
  transactionIds,
@@ -3,7 +3,6 @@ import recordGet from 'lodash/get';
3
3
  import uniq from 'lodash/uniq';
4
4
  import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
5
5
  import { isVendorTransaction } from '../../../entity/transaction/stateTypes/vendorTransaction';
6
- import { getLineIdsWhereEntityStillMatches } from '../../recommendation/recommendationStaleResponseHelper';
7
6
  import { filterAutoTabLineItems, mergeTabSpecificLineItems, removeTransactionFromTabView, setEntityRecommendationForLineIdInLocalData, shouldAutoSelectAndAdd, toSetAllLineItemsToCategoryClass, toTransactionDetailLocalData, } from '../helpers/transactionCategorizationLocalDataHelper';
8
7
  import { DEFAULT_COMPLETED_SUB_TAB, } from '../types/completedSubTab';
9
8
  import { TRANSACTIONS_TABS, } from '../types/transactionsViewState';
@@ -517,66 +516,11 @@ const expenseAutomationTransactionsView = createSlice({
517
516
  const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
518
517
  .transactionReviewLocalDataById, transactionId.id, undefined);
519
518
  if (transactionLocalData != null) {
520
- // Stale-response guard. Filter `lineIds` down to lines whose
521
- // currently selected entity still matches the payload
522
- // entity, so a response that lands after the user (or the
523
- // silent backgroundRefetchReviewTab path) wiped local data
524
- // can't overwrite the restored state. Lines that fail the
525
- // guard are still released to Completed below so their
526
- // inline skeletons resolve. Complements the epic-level
527
- // `takeUntil`.
528
- //
529
- // List flow: ONLY vendor uses page-level `selectedEntity`;
530
- // customer + JE + deposit all use per-line
531
- // `selectedEntityLine`. This differs from the detail flow
532
- // (where customer is page-level too) and matches the
533
- // dichotomy in `setEntityRecommendationForLineIdInLocalData`.
534
- const usesPageLevelEntity = isVendorTransaction(transaction);
535
- const matchedLineIds = getLineIdsWhereEntityStillMatches({
536
- lineIds,
537
- payloadEntity: entity,
538
- getCurrentEntityForLine: (lineId) => usesPageLevelEntity
539
- ? transactionLocalData.transactionReviewLocalData.selectedEntity
540
- : transactionLocalData.transactionReviewLocalData.lineItemById[lineId]?.selectedEntityLine,
541
- });
542
- // When every line failed the guard, skip the helper entirely.
543
- // The list-flow helper's `else` branch writes
544
- // recommendations + account/class onto vendor-txn lines even
545
- // when they're not in `recommendationLineIds` (so callers
546
- // can fold full-transaction recs into untouched lines), and
547
- // we don't want any of those writes when the whole response
548
- // is stale. We still flip the per-line fetch flag so
549
- // skeletons resolve.
550
- if (matchedLineIds.length === 0) {
551
- const existingLocalData = transactionLocalData.transactionReviewLocalData;
552
- const releasedLineItems = { ...existingLocalData.lineItemById };
553
- lineIds.forEach((lineId) => {
554
- const lineItem = releasedLineItems[lineId];
555
- if (lineItem != null) {
556
- releasedLineItems[lineId] = {
557
- ...lineItem,
558
- categoryClassRecommendationsFetchState: {
559
- fetchState: 'Completed',
560
- error: undefined,
561
- },
562
- };
563
- }
564
- });
565
- draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transaction.id] = {
566
- transactionId: transaction.id,
567
- transactionReviewLocalData: {
568
- ...existingLocalData,
569
- lineItemById: releasedLineItems,
570
- },
571
- };
572
- return;
573
- }
574
- const newLocalData = setEntityRecommendationForLineIdInLocalData(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, matchedLineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
519
+ const newLocalData = setEntityRecommendationForLineIdInLocalData(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, lineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
575
520
  // Release the per-line fetch flag for every line this fetch
576
- // covered (matched AND unmatched) so the inline skeleton
577
- // resolves on stale lines too. Done in-place on the freshly
578
- // returned local data (the helper produces a new mutable
579
- // object), before we write it back to the draft.
521
+ // covered. Done in-place on the freshly returned local data
522
+ // (the helper produces a new mutable object), before we write
523
+ // it back to the draft.
580
524
  lineIds.forEach((lineId) => {
581
525
  const lineItem = newLocalData.lineItemById[lineId];
582
526
  if (lineItem != null) {
@@ -593,9 +537,7 @@ const expenseAutomationTransactionsView = createSlice({
593
537
  transactionId: transaction.id,
594
538
  transactionReviewLocalData: newLocalData,
595
539
  };
596
- // Mark transaction as dirty (autofill happened). We only
597
- // reach this point with at least one matched line, so
598
- // recommendations were applied.
540
+ // Mark transaction as dirty (autofill happened)
599
541
  if (!draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData.includes(transaction.id)) {
600
542
  draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData = [
601
543
  ...draft.transactionCategorizationView[selectedTab]
@@ -1,5 +1,5 @@
1
1
  import { concat, of, timer } from 'rxjs';
2
- import { catchError, debounce, filter, groupBy, mergeMap, switchMap, takeUntil, } from 'rxjs/operators';
2
+ import { catchError, debounce, filter, groupBy, mergeMap, switchMap, } from 'rxjs/operators';
3
3
  import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
4
4
  import { getTransactionWithCOT, getTransactionWithCOTFromRecommendations, } from '../../entity/transaction/transactionHelper';
5
5
  import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
@@ -7,7 +7,7 @@ import { getUncategorizedAccounts } from '../accountList/accountListSelector';
7
7
  import { markCategoryClassRecommendationsCompletedForCategorization, markCategoryClassRecommendationsFailureForCategorization, markCategoryClassRecommendationsInProgressForCategorization, setEntityRecommendationForLineIdsForCategorization, } from '../expenseAutomationView/reducers/transactionsViewReducer';
8
8
  import { markCategoryClassRecommendationsCompletedForTransactionDetail, markCategoryClassRecommendationsFailureForTransactionDetail, markCategoryClassRecommendationsInProgressForTransactionDetail, setEntityRecommendationForLineIdsForTransactionDetail, } from '../transactionDetail/transactionDetailReducer';
9
9
  import { buildRecommendationUrl, getRecommendationByLineIdWithCOTFromRecommendationPayloadWithCOT, } from './recommendationHelper';
10
- import { cancelEntityRecommendationsForLineUpdate, fetchEntityRecommendationsForLineUpdate, } from './recommendationReducer';
10
+ import { fetchEntityRecommendationsForLineUpdate } from './recommendationReducer';
11
11
  // Close the per-target groupBy bucket after this much idle time so inactive
12
12
  // groups don't accumulate forever (each group holds a Subject + a chain of
13
13
  // active subscribers; without a duration selector groupBy retains them for
@@ -83,14 +83,5 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
83
83
  ? markCategoryClassRecommendationsFailureForCategorization(payload.selectedTab, transactionId, lineIds, status)
84
84
  : markCategoryClassRecommendationsFailureForTransactionDetail(transactionId, lineIds, status));
85
85
  }));
86
- // takeUntil kills the in-flight HTTP and suppresses every
87
- // downstream success/failure/markCompleted emission once a
88
- // cancel action lands for the same transactionId. groupBy +
89
- // switchMap already handle re-fetch-on-same-target; takeUntil
90
- // covers the user-initiated Cancel (detail footer + list
91
- // footer) and the silent backgroundRefetchReviewTab path,
92
- // which both wipe local data without dispatching another
93
- // fetch on the same target.
94
- const cancel$ = actions$.pipe(filter(cancelEntityRecommendationsForLineUpdate.match), filter((a) => a.payload.transactionId.id === transactionId.id));
95
- return concat(of(startAction), httpStream$.pipe(takeUntil(cancel$)));
86
+ return concat(of(startAction), httpStream$);
96
87
  }))));
@@ -58,23 +58,6 @@ const recommendation = createSlice({
58
58
  return { payload: args };
59
59
  },
60
60
  },
61
- // No-op reducer; the action exists purely so the line-update epic
62
- // can observe it via `takeUntil` and kill an in-flight HTTP request
63
- // when the user (or a background refresh) wipes local data before
64
- // the response lands. Without this, a stale response races the reset
65
- // and overwrites the user's intent. Cancel is keyed by
66
- // `transactionId` only: per-page Cancel buttons cancel everything
67
- // under that transaction (including JE sibling line sets), which
68
- // matches the UI semantics on both detail and categorization pages.
69
- cancelEntityRecommendationsForLineUpdate: {
70
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
71
- reducer(_draft, _action) {
72
- // intentionally empty
73
- },
74
- prepare(transactionId) {
75
- return { payload: { transactionId } };
76
- },
77
- },
78
61
  fetchRecommendationByEntityName: {
79
62
  reducer(draft, action) {
80
63
  const { entityName, entityType } = action.payload;
@@ -153,7 +136,7 @@ const recommendation = createSlice({
153
136
  },
154
137
  },
155
138
  });
156
- export const { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, cancelEntityRecommendationsForLineUpdate, fetchRecommendationByEntityName, fetchRecommendationByEntityId, updateRecommendationForEntity, updateRecommendationForEntityFailure, indicateReadyToInitializeRecommendation, clearRecommendation, } = recommendation.actions;
139
+ export const { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityName, fetchRecommendationByEntityId, updateRecommendationForEntity, updateRecommendationForEntityFailure, indicateReadyToInitializeRecommendation, clearRecommendation, } = recommendation.actions;
157
140
  export default recommendation.reducer;
158
141
  const doUpdateRecommendationForEntity = (draft, entityId, entityType, payload) => {
159
142
  const key = getEntityRecommendationKey(entityType, entityId);
@@ -87,31 +87,6 @@ export const getChargeCardListView = (state, includeCreditAccountDebitSummaryAnd
87
87
  hasDebitCard,
88
88
  };
89
89
  };
90
- /**
91
- * Returns every enriched `ChargeCardWithUser` for the tenant, without
92
- * applying the cards-list screen's `searchText` filter or its column
93
- * `sortKey/sortOrder`. Used by surfaces that need the raw card universe
94
- * decoupled from whatever the user has typed/sorted on the cards list
95
- * (e.g. the Card Policy "Apply to Cards" picker, which owns its own
96
- * search + sort UI). The list-screen's filter/sort state is intentionally
97
- * left untouched so revisits to the cards list still restore the user's
98
- * search.
99
- */
100
- export const getAllChargeCardsWithUser = (state) => {
101
- const { chargeCardListState, chargeCardState, chargeCardConfigState } = state;
102
- const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
103
- const chargeCardsWithUser = getChargeCardsWithUser(cards, state);
104
- const fetchState = reduceFetchState([
105
- chargeCardListState,
106
- chargeCardConfigState,
107
- ]).fetchState;
108
- return {
109
- fetchState,
110
- error: chargeCardListState.error,
111
- cards: chargeCardsWithUser,
112
- version: '1.0',
113
- };
114
- };
115
90
  export const getMyPendingActivationChargeCardListView = (state) => {
116
91
  const { tenantState, chargeCardListState, chargeCardState } = state;
117
92
  const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
@@ -7,7 +7,7 @@ import { updateAllUsers } from '../../../../entity/user/userReducer';
7
7
  import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
8
8
  import { createZeniAPIStatus, isSuccessStatus, } from '../../../../responsePayload';
9
9
  import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
10
- import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount, updateLastIssuedCardIds, updateLastSelfIssuedDebitCardId, } from './issueChargeCardReducer';
10
+ import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount, updateLastSelfIssuedDebitCardId, } from './issueChargeCardReducer';
11
11
  export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(issueChargeCards.match), switchMap(() => {
12
12
  const state = state$.value;
13
13
  const loggedInUserId = state$.value.tenantState.loggedInUser?.userId;
@@ -87,7 +87,7 @@ export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(
87
87
  actions.push(updateChargeCards(issuedCards), updateAllUsers({ users: response.data.users }), updateUserRoles(response.data.user_roles), updateChargeCardList({
88
88
  chargeCardListPayload: response.data,
89
89
  keepExistingListItems: true,
90
- }), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}), updateLastIssuedCardIds(issuedCards.map((card) => card.card_id)), issueChargeCardSuccessOrFailure({ fetchState: 'Completed' }));
90
+ }), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}), issueChargeCardSuccessOrFailure({ fetchState: 'Completed' }));
91
91
  if (issuedCards.length === 1 &&
92
92
  (issuedCards[0].card_type.code ===
93
93
  'business_virtual_debit_card' ||
@@ -1,6 +1,4 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { applyAiCardCreationFormDraftUpdate } from './applyAiCardCreationFormDraftUpdate';
3
- import { buildAiCardCreationFormDraftSeed } from './buildAiCardCreationFormDraftSeed';
4
2
  export const initialState = {
5
3
  depositAccountIds: [],
6
4
  depositAccountsFetchState: { fetchState: 'Not-Started', error: undefined },
@@ -16,7 +14,6 @@ export const initialState = {
16
14
  },
17
15
  activeChargeCardCount: {},
18
16
  activeDebitCardCountByDepositAccountId: {},
19
- lastIssuedCardIds: [],
20
17
  };
21
18
  const issueChargeCard = createSlice({
22
19
  name: 'issueChargeCard',
@@ -37,19 +34,14 @@ const issueChargeCard = createSlice({
37
34
  },
38
35
  },
39
36
  issueChargeCards: {
40
- prepare(payload) {
41
- return { payload: payload ?? {} };
37
+ prepare() {
38
+ return { payload: {} };
42
39
  },
43
- reducer(draft, action) {
40
+ reducer(draft) {
44
41
  draft.saveStatus.fetchState = 'In-Progress';
45
42
  draft.saveStatus.error = undefined;
46
- draft.lastIssueSourceChatSessionId = action.payload.sourceChatSessionId;
47
- draft.lastIssuedCardIds = [];
48
43
  },
49
44
  },
50
- updateLastIssuedCardIds(draft, action) {
51
- draft.lastIssuedCardIds = action.payload;
52
- },
53
45
  updateChargeCardsLocalStore(draft, action) {
54
46
  draft.localData = action.payload;
55
47
  },
@@ -57,8 +49,6 @@ const issueChargeCard = createSlice({
57
49
  draft.localData = [...initialState.localData];
58
50
  draft.saveStatus = initialState.saveStatus;
59
51
  draft.lastSelfIssuedDebitCardId = undefined;
60
- draft.lastIssueSourceChatSessionId = undefined;
61
- draft.lastIssuedCardIds = [];
62
52
  },
63
53
  updateLastSelfIssuedDebitCardId(draft, action) {
64
54
  draft.lastSelfIssuedDebitCardId = action.payload;
@@ -134,38 +124,10 @@ const issueChargeCard = createSlice({
134
124
  draft.depositAccountsFetchState.fetchState = action.payload.fetchState;
135
125
  draft.depositAccountsFetchState.error = action.payload.error;
136
126
  },
137
- // Dispatched once when `CardsCreationInteractiveForm` mounts (or the AI
138
- // payload arrives).
139
- seedAiCardCreationFormDraft: {
140
- reducer(draft, action) {
141
- const { draft: nextDraft, context } = buildAiCardCreationFormDraftSeed({
142
- allUsers: action.payload.allUsers,
143
- initialData: action.payload.initialData,
144
- });
145
- draft.aiCardCreationFormDraft = nextDraft;
146
- draft.aiCardCreationFormDraftContext = context;
147
- },
148
- prepare(allUsers, initialData) {
149
- return { payload: { allUsers, initialData } };
150
- },
151
- },
152
- // Derivation lives in `applyAiCardCreationFormDraftUpdate` so the
153
- // Storybook owner harness shares the same rules.
154
- updateAiCardCreationFormDraft(draft, action) {
155
- draft.aiCardCreationFormDraft = applyAiCardCreationFormDraftUpdate({
156
- prev: draft.aiCardCreationFormDraft,
157
- next: action.payload,
158
- context: draft.aiCardCreationFormDraftContext,
159
- });
160
- },
161
- clearAiCardCreationFormDraft(draft) {
162
- draft.aiCardCreationFormDraft = undefined;
163
- draft.aiCardCreationFormDraftContext = undefined;
164
- },
165
127
  clearIssueChargeCard(draft) {
166
128
  Object.assign(draft, initialState);
167
129
  },
168
130
  },
169
131
  });
170
- export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId, updateLastIssuedCardIds, issueChargeCardSuccessOrFailure, resetIssueChargeCardForm, updateCustomAddressId, updateChargeCardCount, updateDebitCardCount, fetchIssueCardPage, updateDepositAccountsInCards, fetchDepositAccountListForCards, updateDepositAccountListForCardsFetchStatus, seedAiCardCreationFormDraft, updateAiCardCreationFormDraft, clearAiCardCreationFormDraft, clearIssueChargeCard, } = issueChargeCard.actions;
132
+ export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId, issueChargeCardSuccessOrFailure, resetIssueChargeCardForm, updateCustomAddressId, updateChargeCardCount, updateDebitCardCount, fetchIssueCardPage, updateDepositAccountsInCards, fetchDepositAccountListForCards, updateDepositAccountListForCardsFetchStatus, clearIssueChargeCard, } = issueChargeCard.actions;
171
133
  export default issueChargeCard.reducer;
@@ -5,7 +5,6 @@ import { getDepositAccountLimitsForChargeCardByDepositAccountIds } from '../../.
5
5
  import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
6
6
  import { getNewAddress } from '../../../addressView/addressViewSelector';
7
7
  import { getUserList } from '../../../userListView/userListViewSelector';
8
- import { toIssueChargeCardLocalDataFromDraft } from './toIssueChargeCardLocalDataFromDraft';
9
8
  export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEnabled) => {
10
9
  const { issueChargeCardState, userState, userRoleState, userListViewState, chargeCardConfigState, chargeCardListState, addressState, classState, depositAccountState, classListState, } = state;
11
10
  const userListSelectorView = getUserList(userState, userRoleState, userListViewState, 'cardHolderCandidate');
@@ -94,37 +93,3 @@ export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEn
94
93
  lastSelfIssuedDebitCardId: issueChargeCardState.lastSelfIssuedDebitCardId,
95
94
  };
96
95
  };
97
- // AI CFO chat session that triggered the most recent issue; lets the cards
98
- // list screen attribute the pending placeholder + synthetic drawer bubble.
99
- export const getLastIssueChargeCardsSourceChatSessionId = (state) => {
100
- return state.issueChargeCardState.lastIssueSourceChatSessionId;
101
- };
102
- // Cards created by the most recent successful issue; AI CFO drawer's "Created"
103
- // bubble maps back through these.
104
- export const getLastIssuedChargeCardIds = (state) => {
105
- return state.issueChargeCardState.lastIssuedCardIds;
106
- };
107
- export const getIssueChargeCardsSaveStatus = (state) => {
108
- return state.issueChargeCardState.saveStatus;
109
- };
110
- // Mirrors `localData.length` while in flight so the list can render N skeleton
111
- // rows at the top of the table.
112
- export const getInFlightIssueChargeCardsCount = (state) => {
113
- if (state.issueChargeCardState.saveStatus.fetchState !== 'In-Progress') {
114
- return 0;
115
- }
116
- return state.issueChargeCardState.localData.length;
117
- };
118
- // Hydrates `CardsCreationInteractiveForm`'s RHF; `undefined` outside the
119
- // seed/clear window.
120
- export const getAiCardCreationFormDraft = (state) => {
121
- return state.issueChargeCardState.aiCardCreationFormDraft;
122
- };
123
- // Returns [] when the draft is absent so callers can short-circuit submission.
124
- export const selectIssueChargeCardLocalDataFromDraft = (state) => {
125
- const draft = state.issueChargeCardState.aiCardCreationFormDraft;
126
- if (draft == null) {
127
- return [];
128
- }
129
- return toIssueChargeCardLocalDataFromDraft(draft);
130
- };