@zeniai/client-epic-state 5.1.10 → 5.1.11-betaAY0
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/amount.d.ts +1 -0
- package/lib/commonStateTypes/amount.js +9 -1
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
- package/lib/commonStateTypes/workingDayHelper.js +28 -1
- 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 +20 -1
- package/lib/entity/approvalRule/approvalRuleConflict.d.ts +56 -0
- package/lib/entity/approvalRule/approvalRuleConflict.js +77 -0
- package/lib/entity/approvalRule/approvalRulePayload.d.ts +34 -5
- package/lib/entity/approvalRule/approvalRulePayload.js +149 -10
- package/lib/entity/approvalRule/approvalRuleSelector.d.ts +25 -1
- package/lib/entity/approvalRule/approvalRuleSelector.js +40 -0
- package/lib/entity/approvalRule/approvalRuleState.d.ts +59 -7
- 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 +6 -0
- package/lib/entity/company/companyStateTypes.d.ts +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +19 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +9 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +5 -0
- package/lib/entity/task/taskPayload.d.ts +3 -1
- package/lib/entity/task/taskPayload.js +2 -0
- package/lib/entity/task/taskState.d.ts +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +8 -2
- package/lib/entity/tenant/clearAllEpic.js +12 -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 +59 -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 +3 -2
- package/lib/entity/tenant/tenantReducer.d.ts +44 -30
- package/lib/entity/tenant/tenantReducer.js +130 -29
- package/lib/entity/tenant/tenantState.d.ts +3 -2
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +14 -2
- package/lib/entity/vendor/vendorPayload.d.ts +7 -0
- package/lib/entity/vendor/vendorPayload.js +9 -2
- package/lib/epic.d.ts +32 -4
- package/lib/epic.js +33 -4
- package/lib/esm/commonStateTypes/amount.js +7 -0
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
- 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 +17 -0
- package/lib/esm/entity/approvalRule/approvalRuleConflict.js +74 -0
- package/lib/esm/entity/approvalRule/approvalRulePayload.js +149 -10
- package/lib/esm/entity/approvalRule/approvalRuleSelector.js +35 -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 +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +19 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +8 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +5 -0
- package/lib/esm/entity/task/taskPayload.js +2 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +12 -0
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +55 -0
- package/lib/esm/entity/tenant/tenantReducer.js +128 -27
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +2 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +14 -2
- package/lib/esm/entity/vendor/vendorPayload.js +7 -1
- package/lib/esm/epic.js +33 -4
- package/lib/esm/index.js +68 -27
- package/lib/esm/reducer.js +18 -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/companyTaskManagerView/companyTaskManagerViewReducer.js +39 -11
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +14 -4
- package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +38 -0
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
- package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +16 -0
- package/lib/esm/view/companyView/companyViewReducer.js +11 -10
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +5 -5
- package/lib/esm/view/companyView/epic/companyPassport/{updateCapitalizationThresholdEpic.js → updateCapitalizationAccountThresholdEpic.js} +38 -19
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
- package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
- package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +40 -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/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +29 -17
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +223 -51
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +36 -18
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +45 -6
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +109 -12
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +11 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +54 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +13 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +144 -16
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
- package/lib/esm/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +78 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +49 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +32 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +212 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +23 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -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 +71 -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 +49 -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 +77 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +221 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +106 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +41 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +11 -7
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +61 -0
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +13 -4
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +80 -11
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +6 -0
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +7 -1
- package/lib/index.d.ts +84 -34
- package/lib/index.js +267 -35
- package/lib/reducer.d.ts +18 -0
- package/lib/reducer.js +18 -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/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +19 -11
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +11 -5
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +40 -12
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +2 -0
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +13 -3
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +11 -3
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +10 -0
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +42 -0
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +1 -3
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +6 -0
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +20 -0
- package/lib/view/companyView/companyViewReducer.d.ts +8 -7
- package/lib/view/companyView/companyViewReducer.js +12 -11
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +5 -5
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/{updateCapitalizationThresholdEpic.js → updateCapitalizationAccountThresholdEpic.js} +38 -19
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -1
- package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
- package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +44 -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/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +27 -15
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +44 -5
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +225 -52
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +6 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +39 -18
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +53 -8
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +47 -7
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +14 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +110 -13
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +16 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +10 -6
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.d.ts +23 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +58 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +12 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +59 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +146 -17
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +31 -5
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +8 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +47 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +34 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +23 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +82 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +53 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +36 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +217 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +27 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
- 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 +75 -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 +9 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +53 -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 +9 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +81 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +29 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +229 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +107 -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 +154 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +46 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +10 -6
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.d.ts +14 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +65 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +12 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +14 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +81 -12
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +12 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +6 -0
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +7 -1
- package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -0
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +1 -0
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +65 -34
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +0 -10
|
@@ -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,
|
|
@@ -8,62 +10,33 @@ export const initialState = {
|
|
|
8
10
|
updateStatus: initialStatus,
|
|
9
11
|
saveStatus: initialStatus,
|
|
10
12
|
dashboardLoadedStatus: initialStatus,
|
|
11
|
-
currentStep: '
|
|
13
|
+
currentStep: 'setup_billing',
|
|
14
|
+
currentSubStep: 'default',
|
|
15
|
+
parsingDocumentFileIds: [],
|
|
12
16
|
companyDetails: {
|
|
17
|
+
autoFilledFields: [],
|
|
13
18
|
localData: undefined,
|
|
14
19
|
},
|
|
15
|
-
companyOfficerUpdateStatus: {
|
|
16
|
-
|
|
20
|
+
companyOfficerUpdateStatus: (() => {
|
|
21
|
+
const emptyOfficerSlot = {
|
|
22
|
+
autoFilledFields: [],
|
|
17
23
|
localData: undefined,
|
|
18
24
|
sendOtpStatus: initialStatus,
|
|
19
25
|
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
|
-
},
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
Officer_1: { ...emptyOfficerSlot },
|
|
29
|
+
Officer_2: { ...emptyOfficerSlot },
|
|
30
|
+
Officer_3: { ...emptyOfficerSlot },
|
|
31
|
+
Officer_4: { ...emptyOfficerSlot },
|
|
32
|
+
Officer_5: { ...emptyOfficerSlot },
|
|
33
|
+
Officer_6: { ...emptyOfficerSlot },
|
|
34
|
+
Officer_7: { ...emptyOfficerSlot },
|
|
35
|
+
Officer_8: { ...emptyOfficerSlot },
|
|
36
|
+
Officer_9: { ...emptyOfficerSlot },
|
|
37
|
+
Officer_10: { ...emptyOfficerSlot },
|
|
38
|
+
};
|
|
39
|
+
})(),
|
|
67
40
|
primaryContactDetails: {},
|
|
68
41
|
paymentAccountDetails: {
|
|
69
42
|
fetchStatus: initialStatus,
|
|
@@ -91,6 +64,7 @@ export const initialState = {
|
|
|
91
64
|
},
|
|
92
65
|
fetchState: 'Not-Started',
|
|
93
66
|
error: undefined,
|
|
67
|
+
aiAgentsActivation: { ...emptyAiAgentsActivationSubview },
|
|
94
68
|
uiState: {
|
|
95
69
|
isQBOPopupOpen: false,
|
|
96
70
|
isCardPaymentPopupOpen: false,
|
|
@@ -143,6 +117,9 @@ const onboardingCustomerView = createSlice({
|
|
|
143
117
|
updateCurrentStep(draft, action) {
|
|
144
118
|
draft.currentStep = action.payload.step;
|
|
145
119
|
},
|
|
120
|
+
updateCurrentSubStep(draft, action) {
|
|
121
|
+
draft.currentSubStep = action.payload.subStep;
|
|
122
|
+
},
|
|
146
123
|
updateOnboardingCustomerViewAccountDetails: {
|
|
147
124
|
prepare(paymentAccountIds, subscriptionPaymentAccountIds) {
|
|
148
125
|
return { payload: { paymentAccountIds, subscriptionPaymentAccountIds } };
|
|
@@ -180,6 +157,126 @@ const onboardingCustomerView = createSlice({
|
|
|
180
157
|
};
|
|
181
158
|
},
|
|
182
159
|
},
|
|
160
|
+
acknowledgeOnboardingAiFinanceTeam: {
|
|
161
|
+
reducer(draft) {
|
|
162
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
163
|
+
fetchState: 'In-Progress',
|
|
164
|
+
error: undefined,
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
prepare(companyId) {
|
|
168
|
+
return {
|
|
169
|
+
payload: { companyId },
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
acknowledgeOnboardingAiFinanceTeamSuccess(draft) {
|
|
174
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
175
|
+
fetchState: 'Completed',
|
|
176
|
+
error: undefined,
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
acknowledgeOnboardingAiFinanceTeamFailure: {
|
|
180
|
+
reducer(draft, action) {
|
|
181
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
182
|
+
fetchState: 'Error',
|
|
183
|
+
error: action.payload,
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
prepare(error) {
|
|
187
|
+
return {
|
|
188
|
+
payload: error,
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
acknowledgeOnboardingAiActivationViewed: {
|
|
193
|
+
reducer(draft) {
|
|
194
|
+
draft.aiActivationViewedAcknowledgementStatus = {
|
|
195
|
+
fetchState: 'In-Progress',
|
|
196
|
+
error: undefined,
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
prepare(companyId) {
|
|
200
|
+
return {
|
|
201
|
+
payload: { companyId },
|
|
202
|
+
};
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
acknowledgeOnboardingAiActivationViewedSuccess(draft) {
|
|
206
|
+
draft.aiActivationViewedAcknowledgementStatus = {
|
|
207
|
+
fetchState: 'Completed',
|
|
208
|
+
error: undefined,
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
acknowledgeOnboardingAiActivationViewedFailure: {
|
|
212
|
+
reducer(draft, action) {
|
|
213
|
+
draft.aiActivationViewedAcknowledgementStatus = {
|
|
214
|
+
fetchState: 'Error',
|
|
215
|
+
error: action.payload,
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
prepare(error) {
|
|
219
|
+
return {
|
|
220
|
+
payload: error,
|
|
221
|
+
};
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
fetchAiAgentsActivationStatus(draft) {
|
|
225
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
226
|
+
fetchState: 'In-Progress',
|
|
227
|
+
error: undefined,
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
fetchAiAgentsActivationStatusSuccess: {
|
|
231
|
+
reducer(draft, action) {
|
|
232
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
233
|
+
fetchState: 'Completed',
|
|
234
|
+
error: undefined,
|
|
235
|
+
};
|
|
236
|
+
draft.aiAgentsActivation.phases = action.payload.phases;
|
|
237
|
+
draft.aiAgentsActivation.counts = action.payload.counts;
|
|
238
|
+
},
|
|
239
|
+
prepare(payload) {
|
|
240
|
+
return { payload };
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
fetchAiAgentsActivationStatusFailure: {
|
|
244
|
+
reducer(draft, action) {
|
|
245
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
246
|
+
fetchState: 'Error',
|
|
247
|
+
error: action.payload,
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
prepare(error) {
|
|
251
|
+
return { payload: error };
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
aiAgentsActivationCountsUpdated: {
|
|
255
|
+
reducer(draft, action) {
|
|
256
|
+
draft.aiAgentsActivation.counts = {
|
|
257
|
+
...draft.aiAgentsActivation.counts,
|
|
258
|
+
...action.payload,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
prepare(payload) {
|
|
262
|
+
return { payload };
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
aiAgentsActivationPhaseChanged: {
|
|
266
|
+
reducer(draft, action) {
|
|
267
|
+
const target = draft.aiAgentsActivation.phases;
|
|
268
|
+
const index = target.findIndex((phase) => phase.key === action.payload.key);
|
|
269
|
+
if (index === -1) {
|
|
270
|
+
target.push(action.payload);
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
target[index] = { ...target[index], ...action.payload };
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
prepare(payload) {
|
|
277
|
+
return { payload };
|
|
278
|
+
},
|
|
279
|
+
},
|
|
183
280
|
updateOnboardingCustomerViewDashboardLoaded: {
|
|
184
281
|
reducer(draft) {
|
|
185
282
|
draft.dashboardLoadedStatus = {
|
|
@@ -592,7 +689,82 @@ const onboardingCustomerView = createSlice({
|
|
|
592
689
|
clearOnboardingCustomerView(draft) {
|
|
593
690
|
Object.assign(draft, initialState);
|
|
594
691
|
},
|
|
692
|
+
/** Merge AI-parsed officer fields into the officer's onboarding localData. */
|
|
693
|
+
applyKycDocumentAutofillForOnboarding: {
|
|
694
|
+
reducer(draft, action) {
|
|
695
|
+
const { officerType, values, autoFilledFieldNames, fileId } = action.payload;
|
|
696
|
+
const slot = draft.companyOfficerUpdateStatus[officerType];
|
|
697
|
+
slot.localData = Object.assign({}, slot.localData, values);
|
|
698
|
+
slot.autoFilledFields = Array.from(new Set([...(slot.autoFilledFields ?? []), ...autoFilledFieldNames]));
|
|
699
|
+
draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
|
|
700
|
+
},
|
|
701
|
+
prepare(payload) {
|
|
702
|
+
return { payload };
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
/** Merge AI-parsed company fields into companyDetails onboarding localData. */
|
|
706
|
+
applyKybDocumentAutofillForOnboarding: {
|
|
707
|
+
reducer(draft, action) {
|
|
708
|
+
const { values, autoFilledFieldNames, fileId } = action.payload;
|
|
709
|
+
draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
|
|
710
|
+
const prev = draft.companyDetails.autoFilledFields ?? [];
|
|
711
|
+
draft.companyDetails.autoFilledFields = Array.from(new Set([...prev, ...autoFilledFieldNames]));
|
|
712
|
+
draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
|
|
713
|
+
},
|
|
714
|
+
prepare(payload) {
|
|
715
|
+
return { payload };
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
/** Wipe AI-autofill badges during onboarding. */
|
|
719
|
+
clearKycKybAutofillForOnboarding: {
|
|
720
|
+
reducer(draft, action) {
|
|
721
|
+
const { officerType } = action.payload;
|
|
722
|
+
if (officerType != null) {
|
|
723
|
+
draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
|
|
724
|
+
}
|
|
725
|
+
else {
|
|
726
|
+
draft.companyDetails.autoFilledFields = [];
|
|
727
|
+
Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
|
|
728
|
+
draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
prepare(payload = {}) {
|
|
733
|
+
return { payload };
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
extraReducers: (builder) => {
|
|
738
|
+
const addParsingFileId = (draft, fileId) => {
|
|
739
|
+
draft.parsingDocumentFileIds = draft.parsingDocumentFileIds ?? [];
|
|
740
|
+
if (!draft.parsingDocumentFileIds.includes(fileId)) {
|
|
741
|
+
draft.parsingDocumentFileIds.push(fileId);
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
const removeParsingFileId = (draft, fileId) => {
|
|
745
|
+
draft.parsingDocumentFileIds = (draft.parsingDocumentFileIds ?? []).filter((id) => id !== fileId);
|
|
746
|
+
};
|
|
747
|
+
builder.addCase(parseUploadedKycDocument, (draft, action) => {
|
|
748
|
+
if (action.payload.target === 'onboarding') {
|
|
749
|
+
addParsingFileId(draft, action.payload.fileId);
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
builder.addCase(parseUploadedKybDocument, (draft, action) => {
|
|
753
|
+
if (action.payload.target === 'onboarding') {
|
|
754
|
+
addParsingFileId(draft, action.payload.fileId);
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
builder.addCase(parseUploadedKycDocumentFailure, (draft, action) => {
|
|
758
|
+
if (action.payload.target === 'onboarding') {
|
|
759
|
+
removeParsingFileId(draft, action.payload.fileId);
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
builder.addCase(parseUploadedKybDocumentFailure, (draft, action) => {
|
|
763
|
+
if (action.payload.target === 'onboarding') {
|
|
764
|
+
removeParsingFileId(draft, action.payload.fileId);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
595
767
|
},
|
|
596
768
|
});
|
|
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;
|
|
769
|
+
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, updateCurrentSubStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, } = onboardingCustomerView.actions;
|
|
598
770
|
export default onboardingCustomerView.reducer;
|
|
@@ -8,10 +8,10 @@ import { getUserRoleByUserIds } from '../../../entity/userRole/userRoleSelector'
|
|
|
8
8
|
import { getCompanyConfig } from '../../companyConfigView/companyConfigSelector';
|
|
9
9
|
import { getCompanyView } from '../../companyView/selectorHelpers/getCompanyView';
|
|
10
10
|
import { getCompanyAndIdentityDetails, } from '../../spendManagement/commonSetup/setupViewSelector';
|
|
11
|
-
import { ALL_ONBOARDING_STEPS, ALL_ZENI_USER_ONBOARDING_STEPS, REQUIRED_ONBOARDING_STEPS, ZENI_USER_REQUIRED_ONBOARDING_STEPS, toOnboardingStepType, } from './onboardingCustomerViewState';
|
|
11
|
+
import { ALL_ONBOARDING_STEPS, ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS, ALL_ZENI_USER_ONBOARDING_STEPS, REQUIRED_ONBOARDING_STEPS, ZENI_USER_REQUIRED_ONBOARDING_STEPS, emptyAiAgentsActivationSubview, 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, currentSubStep, 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 &&
|
|
@@ -73,7 +74,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
73
74
|
cardPaymentViewState.cardPaymentsIds.length > 0) &&
|
|
74
75
|
companyView?.company.company.companyOnboardingInfo
|
|
75
76
|
.subscriptionBillingAddressId != null) {
|
|
76
|
-
completedSteps.push('
|
|
77
|
+
completedSteps.push('setup_billing');
|
|
77
78
|
}
|
|
78
79
|
const isPaymentVerified = (paymentAccount?.providerVerificationStatus?.code?.includes('verified') ===
|
|
79
80
|
true &&
|
|
@@ -84,24 +85,25 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
84
85
|
.subscriptionBillingAddressId != null;
|
|
85
86
|
if ((isPaymentVerified || hasSubscriptionBillingAddress) &&
|
|
86
87
|
!(isPaymentVerified && hasSubscriptionBillingAddress)) {
|
|
87
|
-
halfCompletedSteps.push('
|
|
88
|
+
halfCompletedSteps.push('setup_billing');
|
|
88
89
|
}
|
|
89
90
|
const isValidConnection = externalConnections?.accounting[0]?.isValid ?? false;
|
|
90
91
|
if (isValidConnection) {
|
|
91
|
-
completedSteps.push('
|
|
92
|
+
completedSteps.push('connect_ledger');
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
+
const isCompanyDetailsDone = companyDetails.localData != null &&
|
|
94
95
|
primaryContactDetails.localData != null &&
|
|
95
|
-
isCompanyDetailsCompleted(fileState, companyView, primaryContact)
|
|
96
|
-
completedSteps.push('company_details');
|
|
97
|
-
}
|
|
96
|
+
isCompanyDetailsCompleted(fileState, companyView, primaryContact);
|
|
98
97
|
const officerIndex = companyOfficers.length > 0
|
|
99
98
|
? Object.values(companyOfficerLocalData).findIndex((officer) => officer?.isSelectedForVerification === true)
|
|
100
99
|
: 0;
|
|
101
100
|
const selectedOfficerType = `Officer_${officerIndex < 0 ? 1 : officerIndex + 1}`;
|
|
102
|
-
|
|
103
|
-
isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, companyOfficerLocalData[selectedOfficerType], fileState)
|
|
104
|
-
|
|
101
|
+
const isOfficerDone = companyOfficerLocalData[selectedOfficerType] != null &&
|
|
102
|
+
isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles, companyOfficerLocalData[selectedOfficerType], fileState);
|
|
103
|
+
// The verification step (single sidebar step) is only "complete" once both
|
|
104
|
+
// the company-officer and company-details sub-steps are fully filled in.
|
|
105
|
+
if (isCompanyDetailsDone && isOfficerDone) {
|
|
106
|
+
completedSteps.push('verification');
|
|
105
107
|
}
|
|
106
108
|
const { allStepsData, requiredStepsData } = onboardingStepsData(isValidConnection, currentTenant?.productSettings ?? [], accountingConnectionCreationMode);
|
|
107
109
|
const allRequiredStepsCompleted = requiredStepsData.every((step) => {
|
|
@@ -119,6 +121,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
119
121
|
return {
|
|
120
122
|
companyDetailsLocalData,
|
|
121
123
|
companyOfficerLocalData,
|
|
124
|
+
parsingDocumentFileIds,
|
|
122
125
|
subscriptionBillingAddress: subscriptionBillingAddress?.addressToCreate,
|
|
123
126
|
companyView,
|
|
124
127
|
allNationalityCountries,
|
|
@@ -127,6 +130,7 @@ export function getOnboardingCustomerView(state, companyId) {
|
|
|
127
130
|
officer: isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileState, companyOfficerLocalData[selectedOfficerType]),
|
|
128
131
|
},
|
|
129
132
|
currentStep,
|
|
133
|
+
currentSubStep,
|
|
130
134
|
completedSteps,
|
|
131
135
|
halfCompletedSteps,
|
|
132
136
|
allRequiredStepsCompleted,
|
|
@@ -203,14 +207,20 @@ export function isOfficerDetailsCompleted(companyOfficers, companyOfficerRoles,
|
|
|
203
207
|
isPhoneVerified === true);
|
|
204
208
|
}
|
|
205
209
|
export const onboardingStepsData = (isValidConnection, productSettings, accountingConnectionCreationMode) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
// 3 cohorts:
|
|
211
|
+
// - Core-only (banking/cards, no bookkeeping): no ledger, no integrations.
|
|
212
|
+
// - Zeni-team-connects-QBO bookkeeping: skip ledger but keep integrations
|
|
213
|
+
// so the customer can still wire up Plaid / Stripe / HubSpot / email.
|
|
214
|
+
// - Customer-connects-QBO bookkeeping: full 4-step flow.
|
|
215
|
+
const isCoreOnlyTenant = (productSettings.isBankingEnabled || productSettings.isCardsEnabled) &&
|
|
216
|
+
!productSettings.isBookkeepingEnabled;
|
|
217
|
+
const allStepsData = isCoreOnlyTenant
|
|
209
218
|
? ALL_ZENI_USER_ONBOARDING_STEPS
|
|
210
|
-
:
|
|
219
|
+
: accountingConnectionCreationMode === 'zeni_user'
|
|
220
|
+
? ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS
|
|
221
|
+
: ALL_ONBOARDING_STEPS;
|
|
211
222
|
const requiredStepsData = (accountingConnectionCreationMode === 'zeni_user' && isValidConnection) ||
|
|
212
|
-
|
|
213
|
-
!productSettings.isBookkeepingEnabled)
|
|
223
|
+
isCoreOnlyTenant
|
|
214
224
|
? ZENI_USER_REQUIRED_ONBOARDING_STEPS
|
|
215
225
|
: REQUIRED_ONBOARDING_STEPS;
|
|
216
226
|
return {
|
|
@@ -323,3 +333,11 @@ export const getProductSettingsString = (productSettings) => {
|
|
|
323
333
|
.map((key) => productKeyMap[key])
|
|
324
334
|
.join(',');
|
|
325
335
|
};
|
|
336
|
+
const fromActivationView = (state) =>
|
|
337
|
+
// Fall back to the empty subview so state hydrated from an older persisted
|
|
338
|
+
// version (before aiAgentsActivation existed) doesn't crash on .phases/.counts.
|
|
339
|
+
state.onboardingCustomerViewState.aiAgentsActivation ??
|
|
340
|
+
emptyAiAgentsActivationSubview;
|
|
341
|
+
export const getAiAgentsActivationSubview = (state) => fromActivationView(state);
|
|
342
|
+
export const getAiAgentsActivationPhases = (state) => fromActivationView(state).phases;
|
|
343
|
+
export const getAiAgentsActivationCounts = (state) => fromActivationView(state).counts;
|
|
@@ -1,28 +1,67 @@
|
|
|
1
1
|
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
// Onboarding steps are the 4 top-level surfaces. Officer + details verification
|
|
3
|
+
// live as sub-steps under `verification` (state machine in CustomerOnboardingPage).
|
|
4
|
+
// The optional data-source step is its own surface; the legacy connect-data-source
|
|
5
|
+
// sub-step under the old `qbo_connection` no longer exists.
|
|
6
|
+
export const ZENI_USER_REQUIRED_ONBOARDING_STEPS = ['setup_billing'];
|
|
5
7
|
export const CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO = [
|
|
6
|
-
'
|
|
8
|
+
'connect_ledger',
|
|
7
9
|
];
|
|
8
10
|
export const REQUIRED_ONBOARDING_STEPS = [
|
|
9
11
|
...ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
10
12
|
...CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
11
13
|
];
|
|
12
14
|
export const ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT = [
|
|
13
|
-
'
|
|
14
|
-
'company_details',
|
|
15
|
+
'verification',
|
|
15
16
|
];
|
|
16
17
|
export const ALL_ZENI_USER_ONBOARDING_STEPS = [
|
|
17
18
|
...ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
18
19
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
19
20
|
];
|
|
21
|
+
// Zeni-team-connects-QBO bookkeeping tenants: skip the `connect_ledger` step
|
|
22
|
+
// (Zeni already did it) but keep `connect_data_source` so the customer can
|
|
23
|
+
// still wire up non-QBO integrations (Plaid, Stripe, HubSpot, email, etc.).
|
|
24
|
+
export const ALL_ZENI_USER_BOOKKEEPING_ONBOARDING_STEPS = [
|
|
25
|
+
...ZENI_USER_REQUIRED_ONBOARDING_STEPS,
|
|
26
|
+
'connect_data_source',
|
|
27
|
+
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
28
|
+
];
|
|
20
29
|
export const ALL_CUSTOMER_ONBOARDING_STEPS_WITH_QBO = [
|
|
21
30
|
...CUSTOMER_REQUIRED_ONBOARDING_STEPS_WITH_QBO,
|
|
31
|
+
'connect_data_source',
|
|
22
32
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
23
33
|
];
|
|
24
34
|
export const ALL_ONBOARDING_STEPS = [
|
|
25
35
|
...REQUIRED_ONBOARDING_STEPS,
|
|
36
|
+
'connect_data_source',
|
|
26
37
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
27
38
|
];
|
|
28
39
|
export const toOnboardingStepType = (v) => stringToUnion(v, ALL_ONBOARDING_STEPS);
|
|
40
|
+
// Per-step sub-state. Lives in Redux so the save epic can tell, for example,
|
|
41
|
+
// an officer-form save from a company-details save while both share
|
|
42
|
+
// currentStep = 'verification'.
|
|
43
|
+
// - 'default' generic landing sub-state.
|
|
44
|
+
// - 'ai-activating' connect_ledger interstitial during AI activation.
|
|
45
|
+
// - 'unlock-stack' verification landing — VerifyUnlockFinancialStackPage.
|
|
46
|
+
// - 'company_officer' verification → officer form.
|
|
47
|
+
// - 'company_details' verification → company details form.
|
|
48
|
+
export const ALL_ONBOARDING_SUB_STEPS = [
|
|
49
|
+
'default',
|
|
50
|
+
'ai-activating',
|
|
51
|
+
'unlock-stack',
|
|
52
|
+
'company_officer',
|
|
53
|
+
'company_details',
|
|
54
|
+
];
|
|
55
|
+
export const toOnboardingSubStepType = (v) => stringToUnion(v, ALL_ONBOARDING_SUB_STEPS);
|
|
56
|
+
export const emptyAiAgentsActivationCounts = {
|
|
57
|
+
customerCount: 0,
|
|
58
|
+
glAccountCount: 0,
|
|
59
|
+
targetTransactionCount: 0,
|
|
60
|
+
transactionCount: 0,
|
|
61
|
+
vendorCount: 0,
|
|
62
|
+
};
|
|
63
|
+
export const emptyAiAgentsActivationSubview = {
|
|
64
|
+
counts: emptyAiAgentsActivationCounts,
|
|
65
|
+
fetchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
66
|
+
phases: [],
|
|
67
|
+
};
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
import recordGet from 'lodash/get';
|
|
2
2
|
import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
3
|
-
import {
|
|
3
|
+
import { getDepositAccountByDepositAccountId } from '../../../entity/depositAccount/depositAccountSelector';
|
|
4
|
+
import { getAllFundingAccounts, mapDepositAccToFundingAccount, } from '../commonSetup/setupViewSelector';
|
|
4
5
|
import { getAllDepositAccounts } from '../zeniAccounts/depositAccountList/depositAccountListSelector';
|
|
5
6
|
import { getAllPaymentAccounts } from '../zeniAccounts/paymentAccountList/paymentAccountListSelector';
|
|
7
|
+
const buildCashManagementRule = (autoSweepFlowState, depositAccountState, treasuryDetailState) => {
|
|
8
|
+
const { settingsId, bufferAmount, frequency, memo, primaryFundingAccountId, nextTransferDate, } = autoSweepFlowState;
|
|
9
|
+
if (settingsId == null || primaryFundingAccountId == null) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
const depositAccount = getDepositAccountByDepositAccountId(depositAccountState, primaryFundingAccountId);
|
|
13
|
+
return {
|
|
14
|
+
bufferAmount,
|
|
15
|
+
frequency,
|
|
16
|
+
memo,
|
|
17
|
+
settingsId,
|
|
18
|
+
primaryFundingAccount: depositAccount != null
|
|
19
|
+
? mapDepositAccToFundingAccount(depositAccount)
|
|
20
|
+
: undefined,
|
|
21
|
+
treasurySummary: treasuryDetailState.accountSummary,
|
|
22
|
+
nextTransferDate,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
6
25
|
export const getAutoTransferRules = (state) => {
|
|
7
|
-
const { autotransferRulesState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
|
|
26
|
+
const { autotransferRulesState, autoSweepFlowState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
|
|
8
27
|
const { rules, error, historyByRuleId, ruleUpdateLocalData, ruleUpdateStatusById, ruleDeleteStatusById, createRuleFetchState, autoTransferReviewDetail, } = autotransferRulesState;
|
|
9
28
|
const depositAccountsView = getAllDepositAccounts(depositAccountState, depositAccountListState);
|
|
10
29
|
const paymentAccountsView = getAllPaymentAccounts(paymentAccountState, paymentAccountListState);
|
|
@@ -39,6 +58,7 @@ export const getAutoTransferRules = (state) => {
|
|
|
39
58
|
transferMoneyParties,
|
|
40
59
|
transferMoneyPartiesFetchState,
|
|
41
60
|
createRuleFetchState,
|
|
61
|
+
cashManagementRule: buildCashManagementRule(autoSweepFlowState, depositAccountState, treasuryDetailState),
|
|
42
62
|
fetchState,
|
|
43
63
|
error,
|
|
44
64
|
version: 0,
|
|
@@ -52,6 +52,12 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
52
52
|
let recurringConfig;
|
|
53
53
|
let billPayInfo;
|
|
54
54
|
let isBillMarkedForRetry = false;
|
|
55
|
+
// Bill-level accounting class id. Approval Rules 3.0 'department'
|
|
56
|
+
// criteria match against this. Sourced from BillTransaction so
|
|
57
|
+
// any selector that needs it (e.g. creator-as-approver lookup)
|
|
58
|
+
// can read it off the view rather than reaching into
|
|
59
|
+
// 'state.billTransactionState' itself.
|
|
60
|
+
let classId;
|
|
55
61
|
const zeniAssistRetryStatus = billId != null
|
|
56
62
|
? billDetailViewState.billDetailById[key].zeniAssist.retryStatus
|
|
57
63
|
: undefined;
|
|
@@ -62,6 +68,13 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
62
68
|
transaction?.billPayInfo.isCollectToAccountInfoFromVendorContact ?? false;
|
|
63
69
|
isRecurring = transaction?.isRecurring ?? false;
|
|
64
70
|
billPayInfo = transaction?.billPayInfo;
|
|
71
|
+
// Normalise empty-string to undefined so downstream readers
|
|
72
|
+
// treat "no class" uniformly regardless of whether the wire
|
|
73
|
+
// used '' or omitted the field.
|
|
74
|
+
classId =
|
|
75
|
+
transaction?.classId != null && transaction.classId !== ''
|
|
76
|
+
? transaction.classId
|
|
77
|
+
: undefined;
|
|
65
78
|
if (isRecurring &&
|
|
66
79
|
transaction?.recurringBillConfigId != null &&
|
|
67
80
|
transaction.recurringBillInstance != null) {
|
|
@@ -178,5 +191,6 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
178
191
|
zeniAssistRetryStatus,
|
|
179
192
|
billPayInfo,
|
|
180
193
|
outsideZeniPaymentInfo,
|
|
194
|
+
classId,
|
|
181
195
|
};
|
|
182
196
|
};
|