@zeniai/client-epic-state 5.1.0-betaSS3 → 5.1.0
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/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
- package/lib/commonStateTypes/workingDayHelper.js +28 -1
- package/lib/entity/account/accountSelector.d.ts +9 -0
- package/lib/entity/account/accountSelector.js +14 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +64 -5
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
- package/lib/entity/aiCfo/aiCfoReducer.js +252 -10
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
- package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +98 -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 +145 -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/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -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/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +7 -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 +9 -2
- package/lib/entity/tenant/clearAllEpic.js +14 -0
- package/lib/entity/tenant/tenantPayload.d.ts +21 -0
- package/lib/entity/tenant/tenantReducer.d.ts +14 -5
- package/lib/entity/tenant/tenantReducer.js +132 -8
- package/lib/entity/tenant/tenantState.d.ts +24 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -10
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -1
- package/lib/entity/transaction/stateTypes/transactionLine.js +2 -1
- package/lib/epic.d.ts +31 -2
- package/lib/epic.js +31 -2
- package/lib/esm/commonStateTypes/amount.js +7 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
- package/lib/esm/entity/account/accountSelector.js +11 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +252 -10
- 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 +145 -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/jeSchedules/jeSchedulesPayload.js +7 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +7 -0
- package/lib/esm/entity/task/taskPayload.js +2 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +14 -0
- package/lib/esm/entity/tenant/tenantReducer.js +130 -7
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -10
- package/lib/esm/entity/transaction/stateTypes/transactionLine.js +1 -0
- package/lib/esm/epic.js +31 -2
- package/lib/esm/index.js +68 -28
- package/lib/esm/reducer.js +21 -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 +46 -1
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +98 -0
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +82 -0
- package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +64 -0
- package/lib/esm/view/createTransferEntry/createTransferEntryState.js +17 -0
- package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +136 -0
- package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +36 -0
- package/lib/esm/view/dashboard/dashboardReducer.js +11 -1
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +3 -4
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +13 -9
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +3 -16
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -16
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +2 -13
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -6
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +3 -20
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +21 -49
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -6
- package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
- 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 +140 -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 +47 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +34 -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 +225 -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/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/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +18 -0
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +18 -0
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +1 -1
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +45 -1
- package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.js +149 -0
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +6 -1
- package/lib/index.d.ts +84 -34
- package/lib/index.js +261 -37
- package/lib/reducer.d.ts +21 -0
- package/lib/reducer.js +21 -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/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- 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 +12 -1
- package/lib/view/companyView/companyViewReducer.js +48 -3
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +102 -0
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -2
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/createTransferEntry/createTransferEntryReducer.d.ts +32 -0
- package/lib/view/createTransferEntry/createTransferEntryReducer.js +86 -0
- package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +39 -0
- package/lib/view/createTransferEntry/createTransferEntrySelector.js +69 -0
- package/lib/view/createTransferEntry/createTransferEntryState.d.ts +30 -0
- package/lib/view/createTransferEntry/createTransferEntryState.js +20 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.d.ts +11 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +140 -0
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +14 -0
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +40 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardReducer.js +11 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +3 -4
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +14 -10
- package/lib/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +3 -16
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -16
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +2 -13
- package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -6
- package/lib/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -6
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -6
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +3 -20
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +20 -9
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +12 -19
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +22 -50
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +8 -6
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -7
- package/lib/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- 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 +142 -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 +51 -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 +38 -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 +230 -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/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/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +46 -2
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +2 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +102 -0
- package/lib/view/transactionDetail/journalEntryLinesViewModel.js +160 -0
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +6 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +1 -1
|
@@ -87,6 +87,31 @@ export const getChargeCardListView = (state, includeCreditAccountDebitSummaryAnd
|
|
|
87
87
|
hasDebitCard,
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Returns every enriched `ChargeCardWithUser` for the tenant, without
|
|
92
|
+
* applying the cards-list screen's `searchText` filter or its column
|
|
93
|
+
* `sortKey/sortOrder`. Used by surfaces that need the raw card universe
|
|
94
|
+
* decoupled from whatever the user has typed/sorted on the cards list
|
|
95
|
+
* (e.g. the Card Policy "Apply to Cards" picker, which owns its own
|
|
96
|
+
* search + sort UI). The list-screen's filter/sort state is intentionally
|
|
97
|
+
* left untouched so revisits to the cards list still restore the user's
|
|
98
|
+
* search.
|
|
99
|
+
*/
|
|
100
|
+
export const getAllChargeCardsWithUser = (state) => {
|
|
101
|
+
const { chargeCardListState, chargeCardState, chargeCardConfigState } = state;
|
|
102
|
+
const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
|
|
103
|
+
const chargeCardsWithUser = getChargeCardsWithUser(cards, state);
|
|
104
|
+
const fetchState = reduceFetchState([
|
|
105
|
+
chargeCardListState,
|
|
106
|
+
chargeCardConfigState,
|
|
107
|
+
]).fetchState;
|
|
108
|
+
return {
|
|
109
|
+
fetchState,
|
|
110
|
+
error: chargeCardListState.error,
|
|
111
|
+
cards: chargeCardsWithUser,
|
|
112
|
+
version: '1.0',
|
|
113
|
+
};
|
|
114
|
+
};
|
|
90
115
|
export const getMyPendingActivationChargeCardListView = (state) => {
|
|
91
116
|
const { tenantState, chargeCardListState, chargeCardState } = state;
|
|
92
117
|
const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
|
package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { deriveAiCardRowsFromTeams } from './deriveAiCardRowsFromTeams';
|
|
2
|
+
// Re-derives step-2 `cardRows` only when step-1 team selection changed.
|
|
3
|
+
// Step-2-only edits must skip the re-derive: `deriveAiCardRowsFromTeams` keys
|
|
4
|
+
// off `cardRow.id`, and a dropdown swap has just mutated it — re-running would
|
|
5
|
+
// revert the edit to the source team's id/label.
|
|
6
|
+
export const applyAiCardCreationFormDraftUpdate = ({ next, prev, context, }) => {
|
|
7
|
+
if (context == null || context.mode === 'create') {
|
|
8
|
+
return next;
|
|
9
|
+
}
|
|
10
|
+
if (!haveCheckedTeamRowsChanged(prev?.teamRows, next.teamRows)) {
|
|
11
|
+
return next;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
teamRows: next.teamRows,
|
|
15
|
+
cardRows: deriveAiCardRowsFromTeams({
|
|
16
|
+
teamRows: next.teamRows,
|
|
17
|
+
prevCardRows: next.cardRows,
|
|
18
|
+
allUsers: context.allUsers,
|
|
19
|
+
suggestedOwnerUserIdByTeamId: context.suggestedOwnerUserIdByTeamId,
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
const haveCheckedTeamRowsChanged = (prevTeamRows, nextTeamRows) => {
|
|
24
|
+
const prevCheckedIds = (prevTeamRows ?? [])
|
|
25
|
+
.filter((row) => row.isChecked)
|
|
26
|
+
.map((row) => row.id);
|
|
27
|
+
const nextCheckedIds = nextTeamRows
|
|
28
|
+
.filter((row) => row.isChecked)
|
|
29
|
+
.map((row) => row.id);
|
|
30
|
+
if (prevCheckedIds.length !== nextCheckedIds.length) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return prevCheckedIds.some((id, idx) => id !== nextCheckedIds[idx]);
|
|
34
|
+
};
|
package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { deriveAiCardRowsFromTeams } from './deriveAiCardRowsFromTeams';
|
|
2
|
+
// Branches on `initialData.mode`:
|
|
3
|
+
// - review: step-1 teams start checked; step-2 `cardRows` pre-derived so the
|
|
4
|
+
// happy path (no toggle) lands on a populated table.
|
|
5
|
+
// - create: seed `cardRows` from AI's suggested cards; `teamRows` stays empty.
|
|
6
|
+
export const buildAiCardCreationFormDraftSeed = ({ initialData, allUsers, }) => {
|
|
7
|
+
const context = {
|
|
8
|
+
allUsers,
|
|
9
|
+
mode: initialData.mode,
|
|
10
|
+
suggestedOwnerUserIdByTeamId: initialData.suggestedOwnerUserIdByTeamId,
|
|
11
|
+
};
|
|
12
|
+
if (initialData.mode === 'create') {
|
|
13
|
+
return {
|
|
14
|
+
context,
|
|
15
|
+
draft: {
|
|
16
|
+
teamRows: [],
|
|
17
|
+
cardRows: initialData.cardRows.map((seed) => buildCardRowFromSeed(seed, allUsers)),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const teamRows = initialData.teamRows.map((row) => ({
|
|
22
|
+
cardKind: row.cardKind,
|
|
23
|
+
id: row.id,
|
|
24
|
+
isChecked: true,
|
|
25
|
+
label: row.label,
|
|
26
|
+
value: row.avgMonthlySpend,
|
|
27
|
+
rightLabel: row.recommendedLimit,
|
|
28
|
+
rightSubLabel: row.recommendedLimitCadence,
|
|
29
|
+
}));
|
|
30
|
+
return {
|
|
31
|
+
context,
|
|
32
|
+
draft: {
|
|
33
|
+
teamRows,
|
|
34
|
+
cardRows: deriveAiCardRowsFromTeams({
|
|
35
|
+
teamRows,
|
|
36
|
+
prevCardRows: [],
|
|
37
|
+
allUsers,
|
|
38
|
+
suggestedOwnerUserIdByTeamId: initialData.suggestedOwnerUserIdByTeamId,
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const buildCardRowFromSeed = (seed, allUsers) => {
|
|
44
|
+
const selectedUser = seed.suggestedOwnerUserId != null
|
|
45
|
+
? allUsers.find((user) => user.userId === seed.suggestedOwnerUserId)
|
|
46
|
+
: undefined;
|
|
47
|
+
return {
|
|
48
|
+
cardKind: seed.cardKind,
|
|
49
|
+
id: seed.id,
|
|
50
|
+
label: seed.label,
|
|
51
|
+
owner: {
|
|
52
|
+
allUsers,
|
|
53
|
+
selectedUser,
|
|
54
|
+
},
|
|
55
|
+
recommendedLimit: seed.recommendedLimit,
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// One row per checked team in source order. Existing rows are preserved
|
|
2
|
+
// verbatim so step-2 user edits survive upstream re-derives; new teams seed
|
|
3
|
+
// owner from the suggestion map and `recommendedLimit` by parsing `rightLabel`.
|
|
4
|
+
export const deriveAiCardRowsFromTeams = ({ teamRows, prevCardRows = [], allUsers, suggestedOwnerUserIdByTeamId, }) => {
|
|
5
|
+
const prevById = new Map(prevCardRows.map((row) => [row.id, row]));
|
|
6
|
+
const userById = new Map(allUsers.map((user) => [user.userId, user]));
|
|
7
|
+
return teamRows
|
|
8
|
+
.filter((row) => row.isChecked)
|
|
9
|
+
.map((teamRow) => {
|
|
10
|
+
const previous = prevById.get(teamRow.id);
|
|
11
|
+
if (previous != null) {
|
|
12
|
+
return previous;
|
|
13
|
+
}
|
|
14
|
+
const suggestedUserId = suggestedOwnerUserIdByTeamId[teamRow.id];
|
|
15
|
+
const selectedUser = suggestedUserId != null ? userById.get(suggestedUserId) : undefined;
|
|
16
|
+
return {
|
|
17
|
+
cardKind: teamRow.cardKind,
|
|
18
|
+
id: teamRow.id,
|
|
19
|
+
label: teamRow.label,
|
|
20
|
+
owner: {
|
|
21
|
+
allUsers,
|
|
22
|
+
selectedUser,
|
|
23
|
+
},
|
|
24
|
+
recommendedLimit: parseLimitToFloat(teamRow.rightLabel),
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const parseLimitToFloat = (raw) => {
|
|
29
|
+
const cleaned = raw.replace(/[^0-9.-]/g, '');
|
|
30
|
+
if (cleaned.length === 0) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const parsed = Number(cleaned);
|
|
34
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
35
|
+
};
|
|
@@ -7,7 +7,7 @@ import { updateAllUsers } from '../../../../entity/user/userReducer';
|
|
|
7
7
|
import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
|
|
8
8
|
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../responsePayload';
|
|
9
9
|
import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
|
|
10
|
-
import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount, updateLastSelfIssuedDebitCardId, } from './issueChargeCardReducer';
|
|
10
|
+
import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount, updateLastIssuedCardIds, updateLastSelfIssuedDebitCardId, } from './issueChargeCardReducer';
|
|
11
11
|
export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(issueChargeCards.match), switchMap(() => {
|
|
12
12
|
const state = state$.value;
|
|
13
13
|
const loggedInUserId = state$.value.tenantState.loggedInUser?.userId;
|
|
@@ -87,7 +87,7 @@ export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
87
87
|
actions.push(updateChargeCards(issuedCards), updateAllUsers({ users: response.data.users }), updateUserRoles(response.data.user_roles), updateChargeCardList({
|
|
88
88
|
chargeCardListPayload: response.data,
|
|
89
89
|
keepExistingListItems: true,
|
|
90
|
-
}), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}), issueChargeCardSuccessOrFailure({ fetchState: 'Completed' }));
|
|
90
|
+
}), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}), updateLastIssuedCardIds(issuedCards.map((card) => card.card_id)), issueChargeCardSuccessOrFailure({ fetchState: 'Completed' }));
|
|
91
91
|
if (issuedCards.length === 1 &&
|
|
92
92
|
(issuedCards[0].card_type.code ===
|
|
93
93
|
'business_virtual_debit_card' ||
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
import { applyAiCardCreationFormDraftUpdate } from './applyAiCardCreationFormDraftUpdate';
|
|
3
|
+
import { buildAiCardCreationFormDraftSeed } from './buildAiCardCreationFormDraftSeed';
|
|
2
4
|
export const initialState = {
|
|
3
5
|
depositAccountIds: [],
|
|
4
6
|
depositAccountsFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
@@ -14,6 +16,7 @@ export const initialState = {
|
|
|
14
16
|
},
|
|
15
17
|
activeChargeCardCount: {},
|
|
16
18
|
activeDebitCardCountByDepositAccountId: {},
|
|
19
|
+
lastIssuedCardIds: [],
|
|
17
20
|
};
|
|
18
21
|
const issueChargeCard = createSlice({
|
|
19
22
|
name: 'issueChargeCard',
|
|
@@ -34,14 +37,19 @@ const issueChargeCard = createSlice({
|
|
|
34
37
|
},
|
|
35
38
|
},
|
|
36
39
|
issueChargeCards: {
|
|
37
|
-
prepare() {
|
|
38
|
-
return { payload: {} };
|
|
40
|
+
prepare(payload) {
|
|
41
|
+
return { payload: payload ?? {} };
|
|
39
42
|
},
|
|
40
|
-
reducer(draft) {
|
|
43
|
+
reducer(draft, action) {
|
|
41
44
|
draft.saveStatus.fetchState = 'In-Progress';
|
|
42
45
|
draft.saveStatus.error = undefined;
|
|
46
|
+
draft.lastIssueSourceChatSessionId = action.payload.sourceChatSessionId;
|
|
47
|
+
draft.lastIssuedCardIds = [];
|
|
43
48
|
},
|
|
44
49
|
},
|
|
50
|
+
updateLastIssuedCardIds(draft, action) {
|
|
51
|
+
draft.lastIssuedCardIds = action.payload;
|
|
52
|
+
},
|
|
45
53
|
updateChargeCardsLocalStore(draft, action) {
|
|
46
54
|
draft.localData = action.payload;
|
|
47
55
|
},
|
|
@@ -49,6 +57,8 @@ const issueChargeCard = createSlice({
|
|
|
49
57
|
draft.localData = [...initialState.localData];
|
|
50
58
|
draft.saveStatus = initialState.saveStatus;
|
|
51
59
|
draft.lastSelfIssuedDebitCardId = undefined;
|
|
60
|
+
draft.lastIssueSourceChatSessionId = undefined;
|
|
61
|
+
draft.lastIssuedCardIds = [];
|
|
52
62
|
},
|
|
53
63
|
updateLastSelfIssuedDebitCardId(draft, action) {
|
|
54
64
|
draft.lastSelfIssuedDebitCardId = action.payload;
|
|
@@ -124,10 +134,38 @@ const issueChargeCard = createSlice({
|
|
|
124
134
|
draft.depositAccountsFetchState.fetchState = action.payload.fetchState;
|
|
125
135
|
draft.depositAccountsFetchState.error = action.payload.error;
|
|
126
136
|
},
|
|
137
|
+
// Dispatched once when `CardsCreationInteractiveForm` mounts (or the AI
|
|
138
|
+
// payload arrives).
|
|
139
|
+
seedAiCardCreationFormDraft: {
|
|
140
|
+
reducer(draft, action) {
|
|
141
|
+
const { draft: nextDraft, context } = buildAiCardCreationFormDraftSeed({
|
|
142
|
+
allUsers: action.payload.allUsers,
|
|
143
|
+
initialData: action.payload.initialData,
|
|
144
|
+
});
|
|
145
|
+
draft.aiCardCreationFormDraft = nextDraft;
|
|
146
|
+
draft.aiCardCreationFormDraftContext = context;
|
|
147
|
+
},
|
|
148
|
+
prepare(allUsers, initialData) {
|
|
149
|
+
return { payload: { allUsers, initialData } };
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
// Derivation lives in `applyAiCardCreationFormDraftUpdate` so the
|
|
153
|
+
// Storybook owner harness shares the same rules.
|
|
154
|
+
updateAiCardCreationFormDraft(draft, action) {
|
|
155
|
+
draft.aiCardCreationFormDraft = applyAiCardCreationFormDraftUpdate({
|
|
156
|
+
prev: draft.aiCardCreationFormDraft,
|
|
157
|
+
next: action.payload,
|
|
158
|
+
context: draft.aiCardCreationFormDraftContext,
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
clearAiCardCreationFormDraft(draft) {
|
|
162
|
+
draft.aiCardCreationFormDraft = undefined;
|
|
163
|
+
draft.aiCardCreationFormDraftContext = undefined;
|
|
164
|
+
},
|
|
127
165
|
clearIssueChargeCard(draft) {
|
|
128
166
|
Object.assign(draft, initialState);
|
|
129
167
|
},
|
|
130
168
|
},
|
|
131
169
|
});
|
|
132
|
-
export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId, issueChargeCardSuccessOrFailure, resetIssueChargeCardForm, updateCustomAddressId, updateChargeCardCount, updateDebitCardCount, fetchIssueCardPage, updateDepositAccountsInCards, fetchDepositAccountListForCards, updateDepositAccountListForCardsFetchStatus, clearIssueChargeCard, } = issueChargeCard.actions;
|
|
170
|
+
export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId, updateLastIssuedCardIds, issueChargeCardSuccessOrFailure, resetIssueChargeCardForm, updateCustomAddressId, updateChargeCardCount, updateDebitCardCount, fetchIssueCardPage, updateDepositAccountsInCards, fetchDepositAccountListForCards, updateDepositAccountListForCardsFetchStatus, seedAiCardCreationFormDraft, updateAiCardCreationFormDraft, clearAiCardCreationFormDraft, clearIssueChargeCard, } = issueChargeCard.actions;
|
|
133
171
|
export default issueChargeCard.reducer;
|
|
@@ -5,6 +5,7 @@ import { getDepositAccountLimitsForChargeCardByDepositAccountIds } from '../../.
|
|
|
5
5
|
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
6
6
|
import { getNewAddress } from '../../../addressView/addressViewSelector';
|
|
7
7
|
import { getUserList } from '../../../userListView/userListViewSelector';
|
|
8
|
+
import { toIssueChargeCardLocalDataFromDraft } from './toIssueChargeCardLocalDataFromDraft';
|
|
8
9
|
export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEnabled) => {
|
|
9
10
|
const { issueChargeCardState, userState, userRoleState, userListViewState, chargeCardConfigState, chargeCardListState, addressState, classState, depositAccountState, classListState, } = state;
|
|
10
11
|
const userListSelectorView = getUserList(userState, userRoleState, userListViewState, 'cardHolderCandidate');
|
|
@@ -93,3 +94,37 @@ export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEn
|
|
|
93
94
|
lastSelfIssuedDebitCardId: issueChargeCardState.lastSelfIssuedDebitCardId,
|
|
94
95
|
};
|
|
95
96
|
};
|
|
97
|
+
// AI CFO chat session that triggered the most recent issue; lets the cards
|
|
98
|
+
// list screen attribute the pending placeholder + synthetic drawer bubble.
|
|
99
|
+
export const getLastIssueChargeCardsSourceChatSessionId = (state) => {
|
|
100
|
+
return state.issueChargeCardState.lastIssueSourceChatSessionId;
|
|
101
|
+
};
|
|
102
|
+
// Cards created by the most recent successful issue; AI CFO drawer's "Created"
|
|
103
|
+
// bubble maps back through these.
|
|
104
|
+
export const getLastIssuedChargeCardIds = (state) => {
|
|
105
|
+
return state.issueChargeCardState.lastIssuedCardIds;
|
|
106
|
+
};
|
|
107
|
+
export const getIssueChargeCardsSaveStatus = (state) => {
|
|
108
|
+
return state.issueChargeCardState.saveStatus;
|
|
109
|
+
};
|
|
110
|
+
// Mirrors `localData.length` while in flight so the list can render N skeleton
|
|
111
|
+
// rows at the top of the table.
|
|
112
|
+
export const getInFlightIssueChargeCardsCount = (state) => {
|
|
113
|
+
if (state.issueChargeCardState.saveStatus.fetchState !== 'In-Progress') {
|
|
114
|
+
return 0;
|
|
115
|
+
}
|
|
116
|
+
return state.issueChargeCardState.localData.length;
|
|
117
|
+
};
|
|
118
|
+
// Hydrates `CardsCreationInteractiveForm`'s RHF; `undefined` outside the
|
|
119
|
+
// seed/clear window.
|
|
120
|
+
export const getAiCardCreationFormDraft = (state) => {
|
|
121
|
+
return state.issueChargeCardState.aiCardCreationFormDraft;
|
|
122
|
+
};
|
|
123
|
+
// Returns [] when the draft is absent so callers can short-circuit submission.
|
|
124
|
+
export const selectIssueChargeCardLocalDataFromDraft = (state) => {
|
|
125
|
+
const draft = state.issueChargeCardState.aiCardCreationFormDraft;
|
|
126
|
+
if (draft == null) {
|
|
127
|
+
return [];
|
|
128
|
+
}
|
|
129
|
+
return toIssueChargeCardLocalDataFromDraft(draft);
|
|
130
|
+
};
|
package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { EMPTY, concat, of } from 'rxjs';
|
|
2
|
+
import { distinctUntilChanged, filter, map, mergeMap, take, } from 'rxjs/operators';
|
|
3
|
+
import { upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, } from '../../../../entity/aiCfo/aiCfoReducer';
|
|
4
|
+
import { getQuestionAnswerByIdForChatSession } from '../../../../entity/aiCfo/aiCfoSelector';
|
|
5
|
+
import { fetchUserListByType } from '../../../userListView/userListViewReducer';
|
|
6
|
+
import { getUserList } from '../../../userListView/userListViewSelector';
|
|
7
|
+
import { clearAiCardCreationFormDraft, issueChargeCardSuccessOrFailure, seedAiCardCreationFormDraft, } from './issueChargeCardReducer';
|
|
8
|
+
const readAllUsersAsUserArray = (state) => getUserList(state.userState, state.userRoleState, state.userListViewState, 'cardHolderCandidate')
|
|
9
|
+
.users.map((person) => person.user)
|
|
10
|
+
.filter((user) => user != null);
|
|
11
|
+
const readCardsCreationPayload = (state, chatSessionId, questionAnswerId) => {
|
|
12
|
+
const qa = getQuestionAnswerByIdForChatSession(state.aiCfoState, chatSessionId, questionAnswerId);
|
|
13
|
+
const visualization = qa?.responses.answer?.content.visualization;
|
|
14
|
+
if (visualization?.type !== 'interactive_form') {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const data = visualization.data;
|
|
18
|
+
if (!('formType' in data) || data.formType !== 'cards_creation') {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return data.payload;
|
|
22
|
+
};
|
|
23
|
+
// Pusher may target "latest QA"; REST always carries the id. Either way,
|
|
24
|
+
// resolve to the QA the reducer just wrote so we can read it off state.
|
|
25
|
+
const resolveQuestionAnswerId = (state, action) => {
|
|
26
|
+
if (action.payload.questionAnswerId != null) {
|
|
27
|
+
return action.payload.questionAnswerId;
|
|
28
|
+
}
|
|
29
|
+
const session = state.aiCfoState.aiCfoByChatSessionId[action.payload.chatSessionId];
|
|
30
|
+
return session?.questionAnswers.slice(-1)[0]?.questionAnswerId;
|
|
31
|
+
};
|
|
32
|
+
const isSeedTrigger = (action) => upsertAnswerPayload.match(action) ||
|
|
33
|
+
upsertOrAddQuestionAnswerPayload.match(action);
|
|
34
|
+
export const seedAiCardCreationFormDraftEpic = (actions$, state$) => actions$.pipe(mergeMap((action) => {
|
|
35
|
+
if (issueChargeCardSuccessOrFailure.match(action) &&
|
|
36
|
+
action.payload.fetchState === 'Completed') {
|
|
37
|
+
return of(clearAiCardCreationFormDraft());
|
|
38
|
+
}
|
|
39
|
+
if (!isSeedTrigger(action)) {
|
|
40
|
+
return EMPTY;
|
|
41
|
+
}
|
|
42
|
+
const state = state$.value;
|
|
43
|
+
const questionAnswerId = resolveQuestionAnswerId(state, action);
|
|
44
|
+
if (questionAnswerId == null) {
|
|
45
|
+
return EMPTY;
|
|
46
|
+
}
|
|
47
|
+
const payload = readCardsCreationPayload(state, action.payload.chatSessionId, questionAnswerId);
|
|
48
|
+
if (payload == null) {
|
|
49
|
+
return EMPTY;
|
|
50
|
+
}
|
|
51
|
+
const allUsersNow = readAllUsersAsUserArray(state);
|
|
52
|
+
if (allUsersNow.length > 0) {
|
|
53
|
+
return of(seedAiCardCreationFormDraft(allUsersNow, payload));
|
|
54
|
+
}
|
|
55
|
+
const seedWhenUsersLoaded$ = state$.pipe(map(readAllUsersAsUserArray), distinctUntilChanged((prev, next) => prev.length === next.length &&
|
|
56
|
+
prev.every((user, idx) => user === next[idx])), filter((users) => users.length > 0), take(1), map((users) => seedAiCardCreationFormDraft(users, payload)));
|
|
57
|
+
const userListFetchState = state.userListViewState.userListByType.cardHolderCandidate.fetchState;
|
|
58
|
+
if (userListFetchState === 'In-Progress') {
|
|
59
|
+
return seedWhenUsersLoaded$;
|
|
60
|
+
}
|
|
61
|
+
return concat(of(fetchUserListByType('cardHolderCandidate', false)), seedWhenUsersLoaded$);
|
|
62
|
+
}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// V1: AI CFO only issues monthly business_virtual_credit_cards. Form has no
|
|
2
|
+
// frequency field; the unused physicalCard/debitCard slots are filled with
|
|
3
|
+
// empty defaults the epic ignores.
|
|
4
|
+
const DEFAULT_FREQUENCY = 'monthly';
|
|
5
|
+
const DEFAULT_CURRENCY_CODE = 'USD';
|
|
6
|
+
const DEFAULT_CURRENCY_SYMBOL = '$';
|
|
7
|
+
const mapCardRow = (row) => {
|
|
8
|
+
const ownerUserId = row.owner.selectedUser?.userId;
|
|
9
|
+
return {
|
|
10
|
+
lineId: row.id,
|
|
11
|
+
chargeCardType: 'credit_card',
|
|
12
|
+
creditCard: {
|
|
13
|
+
cardType: 'business_virtual_credit_card',
|
|
14
|
+
virtualCard: {
|
|
15
|
+
cardName: row.label,
|
|
16
|
+
frequency: DEFAULT_FREQUENCY,
|
|
17
|
+
userIds: ownerUserId != null ? [ownerUserId] : [],
|
|
18
|
+
amount: {
|
|
19
|
+
amount: row.recommendedLimit ?? 0,
|
|
20
|
+
currencyCode: DEFAULT_CURRENCY_CODE,
|
|
21
|
+
currencySymbol: DEFAULT_CURRENCY_SYMBOL,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
physicalCard: {
|
|
25
|
+
cardName: '',
|
|
26
|
+
frequency: DEFAULT_FREQUENCY,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
debitCard: {
|
|
30
|
+
cardType: 'business_virtual_debit_card',
|
|
31
|
+
virtualCard: {
|
|
32
|
+
cardName: '',
|
|
33
|
+
frequency: DEFAULT_FREQUENCY,
|
|
34
|
+
userIds: [],
|
|
35
|
+
},
|
|
36
|
+
physicalCard: {
|
|
37
|
+
cardName: '',
|
|
38
|
+
frequency: DEFAULT_FREQUENCY,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
// Returns [] when `cardRows` is empty so callers can short-circuit submission.
|
|
44
|
+
export const toIssueChargeCardLocalDataFromDraft = (draft) => draft.cardRows.map(mapCardRow);
|
package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js
CHANGED
|
@@ -63,7 +63,11 @@ export const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe(f
|
|
|
63
63
|
const approvalRules = state.remiSetupApproverViewState;
|
|
64
64
|
if (approvalRules.fetchState !== 'Completed' &&
|
|
65
65
|
approvalRules.fetchState !== 'In-Progress') {
|
|
66
|
-
|
|
66
|
+
// Side-fetch from the edit-reim page bootstrap. The
|
|
67
|
+
// triggering action doesn't carry the V3 flag, so we
|
|
68
|
+
// explicitly target v1; v3 tenants re-fetch via their
|
|
69
|
+
// own screen connector.
|
|
70
|
+
remiDetailActions.push(fetchRemiSetupApproverView(true, false, false, false));
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
}
|
|
@@ -6,9 +6,17 @@ import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
|
6
6
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
7
7
|
import { deleteRemiApprovalRule, deleteRemiApprovalRuleFailure, deleteRemiApprovalRuleSuccess, } from '../remiSetupApproverViewReducer';
|
|
8
8
|
export const deleteRemiApprovalRuleEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(deleteRemiApprovalRule.match), switchMap((action) => {
|
|
9
|
-
const { approvalRuleId } = action.payload;
|
|
9
|
+
const { approvalRuleId, useV3 } = action.payload;
|
|
10
|
+
// Approval Rules 3.0 — flag-gated endpoint selection.
|
|
11
|
+
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
12
|
+
// when RTK's payload type widens to `any` in some configs.
|
|
13
|
+
const endpoint = useV3 === true
|
|
14
|
+
? `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
15
|
+
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
10
16
|
return zeniAPI
|
|
11
|
-
.deleteAndGetJSON(
|
|
17
|
+
.deleteAndGetJSON(endpoint, {
|
|
18
|
+
approval_rule_id: approvalRuleId,
|
|
19
|
+
})
|
|
12
20
|
.pipe(mergeMap((response) => {
|
|
13
21
|
if (isSuccessResponse(response) && response.data != null) {
|
|
14
22
|
const approvalRuleIds = response.data.approval_rules.map((approvalRule) => approvalRule.approval_rule_id);
|
|
@@ -6,7 +6,7 @@ import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
|
6
6
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
7
7
|
import { fetchRemiSetupApproverView, fetchRemiSetupApproverViewFailure, fetchRemiSetupApproverViewSuccess, } from '../remiSetupApproverViewReducer';
|
|
8
8
|
export const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchRemiSetupApproverView.match), switchMap((action) => {
|
|
9
|
-
const { cacheOverride, resolveAttributeToUser, includeImplicitActors } = action.payload;
|
|
9
|
+
const { cacheOverride, resolveAttributeToUser, includeImplicitActors, useV3, } = action.payload;
|
|
10
10
|
const { remiSetupApproverViewState, approvalRuleState } = state$.value;
|
|
11
11
|
const approvalRules = getApprovalRulesByIds(approvalRuleState, remiSetupApproverViewState.approvalRuleIds);
|
|
12
12
|
if (cacheOverride === true ||
|
|
@@ -14,8 +14,14 @@ export const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => act
|
|
|
14
14
|
remiSetupApproverViewState.approvalRuleIds.length ||
|
|
15
15
|
(remiSetupApproverViewState.hasValidState() === false &&
|
|
16
16
|
remiSetupApproverViewState.fetchState !== 'In-Progress')) {
|
|
17
|
+
// Approval Rules 3.0 — flag-gated endpoint selection.
|
|
18
|
+
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
19
|
+
// when RTK's payload type widens to `any` in some configs.
|
|
20
|
+
const basePath = useV3 === true
|
|
21
|
+
? `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
22
|
+
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
17
23
|
return zeniAPI
|
|
18
|
-
.getJSON(`${
|
|
24
|
+
.getJSON(`${basePath}?query={"is_include_implicit_actors": ${includeImplicitActors}, "is_resolve_attribute_to_user":${resolveAttributeToUser}}`)
|
|
19
25
|
.pipe(mergeMap((response) => {
|
|
20
26
|
if (isSuccessResponse(response) && response.data != null) {
|
|
21
27
|
const approvalRuleIds = response.data.approval_rules.map((approvalRule) => approvalRule.approval_rule_id);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { getApprovalRuleById } from '../../../../../entity/approvalRule/approvalRuleSelector';
|
|
3
|
+
import { getAmountCriteria, getApprovalRuleById, getDepartmentCriteria, getVendorCriteria, } from '../../../../../entity/approvalRule/approvalRuleSelector';
|
|
4
4
|
import { clearRemiSetupApproverViewUpdateData, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, } from '../remiSetupApproverViewReducer';
|
|
5
5
|
export const initializeRemiSetupApproverViewUpdateDataEpic = (actions$, state$) => actions$.pipe(filter(initializeRemiSetupApproverViewUpdateData.match), mergeMap((action) => {
|
|
6
6
|
const { approvalRuleId } = action.payload;
|
|
@@ -8,16 +8,20 @@ export const initializeRemiSetupApproverViewUpdateDataEpic = (actions$, state$)
|
|
|
8
8
|
if (approvalRuleId != null) {
|
|
9
9
|
const approvalRule = getApprovalRuleById(state$.value.approvalRuleState, approvalRuleId);
|
|
10
10
|
if (approvalRule != null) {
|
|
11
|
-
const criteria = approvalRule.criteria[0];
|
|
12
|
-
const range = criteria?.range;
|
|
13
11
|
const remiSetupApproverViewUpdateData = {
|
|
14
12
|
approvalRuleId,
|
|
15
13
|
steps: approvalRule.steps,
|
|
16
14
|
criteria: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
amount: getAmountCriteria(approvalRule.criteria),
|
|
16
|
+
vendor: getVendorCriteria(approvalRule.criteria),
|
|
17
|
+
department: getDepartmentCriteria(approvalRule.criteria),
|
|
20
18
|
},
|
|
19
|
+
// Approval Rules 3.0 — seed rule-level fields so the form can
|
|
20
|
+
// round-trip them on edit. Each may be undefined on legacy rules.
|
|
21
|
+
name: approvalRule.name,
|
|
22
|
+
description: approvalRule.description,
|
|
23
|
+
separationOfDuties: approvalRule.separationOfDuties,
|
|
24
|
+
isFallback: approvalRule.isFallback,
|
|
21
25
|
};
|
|
22
26
|
fetchActions.push(clearRemiSetupApproverViewUpdateData(), saveRemiSetupApproverViewUpdateData(remiSetupApproverViewUpdateData));
|
|
23
27
|
}
|
|
@@ -25,7 +29,7 @@ export const initializeRemiSetupApproverViewUpdateDataEpic = (actions$, state$)
|
|
|
25
29
|
else {
|
|
26
30
|
const remiSetupApproverViewCreateData = {
|
|
27
31
|
steps: [],
|
|
28
|
-
criteria:
|
|
32
|
+
criteria: {},
|
|
29
33
|
};
|
|
30
34
|
fetchActions.push(clearRemiSetupApproverViewUpdateData(), saveRemiSetupApproverViewUpdateData(remiSetupApproverViewCreateData));
|
|
31
35
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { updateApprovalRules } from '../../../../../entity/approvalRule/approvalRuleReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
6
|
+
import { fetchRemiSetupApproverView, reorderRemiApprovalRules, reorderRemiApprovalRulesFailure, reorderRemiApprovalRulesSuccess, } from '../remiSetupApproverViewReducer';
|
|
7
|
+
export const reorderRemiApprovalRulesEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(reorderRemiApprovalRules.match), switchMap((action) => {
|
|
8
|
+
const { approvalRuleIds, useV3 } = action.payload;
|
|
9
|
+
const endpoint = `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2/reorder`;
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.putAndGetJSON(endpoint, {
|
|
12
|
+
rule_ids: approvalRuleIds,
|
|
13
|
+
})
|
|
14
|
+
.pipe(mergeMap((response) => {
|
|
15
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
16
|
+
const serverOrderedIds = response.data.approval_rules.map((approvalRule) => approvalRule.approval_rule_id);
|
|
17
|
+
const actions = [
|
|
18
|
+
updateApprovalRules(response.data.approval_rules),
|
|
19
|
+
reorderRemiApprovalRulesSuccess(serverOrderedIds),
|
|
20
|
+
openSnackbar({
|
|
21
|
+
messageSection: `reimbursement_approval_reorder`,
|
|
22
|
+
messageText: 'success',
|
|
23
|
+
type: 'success',
|
|
24
|
+
}),
|
|
25
|
+
];
|
|
26
|
+
return from(actions);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return from([
|
|
30
|
+
reorderRemiApprovalRulesFailure(response.status),
|
|
31
|
+
openSnackbar({
|
|
32
|
+
messageSection: `reimbursement_approval_reorder`,
|
|
33
|
+
messageText: 'failed',
|
|
34
|
+
type: 'error',
|
|
35
|
+
}),
|
|
36
|
+
// Failure-recovery refetch — match the screen connector
|
|
37
|
+
// convention '(cacheOverride, resolveAttributeToUser,
|
|
38
|
+
// includeImplicitActors, useV3)' rather than copying BillPay's
|
|
39
|
+
// 3-arg shape. With the previous useV3-as-default-false the
|
|
40
|
+
// V3 flag was being smuggled in as 'includeImplicitActors',
|
|
41
|
+
// which silently broke V3 recovery refetches.
|
|
42
|
+
fetchRemiSetupApproverView(true, false, false, useV3),
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
}), catchError((error) => from([
|
|
46
|
+
reorderRemiApprovalRulesFailure(createZeniAPIStatus('Unexpected Error', 'Reorder Reimbursement Approval Rules errored out' +
|
|
47
|
+
JSON.stringify(error))),
|
|
48
|
+
openSnackbar({
|
|
49
|
+
messageSection: `reimbursement_approval_reorder`,
|
|
50
|
+
messageText: 'failed',
|
|
51
|
+
type: 'error',
|
|
52
|
+
}),
|
|
53
|
+
// Failure-recovery refetch — match the screen connector
|
|
54
|
+
// convention '(cacheOverride, resolveAttributeToUser,
|
|
55
|
+
// includeImplicitActors, useV3)' rather than copying BillPay's
|
|
56
|
+
// 3-arg shape. With the previous useV3-as-default-false the
|
|
57
|
+
// V3 flag was being smuggled in as 'includeImplicitActors',
|
|
58
|
+
// which silently broke V3 recovery refetches.
|
|
59
|
+
fetchRemiSetupApproverView(true, false, false, useV3),
|
|
60
|
+
])));
|
|
61
|
+
}));
|
|
@@ -4,16 +4,25 @@ import { updateApprovalRules } from '../../../../../entity/approvalRule/approval
|
|
|
4
4
|
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
5
|
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
6
6
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
7
|
-
import { toApprovalChangableInfoPayload } from '../../../billPay/billPaySetupApproverView/types/commonPayload';
|
|
7
|
+
import { toApprovalChangableInfoPayload, toApprovalChangableInfoPayloadV1, } from '../../../billPay/billPaySetupApproverView/types/commonPayload';
|
|
8
8
|
import { saveRemiSetupApproverViewUpdates, saveRemiSetupApproverViewUpdatesFailure, saveRemiSetupApproverViewUpdatesSuccess, } from '../remiSetupApproverViewReducer';
|
|
9
|
-
export const saveRemiSetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(saveRemiSetupApproverViewUpdates.match), switchMap(() => {
|
|
9
|
+
export const saveRemiSetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(saveRemiSetupApproverViewUpdates.match), switchMap((action) => {
|
|
10
10
|
const { remiSetupApproverViewState } = state$.value;
|
|
11
11
|
const remiSetupApproverViewUpdateData = remiSetupApproverViewState.remiSetupApproverViewUpdateData;
|
|
12
12
|
if (remiSetupApproverViewUpdateData != null &&
|
|
13
13
|
remiSetupApproverViewUpdateData.data != null) {
|
|
14
|
-
|
|
14
|
+
// Approval Rules 3.0 — gate URL + write-side payload mapper on
|
|
15
|
+
// the `approval_rule_v3_config` dynamic config. `useV3` arrives
|
|
16
|
+
// on the action payload from the screen connector.
|
|
17
|
+
const { useV3 } = action.payload;
|
|
18
|
+
const payload = useV3
|
|
19
|
+
? toApprovalChangableInfoPayload(remiSetupApproverViewUpdateData.data)
|
|
20
|
+
: toApprovalChangableInfoPayloadV1(remiSetupApproverViewUpdateData.data);
|
|
21
|
+
const endpoint = useV3
|
|
22
|
+
? `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
23
|
+
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
15
24
|
return zeniAPI
|
|
16
|
-
.postAndGetJSON(
|
|
25
|
+
.postAndGetJSON(endpoint, payload)
|
|
17
26
|
.pipe(mergeMap((response) => {
|
|
18
27
|
if (isSuccessResponse(response) && response.data != null) {
|
|
19
28
|
const approvalRuleIds = response.data.approval_rules.map((approvalRule) => approvalRule.approval_rule_id);
|