@zeniai/client-epic-state 5.1.7 → 5.1.8
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/transactionPayload.js +4 -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/transactionPayload.js +4 -2
- 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/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/journalEntryLinesViewModel.d.ts +1 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +1 -1
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +0 -10
package/lib/esm/reducer.js
CHANGED
|
@@ -11,6 +11,7 @@ import billTransaction, { initialState as initialBillTransactionState, } from '.
|
|
|
11
11
|
import contact, { initialState as initialContactState, } from './entity/billPay/contact/contactReducer';
|
|
12
12
|
import recurringBill, { initialState as initialRecurringBillState, } from './entity/billPay/recurringBills/recurringBillsReducer';
|
|
13
13
|
import cardPayment, { initialState as initialCardPaymentState, } from './entity/cardPayment/cardPaymentReducer';
|
|
14
|
+
import cardPolicy, { initialState as initialCardPolicyState, } from './entity/cardPolicy/cardPolicyReducer';
|
|
14
15
|
import chargeCard, { initialState as initialChargeCardState, } from './entity/chargeCard/chargeCardReducer';
|
|
15
16
|
import chargeCardRepayment, { initialState as initialChargeCardRepaymentState, } from './entity/chargeCardRepayment/chargeCardRepaymentReducer';
|
|
16
17
|
import chargeCardTransaction, { initialState as initialChargeCardTransactionState, } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
|
|
@@ -158,6 +159,11 @@ import internationalWireVerification, { initialState as initialInternationalWire
|
|
|
158
159
|
import magicLinkView, { initialState as initialMagicLinkViewState, } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
|
|
159
160
|
import previousBills, { initialState as initialPreviousBillsState, } from './view/spendManagement/billPay/previousBills/previousBillsReducer';
|
|
160
161
|
import wiseRedirect, { initialState as initialWiseRedirectState, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
|
|
162
|
+
import autoSweepFlow, { initialState as initialAutoSweepFlowState, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
|
|
163
|
+
import cashManagementOverview, { initialState as initialCashManagementOverviewState, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
|
|
164
|
+
import cardPolicyDetail, { initialState as initialCardPolicyDetailState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer';
|
|
165
|
+
import cardPolicyList, { initialState as initialCardPolicyListState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
|
|
166
|
+
import createCardPolicy, { initialState as initialCreateCardPolicyState, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
|
|
161
167
|
import cardUserOnboarding, { initialState as initialCardUserOnboardingState, } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
|
|
162
168
|
import cashbackDetail, { initialState as initialCashbackDetailState, } from './view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer';
|
|
163
169
|
import chargeCardConfig, { initialState as initialChargeCardConfigState, } from './view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer';
|
|
@@ -238,6 +244,7 @@ const initialEntitiesState = {
|
|
|
238
244
|
bankAccountState: initialBankAccountState,
|
|
239
245
|
billTransactionState: initialBillTransactionState,
|
|
240
246
|
cardPaymentState: initialCardPaymentState,
|
|
247
|
+
cardPolicyState: initialCardPolicyState,
|
|
241
248
|
chargeCardState: initialChargeCardState,
|
|
242
249
|
chargeCardRepaymentState: initialChargeCardRepaymentState,
|
|
243
250
|
chargeCardTransactionState: initialChargeCardTransactionState,
|
|
@@ -309,6 +316,7 @@ const initialViewsState = {
|
|
|
309
316
|
arAgingState: initialArAgingState,
|
|
310
317
|
auditReportViewState: initialAuditReportViewState,
|
|
311
318
|
authenticationViewState: initialAuthenticationViewState,
|
|
319
|
+
autoSweepFlowState: initialAutoSweepFlowState,
|
|
312
320
|
autotransferRulesState: initialAutotransferRulesState,
|
|
313
321
|
balanceSheetState: initialBalanceSheetState,
|
|
314
322
|
bankAccountViewState: initialBankAccountView,
|
|
@@ -322,11 +330,14 @@ const initialViewsState = {
|
|
|
322
330
|
billsBulkActionViewState: initialBillsBulkActionViewState,
|
|
323
331
|
cardBalanceState: initialCardBalanceState,
|
|
324
332
|
cardPaymentViewState: initialCardPaymentViewState,
|
|
333
|
+
cardPolicyDetailState: initialCardPolicyDetailState,
|
|
334
|
+
cardPolicyListState: initialCardPolicyListState,
|
|
325
335
|
cardUserOnboardingState: initialCardUserOnboardingState,
|
|
326
336
|
cashbackDetailState: initialCashbackDetailState,
|
|
327
337
|
cashBalanceState: initialCashBalanceState,
|
|
328
338
|
cashFlowState: initialCashFlowState,
|
|
329
339
|
cashInCashOutState: initialCashInCashOutState,
|
|
340
|
+
cashManagementOverviewState: initialCashManagementOverviewState,
|
|
330
341
|
cashPositionState: initialCashPositionState,
|
|
331
342
|
chargeCardConfigState: initialChargeCardConfigState,
|
|
332
343
|
chargeCardDetailState: initialChargeCardDetailState,
|
|
@@ -345,6 +356,7 @@ const initialViewsState = {
|
|
|
345
356
|
companyTaskManagerViewState: initialCompanyTaskManagerViewState,
|
|
346
357
|
companyViewState: initialCompanyViewState,
|
|
347
358
|
countryListState: initialCountryListState,
|
|
359
|
+
createCardPolicyState: initialCreateCardPolicyState,
|
|
348
360
|
creditAgentEntityState: initialCreditAgentEntityState,
|
|
349
361
|
creditAgentViewState: initialCreditAgentViewState,
|
|
350
362
|
dashboardLayoutState: initialDashboardLayoutState,
|
|
@@ -475,6 +487,7 @@ const entityReducers = {
|
|
|
475
487
|
billPayConfigState: billPayConfig,
|
|
476
488
|
billTransactionState: billTransaction,
|
|
477
489
|
cardPaymentState: cardPayment,
|
|
490
|
+
cardPolicyState: cardPolicy,
|
|
478
491
|
chargeCardState: chargeCard,
|
|
479
492
|
chargeCardRepaymentState: chargeCardRepayment,
|
|
480
493
|
chargeCardTransactionState: chargeCardTransaction,
|
|
@@ -546,6 +559,7 @@ const viewReducers = {
|
|
|
546
559
|
arAgingState: arAging,
|
|
547
560
|
auditReportViewState: auditReportView,
|
|
548
561
|
authenticationViewState: authentication,
|
|
562
|
+
autoSweepFlowState: autoSweepFlow,
|
|
549
563
|
autotransferRulesState: autotransferRules,
|
|
550
564
|
balanceSheetState: balanceSheet,
|
|
551
565
|
bankAccountViewState: bankAccountView,
|
|
@@ -558,11 +572,14 @@ const viewReducers = {
|
|
|
558
572
|
billsBulkActionViewState: billsBulkActionView,
|
|
559
573
|
cardBalanceState: cardBalance,
|
|
560
574
|
cardPaymentViewState: cardPaymentView,
|
|
575
|
+
cardPolicyDetailState: cardPolicyDetail,
|
|
576
|
+
cardPolicyListState: cardPolicyList,
|
|
561
577
|
cardUserOnboardingState: cardUserOnboarding,
|
|
562
578
|
cashbackDetailState: cashbackDetail,
|
|
563
579
|
cashBalanceState: cashBalance,
|
|
564
580
|
cashFlowState: cashFlow,
|
|
565
581
|
cashInCashOutState: cashInCashOut,
|
|
582
|
+
cashManagementOverviewState: cashManagementOverview,
|
|
566
583
|
cashPositionState: cashPosition,
|
|
567
584
|
chargeCardConfigState: chargeCardConfig,
|
|
568
585
|
chargeCardDetailState: chargeCardDetail,
|
|
@@ -581,6 +598,7 @@ const viewReducers = {
|
|
|
581
598
|
companyTaskManagerViewState: companyTaskManagerView,
|
|
582
599
|
companyViewState: companyView,
|
|
583
600
|
countryListState: countryList,
|
|
601
|
+
createCardPolicyState: createCardPolicy,
|
|
584
602
|
creditAgentEntityState: creditAgentEntity,
|
|
585
603
|
creditAgentViewState: creditAgentView,
|
|
586
604
|
dashboardState: dashboard,
|
|
@@ -188,8 +188,10 @@ const aiCfoView = createSlice({
|
|
|
188
188
|
draft.createSessionState.fetchState = 'In-Progress';
|
|
189
189
|
draft.createSessionState.error = undefined;
|
|
190
190
|
},
|
|
191
|
-
prepare(agentId, userId, contextRefId, contextType) {
|
|
192
|
-
return {
|
|
191
|
+
prepare(agentId, userId, contextRefId, contextType, pageContext) {
|
|
192
|
+
return {
|
|
193
|
+
payload: { agentId, contextRefId, contextType, pageContext, userId },
|
|
194
|
+
};
|
|
193
195
|
},
|
|
194
196
|
},
|
|
195
197
|
createSessionSuccess(draft, action) {
|
|
@@ -220,7 +222,7 @@ const aiCfoView = createSlice({
|
|
|
220
222
|
draft.createSessionAndSubmitState.fetchState = 'In-Progress';
|
|
221
223
|
draft.createSessionAndSubmitState.error = undefined;
|
|
222
224
|
},
|
|
223
|
-
prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files) {
|
|
225
|
+
prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
|
|
224
226
|
return {
|
|
225
227
|
payload: {
|
|
226
228
|
agentId,
|
|
@@ -230,6 +232,7 @@ const aiCfoView = createSlice({
|
|
|
230
232
|
createdAt,
|
|
231
233
|
question,
|
|
232
234
|
files,
|
|
235
|
+
pageContext,
|
|
233
236
|
},
|
|
234
237
|
};
|
|
235
238
|
},
|
|
@@ -66,8 +66,11 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
|
|
|
66
66
|
}));
|
|
67
67
|
}
|
|
68
68
|
export const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(createSessionAndSubmit.match), switchMap((action) => {
|
|
69
|
-
const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, } = action.payload;
|
|
70
|
-
const payload = {
|
|
69
|
+
const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
|
|
70
|
+
const payload = {
|
|
71
|
+
agent_id: agentId,
|
|
72
|
+
...(pageContext != null && { page_context: pageContext }),
|
|
73
|
+
};
|
|
71
74
|
return zeniAPI
|
|
72
75
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
|
|
73
76
|
.pipe(mergeMap((response) => {
|
|
@@ -5,11 +5,12 @@ import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload
|
|
|
5
5
|
import { date as zeniDate } from '../../../zeniDayJS';
|
|
6
6
|
import { createSession, createSessionFailure, createSessionSuccess, } from '../aiCfoViewReducer';
|
|
7
7
|
export const createSessionEpic = (actions$, _, zeniAPI) => actions$.pipe(filter(createSession.match), switchMap((action) => {
|
|
8
|
-
const { agentId, contextRefId, contextType, userId } = action.payload;
|
|
8
|
+
const { agentId, contextRefId, contextType, pageContext, userId } = action.payload;
|
|
9
9
|
const payload = {
|
|
10
10
|
agent_id: agentId,
|
|
11
11
|
...(contextRefId != null && { context_ref_id: contextRefId }),
|
|
12
12
|
...(contextType != null && { context_type: contextType }),
|
|
13
|
+
...(pageContext != null && { page_context: pageContext }),
|
|
13
14
|
};
|
|
14
15
|
return zeniAPI
|
|
15
16
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
|
|
@@ -2,13 +2,23 @@ import { of } from 'rxjs';
|
|
|
2
2
|
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
4
4
|
import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, } from '../aiCfoViewReducer';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
|
|
7
|
+
*
|
|
8
|
+
* Appends `&no_card_created=true` when the action payload sets
|
|
9
|
+
* `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
|
|
10
|
+
* has not yet created any card). Any other value omits the flag entirely so
|
|
11
|
+
* the existing call sites continue to issue the unchanged request.
|
|
12
|
+
*/
|
|
6
13
|
export const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchSuggestedQuestions.match),
|
|
7
14
|
// mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
|
|
8
15
|
// would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
|
|
9
16
|
mergeMap((action) => {
|
|
10
|
-
const { pageContext } = action.payload;
|
|
17
|
+
const { pageContext, noCardCreated } = action.payload;
|
|
11
18
|
const query = new URLSearchParams({ page_context: pageContext });
|
|
19
|
+
if (noCardCreated === true) {
|
|
20
|
+
query.set('no_card_created', 'true');
|
|
21
|
+
}
|
|
12
22
|
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
|
|
13
23
|
return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
|
|
14
24
|
if (isSuccessResponse(response) && response.data != null) {
|
|
@@ -3,7 +3,8 @@ export const initialUIState = {
|
|
|
3
3
|
filterText: '',
|
|
4
4
|
sortKey: 'dueDate',
|
|
5
5
|
sortOrder: 'descending',
|
|
6
|
-
|
|
6
|
+
from: 0,
|
|
7
|
+
filters: {},
|
|
7
8
|
};
|
|
8
9
|
const initialMetrics = {
|
|
9
10
|
closed: 0,
|
|
@@ -18,6 +19,13 @@ export const initialState = {
|
|
|
18
19
|
metrics: initialMetrics,
|
|
19
20
|
metricsFetchState: 'Not-Started',
|
|
20
21
|
uiState: initialUIState,
|
|
22
|
+
cockpitContext: {
|
|
23
|
+
fetchState: 'Not-Started',
|
|
24
|
+
error: undefined,
|
|
25
|
+
companyIds: [],
|
|
26
|
+
userIds: [],
|
|
27
|
+
userGroupIds: [],
|
|
28
|
+
},
|
|
21
29
|
hasValidState() {
|
|
22
30
|
return this.fetchState == 'Completed';
|
|
23
31
|
},
|
|
@@ -28,10 +36,11 @@ const companyTaskManagerView = createSlice({
|
|
|
28
36
|
initialState,
|
|
29
37
|
reducers: {
|
|
30
38
|
fetchCompanyTaskManagerView: {
|
|
31
|
-
prepare(
|
|
39
|
+
prepare(from, sortKey, sortOrder, keepExistingListItems = true, searchString, filters) {
|
|
32
40
|
return {
|
|
33
41
|
payload: {
|
|
34
|
-
|
|
42
|
+
from,
|
|
43
|
+
filters,
|
|
35
44
|
searchString,
|
|
36
45
|
sortKey,
|
|
37
46
|
sortOrder,
|
|
@@ -40,10 +49,10 @@ const companyTaskManagerView = createSlice({
|
|
|
40
49
|
};
|
|
41
50
|
},
|
|
42
51
|
reducer(draft, action) {
|
|
43
|
-
const {
|
|
52
|
+
const { from, searchString, sortKey, sortOrder, keepExistingListItems } = action.payload;
|
|
44
53
|
draft.uiState.sortKey = sortKey;
|
|
45
54
|
draft.uiState.sortOrder = sortOrder;
|
|
46
|
-
draft.uiState.
|
|
55
|
+
draft.uiState.from = from;
|
|
47
56
|
if (keepExistingListItems === false) {
|
|
48
57
|
draft.taskIds = [];
|
|
49
58
|
}
|
|
@@ -56,15 +65,14 @@ const companyTaskManagerView = createSlice({
|
|
|
56
65
|
},
|
|
57
66
|
updateCompanyTaskManagerViewOnSuccess(draft, action) {
|
|
58
67
|
const { data } = action.payload;
|
|
59
|
-
const
|
|
68
|
+
const tasks = data.aggregations.group_by_company_name.buckets.flatMap((bucket) => bucket.tasks);
|
|
60
69
|
draft.fetchState = 'Completed';
|
|
61
70
|
draft.error = undefined;
|
|
62
71
|
draft.taskIds = [...draft.taskIds, ...tasks.map((task) => task.task_id)];
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
draft.totalTaskCount = total_count;
|
|
72
|
+
if (draft.uiState.filterText === '' && draft.uiState.from === 0) {
|
|
73
|
+
draft.totalTaskCount = data.total;
|
|
66
74
|
}
|
|
67
|
-
draft.uiState.
|
|
75
|
+
draft.uiState.from = data.from + data.limit;
|
|
68
76
|
},
|
|
69
77
|
updateCompanyTaskManagerViewOnFailure: {
|
|
70
78
|
reducer(draft, action) {
|
|
@@ -85,10 +93,30 @@ const companyTaskManagerView = createSlice({
|
|
|
85
93
|
updateTaskManagerMetricsOnFailure(draft) {
|
|
86
94
|
draft.metricsFetchState = 'Error';
|
|
87
95
|
},
|
|
96
|
+
updateCompanyTaskManagerViewFilters(draft, action) {
|
|
97
|
+
if (action.payload.filters != null) {
|
|
98
|
+
draft.uiState.filters = action.payload.filters;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
fetchCockpitContext(draft) {
|
|
102
|
+
draft.cockpitContext.fetchState = 'In-Progress';
|
|
103
|
+
draft.cockpitContext.error = undefined;
|
|
104
|
+
},
|
|
105
|
+
updateCockpitContextOnSuccess(draft, action) {
|
|
106
|
+
draft.cockpitContext.fetchState = 'Completed';
|
|
107
|
+
draft.cockpitContext.error = undefined;
|
|
108
|
+
draft.cockpitContext.companyIds = action.payload.companyIds;
|
|
109
|
+
draft.cockpitContext.userIds = action.payload.userIds;
|
|
110
|
+
draft.cockpitContext.userGroupIds = action.payload.userGroupIds;
|
|
111
|
+
},
|
|
112
|
+
updateCockpitContextOnFailure(draft, action) {
|
|
113
|
+
draft.cockpitContext.fetchState = 'Error';
|
|
114
|
+
draft.cockpitContext.error = action.payload;
|
|
115
|
+
},
|
|
88
116
|
clearCompanyTaskManagerView(draft) {
|
|
89
117
|
Object.assign(draft, initialState);
|
|
90
118
|
},
|
|
91
119
|
},
|
|
92
120
|
});
|
|
93
|
-
export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView, } = companyTaskManagerView.actions;
|
|
121
|
+
export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView, updateCompanyTaskManagerViewFilters, fetchCockpitContext, updateCockpitContextOnSuccess, updateCockpitContextOnFailure, } = companyTaskManagerView.actions;
|
|
94
122
|
export default companyTaskManagerView.reducer;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { reduceAnyFetchState } from '../../commonStateTypes/reduceFetchState';
|
|
3
|
+
import { getCompanyByCompanyId, getCompanyByCompanyIds, } from '../../entity/company/companySelector';
|
|
3
4
|
import { getTagsByIds } from '../../entity/tag/tagSelector';
|
|
4
5
|
import { getTaskById } from '../../entity/task/taskSelector';
|
|
5
6
|
import { getUserByUserId, getUsersByUserIds, } from '../../entity/user/userSelector';
|
|
6
7
|
export const getCompanyTaskManagerView = createSelector((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
|
|
7
|
-
const { taskIds, uiState,
|
|
8
|
+
const { taskIds, uiState, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
|
|
8
9
|
const tasksList = [];
|
|
9
10
|
taskIds.forEach((taskId) => {
|
|
10
11
|
const task = getTaskById(taskState, taskId);
|
|
@@ -26,13 +27,22 @@ export const getCompanyTaskManagerView = createSelector((state) => state.company
|
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
});
|
|
30
|
+
const allCompanyIds = companyTaskManagerViewState.cockpitContext.companyIds;
|
|
31
|
+
const companies = getCompanyByCompanyIds(companyState, allCompanyIds).map((c) => c.company);
|
|
32
|
+
const users = getUsersByUserIds(userState, companyTaskManagerViewState.cockpitContext.userIds);
|
|
33
|
+
const fetchStateAndError = reduceAnyFetchState([
|
|
34
|
+
companyTaskManagerViewState,
|
|
35
|
+
companyTaskManagerViewState.cockpitContext,
|
|
36
|
+
]);
|
|
29
37
|
return {
|
|
38
|
+
companies,
|
|
30
39
|
metrics,
|
|
31
40
|
metricsFetchState,
|
|
32
41
|
tasksList,
|
|
33
42
|
uiState,
|
|
34
|
-
fetchState,
|
|
35
|
-
error,
|
|
43
|
+
fetchState: fetchStateAndError.fetchState,
|
|
44
|
+
error: fetchStateAndError.error,
|
|
36
45
|
totalTaskCount,
|
|
46
|
+
users,
|
|
37
47
|
};
|
|
38
48
|
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { from, of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { updateCompanies } from '../../../entity/company/companyReducer';
|
|
4
|
+
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
5
|
+
import { updateAllUserGroups } from '../../../entity/userGroups/userGroupsReducer';
|
|
6
|
+
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
7
|
+
import { fetchCockpitContext, updateCockpitContextOnFailure, updateCockpitContextOnSuccess, } from '../companyTaskManagerViewReducer';
|
|
8
|
+
export const fetchCockpitContextEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCockpitContext.match), switchMap(() => zeniAPI
|
|
9
|
+
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/cockpit-context`)
|
|
10
|
+
.pipe(mergeMap((response) => {
|
|
11
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
12
|
+
const companies = response.data?.companies ?? [];
|
|
13
|
+
const users = response.data?.users ?? [];
|
|
14
|
+
const userGroups = response.data?.user_groups ?? [];
|
|
15
|
+
const companyIds = companies.map((company) => company.company_id);
|
|
16
|
+
const userIds = users.map((user) => user.user_id);
|
|
17
|
+
const userGroupIds = userGroups.map((userGroup) => userGroup.id);
|
|
18
|
+
const actions = [
|
|
19
|
+
updateCompanies({
|
|
20
|
+
payload: response.data.companies,
|
|
21
|
+
schema: {},
|
|
22
|
+
}),
|
|
23
|
+
updateAllUsers({ users: response.data.users }),
|
|
24
|
+
updateAllUserGroups({
|
|
25
|
+
userGroups: response.data.user_groups,
|
|
26
|
+
}),
|
|
27
|
+
updateCockpitContextOnSuccess({
|
|
28
|
+
companyIds,
|
|
29
|
+
userIds,
|
|
30
|
+
userGroupIds,
|
|
31
|
+
}),
|
|
32
|
+
];
|
|
33
|
+
return from(actions);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return of(updateCockpitContextOnFailure(response.status));
|
|
37
|
+
}
|
|
38
|
+
}), catchError((error) => of(updateCockpitContextOnFailure(createZeniAPIStatus('Unexpected error', 'Cockpit context fetch errored out' + JSON.stringify(error))))))));
|
|
@@ -1,51 +1,35 @@
|
|
|
1
1
|
import { from } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { getSortOrder } from '../../../commonPayloadTypes/sortOrderPayload';
|
|
4
|
-
import { updateCompanies } from '../../../entity/company/companyReducer';
|
|
5
4
|
import { updateTags } from '../../../entity/tag/tagReducer';
|
|
6
5
|
import { updateTasks } from '../../../entity/task/taskReducer';
|
|
7
|
-
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
8
6
|
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
9
7
|
import { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnFailure, updateCompanyTaskManagerViewOnSuccess, } from '../companyTaskManagerViewReducer';
|
|
10
|
-
const
|
|
11
|
-
switch (sortKey) {
|
|
12
|
-
case 'taskName':
|
|
13
|
-
return 'name';
|
|
14
|
-
case 'dueDate':
|
|
15
|
-
return 'due_date';
|
|
16
|
-
case 'createdBy':
|
|
17
|
-
return 'created_by';
|
|
18
|
-
case 'name':
|
|
19
|
-
return 'company_name';
|
|
20
|
-
default:
|
|
21
|
-
return sortKey;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 100;
|
|
24
9
|
export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCompanyTaskManagerView.match), switchMap((action) => {
|
|
25
|
-
const {
|
|
10
|
+
const { from: fromOffset, searchString, sortKey, sortOrder, filters, } = action.payload;
|
|
26
11
|
const queryValue = {
|
|
27
|
-
|
|
12
|
+
size: DEFAULT_PAGE_SIZE,
|
|
13
|
+
from: fromOffset,
|
|
14
|
+
global_search: searchString ?? '',
|
|
28
15
|
sort_by: toSortKeyPayload(sortKey),
|
|
29
16
|
sort_order: getSortOrder(sortOrder),
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
filter_join: filters?.categoryCombinationOperator === 'AND' ? 'and' : 'or',
|
|
18
|
+
...(filters?.categories != null && filters.categories.length > 0
|
|
19
|
+
? { filter_by: toFilterByPayload(filters) }
|
|
20
|
+
: {}),
|
|
32
21
|
};
|
|
33
22
|
return zeniAPI
|
|
34
|
-
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
|
|
23
|
+
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks-es?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
|
|
35
24
|
.pipe(mergeMap((response) => {
|
|
36
25
|
if (isSuccessResponse(response) && response.data != null) {
|
|
37
|
-
const tasksList = response.data.tasks;
|
|
26
|
+
const tasksList = response.data.aggregations.group_by_company_name.buckets.flatMap((bucket) => bucket.tasks);
|
|
38
27
|
const actions = [
|
|
39
28
|
updateCompanyTaskManagerViewOnSuccess({
|
|
40
29
|
data: response.data,
|
|
41
30
|
}),
|
|
42
31
|
updateTasks(tasksList),
|
|
43
|
-
|
|
44
|
-
payload: response.data.companies,
|
|
45
|
-
schema: {},
|
|
46
|
-
}),
|
|
47
|
-
updateTags(tasksList.map((task) => task.tags).flat()),
|
|
48
|
-
updateAllUsers({ users: response.data.users }),
|
|
32
|
+
updateTags(tasksList.flatMap((task) => task.tags)),
|
|
49
33
|
];
|
|
50
34
|
return from(actions);
|
|
51
35
|
}
|
|
@@ -62,3 +46,28 @@ export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => a
|
|
|
62
46
|
return from(actions);
|
|
63
47
|
}));
|
|
64
48
|
}));
|
|
49
|
+
const toSortKeyPayload = (sortKey) => {
|
|
50
|
+
switch (sortKey) {
|
|
51
|
+
case 'taskName':
|
|
52
|
+
return 'name';
|
|
53
|
+
case 'dueDate':
|
|
54
|
+
return 'due_date';
|
|
55
|
+
case 'createdBy':
|
|
56
|
+
return 'created_by';
|
|
57
|
+
case 'name':
|
|
58
|
+
return 'company_name';
|
|
59
|
+
default:
|
|
60
|
+
return sortKey;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const toFilterByPayload = (filters) => {
|
|
64
|
+
if (filters.categories == null) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
return filters.categories.map((category) => ({
|
|
68
|
+
field: category.field ?? '',
|
|
69
|
+
operator: category.matchingOperator === 'equal' ? 'is' : 'is_not',
|
|
70
|
+
values: category.values.map((v) => String(v)),
|
|
71
|
+
join: category.valuesCombinationOperator === 'ALL' ? 'and' : 'or',
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EMPTY, of } from 'rxjs';
|
|
2
|
+
import { filter, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewFilters, } from '../companyTaskManagerViewReducer';
|
|
4
|
+
export const updateCompanyTaskManagerViewFiltersEpic = (actions$, state$) => actions$.pipe(filter(updateCompanyTaskManagerViewFilters.match), switchMap((action) => {
|
|
5
|
+
const filters = action.payload.filters;
|
|
6
|
+
const allCategoriesValid = filters?.categories == null
|
|
7
|
+
? true
|
|
8
|
+
: filters?.categories?.every((category) => category.field != null &&
|
|
9
|
+
category.values != null &&
|
|
10
|
+
category.values.length > 0);
|
|
11
|
+
if (!allCategoriesValid) {
|
|
12
|
+
return EMPTY;
|
|
13
|
+
}
|
|
14
|
+
const { uiState } = state$.value.companyTaskManagerViewState;
|
|
15
|
+
return of(fetchCompanyTaskManagerView(0, uiState.sortKey, uiState.sortOrder, false, uiState.filterText, filters));
|
|
16
|
+
}));
|
|
@@ -309,14 +309,15 @@ const companyView = createSlice({
|
|
|
309
309
|
error: action.payload.status,
|
|
310
310
|
};
|
|
311
311
|
},
|
|
312
|
-
|
|
313
|
-
prepare(companyId,
|
|
312
|
+
updateCapitalizationAccountThreshold: {
|
|
313
|
+
prepare(companyId, accountId, threshold, dismissOnboardingForAccount, allOverrides) {
|
|
314
314
|
return {
|
|
315
315
|
payload: {
|
|
316
316
|
companyId,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
accountId,
|
|
318
|
+
threshold,
|
|
319
|
+
dismissOnboardingForAccount,
|
|
320
|
+
allOverrides,
|
|
320
321
|
},
|
|
321
322
|
};
|
|
322
323
|
},
|
|
@@ -329,21 +330,21 @@ const companyView = createSlice({
|
|
|
329
330
|
};
|
|
330
331
|
},
|
|
331
332
|
},
|
|
332
|
-
|
|
333
|
+
updateCapitalizationAccountThresholdSuccess(draft) {
|
|
333
334
|
draft.passportView.capitalizationThresholdUpdateStatus = {
|
|
334
335
|
fetchState: 'Completed',
|
|
335
336
|
error: undefined,
|
|
336
337
|
};
|
|
337
338
|
},
|
|
338
|
-
|
|
339
|
+
updateCapitalizationAccountThresholdFailure(draft, action) {
|
|
339
340
|
draft.passportView.capitalizationThresholdUpdateStatus = {
|
|
340
341
|
fetchState: 'Error',
|
|
341
342
|
error: action.payload.status,
|
|
342
343
|
};
|
|
343
344
|
},
|
|
344
345
|
dismissCapitalizationOnboarding: {
|
|
345
|
-
prepare(companyId,
|
|
346
|
-
return { payload: { companyId,
|
|
346
|
+
prepare(companyId, accountId) {
|
|
347
|
+
return { payload: { companyId, accountId } };
|
|
347
348
|
},
|
|
348
349
|
reducer(
|
|
349
350
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -626,5 +627,5 @@ const companyView = createSlice({
|
|
|
626
627
|
},
|
|
627
628
|
},
|
|
628
629
|
});
|
|
629
|
-
export const { fetchCompanyPassportView, fetchAllCockpitViews, fetchOnboardingView, fetchManagementView, fetchSubscriptionView, fetchPortfolioView, fetchCompanyManagementView, companyManagementSaveUpdates, companyManagementSavePendingUpdates, companyManagementDiscardUpdates, companyManagementSaveUpdatesSuccess, companyManagementSaveUpdatesFailure, updateCompanyViewOnSuccess, updateCompanyViewOnFailure, fetchCompanyPortfolioView, fetchZeniUsers, updateZeniUsersOnSuccess, updateZeniUsersOnFailure, clearCompanyView, updateCompanyPortfolioUIState, updateCompanyManagementUIState, companyPassportSaveDataInLocalStore, deleteCompanyOfficerInLocalStore, companyPassportClearDataInLocalStore, companyPassportUpdateCompanyDetails, companyPassportUpdateCompanyDetailsSuccess, companyPassportUpdateCompanyDetailsFailure, updateAccountingClassesEnabled, updateAccountingClassesEnabledSuccess, updateAccountingClassesEnabledFailure,
|
|
630
|
+
export const { fetchCompanyPassportView, fetchAllCockpitViews, fetchOnboardingView, fetchManagementView, fetchSubscriptionView, fetchPortfolioView, fetchCompanyManagementView, companyManagementSaveUpdates, companyManagementSavePendingUpdates, companyManagementDiscardUpdates, companyManagementSaveUpdatesSuccess, companyManagementSaveUpdatesFailure, updateCompanyViewOnSuccess, updateCompanyViewOnFailure, fetchCompanyPortfolioView, fetchZeniUsers, updateZeniUsersOnSuccess, updateZeniUsersOnFailure, clearCompanyView, updateCompanyPortfolioUIState, updateCompanyManagementUIState, companyPassportSaveDataInLocalStore, deleteCompanyOfficerInLocalStore, companyPassportClearDataInLocalStore, companyPassportUpdateCompanyDetails, companyPassportUpdateCompanyDetailsSuccess, companyPassportUpdateCompanyDetailsFailure, updateAccountingClassesEnabled, updateAccountingClassesEnabledSuccess, updateAccountingClassesEnabledFailure, updateCapitalizationAccountThreshold, updateCapitalizationAccountThresholdSuccess, updateCapitalizationAccountThresholdFailure, dismissCapitalizationOnboarding, companyPassportUpdatePrimaryContact, companyPassportUpdatePrimaryContactSuccess, companyPassportUpdatePrimaryContactFailure, companyPassportUpdateCompanyOfficer, companyPassportUpdateCompanyOfficerSuccess, companyPassportUpdateCompanyOfficerFailure, companyPassportCreateCompanyOfficers, companyPassportCreateCompanyOfficersSuccess, companyPassportCreateCompanyOfficersFailure, updateCompanyPassportLocalStoreData, saveIndustryAndIncDateInCompanyPassportLocalStore, saveCompanyPassportDetails, fetchParentSubsidiaryManagementView, updateParentSubsidiaryView, updateParentSubsidiaryViewOnFailure, updateCompanyDownloadState, fetchCompanyMetaData, updateCompanyMetaDataOnSuccess, updateCompanyMetaDataOnFailure, updateMetaDataOnSendMonthEndReport, } = companyView.actions;
|
|
630
631
|
export default companyView.reducer;
|
package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js
CHANGED
|
@@ -4,11 +4,11 @@ import { updateTenantCapitalizationOnboardingDismissed } from '../../../../entit
|
|
|
4
4
|
import { isSuccessResponse } from '../../../../responsePayload';
|
|
5
5
|
import { dismissCapitalizationOnboarding } from '../../companyViewReducer';
|
|
6
6
|
export const dismissCapitalizationOnboardingEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(dismissCapitalizationOnboarding.match), switchMap((action) => {
|
|
7
|
-
const { companyId,
|
|
7
|
+
const { companyId, accountId } = action.payload;
|
|
8
8
|
const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
|
|
9
|
-
const body =
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const body = {
|
|
10
|
+
capitalization_onboarding_dismissed_accounts: { [accountId]: true },
|
|
11
|
+
};
|
|
12
12
|
return zeniAPI
|
|
13
13
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, body)
|
|
14
14
|
.pipe(mergeMap((response) => {
|
|
@@ -16,7 +16,7 @@ export const dismissCapitalizationOnboardingEpic = (actions$, state$, zeniAPI) =
|
|
|
16
16
|
return from([
|
|
17
17
|
updateTenantCapitalizationOnboardingDismissed({
|
|
18
18
|
tenantId,
|
|
19
|
-
|
|
19
|
+
accountId,
|
|
20
20
|
}),
|
|
21
21
|
]);
|
|
22
22
|
}
|