@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS14
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 +8 -2
- package/lib/entity/tenant/clearAllEpic.js +12 -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 +12 -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 +74 -76
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +1 -28
- package/lib/esm/view/creditAgentView/epics/downloadCreditReportEpic.js +20 -17
- package/lib/esm/view/creditAgentView/epics/fetchCardProfilesEpic.js +5 -5
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +8 -8
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +7 -7
- package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +8 -3
- package/lib/esm/view/creditAgentView/epics/updateCardProfileEpic.js +5 -11
- 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/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +10 -3
- 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 +51 -28
- package/lib/index.js +117 -49
- 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 +20 -9
- package/lib/view/creditAgentView/creditAgentViewReducer.js +77 -79
- package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
- package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +5 -46
- package/lib/view/creditAgentView/creditAgentViewState.js +0 -29
- package/lib/view/creditAgentView/epics/downloadCreditReportEpic.d.ts +20 -5
- package/lib/view/creditAgentView/epics/downloadCreditReportEpic.js +21 -16
- package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.d.ts +4 -4
- package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.js +4 -4
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +6 -6
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +5 -5
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +5 -5
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +5 -5
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +8 -3
- package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +5 -5
- package/lib/view/creditAgentView/epics/updateCardProfileEpic.js +4 -10
- 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/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.d.ts +9 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +10 -3
- 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,31 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initialCreditAgentViewState = void 0;
|
|
4
|
-
exports.initialCreditAgentViewState = {
|
|
5
|
-
access: {
|
|
6
|
-
fetchState: 'Not-Started',
|
|
7
|
-
isAllowed: null,
|
|
8
|
-
},
|
|
9
|
-
cardProfiles: {
|
|
10
|
-
downloadState: 'Not-Started',
|
|
11
|
-
error: undefined,
|
|
12
|
-
fetchState: 'Not-Started',
|
|
13
|
-
rows: [],
|
|
14
|
-
},
|
|
15
|
-
macro: {
|
|
16
|
-
data: null,
|
|
17
|
-
error: undefined,
|
|
18
|
-
fetchState: 'Not-Started',
|
|
19
|
-
updateState: 'Not-Started',
|
|
20
|
-
},
|
|
21
|
-
report: {
|
|
22
|
-
count: 0,
|
|
23
|
-
error: undefined,
|
|
24
|
-
fetchState: 'Not-Started',
|
|
25
|
-
rows: [],
|
|
26
|
-
},
|
|
27
|
-
scheduleCron: {
|
|
28
|
-
error: undefined,
|
|
29
|
-
fetchState: 'Not-Started',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../reducer';
|
|
3
3
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { CardTenantProfileRow } from '../creditAgentViewState';
|
|
5
|
+
import { downloadCreditReport, downloadCreditReportFailure, downloadCreditReportSuccess } from '../creditAgentViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof downloadCreditReport> | ReturnType<typeof downloadCreditReportSuccess> | ReturnType<typeof downloadCreditReportFailure>;
|
|
7
|
+
export declare const CSV_HEADERS: string[];
|
|
8
|
+
export declare function rowToCsvLine(row: CardTenantProfileRow): string;
|
|
9
|
+
export declare function buildCsvString(rows: CardTenantProfileRow[]): string;
|
|
10
|
+
/**
|
|
11
|
+
* Epic: gather rows from state and emit downloadCreditReportSuccess with CSV data.
|
|
12
|
+
*
|
|
13
|
+
* This epic intentionally does NOT touch the DOM (no Blob, no document, no
|
|
14
|
+
* URL.createObjectURL). Those browser-only APIs would break SSR and React Native
|
|
15
|
+
* consumers of this shared package. The consuming web app should listen for
|
|
16
|
+
* downloadCreditReportSuccess and perform the actual file-save using its own
|
|
17
|
+
* platform-appropriate mechanism.
|
|
18
|
+
*/
|
|
6
19
|
export declare const downloadCreditReportEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, _zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
-
payload:
|
|
8
|
-
|
|
20
|
+
payload: {
|
|
21
|
+
csv: string;
|
|
22
|
+
};
|
|
23
|
+
type: "creditAgentView/downloadCreditReportSuccess";
|
|
9
24
|
} | {
|
|
10
25
|
payload: undefined;
|
|
11
|
-
type: "creditAgentView/
|
|
26
|
+
type: "creditAgentView/downloadCreditReportFailure";
|
|
12
27
|
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.downloadCreditReportEpic = void 0;
|
|
3
|
+
exports.downloadCreditReportEpic = exports.CSV_HEADERS = void 0;
|
|
4
|
+
exports.rowToCsvLine = rowToCsvLine;
|
|
5
|
+
exports.buildCsvString = buildCsvString;
|
|
4
6
|
const rxjs_1 = require("rxjs");
|
|
5
7
|
const operators_1 = require("rxjs/operators");
|
|
6
8
|
const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
|
|
7
|
-
|
|
9
|
+
exports.CSV_HEADERS = [
|
|
8
10
|
'Customer Name',
|
|
9
11
|
'Card Status',
|
|
10
12
|
'Credit Limit ($)',
|
|
@@ -40,24 +42,27 @@ function rowToCsvLine(row) {
|
|
|
40
42
|
})
|
|
41
43
|
.join(',');
|
|
42
44
|
}
|
|
45
|
+
function buildCsvString(rows) {
|
|
46
|
+
const csvLines = [exports.CSV_HEADERS.join(','), ...rows.map(rowToCsvLine)];
|
|
47
|
+
return csvLines.join('\n');
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Epic: gather rows from state and emit downloadCreditReportSuccess with CSV data.
|
|
51
|
+
*
|
|
52
|
+
* This epic intentionally does NOT touch the DOM (no Blob, no document, no
|
|
53
|
+
* URL.createObjectURL). Those browser-only APIs would break SSR and React Native
|
|
54
|
+
* consumers of this shared package. The consuming web app should listen for
|
|
55
|
+
* downloadCreditReportSuccess and perform the actual file-save using its own
|
|
56
|
+
* platform-appropriate mechanism.
|
|
57
|
+
*/
|
|
43
58
|
const downloadCreditReportEpic = (actions$, state$, _zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.downloadCreditReport.match), (0, operators_1.switchMap)(() => {
|
|
44
59
|
try {
|
|
45
60
|
const rows = state$.value.creditAgentViewState.cardProfiles.rows;
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
|
|
49
|
-
const objectUrl = URL.createObjectURL(blob);
|
|
50
|
-
const link = document.createElement('a');
|
|
51
|
-
link.href = objectUrl;
|
|
52
|
-
link.setAttribute('download', 'card-tenant-profiles.csv');
|
|
53
|
-
document.body.appendChild(link);
|
|
54
|
-
link.click();
|
|
55
|
-
document.body.removeChild(link);
|
|
56
|
-
URL.revokeObjectURL(objectUrl);
|
|
57
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.downloadCreditReportCompleted)());
|
|
61
|
+
const csv = buildCsvString(rows);
|
|
62
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.downloadCreditReportSuccess)(csv));
|
|
58
63
|
}
|
|
59
64
|
catch {
|
|
60
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
65
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.downloadCreditReportFailure)());
|
|
61
66
|
}
|
|
62
|
-
}), (0, operators_1.catchError)(() => (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
67
|
+
}), (0, operators_1.catchError)(() => (0, rxjs_1.of)((0, creditAgentViewReducer_1.downloadCreditReportFailure)())));
|
|
63
68
|
exports.downloadCreditReportEpic = downloadCreditReportEpic;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../reducer';
|
|
3
3
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import { fetchCardProfiles,
|
|
5
|
-
export type ActionType = ReturnType<typeof fetchCardProfiles> | ReturnType<typeof
|
|
4
|
+
import { fetchCardProfiles, fetchCardProfilesFailure, fetchCardProfilesSuccess } from '../creditAgentViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof fetchCardProfiles> | ReturnType<typeof fetchCardProfilesSuccess> | ReturnType<typeof fetchCardProfilesFailure>;
|
|
6
6
|
export declare const fetchCardProfilesEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: import("../creditAgentViewState").CardTenantProfileRow[];
|
|
8
|
-
type: "creditAgentView/
|
|
8
|
+
type: "creditAgentView/fetchCardProfilesSuccess";
|
|
9
9
|
} | {
|
|
10
10
|
payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
11
|
-
type: "creditAgentView/
|
|
11
|
+
type: "creditAgentView/fetchCardProfilesFailure";
|
|
12
12
|
}>;
|
|
@@ -8,13 +8,13 @@ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
|
|
|
8
8
|
const fetchCardProfilesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.fetchCardProfiles.match), (0, operators_1.switchMap)(() => {
|
|
9
9
|
const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cockpit/card-tenant-profiles`;
|
|
10
10
|
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
11
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)
|
|
11
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
12
12
|
const rows = (response.data.rows ?? []).map(creditAgentViewReducer_1.mapCardTenantProfileRowPayload);
|
|
13
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
13
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCardProfilesSuccess)(rows));
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
16
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCardProfilesFailure)(response.status));
|
|
17
17
|
}
|
|
18
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
18
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCardProfilesFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
|
|
19
19
|
}));
|
|
20
20
|
exports.fetchCardProfilesEpic = fetchCardProfilesEpic;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../reducer';
|
|
3
3
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import { fetchCreditAgentAccess,
|
|
5
|
-
export type ActionType = ReturnType<typeof fetchCreditAgentAccess> | ReturnType<typeof
|
|
6
|
-
export declare const fetchCreditAgentAccessEpic: (actions$: ActionsObservable<ActionType>,
|
|
4
|
+
import { fetchCreditAgentAccess, fetchCreditAgentAccessFailure, fetchCreditAgentAccessSuccess } from '../creditAgentViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof fetchCreditAgentAccess> | ReturnType<typeof fetchCreditAgentAccessSuccess> | ReturnType<typeof fetchCreditAgentAccessFailure>;
|
|
6
|
+
export declare const fetchCreditAgentAccessEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: boolean;
|
|
8
|
-
type: "creditAgentView/
|
|
8
|
+
type: "creditAgentView/fetchCreditAgentAccessSuccess";
|
|
9
9
|
} | {
|
|
10
|
-
payload:
|
|
11
|
-
type: "creditAgentView/
|
|
10
|
+
payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
11
|
+
type: "creditAgentView/fetchCreditAgentAccessFailure";
|
|
12
12
|
}>;
|
|
@@ -5,13 +5,13 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
|
|
8
|
-
const fetchCreditAgentAccessEpic = (actions$,
|
|
8
|
+
const fetchCreditAgentAccessEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.fetchCreditAgentAccess.match), (0, operators_1.withLatestFrom)(state$), (0, operators_1.filter)(([, state]) => state.creditAgentViewState.access.fetchState !== 'In-Progress'), (0, operators_1.switchMap)(() => {
|
|
9
9
|
const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cockpit/cards-cockpit-access`;
|
|
10
10
|
return zeniAPI.getJSON(url).pipe((0, operators_1.switchMap)((response) => {
|
|
11
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)
|
|
12
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
11
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
12
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentAccessSuccess)(response.data.is_allowed === true));
|
|
13
13
|
}
|
|
14
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
15
|
-
}), (0, operators_1.catchError)(() => (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
14
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentAccessFailure)(response.status));
|
|
15
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentAccessFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
|
|
16
16
|
}));
|
|
17
17
|
exports.fetchCreditAgentAccessEpic = fetchCreditAgentAccessEpic;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../reducer';
|
|
3
3
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import { fetchCreditAgentMacro,
|
|
5
|
-
export type ActionType = ReturnType<typeof fetchCreditAgentMacro> | ReturnType<typeof
|
|
6
|
-
export declare const fetchCreditAgentMacroEpic: (actions$: ActionsObservable<ActionType>,
|
|
4
|
+
import { fetchCreditAgentMacro, fetchCreditAgentMacroFailure, fetchCreditAgentMacroSuccess } from '../creditAgentViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof fetchCreditAgentMacro> | ReturnType<typeof fetchCreditAgentMacroSuccess> | ReturnType<typeof fetchCreditAgentMacroFailure>;
|
|
6
|
+
export declare const fetchCreditAgentMacroEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: import("../creditAgentViewPayload").MacroPayload;
|
|
8
|
-
type: "creditAgentView/
|
|
8
|
+
type: "creditAgentView/fetchCreditAgentMacroSuccess";
|
|
9
9
|
} | {
|
|
10
10
|
payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
11
|
-
type: "creditAgentView/
|
|
11
|
+
type: "creditAgentView/fetchCreditAgentMacroFailure";
|
|
12
12
|
}>;
|
|
@@ -5,15 +5,15 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
|
|
8
|
-
const fetchCreditAgentMacroEpic = (actions$,
|
|
8
|
+
const fetchCreditAgentMacroEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.fetchCreditAgentMacro.match), (0, operators_1.withLatestFrom)(state$), (0, operators_1.filter)(([, state]) => state.creditAgentViewState.macro.fetchState !== 'In-Progress'), (0, operators_1.switchMap)(() => {
|
|
9
9
|
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/macros/credit-agent`;
|
|
10
10
|
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
11
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)
|
|
12
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
11
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
12
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentMacroSuccess)(response.data));
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
15
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentMacroFailure)(response.status));
|
|
16
16
|
}
|
|
17
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
17
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentMacroFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
|
|
18
18
|
}));
|
|
19
19
|
exports.fetchCreditAgentMacroEpic = fetchCreditAgentMacroEpic;
|
|
@@ -8,14 +8,19 @@ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
|
|
|
8
8
|
const saveCreditAgentMacroEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.saveCreditAgentMacro.match), (0, operators_1.switchMap)((action) => {
|
|
9
9
|
const { instructions } = action.payload;
|
|
10
10
|
const existingMacro = state$.value.creditAgentViewState.macro.data;
|
|
11
|
+
// Fail fast if macro has not been loaded yet — avoids overwriting server-side
|
|
12
|
+
// name/description fields with empty defaults.
|
|
13
|
+
if (existingMacro == null) {
|
|
14
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.saveCreditAgentMacroFailure)((0, responsePayload_1.createZeniAPIStatus)('Save failed', 'Cannot save macro: macro data has not been loaded yet.')));
|
|
15
|
+
}
|
|
11
16
|
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/macros/credit-agent`;
|
|
12
17
|
const body = {
|
|
13
18
|
instructions,
|
|
14
|
-
name: existingMacro
|
|
15
|
-
description: existingMacro
|
|
19
|
+
name: existingMacro.name,
|
|
20
|
+
description: existingMacro.description,
|
|
16
21
|
};
|
|
17
22
|
return zeniAPI.putAndGetJSON(url, body).pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)
|
|
23
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
19
24
|
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.saveCreditAgentMacroSuccess)(response.data));
|
|
20
25
|
}
|
|
21
26
|
else {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../reducer';
|
|
3
3
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import { updateCardProfile,
|
|
5
|
-
export type ActionType = ReturnType<typeof updateCardProfile> | ReturnType<typeof
|
|
4
|
+
import { updateCardProfile, updateCardProfileFailure, updateCardProfileSuccess } from '../creditAgentViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof updateCardProfile> | ReturnType<typeof updateCardProfileSuccess> | ReturnType<typeof updateCardProfileFailure>;
|
|
6
6
|
export declare const updateCardProfileEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: {
|
|
8
|
-
profile:
|
|
8
|
+
profile: import("../creditAgentViewState").CardTenantProfileRow;
|
|
9
9
|
tenantNamespace: string;
|
|
10
10
|
};
|
|
11
|
-
type: "creditAgentView/
|
|
11
|
+
type: "creditAgentView/updateCardProfileSuccess";
|
|
12
12
|
} | {
|
|
13
13
|
payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
14
|
-
type: "creditAgentView/
|
|
14
|
+
type: "creditAgentView/updateCardProfileFailure";
|
|
15
15
|
}>;
|
|
@@ -26,20 +26,14 @@ const updateCardProfileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
|
|
|
26
26
|
return zeniAPI.putAndGetJSON(url, body).pipe((0, operators_1.mergeMap)((response) => {
|
|
27
27
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data?.profile != null) {
|
|
28
28
|
const mapped = (0, creditAgentViewReducer_1.mapCardTenantProfileRowPayload)(response.data.profile);
|
|
29
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
30
|
-
profile:
|
|
31
|
-
cardStatus: mapped.cardStatus,
|
|
32
|
-
creditLimit: mapped.creditLimit,
|
|
33
|
-
updatedByName: mapped.updatedByName,
|
|
34
|
-
updatedByUserId: mapped.updatedByUserId,
|
|
35
|
-
updatedOn: mapped.updatedOn,
|
|
36
|
-
},
|
|
29
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.updateCardProfileSuccess)({
|
|
30
|
+
profile: mapped,
|
|
37
31
|
tenantNamespace,
|
|
38
32
|
}));
|
|
39
33
|
}
|
|
40
34
|
else {
|
|
41
|
-
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
35
|
+
return (0, rxjs_1.of)((0, creditAgentViewReducer_1.updateCardProfileFailure)(response.status));
|
|
42
36
|
}
|
|
43
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.
|
|
37
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.updateCardProfileFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
|
|
44
38
|
}));
|
|
45
39
|
exports.updateCardProfileEpic = updateCardProfileEpic;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[] | undefined], {
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
tenantId: string;
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[];
|
|
9
|
+
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation")[];
|
|
10
10
|
}, "dashboard/fetchDashboard", never, never>, updateTreasuryVideoClosed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/updateTreasuryVideoClosed">, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { changeAccountKey } from '../../../../entity/account/accountReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { RootState } from '../../../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
7
|
+
import { excludeAccountFromReconciliation, excludeAccountFromReconciliationFailure, excludeAccountFromReconciliationSuccess } from '../../reducers/reconciliationViewReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof excludeAccountFromReconciliation> | ReturnType<typeof changeAccountKey> | ReturnType<typeof excludeAccountFromReconciliationSuccess> | ReturnType<typeof excludeAccountFromReconciliationFailure> | ReturnType<typeof openSnackbar>;
|
|
9
|
+
export declare const excludeAccountFromReconciliationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.excludeAccountFromReconciliationEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const accountReducer_1 = require("../../../../entity/account/accountReducer");
|
|
7
|
+
const accountState_1 = require("../../../../entity/account/accountState");
|
|
8
|
+
const accountReconSelector_1 = require("../../../../entity/accountRecon/accountReconSelector");
|
|
9
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
10
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
11
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
12
|
+
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
13
|
+
const excludeAccountFromReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.excludeAccountFromReconciliation.match), (0, operators_1.mergeMap)((action) => {
|
|
14
|
+
const { accountId } = action.payload;
|
|
15
|
+
const state = state$.value;
|
|
16
|
+
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
17
|
+
const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
|
|
18
|
+
const reconciliationData = (0, accountReconSelector_1.getAccountReconByAccountIdAndSelectedPeriod)(state, accountId, selectedPeriod);
|
|
19
|
+
const payload = {
|
|
20
|
+
account_id: accountId,
|
|
21
|
+
bank_balance: reconciliationData?.balance?.amount ?? null,
|
|
22
|
+
cleared_balance: reconciliationData?.clearedBalance?.amount ?? null,
|
|
23
|
+
variance: reconciliationData?.variance?.amount ?? null,
|
|
24
|
+
};
|
|
25
|
+
const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts`;
|
|
26
|
+
return zeniAPI
|
|
27
|
+
.postAndGetJSON(apiUrl, payload)
|
|
28
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
29
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
30
|
+
const newAccountKey = (0, accountState_1.getAccountKey)('excluded_account_reconciliation', accountId);
|
|
31
|
+
const oldAccountKey = (0, accountState_1.getAccountKey)('account_reconciliation', accountId);
|
|
32
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationSuccess)({
|
|
33
|
+
account: response.data?.excluded_account ?? undefined,
|
|
34
|
+
selectedPeriod,
|
|
35
|
+
}), (0, accountReducer_1.changeAccountKey)({
|
|
36
|
+
oldKey: oldAccountKey,
|
|
37
|
+
newKey: newAccountKey,
|
|
38
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
39
|
+
messageSection: 'account_excluded_from_reconciliation',
|
|
40
|
+
messageText: 'success',
|
|
41
|
+
type: 'success',
|
|
42
|
+
variables: [
|
|
43
|
+
{
|
|
44
|
+
variableName: '_account-name_',
|
|
45
|
+
variableValue: reconciliationData?.account.accountName ?? '',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationFailure)({
|
|
52
|
+
error: response.status,
|
|
53
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
54
|
+
messageSection: 'account_excluded_from_reconciliation',
|
|
55
|
+
messageText: 'failed',
|
|
56
|
+
type: 'error',
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationFailure)({
|
|
60
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Exclude account from reconciliation REST API call errored out ${JSON.stringify(error)}`),
|
|
61
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
62
|
+
messageSection: 'account_excluded_from_reconciliation',
|
|
63
|
+
messageText: 'failed',
|
|
64
|
+
type: 'error',
|
|
65
|
+
}))));
|
|
66
|
+
}));
|
|
67
|
+
exports.excludeAccountFromReconciliationEpic = excludeAccountFromReconciliationEpic;
|
|
@@ -56,22 +56,17 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
56
56
|
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.mergeMap)((response) => {
|
|
57
57
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
58
58
|
const updateActions = [];
|
|
59
|
-
|
|
60
|
-
updateActions.push((0, userReducer_1.updateAllUsers)({
|
|
59
|
+
const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
|
|
60
|
+
updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'), (0, accountReducer_1.updateAccounts)(response.data.excluded_accounts ?? [], 'excluded_account_reconciliation'), (0, userReducer_1.updateAllUsers)({
|
|
61
61
|
users: response.data.users ?? [],
|
|
62
62
|
updateType: 'merge',
|
|
63
|
-
}));
|
|
64
|
-
updateActions.push((0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }));
|
|
65
|
-
const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
|
|
66
|
-
updateActions.push((0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'));
|
|
67
|
-
updateActions.push((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
|
|
63
|
+
}), (0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }), (0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'), (0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
|
|
68
64
|
const reviewTabLocalData = (0, exports.prepareReviewTabLocalData)(response.data.reconciliation[0]?.transactions?.review ?? []);
|
|
69
65
|
if (accountId != null) {
|
|
70
66
|
const selectedTransactionIds = (0, saveReconciliationDetailEpic_1.getTransactionIdFromCheckedMatchedTransactionPayload)(response.data.reconciliation[0].transactions.reconcile);
|
|
71
67
|
updateActions.push((0, reconciliationViewReducer_1.updateReconcileTabLocalData)({
|
|
72
68
|
selectedTransactionIds: selectedTransactionIds,
|
|
73
|
-
}));
|
|
74
|
-
updateActions.push((0, reconciliationViewReducer_1.initializeReconciliationReviewTabLocalData)(reviewTabLocalData));
|
|
69
|
+
}), (0, reconciliationViewReducer_1.initializeReconciliationReviewTabLocalData)(reviewTabLocalData));
|
|
75
70
|
}
|
|
76
71
|
updateActions.push((0, reconciliationViewReducer_1.fetchReconciliationSuccess)(selectedPeriod, response.data, refreshViewInBackground, accountId));
|
|
77
72
|
return (0, rxjs_1.from)(updateActions);
|
package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { changeAccountKey } from '../../../../entity/account/accountReducer';
|
|
4
|
+
import { updateAccountRecon } from '../../../../entity/accountRecon/accountReconReducer';
|
|
5
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
6
|
+
import { RootState } from '../../../../reducer';
|
|
7
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
8
|
+
import { includeAccountInReconciliation, includeAccountInReconciliationFailure, includeAccountInReconciliationSuccess } from '../../reducers/reconciliationViewReducer';
|
|
9
|
+
export type ActionType = ReturnType<typeof includeAccountInReconciliation> | ReturnType<typeof includeAccountInReconciliationSuccess> | ReturnType<typeof includeAccountInReconciliationFailure> | ReturnType<typeof changeAccountKey> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateAccountRecon>;
|
|
10
|
+
export declare const includeAccountInReconciliationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.includeAccountInReconciliationEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
7
|
+
const accountReducer_1 = require("../../../../entity/account/accountReducer");
|
|
8
|
+
const accountSelector_1 = require("../../../../entity/account/accountSelector");
|
|
9
|
+
const accountState_1 = require("../../../../entity/account/accountState");
|
|
10
|
+
const accountReconReducer_1 = require("../../../../entity/accountRecon/accountReconReducer");
|
|
11
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
12
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
13
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
14
|
+
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
15
|
+
const includeAccountInReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.includeAccountInReconciliation.match), (0, operators_1.mergeMap)((action) => {
|
|
16
|
+
const { accountId } = action.payload;
|
|
17
|
+
const state = state$.value;
|
|
18
|
+
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
19
|
+
const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
|
|
20
|
+
const account = (0, accountSelector_1.getAccountBase)(state.accountState, accountId, 'excluded_account_reconciliation');
|
|
21
|
+
const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod, true);
|
|
22
|
+
const query = JSON.stringify({
|
|
23
|
+
start_date: period.start,
|
|
24
|
+
end_date: period.end,
|
|
25
|
+
});
|
|
26
|
+
const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts/${accountId}?query=${encodeURIComponent(query)}`;
|
|
27
|
+
return zeniAPI
|
|
28
|
+
.deleteAndGetJSON(apiUrl)
|
|
29
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
30
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
31
|
+
const reconciliation = response.data.reconciliation;
|
|
32
|
+
const oldAccountKey = (0, accountState_1.getAccountKey)('excluded_account_reconciliation', reconciliation.account_id);
|
|
33
|
+
const newAccountKey = (0, accountState_1.getAccountKey)('account_reconciliation', reconciliation.account_id);
|
|
34
|
+
return (0, rxjs_1.of)((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, [reconciliation]), (0, reconciliationViewReducer_1.includeAccountInReconciliationSuccess)({
|
|
35
|
+
reconciliation,
|
|
36
|
+
selectedPeriod,
|
|
37
|
+
}), (0, accountReducer_1.changeAccountKey)({
|
|
38
|
+
oldKey: oldAccountKey,
|
|
39
|
+
newKey: newAccountKey,
|
|
40
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
41
|
+
messageSection: 'account_included_in_reconciliation',
|
|
42
|
+
messageText: 'success',
|
|
43
|
+
type: 'success',
|
|
44
|
+
variables: [
|
|
45
|
+
{
|
|
46
|
+
variableName: '_account-name_',
|
|
47
|
+
variableValue: account?.accountName ?? '',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.includeAccountInReconciliationFailure)({
|
|
54
|
+
error: response.status,
|
|
55
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
56
|
+
messageSection: 'account_included_in_reconciliation',
|
|
57
|
+
messageText: 'failed',
|
|
58
|
+
type: 'error',
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.includeAccountInReconciliationFailure)({
|
|
62
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Include account in reconciliation REST API call errored out ${JSON.stringify(error)}`),
|
|
63
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
64
|
+
messageSection: 'account_included_in_reconciliation',
|
|
65
|
+
messageText: 'failed',
|
|
66
|
+
type: 'error',
|
|
67
|
+
}))));
|
|
68
|
+
}));
|
|
69
|
+
exports.includeAccountInReconciliationEpic = includeAccountInReconciliationEpic;
|
|
@@ -24,13 +24,13 @@ const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
|
|
|
24
24
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
25
25
|
const updateActions = [];
|
|
26
26
|
updateActions.push((0, jeSchedulesReducer_1.updateJESchedules)([
|
|
27
|
-
...response.data.
|
|
27
|
+
...response.data.je_schedules,
|
|
28
28
|
...response.data.failed_je_postings.je_schedules,
|
|
29
29
|
]), (0, jeSchedulesReducer_1.updateJESchedulesDetails)([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), (0, jeSchedulesViewReducer_1.initializeJeScheduleLocalData)([
|
|
30
30
|
...response.data.failed_je_postings.je_schedules,
|
|
31
31
|
]));
|
|
32
32
|
updateActions.push((0, jeSchedulesViewReducer_1.fetchJeSchedulesSuccess)({
|
|
33
|
-
jeSchedules: [...response.data.
|
|
33
|
+
jeSchedules: [...response.data.je_schedules],
|
|
34
34
|
failedJeSchedules: [
|
|
35
35
|
...response.data.failed_je_postings.je_schedules,
|
|
36
36
|
],
|
package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActionsObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
|
+
import { bulkUploadReceiptsSuccess, clearBulkUpload, fetchBulkUploadBatchDetailsSuccess, restoreBulkUploadMatchingState, storeBatchDetails } from '../../reducers/missingReceiptsViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof bulkUploadReceiptsSuccess> | ReturnType<typeof restoreBulkUploadMatchingState> | ReturnType<typeof fetchBulkUploadBatchDetailsSuccess> | ReturnType<typeof storeBatchDetails> | ReturnType<typeof clearBulkUpload> | ReturnType<typeof openSnackbar>;
|
|
6
|
+
/**
|
|
7
|
+
* Show a success toast when batch details arrive for the current upload batch,
|
|
8
|
+
* e.g. "17 out of 20 Receipts Matched". Scoped per upload session so it fires
|
|
9
|
+
* only once: starts on `bulkUploadReceiptsSuccess` (or `restoreBulkUploadMatchingState`
|
|
10
|
+
* for a restored session), waits for the first batch-details action for that batch,
|
|
11
|
+
* emits the toast, then stops. `clearBulkUpload` cancels the in-flight wait.
|
|
12
|
+
*/
|
|
13
|
+
export declare const bulkUploadMatchResultToastEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
|
package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bulkUploadMatchResultToastEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
7
|
+
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
8
|
+
/**
|
|
9
|
+
* Show a success toast when batch details arrive for the current upload batch,
|
|
10
|
+
* e.g. "17 out of 20 Receipts Matched". Scoped per upload session so it fires
|
|
11
|
+
* only once: starts on `bulkUploadReceiptsSuccess` (or `restoreBulkUploadMatchingState`
|
|
12
|
+
* for a restored session), waits for the first batch-details action for that batch,
|
|
13
|
+
* emits the toast, then stops. `clearBulkUpload` cancels the in-flight wait.
|
|
14
|
+
*/
|
|
15
|
+
const bulkUploadMatchResultToastEpic = (actions$) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
|
|
16
|
+
missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.switchMap)((uploadAction) => {
|
|
17
|
+
const { batchId } = uploadAction.payload;
|
|
18
|
+
return (0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.storeBatchDetails.match))).pipe((0, operators_1.filter)((a) => a.payload.batchId === batchId), (0, operators_1.take)(1), (0, operators_1.mergeMap)((action) => {
|
|
19
|
+
const { summary } = action.payload;
|
|
20
|
+
return (0, rxjs_1.of)((0, snackbarReducer_1.openSnackbar)({
|
|
21
|
+
messageSection: 'receipts_bulk_match',
|
|
22
|
+
messageText: 'success',
|
|
23
|
+
type: 'success',
|
|
24
|
+
variables: [
|
|
25
|
+
{
|
|
26
|
+
variableName: '_matched_',
|
|
27
|
+
variableValue: String(summary.matched),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
variableName: '_total_',
|
|
31
|
+
variableValue: String(summary.total),
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
}));
|
|
35
|
+
}), (0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match))));
|
|
36
|
+
}));
|
|
37
|
+
exports.bulkUploadMatchResultToastEpic = bulkUploadMatchResultToastEpic;
|