@zeniai/client-epic-state 5.0.92-betaNB2 → 5.0.93-beta0ND
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -20
- package/lib/entity/accountRecon/accountReconPayload.js +1 -23
- package/lib/entity/accountRecon/accountReconSelector.d.ts +1 -6
- package/lib/entity/accountRecon/accountReconSelector.js +0 -5
- package/lib/entity/accountRecon/accountReconState.d.ts +0 -19
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +63 -5
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
- package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
- package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
- package/lib/entity/aiCfo/aiCfoState.js +18 -1
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
- package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
- package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
- package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
- package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +4 -0
- package/lib/entity/company/companyStateTypes.d.ts +4 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -7
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -9
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -8
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +6 -2
- package/lib/entity/tenant/clearAllEpic.js +8 -0
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.d.ts +38 -25
- package/lib/entity/tenant/tenantReducer.js +65 -5
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/epic.d.ts +19 -3
- package/lib/epic.js +20 -3
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/entity/accountRecon/accountReconPayload.js +1 -23
- package/lib/esm/entity/accountRecon/accountReconSelector.js +0 -5
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
- package/lib/esm/entity/aiCfo/aiCfoState.js +15 -0
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
- package/lib/esm/entity/company/companyPayload.js +4 -0
- package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -9
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +8 -0
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
- package/lib/esm/entity/tenant/tenantReducer.js +63 -3
- package/lib/esm/epic.js +20 -3
- package/lib/esm/index.js +48 -15
- package/lib/esm/reducer.js +12 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
- package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +0 -73
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -98
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -20
- package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +0 -20
- package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
- package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
- package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +42 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +217 -50
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +7 -1
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +58 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +39 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +67 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +105 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
- package/lib/index.d.ts +57 -19
- package/lib/index.js +217 -37
- package/lib/reducer.d.ts +12 -0
- package/lib/reducer.js +12 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
- package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
- package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +1 -83
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +0 -75
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +3 -35
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +5 -99
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +1 -5
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -20
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -129
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +0 -21
- package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
- package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
- package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +46 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +219 -51
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +11 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -1
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +62 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +43 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
- 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 +12 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +30 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +71 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +33 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +106 -53
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +142 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +0 -34
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +0 -42
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +0 -38
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +0 -19
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +0 -46
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import { date } from '../../../zeniDayJS';
|
|
3
|
+
import { parseUploadedKybDocument, parseUploadedKybDocumentFailure, parseUploadedKycDocument, parseUploadedKycDocumentFailure, } from '../../spendManagement/commonSetup/kycKybAutofillActions';
|
|
4
|
+
import { emptyAiAgentsActivationSubview, } from './onboardingCustomerViewState';
|
|
3
5
|
const initialStatus = {
|
|
4
6
|
fetchState: 'Not-Started',
|
|
5
7
|
error: undefined,
|
|
@@ -9,61 +11,31 @@ export const initialState = {
|
|
|
9
11
|
saveStatus: initialStatus,
|
|
10
12
|
dashboardLoadedStatus: initialStatus,
|
|
11
13
|
currentStep: 'link_payment_account',
|
|
14
|
+
parsingDocumentFileIds: [],
|
|
12
15
|
companyDetails: {
|
|
16
|
+
autoFilledFields: [],
|
|
13
17
|
localData: undefined,
|
|
14
18
|
},
|
|
15
|
-
companyOfficerUpdateStatus: {
|
|
16
|
-
|
|
19
|
+
companyOfficerUpdateStatus: (() => {
|
|
20
|
+
const emptyOfficerSlot = {
|
|
21
|
+
autoFilledFields: [],
|
|
17
22
|
localData: undefined,
|
|
18
23
|
sendOtpStatus: initialStatus,
|
|
19
24
|
otpverificationStatus: initialStatus,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
otpverificationStatus: initialStatus,
|
|
35
|
-
},
|
|
36
|
-
Officer_5: {
|
|
37
|
-
localData: undefined,
|
|
38
|
-
sendOtpStatus: initialStatus,
|
|
39
|
-
otpverificationStatus: initialStatus,
|
|
40
|
-
},
|
|
41
|
-
Officer_6: {
|
|
42
|
-
localData: undefined,
|
|
43
|
-
sendOtpStatus: initialStatus,
|
|
44
|
-
otpverificationStatus: initialStatus,
|
|
45
|
-
},
|
|
46
|
-
Officer_7: {
|
|
47
|
-
localData: undefined,
|
|
48
|
-
sendOtpStatus: initialStatus,
|
|
49
|
-
otpverificationStatus: initialStatus,
|
|
50
|
-
},
|
|
51
|
-
Officer_8: {
|
|
52
|
-
localData: undefined,
|
|
53
|
-
sendOtpStatus: initialStatus,
|
|
54
|
-
otpverificationStatus: initialStatus,
|
|
55
|
-
},
|
|
56
|
-
Officer_9: {
|
|
57
|
-
localData: undefined,
|
|
58
|
-
sendOtpStatus: initialStatus,
|
|
59
|
-
otpverificationStatus: initialStatus,
|
|
60
|
-
},
|
|
61
|
-
Officer_10: {
|
|
62
|
-
localData: undefined,
|
|
63
|
-
sendOtpStatus: initialStatus,
|
|
64
|
-
otpverificationStatus: initialStatus,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
Officer_1: { ...emptyOfficerSlot },
|
|
28
|
+
Officer_2: { ...emptyOfficerSlot },
|
|
29
|
+
Officer_3: { ...emptyOfficerSlot },
|
|
30
|
+
Officer_4: { ...emptyOfficerSlot },
|
|
31
|
+
Officer_5: { ...emptyOfficerSlot },
|
|
32
|
+
Officer_6: { ...emptyOfficerSlot },
|
|
33
|
+
Officer_7: { ...emptyOfficerSlot },
|
|
34
|
+
Officer_8: { ...emptyOfficerSlot },
|
|
35
|
+
Officer_9: { ...emptyOfficerSlot },
|
|
36
|
+
Officer_10: { ...emptyOfficerSlot },
|
|
37
|
+
};
|
|
38
|
+
})(),
|
|
67
39
|
primaryContactDetails: {},
|
|
68
40
|
paymentAccountDetails: {
|
|
69
41
|
fetchStatus: initialStatus,
|
|
@@ -91,6 +63,7 @@ export const initialState = {
|
|
|
91
63
|
},
|
|
92
64
|
fetchState: 'Not-Started',
|
|
93
65
|
error: undefined,
|
|
66
|
+
aiAgentsActivation: { ...emptyAiAgentsActivationSubview },
|
|
94
67
|
uiState: {
|
|
95
68
|
isQBOPopupOpen: false,
|
|
96
69
|
isCardPaymentPopupOpen: false,
|
|
@@ -180,6 +153,126 @@ const onboardingCustomerView = createSlice({
|
|
|
180
153
|
};
|
|
181
154
|
},
|
|
182
155
|
},
|
|
156
|
+
acknowledgeOnboardingAiFinanceTeam: {
|
|
157
|
+
reducer(draft) {
|
|
158
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
159
|
+
fetchState: 'In-Progress',
|
|
160
|
+
error: undefined,
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
prepare(companyId) {
|
|
164
|
+
return {
|
|
165
|
+
payload: { companyId },
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
acknowledgeOnboardingAiFinanceTeamSuccess(draft) {
|
|
170
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
171
|
+
fetchState: 'Completed',
|
|
172
|
+
error: undefined,
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
acknowledgeOnboardingAiFinanceTeamFailure: {
|
|
176
|
+
reducer(draft, action) {
|
|
177
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
178
|
+
fetchState: 'Error',
|
|
179
|
+
error: action.payload,
|
|
180
|
+
};
|
|
181
|
+
},
|
|
182
|
+
prepare(error) {
|
|
183
|
+
return {
|
|
184
|
+
payload: error,
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
acknowledgeOnboardingAiActivationViewed: {
|
|
189
|
+
reducer(draft) {
|
|
190
|
+
draft.aiActivationViewedAcknowledgementStatus = {
|
|
191
|
+
fetchState: 'In-Progress',
|
|
192
|
+
error: undefined,
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
prepare(companyId) {
|
|
196
|
+
return {
|
|
197
|
+
payload: { companyId },
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
acknowledgeOnboardingAiActivationViewedSuccess(draft) {
|
|
202
|
+
draft.aiActivationViewedAcknowledgementStatus = {
|
|
203
|
+
fetchState: 'Completed',
|
|
204
|
+
error: undefined,
|
|
205
|
+
};
|
|
206
|
+
},
|
|
207
|
+
acknowledgeOnboardingAiActivationViewedFailure: {
|
|
208
|
+
reducer(draft, action) {
|
|
209
|
+
draft.aiActivationViewedAcknowledgementStatus = {
|
|
210
|
+
fetchState: 'Error',
|
|
211
|
+
error: action.payload,
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
prepare(error) {
|
|
215
|
+
return {
|
|
216
|
+
payload: error,
|
|
217
|
+
};
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
fetchAiAgentsActivationStatus(draft) {
|
|
221
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
222
|
+
fetchState: 'In-Progress',
|
|
223
|
+
error: undefined,
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
fetchAiAgentsActivationStatusSuccess: {
|
|
227
|
+
reducer(draft, action) {
|
|
228
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
229
|
+
fetchState: 'Completed',
|
|
230
|
+
error: undefined,
|
|
231
|
+
};
|
|
232
|
+
draft.aiAgentsActivation.phases = action.payload.phases;
|
|
233
|
+
draft.aiAgentsActivation.counts = action.payload.counts;
|
|
234
|
+
},
|
|
235
|
+
prepare(payload) {
|
|
236
|
+
return { payload };
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
fetchAiAgentsActivationStatusFailure: {
|
|
240
|
+
reducer(draft, action) {
|
|
241
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
242
|
+
fetchState: 'Error',
|
|
243
|
+
error: action.payload,
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
prepare(error) {
|
|
247
|
+
return { payload: error };
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
aiAgentsActivationCountsUpdated: {
|
|
251
|
+
reducer(draft, action) {
|
|
252
|
+
draft.aiAgentsActivation.counts = {
|
|
253
|
+
...draft.aiAgentsActivation.counts,
|
|
254
|
+
...action.payload,
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
prepare(payload) {
|
|
258
|
+
return { payload };
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
aiAgentsActivationPhaseChanged: {
|
|
262
|
+
reducer(draft, action) {
|
|
263
|
+
const target = draft.aiAgentsActivation.phases;
|
|
264
|
+
const index = target.findIndex((phase) => phase.key === action.payload.key);
|
|
265
|
+
if (index === -1) {
|
|
266
|
+
target.push(action.payload);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
target[index] = { ...target[index], ...action.payload };
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
prepare(payload) {
|
|
273
|
+
return { payload };
|
|
274
|
+
},
|
|
275
|
+
},
|
|
183
276
|
updateOnboardingCustomerViewDashboardLoaded: {
|
|
184
277
|
reducer(draft) {
|
|
185
278
|
draft.dashboardLoadedStatus = {
|
|
@@ -592,7 +685,81 @@ const onboardingCustomerView = createSlice({
|
|
|
592
685
|
clearOnboardingCustomerView(draft) {
|
|
593
686
|
Object.assign(draft, initialState);
|
|
594
687
|
},
|
|
688
|
+
/** Merge AI-parsed officer fields into the officer's onboarding localData. */
|
|
689
|
+
applyKycDocumentAutofillForOnboarding: {
|
|
690
|
+
reducer(draft, action) {
|
|
691
|
+
const { officerType, values, autoFilledFieldNames, fileId } = action.payload;
|
|
692
|
+
const slot = draft.companyOfficerUpdateStatus[officerType];
|
|
693
|
+
slot.localData = Object.assign({}, slot.localData, values);
|
|
694
|
+
slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
|
|
695
|
+
draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
|
|
696
|
+
},
|
|
697
|
+
prepare(payload) {
|
|
698
|
+
return { payload };
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
/** Merge AI-parsed company fields into companyDetails onboarding localData. */
|
|
702
|
+
applyKybDocumentAutofillForOnboarding: {
|
|
703
|
+
reducer(draft, action) {
|
|
704
|
+
const { values, autoFilledFieldNames, fileId } = action.payload;
|
|
705
|
+
draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
|
|
706
|
+
const prev = draft.companyDetails.autoFilledFields ?? [];
|
|
707
|
+
draft.companyDetails.autoFilledFields = Array.from(new Set([...prev, ...autoFilledFieldNames]));
|
|
708
|
+
draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
|
|
709
|
+
},
|
|
710
|
+
prepare(payload) {
|
|
711
|
+
return { payload };
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
/** Wipe AI-autofill badges during onboarding. */
|
|
715
|
+
clearKycKybAutofillForOnboarding: {
|
|
716
|
+
reducer(draft, action) {
|
|
717
|
+
const { officerType } = action.payload;
|
|
718
|
+
if (officerType != null) {
|
|
719
|
+
draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
draft.companyDetails.autoFilledFields = [];
|
|
723
|
+
Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
|
|
724
|
+
draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
prepare(payload = {}) {
|
|
729
|
+
return { payload };
|
|
730
|
+
},
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
extraReducers: (builder) => {
|
|
734
|
+
const addParsingFileId = (draft, fileId) => {
|
|
735
|
+
if (!draft.parsingDocumentFileIds.includes(fileId)) {
|
|
736
|
+
draft.parsingDocumentFileIds.push(fileId);
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
const removeParsingFileId = (draft, fileId) => {
|
|
740
|
+
draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
|
|
741
|
+
};
|
|
742
|
+
builder.addCase(parseUploadedKycDocument, (draft, action) => {
|
|
743
|
+
if (action.payload.target === 'onboarding') {
|
|
744
|
+
addParsingFileId(draft, action.payload.fileId);
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
builder.addCase(parseUploadedKybDocument, (draft, action) => {
|
|
748
|
+
if (action.payload.target === 'onboarding') {
|
|
749
|
+
addParsingFileId(draft, action.payload.fileId);
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
builder.addCase(parseUploadedKycDocumentFailure, (draft, action) => {
|
|
753
|
+
if (action.payload.target === 'onboarding') {
|
|
754
|
+
removeParsingFileId(draft, action.payload.fileId);
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
builder.addCase(parseUploadedKybDocumentFailure, (draft, action) => {
|
|
758
|
+
if (action.payload.target === 'onboarding') {
|
|
759
|
+
removeParsingFileId(draft, action.payload.fileId);
|
|
760
|
+
}
|
|
761
|
+
});
|
|
595
762
|
},
|
|
596
763
|
});
|
|
597
|
-
export const { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerSetupViewSuccess, fetchOnboardingCustomerSetupViewFailure, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewCompleteStatusSuccess, updateOnboardingCustomerViewCompleteStatusFailure, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewDashboardLoadedSuccess, updateOnboardingCustomerViewDashboardLoadedFailure, updateOnboardingCustomerView, updateOnboardingCustomerViewSuccess, updateOnboardingCustomerViewFailure, updateOnboardingPaymentAccountStatus, updateOnboardingPaymentAccountStatusSuccess, updateOnboardingPaymentAccountStatusFailure, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountLoginStatusSuccess, updateOnboardingPaymentAccountLoginStatusFailure, establishOnboardingPlaidConnection, establishOnboardingPlaidConnectionSuccess, establishOnboardingPlaidConnectionFailure, getOnboardingPlaidLinkToken, getOnboardingPlaidLinkTokenSuccess, getOnboardingPlaidLinkTokenFailure, updateCurrentStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, } = onboardingCustomerView.actions;
|
|
764
|
+
export const { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerSetupViewSuccess, fetchOnboardingCustomerSetupViewFailure, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewCompleteStatusSuccess, updateOnboardingCustomerViewCompleteStatusFailure, acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamSuccess, acknowledgeOnboardingAiFinanceTeamFailure, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiActivationViewedSuccess, acknowledgeOnboardingAiActivationViewedFailure, fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusSuccess, fetchAiAgentsActivationStatusFailure, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewDashboardLoadedSuccess, updateOnboardingCustomerViewDashboardLoadedFailure, updateOnboardingCustomerView, updateOnboardingCustomerViewSuccess, updateOnboardingCustomerViewFailure, updateOnboardingPaymentAccountStatus, updateOnboardingPaymentAccountStatusSuccess, updateOnboardingPaymentAccountStatusFailure, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountLoginStatusSuccess, updateOnboardingPaymentAccountLoginStatusFailure, establishOnboardingPlaidConnection, establishOnboardingPlaidConnectionSuccess, establishOnboardingPlaidConnectionFailure, getOnboardingPlaidLinkToken, getOnboardingPlaidLinkTokenSuccess, getOnboardingPlaidLinkTokenFailure, updateCurrentStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, } = onboardingCustomerView.actions;
|
|
598
765
|
export default onboardingCustomerView.reducer;
|
|
@@ -11,7 +11,7 @@ import { getCompanyAndIdentityDetails, } from '../../spendManagement/commonSetup
|
|
|
11
11
|
import { ALL_ONBOARDING_STEPS, ALL_ZENI_USER_ONBOARDING_STEPS, REQUIRED_ONBOARDING_STEPS, ZENI_USER_REQUIRED_ONBOARDING_STEPS, toOnboardingStepType, } from './onboardingCustomerViewState';
|
|
12
12
|
export function getOnboardingCustomerView(state, companyId) {
|
|
13
13
|
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, countryListState, addressViewState, } = state;
|
|
14
|
-
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
14
|
+
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, parsingDocumentFileIds, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
15
15
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
16
16
|
let subscriptionPaymentAccount;
|
|
17
17
|
let paymentAccount;
|
|
@@ -54,6 +54,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
54
54
|
companyDetails,
|
|
55
55
|
companyOfficerUpdateStatus,
|
|
56
56
|
primaryContactDetails,
|
|
57
|
+
parsingDocumentFileIds,
|
|
57
58
|
});
|
|
58
59
|
const companyAddress = addressViewState.newAddressState?.company_address;
|
|
59
60
|
if (companyAddress == null &&
|
|
@@ -119,6 +120,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
119
120
|
return {
|
|
120
121
|
companyDetailsLocalData,
|
|
121
122
|
companyOfficerLocalData,
|
|
123
|
+
parsingDocumentFileIds,
|
|
122
124
|
subscriptionBillingAddress: subscriptionBillingAddress?.addressToCreate,
|
|
123
125
|
companyView,
|
|
124
126
|
allNationalityCountries,
|
|
@@ -323,3 +325,7 @@ export const getProductSettingsString = (productSettings) => {
|
|
|
323
325
|
.map((key) => productKeyMap[key])
|
|
324
326
|
.join(',');
|
|
325
327
|
};
|
|
328
|
+
const fromActivationView = (state) => state.onboardingCustomerViewState.aiAgentsActivation;
|
|
329
|
+
export const getAiAgentsActivationSubview = (state) => fromActivationView(state);
|
|
330
|
+
export const getAiAgentsActivationPhases = (state) => fromActivationView(state).phases;
|
|
331
|
+
export const getAiAgentsActivationCounts = (state) => fromActivationView(state).counts;
|
|
@@ -26,3 +26,15 @@ export const ALL_ONBOARDING_STEPS = [
|
|
|
26
26
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
27
27
|
];
|
|
28
28
|
export const toOnboardingStepType = (v) => stringToUnion(v, ALL_ONBOARDING_STEPS);
|
|
29
|
+
export const emptyAiAgentsActivationCounts = {
|
|
30
|
+
customerCount: 0,
|
|
31
|
+
glAccountCount: 0,
|
|
32
|
+
targetTransactionCount: 0,
|
|
33
|
+
transactionCount: 0,
|
|
34
|
+
vendorCount: 0,
|
|
35
|
+
};
|
|
36
|
+
export const emptyAiAgentsActivationSubview = {
|
|
37
|
+
counts: emptyAiAgentsActivationCounts,
|
|
38
|
+
fetchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
39
|
+
phases: [],
|
|
40
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|