@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.
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +5 -63
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
- package/lib/entity/aiCfo/aiCfoReducer.js +9 -249
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -4
- package/lib/entity/aiCfo/aiCfoSelector.js +1 -19
- package/lib/entity/aiCfo/aiCfoState.d.ts +4 -97
- package/lib/entity/aiCfo/aiCfoState.js +1 -18
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -7
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/task/taskPayload.d.ts +1 -3
- package/lib/entity/task/taskPayload.js +0 -2
- package/lib/entity/task/taskState.d.ts +0 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
- package/lib/entity/tenant/clearAllEpic.js +0 -8
- package/lib/epic.d.ts +3 -18
- package/lib/epic.js +3 -18
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +9 -249
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -17
- package/lib/esm/entity/aiCfo/aiCfoState.js +0 -15
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -7
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/task/taskPayload.js +0 -2
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
- package/lib/esm/epic.js +3 -18
- package/lib/esm/index.js +12 -42
- package/lib/esm/reducer.js +0 -12
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +11 -39
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +4 -14
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
- package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +3 -12
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -18
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -42
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -35
- package/lib/esm/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
- package/lib/esm/view/transactionDetail/transactionDetailReducer.js +3 -44
- package/lib/index.d.ts +14 -49
- package/lib/index.js +22 -194
- package/lib/reducer.d.ts +0 -12
- package/lib/reducer.js +0 -12
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
- package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +11 -19
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +4 -10
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +12 -40
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +0 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -13
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +3 -11
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +3 -1
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +2 -2
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +1 -10
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -3
- package/lib/view/recommendation/recommendationReducer.js +2 -19
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +2 -12
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -43
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -42
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -5
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailReducer.js +3 -44
- package/package.json +1 -1
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
- package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
- package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -175
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
- package/lib/entity/cardPolicy/cardPolicySelector.js +0 -99
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
- package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -24
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -105
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -171
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -75
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -101
- package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -38
- package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -16
- package/lib/esm/view/recommendation/recommendationStaleResponseHelper.js +0 -26
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -52
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -36
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -39
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -34
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -58
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -38
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -289
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -109
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -44
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -111
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -363
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -36
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -19
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -6
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -119
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -154
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -22
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -39
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -140
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -20
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -100
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -96
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -59
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -24
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -34
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -57
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -35
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -62
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -44
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +0 -10
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -42
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +0 -6
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -20
- package/lib/view/recommendation/recommendationStaleResponseHelper.d.ts +0 -7
- package/lib/view/recommendation/recommendationStaleResponseHelper.js +0 -30
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -56
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -40
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -43
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -38
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -62
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -42
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -294
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -113
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -48
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -115
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +0 -13
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -29
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -369
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +0 -6
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -40
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -26
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +0 -116
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -10
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +0 -33
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -126
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -52
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -158
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -31
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -12
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -43
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +0 -10
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -144
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -24
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -104
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +0 -22
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -100
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -63
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +0 -3
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -28
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +0 -34
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -38
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +0 -12
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -61
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -39
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -66
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +0 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -48
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { updateCompanies } from '../../../entity/company/companyReducer';
|
|
4
|
-
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
5
|
-
import { updateAllUserGroups } from '../../../entity/userGroups/userGroupsReducer';
|
|
6
|
-
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
7
|
-
import { fetchCockpitContext, updateCockpitContextOnFailure, updateCockpitContextOnSuccess, } from '../companyTaskManagerViewReducer';
|
|
8
|
-
export const fetchCockpitContextEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCockpitContext.match), switchMap(() => zeniAPI
|
|
9
|
-
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/cockpit-context`)
|
|
10
|
-
.pipe(mergeMap((response) => {
|
|
11
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
12
|
-
const companies = response.data?.companies ?? [];
|
|
13
|
-
const users = response.data?.users ?? [];
|
|
14
|
-
const userGroups = response.data?.user_groups ?? [];
|
|
15
|
-
const companyIds = companies.map((company) => company.company_id);
|
|
16
|
-
const userIds = users.map((user) => user.user_id);
|
|
17
|
-
const userGroupIds = userGroups.map((userGroup) => userGroup.id);
|
|
18
|
-
const actions = [
|
|
19
|
-
updateCompanies({
|
|
20
|
-
payload: response.data.companies,
|
|
21
|
-
schema: {},
|
|
22
|
-
}),
|
|
23
|
-
updateAllUsers({ users: response.data.users }),
|
|
24
|
-
updateAllUserGroups({
|
|
25
|
-
userGroups: response.data.user_groups,
|
|
26
|
-
}),
|
|
27
|
-
updateCockpitContextOnSuccess({
|
|
28
|
-
companyIds,
|
|
29
|
-
userIds,
|
|
30
|
-
userGroupIds,
|
|
31
|
-
}),
|
|
32
|
-
];
|
|
33
|
-
return from(actions);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return of(updateCockpitContextOnFailure(response.status));
|
|
37
|
-
}
|
|
38
|
-
}), catchError((error) => of(updateCockpitContextOnFailure(createZeniAPIStatus('Unexpected error', 'Cockpit context fetch errored out' + JSON.stringify(error))))))));
|
package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EMPTY, of } from 'rxjs';
|
|
2
|
-
import { filter, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewFilters, } from '../companyTaskManagerViewReducer';
|
|
4
|
-
export const updateCompanyTaskManagerViewFiltersEpic = (actions$, state$) => actions$.pipe(filter(updateCompanyTaskManagerViewFilters.match), switchMap((action) => {
|
|
5
|
-
const filters = action.payload.filters;
|
|
6
|
-
const allCategoriesValid = filters?.categories == null
|
|
7
|
-
? true
|
|
8
|
-
: filters?.categories?.every((category) => category.field != null &&
|
|
9
|
-
category.values != null &&
|
|
10
|
-
category.values.length > 0);
|
|
11
|
-
if (!allCategoriesValid) {
|
|
12
|
-
return EMPTY;
|
|
13
|
-
}
|
|
14
|
-
const { uiState } = state$.value.companyTaskManagerViewState;
|
|
15
|
-
return of(fetchCompanyTaskManagerView(0, uiState.sortKey, uiState.sortOrder, false, uiState.filterText, filters));
|
|
16
|
-
}));
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Two entities refer to the same real-world thing iff they share both
|
|
2
|
-
// type and id. We deliberately compare on these fields only — qboId /
|
|
3
|
-
// zeniId can lag during entity-create flows where the persisted id
|
|
4
|
-
// hasn't been roundtripped yet, while `id` is the local-source-of-truth
|
|
5
|
-
// the line carries.
|
|
6
|
-
const entitiesMatch = (a, b) => a != null && b != null && a.type === b.type && a.id === b.id;
|
|
7
|
-
// Filters `lineIds` down to those whose currently selected entity (as
|
|
8
|
-
// reported by the caller) still matches the payload entity at the
|
|
9
|
-
// moment the success reducer fires. Used by the two
|
|
10
|
-
// `setEntityRecommendationForLineIds…` reducers as a defensive guard
|
|
11
|
-
// against stale responses landing after the user (or a background
|
|
12
|
-
// refresh) has changed or wiped their selection.
|
|
13
|
-
//
|
|
14
|
-
// Each flow decides separately where the "current entity" lives,
|
|
15
|
-
// because the rules diverge:
|
|
16
|
-
// - Detail flow: vendor + customer transactions read from page-level
|
|
17
|
-
// `selectedEntity`; JE / deposit reads per-line `lineEntity`.
|
|
18
|
-
// - List flow: ONLY vendor reads from page-level `selectedEntity`;
|
|
19
|
-
// customer, JE, deposit all read per-line `selectedEntityLine`.
|
|
20
|
-
// Pushing the lookup into the caller keeps this helper a pure
|
|
21
|
-
// comparator and avoids the helper having to know which flow / page-
|
|
22
|
-
// level rule applies.
|
|
23
|
-
export const getLineIdsWhereEntityStillMatches = (args) => {
|
|
24
|
-
const { lineIds, payloadEntity, getCurrentEntityForLine } = args;
|
|
25
|
-
return lineIds.filter((lineId) => entitiesMatch(payloadEntity, getCurrentEntityForLine(lineId)));
|
|
26
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
detailTemplateId: undefined,
|
|
4
|
-
detailFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
5
|
-
updateFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
6
|
-
formDraft: undefined,
|
|
7
|
-
};
|
|
8
|
-
const cardPolicyDetail = createSlice({
|
|
9
|
-
name: 'cardPolicyDetail',
|
|
10
|
-
initialState,
|
|
11
|
-
reducers: {
|
|
12
|
-
fetchCardPolicyDetail: {
|
|
13
|
-
reducer(draft, action) {
|
|
14
|
-
draft.detailTemplateId = action.payload;
|
|
15
|
-
draft.detailFetchState.fetchState = 'In-Progress';
|
|
16
|
-
draft.detailFetchState.error = undefined;
|
|
17
|
-
// Prevent a stale draft from a previous template leaking into the new edit session.
|
|
18
|
-
draft.formDraft = undefined;
|
|
19
|
-
},
|
|
20
|
-
prepare(templateId) {
|
|
21
|
-
return { payload: templateId };
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
updateCardPolicyDetailFetchStatus(draft, action) {
|
|
25
|
-
draft.detailFetchState.fetchState = action.payload.fetchState;
|
|
26
|
-
draft.detailFetchState.error = action.payload.error;
|
|
27
|
-
},
|
|
28
|
-
updateCardPolicyFormDraft(draft, action) {
|
|
29
|
-
draft.formDraft = action.payload;
|
|
30
|
-
},
|
|
31
|
-
updateCardPolicy: {
|
|
32
|
-
reducer(draft,
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
34
|
-
_action) {
|
|
35
|
-
draft.updateFetchState.fetchState = 'In-Progress';
|
|
36
|
-
draft.updateFetchState.error = undefined;
|
|
37
|
-
},
|
|
38
|
-
prepare(templateId) {
|
|
39
|
-
return { payload: templateId };
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
updateCardPolicyFetchStatus(draft, action) {
|
|
43
|
-
draft.updateFetchState.fetchState = action.payload.fetchState;
|
|
44
|
-
draft.updateFetchState.error = action.payload.error;
|
|
45
|
-
},
|
|
46
|
-
clearCardPolicyDetail(draft) {
|
|
47
|
-
Object.assign(draft, initialState);
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
export const { fetchCardPolicyDetail, updateCardPolicyDetailFetchStatus, updateCardPolicyFormDraft, updateCardPolicy, updateCardPolicyFetchStatus, clearCardPolicyDetail, } = cardPolicyDetail.actions;
|
|
52
|
-
export default cardPolicyDetail.reducer;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { getCardPolicyTemplateById } from '../../../../../entity/cardPolicy/cardPolicySelector';
|
|
2
|
-
export function getCardPolicyDetailView(state) {
|
|
3
|
-
const { cardPolicyDetailState, cardPolicyState } = state;
|
|
4
|
-
return {
|
|
5
|
-
templateId: cardPolicyDetailState.detailTemplateId,
|
|
6
|
-
template: cardPolicyDetailState.detailTemplateId != null
|
|
7
|
-
? getCardPolicyTemplateById(cardPolicyState, cardPolicyDetailState.detailTemplateId)
|
|
8
|
-
: undefined,
|
|
9
|
-
formDraft: cardPolicyDetailState.formDraft,
|
|
10
|
-
detailFetchState: cardPolicyDetailState.detailFetchState,
|
|
11
|
-
updateFetchState: cardPolicyDetailState.updateFetchState,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export function getCardPolicyFormDraft(state) {
|
|
15
|
-
return state.cardPolicyDetailState.formDraft;
|
|
16
|
-
}
|
|
17
|
-
export function getCardPolicyDetailFetchState(state) {
|
|
18
|
-
return state.cardPolicyDetailState.detailFetchState;
|
|
19
|
-
}
|
|
20
|
-
export function getUpdateCardPolicyFetchState(state) {
|
|
21
|
-
return state.cardPolicyDetailState.updateFetchState;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { toCardPolicyEditFormDraft, toCardPolicyTemplate, } from '../../../../../entity/cardPolicy/cardPolicyPayload';
|
|
4
|
-
import { updateCreatedCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
|
|
5
|
-
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
6
|
-
import { fetchCardPolicyDetail, updateCardPolicyDetailFetchStatus, updateCardPolicyFormDraft, } from './cardPolicyDetailReducer';
|
|
7
|
-
export const fetchCardPolicyDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCardPolicyDetail.match),
|
|
8
|
-
// `exhaustMap` drops React 18 StrictMode's duplicate mount dispatch instead of
|
|
9
|
-
// emitting a second `/policy-templates/{id}` call.
|
|
10
|
-
exhaustMap((action) => {
|
|
11
|
-
const templateId = action.payload;
|
|
12
|
-
return zeniAPI
|
|
13
|
-
.getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`)
|
|
14
|
-
.pipe(mergeMap((response) => {
|
|
15
|
-
if (isSuccessStatus(response) && response.data != null) {
|
|
16
|
-
const { template } = response.data;
|
|
17
|
-
const formDraft = toCardPolicyEditFormDraft(toCardPolicyTemplate(template));
|
|
18
|
-
const actions = [
|
|
19
|
-
updateCreatedCardPolicyTemplate(template),
|
|
20
|
-
updateCardPolicyFormDraft(formDraft),
|
|
21
|
-
updateCardPolicyDetailFetchStatus({ fetchState: 'Completed' }),
|
|
22
|
-
];
|
|
23
|
-
return from(actions);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return of(updateCardPolicyDetailFetchStatus({
|
|
27
|
-
fetchState: 'Error',
|
|
28
|
-
error: response.status,
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
}), catchError((error) => of(updateCardPolicyDetailFetchStatus({
|
|
32
|
-
fetchState: 'Error',
|
|
33
|
-
error: createZeniAPIStatus('Unexpected Error', 'Fetch card-policy detail REST API call errored out' +
|
|
34
|
-
JSON.stringify(error)),
|
|
35
|
-
}))));
|
|
36
|
-
}));
|
package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { toUpdateCardPolicyTemplateRequestBody, } from '../../../../../entity/cardPolicy/cardPolicyPayload';
|
|
4
|
-
import { updateCreatedCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
|
|
5
|
-
import { createZeniAPIStatus, isSuccessStatus } from '../../../../../responsePayload';
|
|
6
|
-
import { updateCardPolicy, updateCardPolicyFetchStatus, } from './cardPolicyDetailReducer';
|
|
7
|
-
export const updateCardPolicyEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateCardPolicy.match), mergeMap((action) => {
|
|
8
|
-
const templateId = action.payload;
|
|
9
|
-
const formDraft = state$.value.cardPolicyDetailState.formDraft;
|
|
10
|
-
if (formDraft == null) {
|
|
11
|
-
return of(updateCardPolicyFetchStatus({
|
|
12
|
-
fetchState: 'Error',
|
|
13
|
-
error: createZeniAPIStatus('Missing form draft', `Cannot update card-policy ${templateId} — no formDraft is loaded.`),
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
16
|
-
const body = toUpdateCardPolicyTemplateRequestBody(formDraft);
|
|
17
|
-
return zeniAPI
|
|
18
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`, body)
|
|
19
|
-
.pipe(mergeMap((response) => {
|
|
20
|
-
if (isSuccessStatus(response) && response.data != null) {
|
|
21
|
-
const { template } = response.data;
|
|
22
|
-
const actions = [
|
|
23
|
-
updateCreatedCardPolicyTemplate(template),
|
|
24
|
-
updateCardPolicyFetchStatus({ fetchState: 'Completed' }),
|
|
25
|
-
];
|
|
26
|
-
return from(actions);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return of(updateCardPolicyFetchStatus({
|
|
30
|
-
fetchState: 'Error',
|
|
31
|
-
error: response.status,
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
}), catchError((error) => of(updateCardPolicyFetchStatus({
|
|
35
|
-
fetchState: 'Error',
|
|
36
|
-
error: createZeniAPIStatus('Unexpected Error', 'Update card-policy REST API call errored out' +
|
|
37
|
-
JSON.stringify(error)),
|
|
38
|
-
}))));
|
|
39
|
-
}));
|
package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { removeCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
5
|
-
import { archiveCardPolicy, updateArchiveCardPolicyFetchStatus, } from './cardPolicyListReducer';
|
|
6
|
-
export const archiveCardPolicyEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(archiveCardPolicy.match), mergeMap((action) => {
|
|
7
|
-
const templateId = action.payload;
|
|
8
|
-
return zeniAPI
|
|
9
|
-
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`)
|
|
10
|
-
.pipe(mergeMap((response) => {
|
|
11
|
-
if (isSuccessStatus(response)) {
|
|
12
|
-
const actions = [
|
|
13
|
-
removeCardPolicyTemplate(templateId),
|
|
14
|
-
updateArchiveCardPolicyFetchStatus({
|
|
15
|
-
fetchState: 'Completed',
|
|
16
|
-
templateId,
|
|
17
|
-
}),
|
|
18
|
-
];
|
|
19
|
-
return from(actions);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return of(updateArchiveCardPolicyFetchStatus({
|
|
23
|
-
fetchState: 'Error',
|
|
24
|
-
error: response.status,
|
|
25
|
-
templateId,
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
}), catchError((error) => of(updateArchiveCardPolicyFetchStatus({
|
|
29
|
-
fetchState: 'Error',
|
|
30
|
-
error: createZeniAPIStatus('Unexpected Error', 'Archive card-policy REST API call errored out' +
|
|
31
|
-
JSON.stringify(error)),
|
|
32
|
-
templateId,
|
|
33
|
-
}))));
|
|
34
|
-
}));
|
package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
templateIds: [],
|
|
4
|
-
fetchState: {
|
|
5
|
-
fetchState: 'Not-Started',
|
|
6
|
-
error: undefined,
|
|
7
|
-
},
|
|
8
|
-
archiveFetchState: {
|
|
9
|
-
fetchState: 'Not-Started',
|
|
10
|
-
error: undefined,
|
|
11
|
-
},
|
|
12
|
-
archiveTargetTemplateId: undefined,
|
|
13
|
-
};
|
|
14
|
-
const cardPolicyList = createSlice({
|
|
15
|
-
name: 'cardPolicyList',
|
|
16
|
-
initialState,
|
|
17
|
-
reducers: {
|
|
18
|
-
fetchCardPolicyList(draft) {
|
|
19
|
-
draft.fetchState.fetchState = 'In-Progress';
|
|
20
|
-
draft.fetchState.error = undefined;
|
|
21
|
-
},
|
|
22
|
-
updateCardPolicyListFetchStatus(draft, action) {
|
|
23
|
-
draft.fetchState.fetchState = action.payload.fetchState;
|
|
24
|
-
draft.fetchState.error = action.payload.error;
|
|
25
|
-
if (action.payload.templateIds != null) {
|
|
26
|
-
draft.templateIds = action.payload.templateIds;
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
archiveCardPolicy: {
|
|
30
|
-
reducer(draft, action) {
|
|
31
|
-
draft.archiveFetchState.fetchState = 'In-Progress';
|
|
32
|
-
draft.archiveFetchState.error = undefined;
|
|
33
|
-
draft.archiveTargetTemplateId = action.payload;
|
|
34
|
-
},
|
|
35
|
-
prepare(templateId) {
|
|
36
|
-
return { payload: templateId };
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
updateArchiveCardPolicyFetchStatus(draft, action) {
|
|
40
|
-
draft.archiveFetchState.fetchState = action.payload.fetchState;
|
|
41
|
-
draft.archiveFetchState.error = action.payload.error;
|
|
42
|
-
if (action.payload.fetchState === 'Completed') {
|
|
43
|
-
if (action.payload.templateId != null) {
|
|
44
|
-
draft.templateIds = draft.templateIds.filter((id) => id !== action.payload.templateId);
|
|
45
|
-
}
|
|
46
|
-
draft.archiveTargetTemplateId = undefined;
|
|
47
|
-
}
|
|
48
|
-
else if (action.payload.fetchState === 'Error') {
|
|
49
|
-
draft.archiveTargetTemplateId = undefined;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
clearCardPolicyList(draft) {
|
|
53
|
-
Object.assign(draft, initialState);
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
export const { fetchCardPolicyList, updateCardPolicyListFetchStatus, archiveCardPolicy, updateArchiveCardPolicyFetchStatus, clearCardPolicyList, } = cardPolicyList.actions;
|
|
58
|
-
export default cardPolicyList.reducer;
|
package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { getCardPolicyStats, getCardPolicyTemplatesByIds, } from '../../../../../entity/cardPolicy/cardPolicySelector';
|
|
2
|
-
export function getCardPolicyListView(state) {
|
|
3
|
-
const { cardPolicyListState, cardPolicyState } = state;
|
|
4
|
-
return {
|
|
5
|
-
templates: getCardPolicyTemplatesByIds(cardPolicyState, cardPolicyListState.templateIds),
|
|
6
|
-
templateIds: cardPolicyListState.templateIds,
|
|
7
|
-
fetchState: cardPolicyListState.fetchState,
|
|
8
|
-
archiveFetchState: cardPolicyListState.archiveFetchState,
|
|
9
|
-
archiveTargetTemplateId: cardPolicyListState.archiveTargetTemplateId,
|
|
10
|
-
stats: getCardPolicyStats(cardPolicyState),
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export function getCardPolicyListFetchState(state) {
|
|
14
|
-
return state.cardPolicyListState.fetchState;
|
|
15
|
-
}
|
|
16
|
-
export function getArchiveCardPolicyFetchState(state) {
|
|
17
|
-
return state.cardPolicyListState.archiveFetchState;
|
|
18
|
-
}
|
|
19
|
-
export function getCardPolicyTemplateIds(state) {
|
|
20
|
-
return state.cardPolicyListState.templateIds;
|
|
21
|
-
}
|
package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { toCardPolicyStats, toCardPolicyTemplateList, } from '../../../../../entity/cardPolicy/cardPolicyPayload';
|
|
4
|
-
import { updateCardPolicyStats, updateCardPolicyTemplates, } from '../../../../../entity/cardPolicy/cardPolicyReducer';
|
|
5
|
-
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
6
|
-
import { fetchCardPolicyList, updateCardPolicyListFetchStatus, } from './cardPolicyListReducer';
|
|
7
|
-
export const fetchCardPolicyListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCardPolicyList.match),
|
|
8
|
-
// `exhaustMap` drops React 18 StrictMode's duplicate mount dispatch instead of
|
|
9
|
-
// emitting a second `/policy-templates` call.
|
|
10
|
-
exhaustMap(() => {
|
|
11
|
-
return zeniAPI
|
|
12
|
-
.getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates`)
|
|
13
|
-
.pipe(mergeMap((response) => {
|
|
14
|
-
if (isSuccessStatus(response) && response.data != null) {
|
|
15
|
-
const templates = toCardPolicyTemplateList(response.data);
|
|
16
|
-
const stats = toCardPolicyStats(response.data.stats);
|
|
17
|
-
const actions = [
|
|
18
|
-
updateCardPolicyTemplates(templates),
|
|
19
|
-
updateCardPolicyStats(stats),
|
|
20
|
-
updateCardPolicyListFetchStatus({
|
|
21
|
-
fetchState: 'Completed',
|
|
22
|
-
templateIds: templates.map((t) => t.templateId),
|
|
23
|
-
}),
|
|
24
|
-
];
|
|
25
|
-
return from(actions);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return of(updateCardPolicyListFetchStatus({
|
|
29
|
-
fetchState: 'Error',
|
|
30
|
-
error: response.status,
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
}), catchError((error) => of(updateCardPolicyListFetchStatus({
|
|
34
|
-
fetchState: 'Error',
|
|
35
|
-
error: createZeniAPIStatus('Unexpected Error', 'Fetch card-policy list REST API call errored out' +
|
|
36
|
-
JSON.stringify(error)),
|
|
37
|
-
}))));
|
|
38
|
-
}));
|