@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
|
@@ -13,6 +13,7 @@ export const initialState = {
|
|
|
13
13
|
newApprovalRuleId: undefined,
|
|
14
14
|
approvalRulesDeleteStatusById: {},
|
|
15
15
|
remiSetupApproverViewUpdateData: undefined,
|
|
16
|
+
reorderStatus: { fetchState: 'Not-Started', error: undefined },
|
|
16
17
|
hasValidState() {
|
|
17
18
|
return this.fetchState === 'Completed';
|
|
18
19
|
},
|
|
@@ -26,12 +27,17 @@ const remiSetupApproverView = createSlice({
|
|
|
26
27
|
draft.fetchState = 'In-Progress';
|
|
27
28
|
draft.error = undefined;
|
|
28
29
|
},
|
|
29
|
-
|
|
30
|
+
// Approval Rules 3.0 — `useV3` arrives from the screen connector
|
|
31
|
+
// ('approval_rule_v3_config' dynamic config) and picks v1 vs v2
|
|
32
|
+
// endpoint in the fetch epic. Required (no default) so a missing
|
|
33
|
+
// connector wire surfaces at compile time.
|
|
34
|
+
prepare(cacheOverride = false, resolveAttributeToUser = false, includeImplicitActors = false, useV3) {
|
|
30
35
|
return {
|
|
31
36
|
payload: {
|
|
32
37
|
cacheOverride,
|
|
33
38
|
resolveAttributeToUser,
|
|
34
39
|
includeImplicitActors,
|
|
40
|
+
useV3,
|
|
35
41
|
},
|
|
36
42
|
};
|
|
37
43
|
},
|
|
@@ -134,8 +140,12 @@ const remiSetupApproverView = createSlice({
|
|
|
134
140
|
error: undefined,
|
|
135
141
|
};
|
|
136
142
|
},
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
// Approval Rules 3.0 — `useV3` flows from the screen connector
|
|
144
|
+
// ('approval_rule_v3_config' dynamic config) so the delete epic
|
|
145
|
+
// can pick the v1 vs v2 endpoint. Required (no default) so a
|
|
146
|
+
// missing connector wire surfaces at compile time.
|
|
147
|
+
prepare(approvalRuleId, useV3) {
|
|
148
|
+
return { payload: { approvalRuleId, useV3 } };
|
|
139
149
|
},
|
|
140
150
|
},
|
|
141
151
|
deleteRemiApprovalRuleSuccess: {
|
|
@@ -167,13 +177,72 @@ const remiSetupApproverView = createSlice({
|
|
|
167
177
|
};
|
|
168
178
|
},
|
|
169
179
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Approval Rules 3.0 — list-page drag-and-drop reorder.
|
|
182
|
+
* See BillPay equivalent for the longer rationale.
|
|
183
|
+
*/
|
|
184
|
+
reorderRemiApprovalRules: {
|
|
185
|
+
reducer(draft, action) {
|
|
186
|
+
const { approvalRuleIds } = action.payload;
|
|
187
|
+
const wasReorderInFlight = draft.reorderStatus.fetchState === 'In-Progress';
|
|
188
|
+
draft.reorderStatus = { fetchState: 'In-Progress', error: undefined };
|
|
189
|
+
// Stash the pre-reorder order for synchronous rollback on
|
|
190
|
+
// 'Failure'. See the BillPay reducer for the rationale,
|
|
191
|
+
// including the in-flight guard: a second drag before the
|
|
192
|
+
// first PUT lands must not overwrite the snapshot.
|
|
193
|
+
if (!wasReorderInFlight) {
|
|
194
|
+
draft.reorderRollbackIds = draft.approvalRuleIds;
|
|
195
|
+
}
|
|
196
|
+
draft.approvalRuleIds = approvalRuleIds;
|
|
197
|
+
},
|
|
198
|
+
// Approval Rules 3.0 — `useV3` required so a missing wire
|
|
199
|
+
// surfaces at compile time. Mirror of BillPay's reorder.prepare.
|
|
200
|
+
prepare(approvalRuleIds, useV3) {
|
|
201
|
+
return { payload: { approvalRuleIds, useV3 } };
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
reorderRemiApprovalRulesSuccess: {
|
|
205
|
+
reducer(draft, action) {
|
|
206
|
+
const { approvalRuleIds } = action.payload;
|
|
207
|
+
draft.reorderStatus = { fetchState: 'Completed', error: undefined };
|
|
208
|
+
draft.approvalRuleIds = approvalRuleIds;
|
|
209
|
+
draft.reorderRollbackIds = undefined;
|
|
210
|
+
},
|
|
211
|
+
prepare(approvalRuleIds) {
|
|
212
|
+
return { payload: { approvalRuleIds } };
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
reorderRemiApprovalRulesFailure: {
|
|
216
|
+
reducer(draft, action) {
|
|
217
|
+
const { status } = action.payload;
|
|
218
|
+
draft.reorderStatus = { fetchState: 'Error', error: status };
|
|
219
|
+
if (draft.reorderRollbackIds != null) {
|
|
220
|
+
draft.approvalRuleIds = draft.reorderRollbackIds;
|
|
221
|
+
draft.reorderRollbackIds = undefined;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
prepare(status) {
|
|
225
|
+
return { payload: { status } };
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
saveRemiSetupApproverViewUpdates: {
|
|
229
|
+
// Approval Rules 3.0 — `useV3` sourced from
|
|
230
|
+
// `approval_rule_v3_config` dynamic config in the screen
|
|
231
|
+
// connector; epic uses it to pick v1 vs v2 URL + mapper. The
|
|
232
|
+
// reducer doesn't read the action but the parameter must be
|
|
233
|
+
// declared so the action payload type carries downstream.
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
235
|
+
reducer(draft, _action) {
|
|
236
|
+
if (draft.remiSetupApproverViewUpdateData != null) {
|
|
237
|
+
draft.remiSetupApproverViewUpdateData.updateStatus = {
|
|
238
|
+
fetchState: 'In-Progress',
|
|
239
|
+
error: undefined,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
prepare(useV3) {
|
|
244
|
+
return { payload: { useV3 } };
|
|
245
|
+
},
|
|
177
246
|
},
|
|
178
247
|
saveRemiSetupApproverViewUpdatesSuccess: {
|
|
179
248
|
reducer(draft, action) {
|
|
@@ -262,5 +331,5 @@ const remiSetupApproverView = createSlice({
|
|
|
262
331
|
},
|
|
263
332
|
},
|
|
264
333
|
});
|
|
265
|
-
export const { fetchRemiSetupApproverView, fetchRemiSetupApproverViewSuccess, fetchRemiSetupApproverViewFailure, fetchRemiApproversDetails, fetchRemiApproversList, fetchRemiApproversListSuccess, fetchRemiApproversListFailure, deleteRemiApprovalRule, deleteRemiApprovalRuleSuccess, deleteRemiApprovalRuleFailure, saveRemiSetupApproverViewUpdates, saveRemiSetupApproverViewUpdatesSuccess, saveRemiSetupApproverViewUpdatesFailure, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, setListeningToPusherEvent, clearRemiSetupApproverViewUpdateData, clearRemiSetupApproverView, } = remiSetupApproverView.actions;
|
|
334
|
+
export const { fetchRemiSetupApproverView, fetchRemiSetupApproverViewSuccess, fetchRemiSetupApproverViewFailure, fetchRemiApproversDetails, fetchRemiApproversList, fetchRemiApproversListSuccess, fetchRemiApproversListFailure, deleteRemiApprovalRule, deleteRemiApprovalRuleSuccess, deleteRemiApprovalRuleFailure, reorderRemiApprovalRules, reorderRemiApprovalRulesSuccess, reorderRemiApprovalRulesFailure, saveRemiSetupApproverViewUpdates, saveRemiSetupApproverViewUpdatesSuccess, saveRemiSetupApproverViewUpdatesFailure, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, setListeningToPusherEvent, clearRemiSetupApproverViewUpdateData, clearRemiSetupApproverView, } = remiSetupApproverView.actions;
|
|
266
335
|
export default remiSetupApproverView.reducer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
+
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
5
|
+
import { updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoIntroClosedByOutsideClickFailure, updateTreasuryPromoIntroClosedByOutsideClickSuccess, } from '../treasurySetupViewReducer';
|
|
6
|
+
export const updateTreasuryPromoIntroClosedByOutsideClickEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateTreasuryPromoIntroClosedByOutsideClick.match), switchMap(() => {
|
|
7
|
+
return zeniAPI
|
|
8
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_intro_closed_by_outside_click: true })
|
|
9
|
+
.pipe(mergeMap((response) => {
|
|
10
|
+
if (isSuccessStatus(response)) {
|
|
11
|
+
return of(updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser(), updateTreasuryPromoIntroClosedByOutsideClickSuccess());
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return of(updateTreasuryPromoIntroClosedByOutsideClickFailure(response.status));
|
|
15
|
+
}
|
|
16
|
+
}), catchError((error) => of(updateTreasuryPromoIntroClosedByOutsideClickFailure(createZeniAPIStatus('Unexpected error', 'Update treasury promo intro closed by outside click REST API call errored out' +
|
|
17
|
+
(error?.message ?? JSON.stringify(error)))))));
|
|
18
|
+
}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { updateTreasuryPromoRemindMeLaterClickedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
+
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
5
|
+
import { updateTreasuryPromoRemindMeLaterClicked, updateTreasuryPromoRemindMeLaterClickedFailure, updateTreasuryPromoRemindMeLaterClickedSuccess, } from '../treasurySetupViewReducer';
|
|
6
|
+
export const updateTreasuryPromoRemindMeLaterClickedEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateTreasuryPromoRemindMeLaterClicked.match), switchMap(() => {
|
|
7
|
+
return zeniAPI
|
|
8
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_remind_me_later_clicked: true })
|
|
9
|
+
.pipe(mergeMap((response) => {
|
|
10
|
+
if (isSuccessStatus(response)) {
|
|
11
|
+
return of(updateTreasuryPromoRemindMeLaterClickedForLoggedInUser(), updateTreasuryPromoRemindMeLaterClickedSuccess());
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return of(updateTreasuryPromoRemindMeLaterClickedFailure(response.status));
|
|
15
|
+
}
|
|
16
|
+
}), catchError((error) => of(updateTreasuryPromoRemindMeLaterClickedFailure(createZeniAPIStatus('Unexpected error', 'Update treasury promo remind me later REST API call errored out' +
|
|
17
|
+
(error?.message ?? JSON.stringify(error)))))));
|
|
18
|
+
}));
|
package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js
CHANGED
|
@@ -14,5 +14,5 @@ export const updateTreasuryVideoViewedEpic = (actions$, _state$, zeniAPI) => act
|
|
|
14
14
|
return of(updateTreasuryVideoViewedFailure(response.status));
|
|
15
15
|
}
|
|
16
16
|
}), catchError((error) => of(updateTreasuryVideoViewedFailure(createZeniAPIStatus('Unexpected error', 'Update treasury video viewed REST API call errored out' +
|
|
17
|
-
JSON.stringify(error))))));
|
|
17
|
+
(error?.message ?? JSON.stringify(error)))))));
|
|
18
18
|
}));
|
|
@@ -33,6 +33,14 @@ export const initialState = {
|
|
|
33
33
|
fetchState: 'Not-Started',
|
|
34
34
|
error: undefined,
|
|
35
35
|
},
|
|
36
|
+
updateTreasuryPromoIntroClosedByOutsideClickStatus: {
|
|
37
|
+
fetchState: 'Not-Started',
|
|
38
|
+
error: undefined,
|
|
39
|
+
},
|
|
40
|
+
updateTreasuryPromoRemindMeLaterClickedStatus: {
|
|
41
|
+
fetchState: 'Not-Started',
|
|
42
|
+
error: undefined,
|
|
43
|
+
},
|
|
36
44
|
updateTreasuryVideoViewedStatus: {
|
|
37
45
|
fetchState: 'Not-Started',
|
|
38
46
|
error: undefined,
|
|
@@ -290,12 +298,48 @@ const treasurySetupView = createSlice({
|
|
|
290
298
|
error: action.payload,
|
|
291
299
|
};
|
|
292
300
|
},
|
|
301
|
+
updateTreasuryPromoRemindMeLaterClicked(draft) {
|
|
302
|
+
draft.updateTreasuryPromoRemindMeLaterClickedStatus = {
|
|
303
|
+
fetchState: 'In-Progress',
|
|
304
|
+
error: undefined,
|
|
305
|
+
};
|
|
306
|
+
},
|
|
307
|
+
updateTreasuryPromoRemindMeLaterClickedSuccess(draft) {
|
|
308
|
+
draft.updateTreasuryPromoRemindMeLaterClickedStatus = {
|
|
309
|
+
fetchState: 'Completed',
|
|
310
|
+
error: undefined,
|
|
311
|
+
};
|
|
312
|
+
},
|
|
313
|
+
updateTreasuryPromoRemindMeLaterClickedFailure(draft, action) {
|
|
314
|
+
draft.updateTreasuryPromoRemindMeLaterClickedStatus = {
|
|
315
|
+
fetchState: 'Error',
|
|
316
|
+
error: action.payload,
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
updateTreasuryPromoIntroClosedByOutsideClick(draft) {
|
|
320
|
+
draft.updateTreasuryPromoIntroClosedByOutsideClickStatus = {
|
|
321
|
+
fetchState: 'In-Progress',
|
|
322
|
+
error: undefined,
|
|
323
|
+
};
|
|
324
|
+
},
|
|
325
|
+
updateTreasuryPromoIntroClosedByOutsideClickSuccess(draft) {
|
|
326
|
+
draft.updateTreasuryPromoIntroClosedByOutsideClickStatus = {
|
|
327
|
+
fetchState: 'Completed',
|
|
328
|
+
error: undefined,
|
|
329
|
+
};
|
|
330
|
+
},
|
|
331
|
+
updateTreasuryPromoIntroClosedByOutsideClickFailure(draft, action) {
|
|
332
|
+
draft.updateTreasuryPromoIntroClosedByOutsideClickStatus = {
|
|
333
|
+
fetchState: 'Error',
|
|
334
|
+
error: action.payload,
|
|
335
|
+
};
|
|
336
|
+
},
|
|
293
337
|
clearTreasurySetupView(draft) {
|
|
294
338
|
Object.assign(draft, initialState);
|
|
295
339
|
},
|
|
296
340
|
},
|
|
297
341
|
});
|
|
298
|
-
export const { fetchTreasuryFunds, fetchTreasurySetupView, fetchTreasurySetupViewSuccess, fetchTreasurySetupViewFailure, acceptTreasuryTerms, acceptTreasuryTermsSuccess, acceptTreasuryTermsFailure, clearTreasurySetupView, updateTreasuryFundsSuccess, updateTreasuryFundsFailure, updatePortfolioAllocation, updatePortfolioAllocationSuccess, updatePortfolioAllocationFailure, fetchPortfolioAllocation, fetchPortfolioAllocationSuccess, fetchPortfolioAllocationFailure, updateFundAllocationLocalData,
|
|
342
|
+
export const { fetchTreasuryFunds, fetchTreasurySetupView, fetchTreasurySetupViewSuccess, fetchTreasurySetupViewFailure, acceptTreasuryTerms, acceptTreasuryTermsSuccess, acceptTreasuryTermsFailure, clearTreasurySetupView, updateTreasuryFundsSuccess, updateTreasuryFundsFailure, updatePortfolioAllocation, updatePortfolioAllocationSuccess, updatePortfolioAllocationFailure, fetchPortfolioAllocation, fetchPortfolioAllocationSuccess, fetchPortfolioAllocationFailure, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoIntroClosedByOutsideClickFailure, updateTreasuryPromoIntroClosedByOutsideClickSuccess, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryPromoRemindMeLaterClickedFailure, updateTreasuryPromoRemindMeLaterClickedSuccess, updateTreasuryVideoViewed, updateTreasuryVideoViewedFailure, updateTreasuryVideoViewedSuccess, } = treasurySetupView.actions;
|
|
299
343
|
export default treasurySetupView.reducer;
|
|
300
344
|
function mapTreasuryFundsPayloadToFundData(fundsPayload) {
|
|
301
345
|
return fundsPayload.funds.map((fund) => ({
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import orderBy from 'lodash/orderBy';
|
|
2
|
+
import { stringToUnion } from '../../commonStateTypes/stringToUnion';
|
|
3
|
+
import { LINE_TYPE_LINKED, } from '../../entity/transaction/stateTypes/transactionLine';
|
|
4
|
+
/**
|
|
5
|
+
* View-model helpers for the new Journal Entry table view (see
|
|
6
|
+
* web-components `journalEntryTable`). Keeps presentation-agnostic
|
|
7
|
+
* logic — totals, sort, line-filter — colocated in epic-state so it
|
|
8
|
+
* is testable and reusable.
|
|
9
|
+
*/
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Sort keys
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
export const JOURNAL_ENTRY_SORT_KEYS = [
|
|
14
|
+
'description',
|
|
15
|
+
'name',
|
|
16
|
+
'category',
|
|
17
|
+
'class',
|
|
18
|
+
'debit',
|
|
19
|
+
'credit',
|
|
20
|
+
];
|
|
21
|
+
export const toJournalEntrySortKey = (v) => stringToUnion(v, JOURNAL_ENTRY_SORT_KEYS);
|
|
22
|
+
export const journalEntryDefaultSortConfig = {
|
|
23
|
+
sortKey: 'description',
|
|
24
|
+
sortOrder: 'ascending',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Sums the `amount.amount` field of every line and returns an `Amount`
|
|
28
|
+
* whose currencyCode/currencySymbol are taken from the first line.
|
|
29
|
+
* Returns `undefined` for an empty list, and also when the first line
|
|
30
|
+
* has no currency to carry — a stray bare number with no symbol is
|
|
31
|
+
* worse to render than nothing, so the caller is forced to handle the
|
|
32
|
+
* absence.
|
|
33
|
+
*
|
|
34
|
+
* **Precondition:** all input lines must share a currency. Journal
|
|
35
|
+
* entry lines on the same transaction always do, which is the only
|
|
36
|
+
* caller today. Mixed-currency input is summed numerically (no FX
|
|
37
|
+
* conversion) and tagged with the first line's currency, which will
|
|
38
|
+
* silently produce a wrong total — if this helper is ever reused for
|
|
39
|
+
* a cross-currency aggregate (e.g. a multi-transaction report), the
|
|
40
|
+
* caller must pre-group by currency before calling.
|
|
41
|
+
*
|
|
42
|
+
* Mirrors legacy `calculateTotal` in
|
|
43
|
+
* `web-components/src/components/transactionDetail/items/TransactionLinesJournalEntry.tsx`
|
|
44
|
+
* but without the `Object.assign` ceremony and with stable currency carry-over.
|
|
45
|
+
*/
|
|
46
|
+
export const sumJournalEntryAmounts = (lines) => {
|
|
47
|
+
if (lines.length === 0) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const first = lines[0].amount;
|
|
51
|
+
if (first?.currencyCode == null || first?.currencySymbol == null) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
let total = 0;
|
|
55
|
+
for (const line of lines) {
|
|
56
|
+
total += line.amount?.amount ?? 0;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
amount: total,
|
|
60
|
+
currencyCode: first.currencyCode,
|
|
61
|
+
currencySymbol: first.currencySymbol,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Splits `lines` by `postingType` into a single debit total and a
|
|
66
|
+
* single credit total — the shape the new flat-table totals row
|
|
67
|
+
* (`JournalEntryTotalsRow` in `web-components`, Figma frame
|
|
68
|
+
* `5177:12750`) needs.
|
|
69
|
+
*
|
|
70
|
+
* The legacy `TransactionLinesJournalEntry` grouped lines into six
|
|
71
|
+
* `JournalEntryItemType` buckets (`debit` / `uncategorizedDebit` /
|
|
72
|
+
* `miscategorizedDebit` plus the credit triplet) for *visual banner
|
|
73
|
+
* headers* in the line list; its bottom totals row was already two
|
|
74
|
+
* combined numbers. The new flat table folds those banners away by
|
|
75
|
+
* design, so we don't surface a per-status breakdown here. If the
|
|
76
|
+
* design ever asks for sub-totals per status, that's a richer shape
|
|
77
|
+
* (`{debit: {total, uncategorized, miscategorized}, credit: {…}}`)
|
|
78
|
+
* and a follow-up — not a v1 of this helper.
|
|
79
|
+
*
|
|
80
|
+
* As a side effect, the legacy `calculateCombinedTotalAmount`
|
|
81
|
+
* `??`/`+` precedence bug (`totalAmount?.amount ?? 0 + (uncat ?? 0) +
|
|
82
|
+
* (miscat ?? 0)` parses as `totalAmount?.amount ?? (0 + uncat +
|
|
83
|
+
* miscat)`, silently dropping the uncat/miscat pieces whenever
|
|
84
|
+
* `totalAmount` was non-nullish) is gone by construction here: there
|
|
85
|
+
* is no separate combine step, just one pass over the lines.
|
|
86
|
+
*/
|
|
87
|
+
export const journalEntryTotalsByPostingSide = (lines) => {
|
|
88
|
+
const debitLines = [];
|
|
89
|
+
const creditLines = [];
|
|
90
|
+
for (const line of lines) {
|
|
91
|
+
if (line.postingType === 'debit') {
|
|
92
|
+
debitLines.push(line);
|
|
93
|
+
}
|
|
94
|
+
else if (line.postingType === 'credit') {
|
|
95
|
+
creditLines.push(line);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
debitTotal: sumJournalEntryAmounts(debitLines),
|
|
100
|
+
creditTotal: sumJournalEntryAmounts(creditLines),
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
// Filter
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
/**
|
|
107
|
+
* Drops `linked_transaction_line` entries — equivalent to legacy
|
|
108
|
+
* `filterOutLinkedTransactionLine` in `transactionDetail.helpers.ts`.
|
|
109
|
+
*
|
|
110
|
+
* The literal lives in `LINE_TYPE_LINKED` next to `LineType` so the
|
|
111
|
+
* filter discriminant stays bound to the union at the type level.
|
|
112
|
+
* Other sites still inlining the literal (see `transactionDetailLocalDataHelper`,
|
|
113
|
+
* `transactionDetailState`, `transactionCategorizationLocalDataHelper`,
|
|
114
|
+
* `transactionLinePayload`, and the mocks) are a known follow-up.
|
|
115
|
+
*/
|
|
116
|
+
export const filterJournalEntryLinesExcludingLinked = (lines) => lines?.filter((line) => line.type !== LINE_TYPE_LINKED) ?? [];
|
|
117
|
+
const sortOrderToLodash = (sortOrder) => sortOrder === 'descending' ? 'desc' : 'asc';
|
|
118
|
+
/**
|
|
119
|
+
* Stable, accessor-driven sort over arbitrary line shapes. Lines that
|
|
120
|
+
* resolve to the same key value preserve their original relative order
|
|
121
|
+
* thanks to lodash's stable `orderBy`.
|
|
122
|
+
*
|
|
123
|
+
* Strings are lower-cased before comparison so the order is predictable
|
|
124
|
+
* across mixed-case data. Numbers (debit/credit) compare directly.
|
|
125
|
+
*/
|
|
126
|
+
export const sortJournalEntryLines = (lines, config, accessors) => {
|
|
127
|
+
const accessor = (line) => {
|
|
128
|
+
switch (config.sortKey) {
|
|
129
|
+
case 'description':
|
|
130
|
+
return accessors.description(line).toLowerCase();
|
|
131
|
+
case 'name':
|
|
132
|
+
return accessors.name(line).toLowerCase();
|
|
133
|
+
case 'category':
|
|
134
|
+
return accessors.category(line).toLowerCase();
|
|
135
|
+
case 'class':
|
|
136
|
+
return accessors.class(line).toLowerCase();
|
|
137
|
+
case 'debit':
|
|
138
|
+
return accessors.debit(line);
|
|
139
|
+
case 'credit':
|
|
140
|
+
return accessors.credit(line);
|
|
141
|
+
default:
|
|
142
|
+
// stringToUnion narrows permissively (returns `s as StringUnion` for
|
|
143
|
+
// non-member input, see commonStateTypes/stringToUnion.ts), so this
|
|
144
|
+
// branch is reachable at runtime — keep it as a description fallback.
|
|
145
|
+
return accessors.description(line).toLowerCase();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
return orderBy([...lines], [accessor], [sortOrderToLodash(config.sortOrder)]);
|
|
149
|
+
};
|
|
@@ -8,6 +8,7 @@ import { getVendorsByVendorIds } from '../../entity/vendor/vendorSelector';
|
|
|
8
8
|
import { dateNow } from '../../zeniDayJS';
|
|
9
9
|
import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/accountListSelector';
|
|
10
10
|
import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
|
|
11
|
+
import { getResolvedTransferAccounts } from '../createTransferEntry/createTransferEntrySelector';
|
|
11
12
|
import { getProjectList, } from '../projectList/projectListSelector';
|
|
12
13
|
import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
|
|
13
14
|
// "Any line on this transaction is fetching category/class recommendations?"
|
|
@@ -31,7 +32,7 @@ export const getDetailInFlightRecommendations = (state, transactionId) => {
|
|
|
31
32
|
return false;
|
|
32
33
|
};
|
|
33
34
|
export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
34
|
-
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
|
|
35
|
+
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, createTransferEntryState, projectState, projectListState, } = state;
|
|
35
36
|
const detailKey = getTransactionDetailKey(transactionId);
|
|
36
37
|
const transactionDetail = recordGet(transactionDetailState.transactionDetailById, detailKey);
|
|
37
38
|
let fetchState = {
|
|
@@ -98,6 +99,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
98
99
|
: [];
|
|
99
100
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
100
101
|
const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
|
|
102
|
+
const { transferAccountsList, creditCardTransferAccountsList } = getResolvedTransferAccounts(state);
|
|
101
103
|
const hasInFlightCategoryClassRecommendations = getDetailInFlightRecommendations(state, transactionId);
|
|
102
104
|
return {
|
|
103
105
|
reportId: 'transaction_detail',
|
|
@@ -116,6 +118,9 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
116
118
|
classList: classList,
|
|
117
119
|
hasInFlightCategoryClassRecommendations,
|
|
118
120
|
isAccountingClassesEnabled,
|
|
121
|
+
createTransferEntryStatus: createTransferEntryState.createTransferEntryStatus,
|
|
122
|
+
creditCardTransferAccountsList,
|
|
123
|
+
transferAccounts: transferAccountsList,
|
|
119
124
|
isAccountingProjectsEnabled,
|
|
120
125
|
projectList,
|
|
121
126
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|