@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS13
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 +19 -0
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
- package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +4 -0
- package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
- package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
- package/lib/commonStateTypes/common.d.ts +1 -1
- package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
- package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/account/accountPayload.d.ts +2 -0
- package/lib/entity/account/accountReducer.d.ts +5 -2
- package/lib/entity/account/accountReducer.js +13 -5
- package/lib/entity/account/accountSelector.d.ts +7 -0
- package/lib/entity/account/accountSelector.js +4 -2
- package/lib/entity/account/accountState.d.ts +3 -1
- package/lib/entity/account/accountState.js +4 -1
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
- package/lib/entity/account/subAccountSelector.d.ts +2 -0
- package/lib/entity/account/subAccountSelector.js +2 -0
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +4 -2
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +70 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +13 -0
- package/lib/entity/project/projectPayload.js +30 -0
- package/lib/entity/project/projectReducer.d.ts +10 -0
- package/lib/entity/project/projectReducer.js +31 -0
- package/lib/entity/project/projectSelector.d.ts +5 -0
- package/lib/entity/project/projectSelector.js +12 -0
- package/lib/entity/project/projectState.d.ts +13 -0
- package/lib/entity/project/projectState.js +2 -0
- 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 +13 -0
- package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
- package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +11 -0
- package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +15 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +64 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +57 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
- package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
- package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.js +10 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
- package/lib/entity/tenant/clearAllEpic.js +10 -0
- package/lib/entity/tenant/tenantPayload.d.ts +2 -0
- package/lib/entity/tenant/tenantReducer.d.ts +5 -2
- package/lib/entity/tenant/tenantReducer.js +10 -2
- package/lib/entity/tenant/tenantSelector.d.ts +2 -0
- package/lib/entity/tenant/tenantSelector.js +17 -1
- package/lib/entity/tenant/tenantState.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +11 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +114 -1
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +22 -2
- package/lib/epic.js +22 -2
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
- package/lib/esm/commonStateTypes/animations.js +4 -0
- package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
- package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
- package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/entity/account/accountReducer.js +12 -4
- package/lib/esm/entity/account/accountSelector.js +4 -2
- package/lib/esm/entity/account/accountState.js +4 -1
- package/lib/esm/entity/account/subAccountSelector.js +2 -0
- package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +64 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
- package/lib/esm/entity/project/projectPayload.js +26 -0
- package/lib/esm/entity/project/projectReducer.js +27 -0
- package/lib/esm/entity/project/projectSelector.js +8 -0
- package/lib/esm/entity/project/projectState.js +1 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +11 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +60 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +50 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +10 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
- package/lib/esm/entity/tenant/tenantReducer.js +9 -1
- package/lib/esm/entity/tenant/tenantSelector.js +14 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +114 -1
- package/lib/esm/epic.js +22 -2
- package/lib/esm/index.js +32 -19
- package/lib/esm/reducer.js +20 -2
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +152 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +77 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +76 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
- package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
- package/lib/esm/view/companyView/companyViewReducer.js +26 -1
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +1 -39
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -6
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +63 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +65 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +21 -5
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/helpers/bulkUploadTiming.js +16 -0
- package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +29 -6
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
- package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
- package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
- package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
- package/lib/index.d.ts +49 -26
- package/lib/index.js +107 -39
- package/lib/reducer.d.ts +20 -2
- package/lib/reducer.js +20 -2
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +33 -0
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +156 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +16 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +83 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +80 -0
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +8 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
- package/lib/view/companyView/companyViewReducer.d.ts +6 -1
- package/lib/view/companyView/companyViewReducer.js +28 -2
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -36
- package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +2 -2
- package/lib/view/creditAgentView/creditAgentViewReducer.js +2 -40
- package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
- package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -31
- package/lib/view/creditAgentView/creditAgentViewState.js +0 -6
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +67 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +69 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
- package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +20 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.d.ts +16 -0
- package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.js +19 -0
- package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +18 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +30 -7
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +5 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
- package/lib/view/financeStatement/financeStatementSelector.js +12 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
- package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
- package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
- package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
- package/package.json +1 -1
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
function removeSessionIdFromPageKeyMap(draft, sessionId) {
|
|
3
|
+
const map = draft.uiState.chatSessionIdByPageKey;
|
|
4
|
+
for (const key of Object.keys(map)) {
|
|
5
|
+
if (map[key] === sessionId) {
|
|
6
|
+
delete map[key];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function mirrorCurrentSessionToPageKeyMapIfActive(draft) {
|
|
11
|
+
const key = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
12
|
+
const sessionId = draft.uiState.currentChatSessionId;
|
|
13
|
+
if (key != null && sessionId != null) {
|
|
14
|
+
draft.uiState.chatSessionIdByPageKey[key] = sessionId;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
2
17
|
export const initialAiCfoViewState = {
|
|
3
18
|
fetchState: 'Not-Started',
|
|
4
19
|
error: undefined,
|
|
@@ -6,6 +21,8 @@ export const initialAiCfoViewState = {
|
|
|
6
21
|
currentInput: '',
|
|
7
22
|
scrollPositionByChatSessionId: {},
|
|
8
23
|
currentChatSessionId: undefined,
|
|
24
|
+
aiCfoSidePanelHostPageKey: undefined,
|
|
25
|
+
chatSessionIdByPageKey: {},
|
|
9
26
|
agentId: undefined,
|
|
10
27
|
chatHistoryNextPageToken: {},
|
|
11
28
|
chatSessionsNextPageToken: { nextPageToken: null, hasMore: false },
|
|
@@ -29,6 +46,7 @@ export const initialAiCfoViewState = {
|
|
|
29
46
|
fetchChatSessionHistoryByChatSessionId: {},
|
|
30
47
|
responseStateByChatSessionId: {},
|
|
31
48
|
stopSubmitStateByChatSessionId: {},
|
|
49
|
+
suggestedQuestionsByPageContext: {},
|
|
32
50
|
};
|
|
33
51
|
const aiCfoView = createSlice({
|
|
34
52
|
name: 'aiCfoView',
|
|
@@ -162,6 +180,7 @@ const aiCfoView = createSlice({
|
|
|
162
180
|
setSession(draft, action) {
|
|
163
181
|
draft.uiState.currentChatSessionId = action.payload.sessionId;
|
|
164
182
|
draft.uiState.agentId = action.payload.agentId;
|
|
183
|
+
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
165
184
|
},
|
|
166
185
|
createSession: {
|
|
167
186
|
reducer(draft, action) {
|
|
@@ -185,6 +204,7 @@ const aiCfoView = createSlice({
|
|
|
185
204
|
nextPageToken: null,
|
|
186
205
|
hasMore: false,
|
|
187
206
|
};
|
|
207
|
+
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
188
208
|
},
|
|
189
209
|
createSessionFailure(draft, action) {
|
|
190
210
|
draft.createSessionState.fetchState = 'Error';
|
|
@@ -222,6 +242,7 @@ const aiCfoView = createSlice({
|
|
|
222
242
|
nextPageToken: null,
|
|
223
243
|
hasMore: false,
|
|
224
244
|
};
|
|
245
|
+
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
225
246
|
},
|
|
226
247
|
createSessionAndSubmitSuccess(draft) {
|
|
227
248
|
// Note: currentChatSessionId, agentId, and chatHistoryNextPageToken are set by initializeNewSessionState
|
|
@@ -338,6 +359,7 @@ const aiCfoView = createSlice({
|
|
|
338
359
|
draft.uiState.currentChatSessionId = undefined;
|
|
339
360
|
draft.uiState.agentId = undefined;
|
|
340
361
|
}
|
|
362
|
+
removeSessionIdFromPageKeyMap(draft, chatSessionId);
|
|
341
363
|
delete draft.uiState.chatHistoryNextPageToken[chatSessionId];
|
|
342
364
|
delete draft.uiState.scrollPositionByChatSessionId[chatSessionId];
|
|
343
365
|
delete draft.fetchChatSessionHistoryByChatSessionId[chatSessionId];
|
|
@@ -360,6 +382,65 @@ const aiCfoView = createSlice({
|
|
|
360
382
|
},
|
|
361
383
|
clearCurrentSessionId(draft) {
|
|
362
384
|
draft.uiState.currentChatSessionId = undefined;
|
|
385
|
+
const key = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
386
|
+
if (key != null) {
|
|
387
|
+
delete draft.uiState.chatSessionIdByPageKey[key];
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
applyAiCfoSidePanelHostPageTransition(draft, action) {
|
|
391
|
+
const { newAiCfoSidePanelHostPageKey, nextCurrentChatSessionId } = action.payload;
|
|
392
|
+
const prevKey = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
393
|
+
const curId = draft.uiState.currentChatSessionId;
|
|
394
|
+
if (prevKey != null &&
|
|
395
|
+
prevKey !== newAiCfoSidePanelHostPageKey &&
|
|
396
|
+
curId != null) {
|
|
397
|
+
draft.uiState.chatSessionIdByPageKey[prevKey] = curId;
|
|
398
|
+
}
|
|
399
|
+
draft.uiState.aiCfoSidePanelHostPageKey = newAiCfoSidePanelHostPageKey;
|
|
400
|
+
draft.uiState.currentChatSessionId =
|
|
401
|
+
nextCurrentChatSessionId != null ? nextCurrentChatSessionId : undefined;
|
|
402
|
+
draft.uiState.currentInput = '';
|
|
403
|
+
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
404
|
+
},
|
|
405
|
+
clearAiCfoSidePanelHostPageContext(draft) {
|
|
406
|
+
const key = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
407
|
+
const curId = draft.uiState.currentChatSessionId;
|
|
408
|
+
if (key != null && curId != null) {
|
|
409
|
+
draft.uiState.chatSessionIdByPageKey[key] = curId;
|
|
410
|
+
}
|
|
411
|
+
draft.uiState.aiCfoSidePanelHostPageKey = undefined;
|
|
412
|
+
},
|
|
413
|
+
fetchSuggestedQuestions(draft, action) {
|
|
414
|
+
const { pageContext } = action.payload;
|
|
415
|
+
const prev = draft.suggestedQuestionsByPageContext[pageContext];
|
|
416
|
+
draft.suggestedQuestionsByPageContext[pageContext] = {
|
|
417
|
+
fetchState: 'In-Progress',
|
|
418
|
+
pageContext,
|
|
419
|
+
suggestedQuestions: prev?.suggestedQuestions ?? [],
|
|
420
|
+
generatedAt: prev?.generatedAt,
|
|
421
|
+
error: undefined,
|
|
422
|
+
};
|
|
423
|
+
},
|
|
424
|
+
fetchSuggestedQuestionsSuccess(draft, action) {
|
|
425
|
+
const { pageContext, generatedAt, suggestedQuestions } = action.payload;
|
|
426
|
+
draft.suggestedQuestionsByPageContext[pageContext] = {
|
|
427
|
+
fetchState: 'Completed',
|
|
428
|
+
pageContext,
|
|
429
|
+
generatedAt,
|
|
430
|
+
suggestedQuestions,
|
|
431
|
+
error: undefined,
|
|
432
|
+
};
|
|
433
|
+
},
|
|
434
|
+
fetchSuggestedQuestionsFailure(draft, action) {
|
|
435
|
+
const { pageContext, error } = action.payload;
|
|
436
|
+
const prev = draft.suggestedQuestionsByPageContext[pageContext];
|
|
437
|
+
draft.suggestedQuestionsByPageContext[pageContext] = {
|
|
438
|
+
fetchState: 'Error',
|
|
439
|
+
pageContext,
|
|
440
|
+
suggestedQuestions: prev?.suggestedQuestions ?? [],
|
|
441
|
+
generatedAt: prev?.generatedAt,
|
|
442
|
+
error,
|
|
443
|
+
};
|
|
363
444
|
},
|
|
364
445
|
clearAiCfoView(draft) {
|
|
365
446
|
Object.assign(draft, initialAiCfoViewState);
|
|
@@ -371,5 +452,5 @@ const aiCfoView = createSlice({
|
|
|
371
452
|
},
|
|
372
453
|
},
|
|
373
454
|
});
|
|
374
|
-
export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, clearInput, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, clearAiCfoView, updateCotCollapsedState, } = aiCfoView.actions;
|
|
455
|
+
export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, clearInput, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, clearAiCfoView, updateCotCollapsedState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } = aiCfoView.actions;
|
|
375
456
|
export default aiCfoView.reducer;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { initialAiCfoState } from '../../entity/aiCfo/aiCfoReducer';
|
|
1
2
|
import { getAiCfoSelectorView, } from '../../entity/aiCfo/aiCfoSelector';
|
|
3
|
+
import { initialAiCfoViewState } from './aiCfoViewReducer';
|
|
2
4
|
export const getAiCfoView = (state) => {
|
|
3
|
-
const { fetchState, error, uiState, createSessionState, createSessionAndSubmitState, deleteChatSessionStateByChatSessionId, stopSubmitStateByChatSessionId, responseStateByChatSessionId, fetchChatSessionHistoryByChatSessionId, masterTOSAcceptanceState, } = state.aiCfoViewState;
|
|
5
|
+
const { fetchState, error, uiState, createSessionState, createSessionAndSubmitState, deleteChatSessionStateByChatSessionId, stopSubmitStateByChatSessionId, responseStateByChatSessionId, fetchChatSessionHistoryByChatSessionId, masterTOSAcceptanceState, suggestedQuestionsByPageContext, } = state.aiCfoViewState ?? initialAiCfoViewState;
|
|
4
6
|
return {
|
|
5
7
|
fetchState,
|
|
6
8
|
error,
|
|
@@ -12,7 +14,11 @@ export const getAiCfoView = (state) => {
|
|
|
12
14
|
uiState,
|
|
13
15
|
fetchChatSessionHistoryByChatSessionId,
|
|
14
16
|
masterTOSAcceptanceState,
|
|
15
|
-
|
|
17
|
+
suggestedQuestionsByPageContext,
|
|
18
|
+
...getAiCfoSelectorView(state.aiCfoState ?? initialAiCfoState),
|
|
16
19
|
version: 1,
|
|
17
20
|
};
|
|
18
21
|
};
|
|
22
|
+
export function getSuggestedQuestionsForPageContext(state, pageContext) {
|
|
23
|
+
return state.aiCfoViewState?.suggestedQuestionsByPageContext?.[pageContext];
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
4
|
+
import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, } from '../aiCfoViewReducer';
|
|
5
|
+
/** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
|
|
6
|
+
export const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchSuggestedQuestions.match),
|
|
7
|
+
// mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
|
|
8
|
+
// would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
|
|
9
|
+
mergeMap((action) => {
|
|
10
|
+
const { pageContext } = action.payload;
|
|
11
|
+
const query = new URLSearchParams({ page_context: pageContext });
|
|
12
|
+
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
|
|
13
|
+
return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
|
|
14
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
15
|
+
return of(fetchSuggestedQuestionsSuccess({
|
|
16
|
+
pageContext,
|
|
17
|
+
generatedAt: response.data.generated_at,
|
|
18
|
+
suggestedQuestions: response.data.suggested_questions,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
return of(fetchSuggestedQuestionsFailure({
|
|
22
|
+
pageContext,
|
|
23
|
+
error: response.status,
|
|
24
|
+
}));
|
|
25
|
+
}), catchError((error) => of(fetchSuggestedQuestionsFailure({
|
|
26
|
+
pageContext,
|
|
27
|
+
error: createZeniAPIStatus('Unexpected Error', 'Fetch suggested questions REST API call failed', error instanceof Error ? { message: error.message } : undefined),
|
|
28
|
+
}))));
|
|
29
|
+
}));
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap, withLatestFrom, } from 'rxjs/operators';
|
|
3
3
|
import { updateClasses } from '../../entity/class/classReducer';
|
|
4
|
+
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
4
5
|
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
5
6
|
import { fetchClassList, updateClassList, updateClassListFailure, } from './classListReducer';
|
|
6
|
-
export const fetchClassListEpic = (actions$,
|
|
7
|
+
export const fetchClassListEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchClassList.match), withLatestFrom(state$), switchMap(([action, state]) => {
|
|
8
|
+
if (!getIsAccountingClassesEnabled(state)) {
|
|
9
|
+
return of(updateClassList({
|
|
10
|
+
status: createZeniAPIStatus('Success', ''),
|
|
11
|
+
data: { accounting_classes: [] },
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
7
14
|
const { isIncludeDeleted } = action.payload;
|
|
8
15
|
const queryParams = isIncludeDeleted === true
|
|
9
16
|
? `?query=${encodeURIComponent(JSON.stringify({ is_include_deleted: true }))}`
|
|
@@ -6,6 +6,7 @@ import { getContactsByIds } from '../../../entity/billPay/contact/contactSelecto
|
|
|
6
6
|
import { getClassById } from '../../../entity/class/classSelector';
|
|
7
7
|
import { getFilesByFileIds } from '../../../entity/file/fileSelector';
|
|
8
8
|
import { getPaymentInstrumentsByIds } from '../../../entity/paymentInstrument/paymentInstrumentSelector';
|
|
9
|
+
import { getIsAccountingClassesEnabled } from '../../../entity/tenant/tenantSelector';
|
|
9
10
|
import { getUserByUserId, getUsersByUserIds, } from '../../../entity/user/userSelector';
|
|
10
11
|
import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
|
|
11
12
|
import { getAccountList, getNestedAccountListHierarchy, } from '../../accountList/accountListSelector';
|
|
@@ -60,13 +61,17 @@ export const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
60
61
|
?.vendorDetailLocalData,
|
|
61
62
|
supportedCountries: billPayConfigState.vendor.supportedCountries,
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
65
|
+
const editFetchStateList = [
|
|
64
66
|
accountList,
|
|
65
|
-
classList,
|
|
66
67
|
vendorTypeListState,
|
|
67
68
|
vendorViewState.editVendorStateById[vendorIdFromUrl]?.fetchStatus ??
|
|
68
69
|
vendorViewInitialState.newVendorState.fetchStatus,
|
|
69
|
-
]
|
|
70
|
+
];
|
|
71
|
+
if (isAccountingClassesEnabled) {
|
|
72
|
+
editFetchStateList.push(classList);
|
|
73
|
+
}
|
|
74
|
+
fetchState = reduceFetchState(editFetchStateList);
|
|
70
75
|
}
|
|
71
76
|
else {
|
|
72
77
|
const basicVendorDetails = getBasicVendorDetailsForNewVendor(state, vendorViewState.newVendorState);
|
|
@@ -95,11 +100,17 @@ export const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
95
100
|
if (tentativeName != null) {
|
|
96
101
|
entityRecommendations = getRecommendationsForEntity(state, tentativeName, 'vendor');
|
|
97
102
|
}
|
|
103
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
98
104
|
const fetchStateList = [
|
|
99
105
|
{ fetchState: accountList.fetchState, error: accountList.error },
|
|
100
|
-
{ fetchState: classList.fetchState, error: classList.error },
|
|
101
106
|
vendorTypeListState,
|
|
102
107
|
];
|
|
108
|
+
if (isAccountingClassesEnabled) {
|
|
109
|
+
fetchStateList.push({
|
|
110
|
+
fetchState: classList.fetchState,
|
|
111
|
+
error: classList.error,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
103
114
|
if (entityRecommendations != null &&
|
|
104
115
|
entityRecommendations.recommendations != null &&
|
|
105
116
|
entityRecommendations.recommendations.length > 0) {
|
|
@@ -144,6 +155,7 @@ export const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
144
155
|
fetchState: fetchState.fetchState,
|
|
145
156
|
hasWireTransfer,
|
|
146
157
|
hasInternationalWireTransfer,
|
|
158
|
+
isAccountingClassesEnabled: getIsAccountingClassesEnabled(state),
|
|
147
159
|
deleteFileStatusById,
|
|
148
160
|
updateFileStatusById,
|
|
149
161
|
loggedInUserVerification,
|
|
@@ -219,9 +231,10 @@ const getBasicVendorDetailsForNewVendor = (state, newVendor) => {
|
|
|
219
231
|
};
|
|
220
232
|
export const getVendorDetailPageView = (state, vendorId, entity) => {
|
|
221
233
|
const trendWithTransactions = getTrendWithTransactions(state, entity, 'EntityDetail');
|
|
234
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
222
235
|
const reducedFetchState = reduceAnyFetchState([
|
|
223
236
|
state.accountListState.byReportId.accountList,
|
|
224
|
-
state.classListState,
|
|
237
|
+
...(isAccountingClassesEnabled ? [state.classListState] : []),
|
|
225
238
|
state.vendorTypeListState,
|
|
226
239
|
state.ownerListState,
|
|
227
240
|
state.vendorViewState.editVendorStateById[vendorId]?.fetchStatus ?? {
|
|
@@ -6,6 +6,7 @@ import { getAccountBase } from '../../../entity/account/accountSelector';
|
|
|
6
6
|
import { getAddressByAddressId } from '../../../entity/address/addressSelector';
|
|
7
7
|
import { getContactsByIds } from '../../../entity/billPay/contact/contactSelector';
|
|
8
8
|
import { getClassById } from '../../../entity/class/classSelector';
|
|
9
|
+
import { getIsAccountingClassesEnabled } from '../../../entity/tenant/tenantSelector';
|
|
9
10
|
import { getUserByUserId, getUsersByUserIds, } from '../../../entity/user/userSelector';
|
|
10
11
|
import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
|
|
11
12
|
import { dateNow } from '../../../zeniDayJS';
|
|
@@ -20,6 +21,7 @@ const ALL_VENDOR_DETAIL_TABS_TYPES = [
|
|
|
20
21
|
export const toVendorDetailTabsType = (v) => stringToUnion(v, ALL_VENDOR_DETAIL_TABS_TYPES);
|
|
21
22
|
export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
22
23
|
const { accountListState, accountState, classListState, classState, vendorState, userState, vendorsTabVendorViewState, vendorTypeListState, addressState, addressViewState, contactState, } = state;
|
|
24
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
23
25
|
const accountList = getAccountList(accountState, accountListState, 'accountList');
|
|
24
26
|
const classList = getClassList(classState, classListState);
|
|
25
27
|
const ownerList = getUsersByUserIds(state.userState, state.ownerListState.ownerIds);
|
|
@@ -51,7 +53,7 @@ export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
|
51
53
|
}
|
|
52
54
|
fetchState = reduceFetchState([
|
|
53
55
|
accountList,
|
|
54
|
-
classList,
|
|
56
|
+
...(isAccountingClassesEnabled ? [classList] : []),
|
|
55
57
|
vendorTypeListState,
|
|
56
58
|
vendorsTabVendorViewState.vendorStateById[vendorIdFromUrl]?.fetchStatus ?? {
|
|
57
59
|
fetchState: 'Not-Started',
|
|
@@ -62,6 +64,7 @@ export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
|
62
64
|
return {
|
|
63
65
|
accountList: accountList,
|
|
64
66
|
classList: classList,
|
|
67
|
+
isAccountingClassesEnabled,
|
|
65
68
|
vendorTypeList: vendorTypeList,
|
|
66
69
|
accountsHierarchyList,
|
|
67
70
|
classHierarchyList,
|
|
@@ -102,9 +105,10 @@ export const getVendorsTabDetailPageView = (state, vendorId, entity) => {
|
|
|
102
105
|
? getTransactionListByEntityForSinglePeriod(state, entity, state.vendorsTabVendorViewState.allTransactionsTabData
|
|
103
106
|
.numberOfQuartersFetched)
|
|
104
107
|
: undefined;
|
|
108
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
105
109
|
const reducedFetchState = reduceAnyFetchState([
|
|
106
110
|
state.accountListState.byReportId.accountList,
|
|
107
|
-
state.classListState,
|
|
111
|
+
...(isAccountingClassesEnabled ? [state.classListState] : []),
|
|
108
112
|
state.ownerListState,
|
|
109
113
|
state.vendorTypeListState,
|
|
110
114
|
state.vendorsTabVendorViewState.vendorStateById[vendorId]?.fetchStatus ?? {
|
|
@@ -5,10 +5,18 @@ export const initialUIState = {
|
|
|
5
5
|
sortOrder: 'descending',
|
|
6
6
|
pageToken: null,
|
|
7
7
|
};
|
|
8
|
+
const initialMetrics = {
|
|
9
|
+
closed: 0,
|
|
10
|
+
open: 0,
|
|
11
|
+
overdue: 0,
|
|
12
|
+
total: 0,
|
|
13
|
+
};
|
|
8
14
|
export const initialState = {
|
|
9
15
|
taskIds: [],
|
|
10
16
|
fetchState: 'Not-Started',
|
|
11
17
|
error: undefined,
|
|
18
|
+
metrics: initialMetrics,
|
|
19
|
+
metricsFetchState: 'Not-Started',
|
|
12
20
|
uiState: initialUIState,
|
|
13
21
|
hasValidState() {
|
|
14
22
|
return this.fetchState == 'Completed';
|
|
@@ -67,10 +75,20 @@ const companyTaskManagerView = createSlice({
|
|
|
67
75
|
return { payload: { error } };
|
|
68
76
|
},
|
|
69
77
|
},
|
|
78
|
+
fetchTaskManagerMetrics(draft) {
|
|
79
|
+
draft.metricsFetchState = 'In-Progress';
|
|
80
|
+
},
|
|
81
|
+
updateTaskManagerMetrics(draft, action) {
|
|
82
|
+
draft.metrics = action.payload;
|
|
83
|
+
draft.metricsFetchState = 'Completed';
|
|
84
|
+
},
|
|
85
|
+
updateTaskManagerMetricsOnFailure(draft) {
|
|
86
|
+
draft.metricsFetchState = 'Error';
|
|
87
|
+
},
|
|
70
88
|
clearCompanyTaskManagerView(draft) {
|
|
71
89
|
Object.assign(draft, initialState);
|
|
72
90
|
},
|
|
73
91
|
},
|
|
74
92
|
});
|
|
75
|
-
export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, clearCompanyTaskManagerView, } = companyTaskManagerView.actions;
|
|
93
|
+
export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView, } = companyTaskManagerView.actions;
|
|
76
94
|
export default companyTaskManagerView.reducer;
|
|
@@ -4,7 +4,7 @@ import { getTagsByIds } from '../../entity/tag/tagSelector';
|
|
|
4
4
|
import { getTaskById } from '../../entity/task/taskSelector';
|
|
5
5
|
import { getUserByUserId, getUsersByUserIds, } from '../../entity/user/userSelector';
|
|
6
6
|
export const getCompanyTaskManagerView = createSelector((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
|
|
7
|
-
const { taskIds, uiState, fetchState, error, totalTaskCount } = companyTaskManagerViewState;
|
|
7
|
+
const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
|
|
8
8
|
const tasksList = [];
|
|
9
9
|
taskIds.forEach((taskId) => {
|
|
10
10
|
const task = getTaskById(taskState, taskId);
|
|
@@ -27,6 +27,8 @@ export const getCompanyTaskManagerView = createSelector((state) => state.company
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
return {
|
|
30
|
+
metrics,
|
|
31
|
+
metricsFetchState,
|
|
30
32
|
tasksList,
|
|
31
33
|
uiState,
|
|
32
34
|
fetchState,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { isSuccessResponse, } from '../../../responsePayload';
|
|
4
|
+
import { fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, } from '../companyTaskManagerViewReducer';
|
|
5
|
+
export const fetchTaskManagerMetricsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchTaskManagerMetrics.match), switchMap(() => {
|
|
6
|
+
const query = JSON.stringify({ is_filter_by_logged_in_user: true });
|
|
7
|
+
return zeniAPI
|
|
8
|
+
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks-es-metrics?query=${encodeURIComponent(query)}`)
|
|
9
|
+
.pipe(mergeMap((response) => {
|
|
10
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
11
|
+
return of(updateTaskManagerMetrics(response.data.summary));
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return of(updateTaskManagerMetricsOnFailure());
|
|
15
|
+
}
|
|
16
|
+
}), catchError(() => of(updateTaskManagerMetricsOnFailure())));
|
|
17
|
+
}));
|
|
@@ -284,6 +284,31 @@ const companyView = createSlice({
|
|
|
284
284
|
error: status,
|
|
285
285
|
};
|
|
286
286
|
},
|
|
287
|
+
updateAccountingClassesEnabled: {
|
|
288
|
+
reducer(draft,
|
|
289
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
290
|
+
_action) {
|
|
291
|
+
draft.passportView.accountingClassesUpdateStatus = {
|
|
292
|
+
fetchState: 'In-Progress',
|
|
293
|
+
error: undefined,
|
|
294
|
+
};
|
|
295
|
+
},
|
|
296
|
+
prepare(companyId, enabled) {
|
|
297
|
+
return { payload: { companyId, enabled } };
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
updateAccountingClassesEnabledSuccess(draft) {
|
|
301
|
+
draft.passportView.accountingClassesUpdateStatus = {
|
|
302
|
+
fetchState: 'Completed',
|
|
303
|
+
error: undefined,
|
|
304
|
+
};
|
|
305
|
+
},
|
|
306
|
+
updateAccountingClassesEnabledFailure(draft, action) {
|
|
307
|
+
draft.passportView.accountingClassesUpdateStatus = {
|
|
308
|
+
fetchState: 'Error',
|
|
309
|
+
error: action.payload.status,
|
|
310
|
+
};
|
|
311
|
+
},
|
|
287
312
|
companyPassportUpdatePrimaryContact: {
|
|
288
313
|
reducer(draft, action) {
|
|
289
314
|
const { primaryContact } = action.payload;
|
|
@@ -557,5 +582,5 @@ const companyView = createSlice({
|
|
|
557
582
|
},
|
|
558
583
|
},
|
|
559
584
|
});
|
|
560
|
-
export const { fetchCompanyPassportView, fetchAllCockpitViews, fetchOnboardingView, fetchManagementView, fetchSubscriptionView, fetchPortfolioView, fetchCompanyManagementView, companyManagementSaveUpdates, companyManagementSavePendingUpdates, companyManagementDiscardUpdates, companyManagementSaveUpdatesSuccess, companyManagementSaveUpdatesFailure, updateCompanyViewOnSuccess, updateCompanyViewOnFailure, fetchCompanyPortfolioView, fetchZeniUsers, updateZeniUsersOnSuccess, updateZeniUsersOnFailure, clearCompanyView, updateCompanyPortfolioUIState, updateCompanyManagementUIState, companyPassportSaveDataInLocalStore, deleteCompanyOfficerInLocalStore, companyPassportClearDataInLocalStore, companyPassportUpdateCompanyDetails, companyPassportUpdateCompanyDetailsSuccess, companyPassportUpdateCompanyDetailsFailure, companyPassportUpdatePrimaryContact, companyPassportUpdatePrimaryContactSuccess, companyPassportUpdatePrimaryContactFailure, companyPassportUpdateCompanyOfficer, companyPassportUpdateCompanyOfficerSuccess, companyPassportUpdateCompanyOfficerFailure, companyPassportCreateCompanyOfficers, companyPassportCreateCompanyOfficersSuccess, companyPassportCreateCompanyOfficersFailure, updateCompanyPassportLocalStoreData, saveIndustryAndIncDateInCompanyPassportLocalStore, saveCompanyPassportDetails, fetchParentSubsidiaryManagementView, updateParentSubsidiaryView, updateParentSubsidiaryViewOnFailure, updateCompanyDownloadState, fetchCompanyMetaData, updateCompanyMetaDataOnSuccess, updateCompanyMetaDataOnFailure, updateMetaDataOnSendMonthEndReport, } = companyView.actions;
|
|
585
|
+
export const { fetchCompanyPassportView, fetchAllCockpitViews, fetchOnboardingView, fetchManagementView, fetchSubscriptionView, fetchPortfolioView, fetchCompanyManagementView, companyManagementSaveUpdates, companyManagementSavePendingUpdates, companyManagementDiscardUpdates, companyManagementSaveUpdatesSuccess, companyManagementSaveUpdatesFailure, updateCompanyViewOnSuccess, updateCompanyViewOnFailure, fetchCompanyPortfolioView, fetchZeniUsers, updateZeniUsersOnSuccess, updateZeniUsersOnFailure, clearCompanyView, updateCompanyPortfolioUIState, updateCompanyManagementUIState, companyPassportSaveDataInLocalStore, deleteCompanyOfficerInLocalStore, companyPassportClearDataInLocalStore, companyPassportUpdateCompanyDetails, companyPassportUpdateCompanyDetailsSuccess, companyPassportUpdateCompanyDetailsFailure, updateAccountingClassesEnabled, updateAccountingClassesEnabledSuccess, updateAccountingClassesEnabledFailure, companyPassportUpdatePrimaryContact, companyPassportUpdatePrimaryContactSuccess, companyPassportUpdatePrimaryContactFailure, companyPassportUpdateCompanyOfficer, companyPassportUpdateCompanyOfficerSuccess, companyPassportUpdateCompanyOfficerFailure, companyPassportCreateCompanyOfficers, companyPassportCreateCompanyOfficersSuccess, companyPassportCreateCompanyOfficersFailure, updateCompanyPassportLocalStoreData, saveIndustryAndIncDateInCompanyPassportLocalStore, saveCompanyPassportDetails, fetchParentSubsidiaryManagementView, updateParentSubsidiaryView, updateParentSubsidiaryViewOnFailure, updateCompanyDownloadState, fetchCompanyMetaData, updateCompanyMetaDataOnSuccess, updateCompanyMetaDataOnFailure, updateMetaDataOnSendMonthEndReport, } = companyView.actions;
|
|
561
586
|
export default companyView.reducer;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { updateCompanies } from '../../../../entity/company/companyReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { updateTenantAccountingClassesEnabled } from '../../../../entity/tenant/tenantReducer';
|
|
6
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
7
|
+
import { updateAccountingClassesEnabled, updateAccountingClassesEnabledFailure, updateAccountingClassesEnabledSuccess, } from '../../companyViewReducer';
|
|
8
|
+
export const updateAccountingClassesEnabledEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateAccountingClassesEnabled.match), switchMap((action) => {
|
|
9
|
+
const { companyId, enabled } = action.payload;
|
|
10
|
+
const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
|
|
11
|
+
return zeniAPI
|
|
12
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_classes_enabled: enabled })
|
|
13
|
+
.pipe(mergeMap((response) => {
|
|
14
|
+
const companies = response.data?.companies ?? [];
|
|
15
|
+
if (isSuccessResponse(response) && companies.length > 0) {
|
|
16
|
+
const actions = [
|
|
17
|
+
updateCompanies({
|
|
18
|
+
payload: companies,
|
|
19
|
+
schema: {},
|
|
20
|
+
}),
|
|
21
|
+
];
|
|
22
|
+
if (tenantId != null) {
|
|
23
|
+
actions.push(updateTenantAccountingClassesEnabled({
|
|
24
|
+
enabled,
|
|
25
|
+
tenantId,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
actions.push(updateAccountingClassesEnabledSuccess());
|
|
29
|
+
actions.push(openSnackbar({
|
|
30
|
+
messageSection: 'accounting_classes_enabled_update',
|
|
31
|
+
messageText: 'success',
|
|
32
|
+
type: 'success',
|
|
33
|
+
}));
|
|
34
|
+
return from(actions);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return from([
|
|
38
|
+
updateAccountingClassesEnabledFailure({
|
|
39
|
+
status: response.status,
|
|
40
|
+
}),
|
|
41
|
+
openSnackbar({
|
|
42
|
+
messageSection: 'accounting_classes_enabled_update',
|
|
43
|
+
messageText: 'failed',
|
|
44
|
+
type: 'error',
|
|
45
|
+
}),
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
}), catchError((error) => from([
|
|
49
|
+
updateAccountingClassesEnabledFailure({
|
|
50
|
+
status: createZeniAPIStatus('Unexpected error', 'Update Accounting Classes Enabled errored out' +
|
|
51
|
+
(error instanceof Error
|
|
52
|
+
? error.message
|
|
53
|
+
: JSON.stringify(error))),
|
|
54
|
+
}),
|
|
55
|
+
openSnackbar({
|
|
56
|
+
messageSection: 'accounting_classes_enabled_update',
|
|
57
|
+
messageText: 'failed',
|
|
58
|
+
type: 'error',
|
|
59
|
+
}),
|
|
60
|
+
])));
|
|
61
|
+
}));
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { initialCommonState } from '../commonState';
|
|
2
2
|
export const initialCompanyPassportView = {
|
|
3
3
|
...initialCommonState,
|
|
4
|
+
accountingClassesUpdateStatus: {
|
|
5
|
+
fetchState: 'Not-Started',
|
|
6
|
+
error: undefined,
|
|
7
|
+
},
|
|
4
8
|
companyDetails: {
|
|
5
9
|
localData: undefined,
|
|
6
10
|
updateStatus: {
|
|
@@ -16,44 +16,6 @@ const creditAgentView = createSlice({
|
|
|
16
16
|
draft.access.fetchState = 'Error';
|
|
17
17
|
draft.access.isAllowed = false;
|
|
18
18
|
},
|
|
19
|
-
fetchTenantCreditScoreReport(draft) {
|
|
20
|
-
draft.report.fetchState = 'In-Progress';
|
|
21
|
-
draft.report.error = undefined;
|
|
22
|
-
},
|
|
23
|
-
updateTenantCreditScoreReport(draft, action) {
|
|
24
|
-
draft.report.fetchState = 'Completed';
|
|
25
|
-
draft.report.error = undefined;
|
|
26
|
-
draft.report.rows = action.payload.report.map((row) => ({
|
|
27
|
-
customerName: row.customer_name,
|
|
28
|
-
totalCashBalance: row.total_cash_balance,
|
|
29
|
-
totalCardBalance: row.total_card_balance,
|
|
30
|
-
cards: row.cards,
|
|
31
|
-
controllerName: row.controller_name,
|
|
32
|
-
period: row.period,
|
|
33
|
-
runway: row.runway,
|
|
34
|
-
burnRateMonthly: row.burn_rate_monthly,
|
|
35
|
-
healthMonitorScore: row.health_monitor_score,
|
|
36
|
-
creditScore: row.credit_score,
|
|
37
|
-
confidence: row.confidence,
|
|
38
|
-
creditAmount: row.credit_amount,
|
|
39
|
-
creditLimit: row.credit_limit,
|
|
40
|
-
conservativeLimitRationale: row.conservative_limit_rationale,
|
|
41
|
-
liberalCreditLimit: row.liberal_credit_limit,
|
|
42
|
-
liberalLimitRationale: row.liberal_limit_rationale,
|
|
43
|
-
pros: row.pros,
|
|
44
|
-
cons: row.cons,
|
|
45
|
-
reasoning: row.reasoning,
|
|
46
|
-
goingConcernAnalysis: row.going_concern_analysis,
|
|
47
|
-
keyRatios: row.key_ratios,
|
|
48
|
-
runDate: row.run_date,
|
|
49
|
-
status: row.status,
|
|
50
|
-
}));
|
|
51
|
-
draft.report.count = action.payload.count;
|
|
52
|
-
},
|
|
53
|
-
updateTenantCreditScoreReportFailure(draft, action) {
|
|
54
|
-
draft.report.fetchState = 'Error';
|
|
55
|
-
draft.report.error = action.payload;
|
|
56
|
-
},
|
|
57
19
|
scheduleTenantCreditScoreCron(draft,
|
|
58
20
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
59
21
|
_action) {
|
|
@@ -178,6 +140,6 @@ function mapMacroPayload(payload) {
|
|
|
178
140
|
updatedAt: payload.updated_at,
|
|
179
141
|
};
|
|
180
142
|
}
|
|
181
|
-
export const { fetchCreditAgentAccess, fetchCreditAgentAccessCompleted, fetchCreditAgentAccessFailed,
|
|
143
|
+
export const { fetchCreditAgentAccess, fetchCreditAgentAccessCompleted, fetchCreditAgentAccessFailed, scheduleTenantCreditScoreCron, scheduleTenantCreditScoreCronSuccess, scheduleTenantCreditScoreCronFailure, resetScheduleCronState, fetchCreditAgentMacro, updateCreditAgentMacro, updateCreditAgentMacroFailure, saveCreditAgentMacro, saveCreditAgentMacroSuccess, saveCreditAgentMacroFailure, resetSaveMacroState, fetchCardProfiles, fetchCardProfilesCompleted, fetchCardProfilesFailed, updateCardProfile, updateCardProfileCompleted, updateCardProfileFailed, downloadCreditReport, downloadCreditReportCompleted, downloadCreditReportFailed, } = creditAgentView.actions;
|
|
182
144
|
export { initialCreditAgentViewState as initialState };
|
|
183
145
|
export default creditAgentView.reducer;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
2
|
const getCreditAgentViewState = (state) => state.creditAgentViewState;
|
|
3
|
-
export const getCreditAgentReport = createSelector(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.report);
|
|
4
3
|
export const getCreditAgentMacro = createSelector(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.macro);
|
|
5
4
|
export const getScheduleCronState = createSelector(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.scheduleCron);
|
|
6
5
|
export const getCardProfilesData = createSelector(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.cardProfiles);
|
|
@@ -15,12 +15,6 @@ export const initialCreditAgentViewState = {
|
|
|
15
15
|
fetchState: 'Not-Started',
|
|
16
16
|
updateState: 'Not-Started',
|
|
17
17
|
},
|
|
18
|
-
report: {
|
|
19
|
-
count: 0,
|
|
20
|
-
error: undefined,
|
|
21
|
-
fetchState: 'Not-Started',
|
|
22
|
-
rows: [],
|
|
23
|
-
},
|
|
24
18
|
scheduleCron: {
|
|
25
19
|
error: undefined,
|
|
26
20
|
fetchState: 'Not-Started',
|