@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
|
@@ -53,7 +53,7 @@ export const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
53
53
|
response.data?.transaction?.transaction_id != null) {
|
|
54
54
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
55
55
|
const transcationId = response.data.transaction.transaction_id;
|
|
56
|
-
const vendorInResponse = response.data?.vendors[0];
|
|
56
|
+
const vendorInResponse = response.data?.vendors?.[0];
|
|
57
57
|
const flattenedContacts = vendorInResponse?.contacts ?? [];
|
|
58
58
|
const flattenedAddresses = getFlattenedAddress(response.data?.vendors ?? []);
|
|
59
59
|
const flattenedBankAccounts = vendorInResponse?.bank_accounts ?? [];
|
|
@@ -85,7 +85,7 @@ export const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
85
85
|
...response.data.bank_accounts,
|
|
86
86
|
]),
|
|
87
87
|
updatePaymentInstruments(flattenedPaymentInstruments),
|
|
88
|
-
updateVendors(response.data.vendors),
|
|
88
|
+
updateVendors(response.data.vendors ?? []),
|
|
89
89
|
// end: save all vendor related entities
|
|
90
90
|
];
|
|
91
91
|
if (vendorInResponse == null &&
|
|
@@ -94,15 +94,15 @@ export const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
94
94
|
fetchActions.push(fetchVendorsList({
|
|
95
95
|
searchString: response.data?.transaction.candidate_vendor_name,
|
|
96
96
|
}));
|
|
97
|
-
fetchActions.push(waitForVendorByNameThenUpdateBillDetail(billId, response.data,
|
|
97
|
+
fetchActions.push(waitForVendorByNameThenUpdateBillDetail(billId, response.data, undefined));
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
100
|
fetchActions.push(updateBillDetail({ billId, billDetail: response.data }));
|
|
101
|
-
fetchActions.push(updateBillDetailFetchState(transcationId, 'Completed', undefined,
|
|
101
|
+
fetchActions.push(updateBillDetailFetchState(transcationId, 'Completed', undefined, vendorInResponse?.vendor_id));
|
|
102
102
|
const transactionInResponse = response.data?.transaction;
|
|
103
103
|
if (transactionInResponse != null &&
|
|
104
104
|
transactionInResponse.total_amount != null &&
|
|
105
|
-
|
|
105
|
+
vendorInResponse != null) {
|
|
106
106
|
fetchActions.push(fetchDuplicateBill(vendorInResponse.vendor_name, vendorInResponse.vendor_id, transactionInResponse.total_amount, transactionInResponse.recipient_total_amount, transactionInResponse.document_id, billId));
|
|
107
107
|
}
|
|
108
108
|
const billHasPaymentError = [
|
|
@@ -416,6 +416,14 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
416
416
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
417
417
|
}
|
|
418
418
|
break;
|
|
419
|
+
case 'invoiceNumber':
|
|
420
|
+
if (transaction.documentId != null) {
|
|
421
|
+
transactionsWithSortKeyValue.push(transaction);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
419
427
|
case 'dueDate':
|
|
420
428
|
if (currentTab === 'draft') {
|
|
421
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -518,6 +526,8 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
518
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
519
527
|
case 'paymentMethod':
|
|
520
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
529
|
+
case 'invoiceNumber':
|
|
530
|
+
return transaction.documentId;
|
|
521
531
|
}
|
|
522
532
|
}, getColumnWiseSortOrder(sortOrder));
|
|
523
533
|
return [
|
|
@@ -2,6 +2,7 @@ import recordGet from 'lodash/get';
|
|
|
2
2
|
import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { getContactsByIds } from '../../../../entity/billPay/contact/contactSelector';
|
|
4
4
|
import { getPaymentAccountsByPaymentAccountIds } from '../../../../entity/paymentAccount/paymentAccountSelector';
|
|
5
|
+
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
5
6
|
import { getVendorByVendorId } from '../../../../entity/vendor/vendorSelector';
|
|
6
7
|
import { getAccountList } from '../../../accountList/accountListSelector';
|
|
7
8
|
import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
|
|
@@ -73,11 +74,14 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
if (sourceBillDetail != null) {
|
|
76
|
-
|
|
77
|
+
const fetchStateList = [
|
|
77
78
|
sourceBillDetail.fetchStatus,
|
|
78
79
|
accountListState.byReportId['billPayAccountList'],
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
];
|
|
81
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
82
|
+
fetchStateList.push(classListState);
|
|
83
|
+
}
|
|
84
|
+
sourceBillDetailFetchState = reduceFetchState(fetchStateList).fetchState;
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
else {
|
|
@@ -3,6 +3,7 @@ import cloneDeep from 'lodash/cloneDeep';
|
|
|
3
3
|
import { reduceAllFetchState, reduceAnyFetchState, } from '../../../../commonStateTypes/reduceFetchState';
|
|
4
4
|
import { getApprovalRulesByIds } from '../../../../entity/approvalRule/approvalRuleSelector';
|
|
5
5
|
import { getClassesByIds } from '../../../../entity/class/classSelector';
|
|
6
|
+
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
6
7
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
7
8
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
8
9
|
export const getBillPaySetupApproverView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
|
|
@@ -44,7 +45,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
|
|
|
44
45
|
newApprovalRuleId,
|
|
45
46
|
};
|
|
46
47
|
});
|
|
47
|
-
export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
|
|
48
|
+
export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (state) => getIsAccountingClassesEnabled(state), (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState, isAccountingClassesEnabled) => {
|
|
48
49
|
const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
|
|
49
50
|
const { approverIds, attributes } = approverListState;
|
|
50
51
|
const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
|
|
@@ -92,10 +93,9 @@ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => s
|
|
|
92
93
|
allAttributes,
|
|
93
94
|
filteredAttributes,
|
|
94
95
|
billPaySetupApproverViewUpdateData,
|
|
95
|
-
approverListFetchStatus:
|
|
96
|
-
approverListState.fetchStatus,
|
|
97
|
-
|
|
98
|
-
]),
|
|
96
|
+
approverListFetchStatus: isAccountingClassesEnabled
|
|
97
|
+
? reduceAllFetchState([approverListState.fetchStatus, classListState])
|
|
98
|
+
: approverListState.fetchStatus,
|
|
99
99
|
fetchState,
|
|
100
100
|
allAccountingClasses,
|
|
101
101
|
error,
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import { concat, from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
|
|
3
4
|
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
4
5
|
import { fetchBillPayApproversDetails, fetchBillPayApproversList, } from '../billPaySetupApproverViewReducer';
|
|
5
6
|
export const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe(filter(fetchBillPayApproversDetails.match), mergeMap((action) => {
|
|
6
7
|
const { cacheOverride, includeUserRoles } = action.payload;
|
|
7
8
|
const { billPaySetupApproverViewState, classListState } = state$.value;
|
|
8
9
|
const { approverListState } = billPaySetupApproverViewState;
|
|
10
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
|
|
9
11
|
const actions = [];
|
|
10
12
|
if (cacheOverride === true) {
|
|
11
13
|
actions.push(fetchBillPayApproversList(cacheOverride, includeUserRoles));
|
|
12
|
-
|
|
14
|
+
if (isAccountingClassesEnabled) {
|
|
15
|
+
actions.push(fetchClassList());
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
else {
|
|
15
19
|
if (billPaySetupApproverViewState.hasValidState() === false &&
|
|
16
20
|
approverListState.fetchStatus.fetchState !== 'In-Progress') {
|
|
17
21
|
actions.push(fetchBillPayApproversList(true, includeUserRoles));
|
|
18
22
|
}
|
|
19
|
-
if (
|
|
23
|
+
if (isAccountingClassesEnabled &&
|
|
24
|
+
classListState.hasValidState() === false &&
|
|
20
25
|
classListState.fetchState !== 'In-Progress') {
|
|
21
26
|
actions.push(fetchClassList());
|
|
22
27
|
}
|
|
@@ -7,6 +7,7 @@ import { getCompanyByCompanyId } from '../../../../entity/company/companySelecto
|
|
|
7
7
|
import { getDepositAccountByDepositAccountId } from '../../../../entity/depositAccount/depositAccountSelector';
|
|
8
8
|
import { getPaymentAccountByPaymentAccountId, getPaymentAccountsByPaymentAccountIds, } from '../../../../entity/paymentAccount/paymentAccountSelector';
|
|
9
9
|
import { getPaymentInstrumentById, getPaymentInstrumentsByIds, } from '../../../../entity/paymentInstrument/paymentInstrumentSelector';
|
|
10
|
+
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
10
11
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
11
12
|
import { getVendorByQboId, getVendorByVendorId, } from '../../../../entity/vendor/vendorSelector';
|
|
12
13
|
import { dateNow } from '../../../../zeniDayJS';
|
|
@@ -172,12 +173,15 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
|
|
|
172
173
|
isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
|
|
173
174
|
billStage = billPayInfo?.stage.code ?? 'draft';
|
|
174
175
|
if (billViewState != null) {
|
|
175
|
-
|
|
176
|
+
const fetchStateList = [
|
|
176
177
|
sourceBillDetail.fetchStatus,
|
|
177
178
|
accountListState.byReportId.billPayAccountList,
|
|
178
|
-
classListState,
|
|
179
179
|
billPaySetupApproverViewState,
|
|
180
|
-
]
|
|
180
|
+
];
|
|
181
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
182
|
+
fetchStateList.push(classListState);
|
|
183
|
+
}
|
|
184
|
+
fetchState = reduceFetchState(fetchStateList).fetchState;
|
|
181
185
|
deleteStatus = billViewState.deleteStatus;
|
|
182
186
|
billActivities = getBillActivities(state, billId, billPayInfo?.stage.code);
|
|
183
187
|
}
|
|
@@ -191,11 +195,14 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
|
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
197
|
else {
|
|
194
|
-
|
|
198
|
+
const newBillFetchStateList = [
|
|
195
199
|
accountListState.byReportId.billPayAccountList,
|
|
196
|
-
classListState,
|
|
197
200
|
billPaySetupApproverViewState,
|
|
198
|
-
]
|
|
201
|
+
];
|
|
202
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
203
|
+
newBillFetchStateList.push(classListState);
|
|
204
|
+
}
|
|
205
|
+
fetchState = reduceFetchState(newBillFetchStateList).fetchState;
|
|
199
206
|
}
|
|
200
207
|
if (sourceBillDetail != null && fetchState == 'Completed') {
|
|
201
208
|
const updatedRecord = sourceBillDetail.billDetailLocalData;
|
|
@@ -219,6 +219,8 @@ const getCardsBySortKey = (card, sortKey) => {
|
|
|
219
219
|
return card.cardName.toLowerCase();
|
|
220
220
|
case 'cardType':
|
|
221
221
|
return card.type.code;
|
|
222
|
+
case 'accountType':
|
|
223
|
+
return card.type.code.includes('credit') ? 'credit' : 'debit';
|
|
222
224
|
case 'status':
|
|
223
225
|
return card.status.code;
|
|
224
226
|
case 'utilisation':
|
|
@@ -2,7 +2,7 @@ import recordGet from 'lodash/get';
|
|
|
2
2
|
import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { getBankAccountByBankAccountId } from '../../../../entity/bankAccount/bankAccountSelector';
|
|
4
4
|
import { getAllCurrencies } from '../../../../entity/currency/currencySelector';
|
|
5
|
-
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
5
|
+
import { getCurrentTenant, getIsAccountingClassesEnabled, } from '../../../../entity/tenant/tenantSelector';
|
|
6
6
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
7
7
|
import { getAccountList, getNestedAccountListHierarchy, } from '../../../accountList/accountListSelector';
|
|
8
8
|
import { getBankAccount, } from '../../../bankAccountView/bankAccountViewSelector';
|
|
@@ -63,13 +63,16 @@ export const getEditRemiDetail = (state, reimbursementId) => {
|
|
|
63
63
|
paymentTo: reimbursementInfo?.toAccount.billAccountId,
|
|
64
64
|
};
|
|
65
65
|
if (sourceRemiDetail != null) {
|
|
66
|
-
|
|
66
|
+
const fetchStateList = [
|
|
67
67
|
sourceRemiDetail.fetchStatus,
|
|
68
68
|
accountListState.byReportId.reimbursementAccountList,
|
|
69
|
-
classListState,
|
|
70
69
|
merchantListState,
|
|
71
70
|
reimbursementConfigState,
|
|
72
|
-
]
|
|
71
|
+
];
|
|
72
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
73
|
+
fetchStateList.push(classListState);
|
|
74
|
+
}
|
|
75
|
+
fetchState = reduceFetchState(fetchStateList).fetchState;
|
|
73
76
|
remiStage = reimbursementInfo?.stage.code ?? 'draft';
|
|
74
77
|
createdBy = getUserByUserId(userState, reimbursement?.createdBy ?? '');
|
|
75
78
|
createTime = reimbursement?.createTime;
|
|
@@ -45,6 +45,7 @@ export const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled
|
|
|
45
45
|
return {
|
|
46
46
|
...reimbursement,
|
|
47
47
|
submittedBy: getUserByUserId(userState, reimbursement.reimburseeUserId),
|
|
48
|
+
createdByUser: getUserByUserId(userState, reimbursement.createdBy),
|
|
48
49
|
approvers: approvers,
|
|
49
50
|
};
|
|
50
51
|
});
|
|
@@ -415,6 +416,14 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
415
416
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
416
417
|
}
|
|
417
418
|
break;
|
|
419
|
+
case 'createdBy':
|
|
420
|
+
if (reimbursement.createdByUser != null) {
|
|
421
|
+
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
418
427
|
}
|
|
419
428
|
});
|
|
420
429
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -422,6 +431,7 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
422
431
|
case 'reportName':
|
|
423
432
|
case 'type':
|
|
424
433
|
case 'status':
|
|
434
|
+
case 'createdBy':
|
|
425
435
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
426
436
|
default:
|
|
427
437
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -441,6 +451,8 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
441
451
|
return getStatusPerTab(reimbursement);
|
|
442
452
|
case 'amount':
|
|
443
453
|
return reimbursement.amount.amount ?? 0;
|
|
454
|
+
case 'createdBy':
|
|
455
|
+
return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
|
|
444
456
|
}
|
|
445
457
|
}, getColumnWiseSortOrder(sortOrder));
|
|
446
458
|
return [
|
|
@@ -6,7 +6,7 @@ import { fetchTreasuryStatementList } from '../../treasuryStatementList/treasury
|
|
|
6
6
|
import { fetchTreasuryTaxLetterList } from '../../treasuryTaxLetterList/treasuryTaxLetterListReducer';
|
|
7
7
|
import { fetchTreasuryHistory, fetchTreasuryOverviewDetail, fetchTreasurySummaryFailure, fetchTreasurySummarySuccess, fetchTreasuryTransactionList, } from '../treasuryDetailReducer';
|
|
8
8
|
export const fetchTreasuryDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTreasuryOverviewDetail.match), switchMap((action) => {
|
|
9
|
-
const { cacheOverride } = action.payload;
|
|
9
|
+
const { cacheOverride, fetchOnlySummary } = action.payload;
|
|
10
10
|
const state = state$.value;
|
|
11
11
|
const treasuryActions = [];
|
|
12
12
|
if (cacheOverride === true) {
|
|
@@ -17,7 +17,7 @@ export const fetchTreasuryDetailEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
17
17
|
treasuryActions.push(fetchTreasuryHistory());
|
|
18
18
|
treasuryActions.push(fetchTreasuryTransactionList(true));
|
|
19
19
|
}
|
|
20
|
-
else {
|
|
20
|
+
else if (fetchOnlySummary !== true) {
|
|
21
21
|
// Check treasury statement list state
|
|
22
22
|
const treasuryStatementListState = state.treasuryStatementListState;
|
|
23
23
|
if (treasuryStatementListState.hasValidState() === false &&
|
|
@@ -30,10 +30,11 @@ const treasuryDetail = createSlice({
|
|
|
30
30
|
reducer(draft) {
|
|
31
31
|
draft.fetchState = 'In-Progress';
|
|
32
32
|
},
|
|
33
|
-
prepare(cacheOverride) {
|
|
33
|
+
prepare(cacheOverride, fetchOnlySummary) {
|
|
34
34
|
return {
|
|
35
35
|
payload: {
|
|
36
36
|
cacheOverride,
|
|
37
|
+
fetchOnlySummary,
|
|
37
38
|
},
|
|
38
39
|
};
|
|
39
40
|
},
|
|
@@ -75,8 +75,8 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
|
|
|
75
75
|
lineItem.account?.qboId !== accountLine.account.qboId &&
|
|
76
76
|
Boolean(lineItem.account?.qboId);
|
|
77
77
|
hasClassChanged =
|
|
78
|
-
|
|
79
|
-
lineItem.class?.qboId !== accountLine.class
|
|
78
|
+
(lineItem.class?.qboId != null || accountLine.class?.qboId != null) &&
|
|
79
|
+
lineItem.class?.qboId !== accountLine.class?.qboId;
|
|
80
80
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
81
81
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
82
82
|
const latestRecommendedCategory = lineItem.recommendedAccount;
|
|
@@ -140,13 +140,13 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
140
140
|
record.isRetainedCategorySelected = false;
|
|
141
141
|
}
|
|
142
142
|
if (Boolean(recommendedClass?.qboId) &&
|
|
143
|
-
recommendedClass?.qboId !== accountLine.class
|
|
143
|
+
recommendedClass?.qboId !== accountLine.class?.qboId) {
|
|
144
144
|
record.isRecommendedClassSelected = false;
|
|
145
145
|
record.recommendedClass = recommendedClass;
|
|
146
146
|
record.isClassUpdateSelected = false;
|
|
147
147
|
}
|
|
148
148
|
if (accountLine.isClassMiscategorized &&
|
|
149
|
-
Boolean(accountLine.class
|
|
149
|
+
Boolean(accountLine.class?.qboId) &&
|
|
150
150
|
Boolean(isVendorOrCustomerPresent)) {
|
|
151
151
|
record.retainedClass = accountLine.class;
|
|
152
152
|
record.isRetainedClassSelected = false;
|
|
@@ -336,14 +336,14 @@ export const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionD
|
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
const updateClass = () => {
|
|
339
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
339
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
340
340
|
Boolean(recommendedClass?.qboId)) {
|
|
341
341
|
record.class = accountLine.class;
|
|
342
342
|
record.isRecommendedClassSelected = false;
|
|
343
343
|
record.recommendedClass = recommendedClass;
|
|
344
344
|
record.isClassUpdateSelected = false;
|
|
345
345
|
if (accountLine.isClassMiscategorized &&
|
|
346
|
-
Boolean(accountLine.class
|
|
346
|
+
Boolean(accountLine.class?.qboId) &&
|
|
347
347
|
Boolean(isVendorOrCustomerPresent)) {
|
|
348
348
|
record.retainedClass = accountLine.class;
|
|
349
349
|
record.isRetainedClassSelected = false;
|
|
@@ -356,7 +356,7 @@ export const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionD
|
|
|
356
356
|
record.recommendedClass = recommendedClass;
|
|
357
357
|
record.isClassUpdateSelected = false;
|
|
358
358
|
if (accountLine.isClassMiscategorized &&
|
|
359
|
-
Boolean(accountLine.class
|
|
359
|
+
Boolean(accountLine.class?.qboId) &&
|
|
360
360
|
Boolean(isVendorOrCustomerPresent)) {
|
|
361
361
|
record.retainedClass = recommendedClass;
|
|
362
362
|
record.isRetainedClassSelected = false;
|
|
@@ -650,13 +650,13 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
|
|
|
650
650
|
record.isRetainedCategorySelected = false;
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
653
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
654
654
|
Boolean(recommendedClass?.qboId)) {
|
|
655
655
|
record.isRecommendedClassSelected = false;
|
|
656
656
|
record.recommendedClass = recommendedClass;
|
|
657
657
|
record.isClassUpdateSelected = false;
|
|
658
658
|
if (accountLine.isClassMiscategorized &&
|
|
659
|
-
Boolean(accountLine.class
|
|
659
|
+
Boolean(accountLine.class?.qboId)) {
|
|
660
660
|
record.retainedClass = accountLine.class;
|
|
661
661
|
record.isRetainedClassSelected = false;
|
|
662
662
|
}
|
|
@@ -664,12 +664,12 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
|
|
|
664
664
|
else {
|
|
665
665
|
record.isRecommendedClassSelected = false;
|
|
666
666
|
record.recommendedClass = recommendedClass;
|
|
667
|
-
if (recommendedClass?.qboId === accountLine.class
|
|
667
|
+
if (recommendedClass?.qboId === accountLine.class?.qboId) {
|
|
668
668
|
record.recommendedClass = undefined;
|
|
669
669
|
}
|
|
670
670
|
record.isClassUpdateSelected = false;
|
|
671
671
|
if (accountLine.isClassMiscategorized &&
|
|
672
|
-
Boolean(accountLine.class
|
|
672
|
+
Boolean(accountLine.class?.qboId)) {
|
|
673
673
|
record.retainedClass = recommendedClass;
|
|
674
674
|
record.isRetainedClassSelected = false;
|
|
675
675
|
}
|
|
@@ -685,7 +685,7 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
|
|
|
685
685
|
Boolean(recommendedAccount?.qboId) !== false) {
|
|
686
686
|
record.account = recommendedAccount;
|
|
687
687
|
}
|
|
688
|
-
if (Boolean(record.class
|
|
688
|
+
if (Boolean(record.class?.qboId) === false &&
|
|
689
689
|
Boolean(recommendedClass?.qboId) !== false) {
|
|
690
690
|
record.class = recommendedClass;
|
|
691
691
|
}
|
|
@@ -806,7 +806,9 @@ export const getChangedLineItemCountFromLocalData = (transaction, transactionLoc
|
|
|
806
806
|
accountLineLocal.account?.qboId !== accountLine.account.qboId &&
|
|
807
807
|
accountLineLocal.account?.accountId !== accountLine.account.accountId;
|
|
808
808
|
hasClassChanged =
|
|
809
|
-
accountLineLocal.class?.qboId
|
|
809
|
+
(accountLineLocal.class?.qboId != null ||
|
|
810
|
+
accountLine.class?.qboId != null) &&
|
|
811
|
+
accountLineLocal.class?.qboId !== accountLine.class?.qboId;
|
|
810
812
|
}
|
|
811
813
|
hasDescriptionChanged =
|
|
812
814
|
transactionLocalData.lineItemById[lineId] != null
|
|
@@ -944,10 +946,10 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
944
946
|
record.isRecommendedClassSelected = false;
|
|
945
947
|
record.recommendedClass = recommendedClass;
|
|
946
948
|
record.isClassUpdateSelected = false;
|
|
947
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
949
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
948
950
|
Boolean(recommendedClass?.qboId)) {
|
|
949
951
|
if (accountLine.isClassMiscategorized &&
|
|
950
|
-
Boolean(accountLine.class
|
|
952
|
+
Boolean(accountLine.class?.qboId) &&
|
|
951
953
|
Boolean(isVendorOrCustomerPresent)) {
|
|
952
954
|
record.retainedClass = accountLine.class;
|
|
953
955
|
record.isRetainedClassSelected = false;
|
|
@@ -960,7 +962,7 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
960
962
|
record.recommendedClass = recommendedClass;
|
|
961
963
|
record.isClassUpdateSelected = false;
|
|
962
964
|
if (accountLine.isClassMiscategorized &&
|
|
963
|
-
Boolean(accountLine.class
|
|
965
|
+
Boolean(accountLine.class?.qboId) &&
|
|
964
966
|
Boolean(isVendorOrCustomerPresent)) {
|
|
965
967
|
record.retainedClass = recommendedClass;
|
|
966
968
|
record.isRetainedClassSelected = false;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import recordGet from 'lodash/get';
|
|
2
2
|
import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
|
|
3
|
+
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
3
4
|
import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
|
|
4
5
|
import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
|
|
5
6
|
import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
|
|
@@ -51,9 +52,14 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
const accountsList = getAccountList(accountState, accountListState, 'accountList');
|
|
54
|
-
const
|
|
55
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
56
|
+
const classList = isAccountingClassesEnabled
|
|
57
|
+
? getClassList(classState, classListState)
|
|
58
|
+
: { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
|
|
55
59
|
const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
|
|
56
|
-
const classHierarchyList =
|
|
60
|
+
const classHierarchyList = isAccountingClassesEnabled
|
|
61
|
+
? getNestedClassListHierarchy(classListState)
|
|
62
|
+
: [];
|
|
57
63
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
58
64
|
const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
|
|
59
65
|
return {
|
|
@@ -71,6 +77,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
71
77
|
classHierarchyList,
|
|
72
78
|
accountsHierarchyList,
|
|
73
79
|
classList: classList,
|
|
80
|
+
isAccountingClassesEnabled,
|
|
74
81
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
|
75
82
|
transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
|
|
76
83
|
initialSupportedTransactionDetail.transactionDetailLocalData,
|
|
@@ -5,14 +5,23 @@ import { resendOtpVendorView, sendOtpVendorViewFailure, sendOtpVendorViewSuccess
|
|
|
5
5
|
import { resendOnboardingOfficerOtp, sendOnboardingOfficerOtpFailure, sendOnboardingOfficerOtpSuccess, } from '../onboardingView/customerView/onboardingCustomerViewReducer';
|
|
6
6
|
import { resendOtpMyProfile, sendOtpMyProfileFailure, sendOtpMyProfileSuccess, } from '../settingsView/settingsViewReducer';
|
|
7
7
|
import { resendOtpCardUserOnboarding, sendOtpCardUserOnboardingFailure, sendOtpCardUserOnboardingSuccess, } from '../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
|
|
8
|
-
import { sendOtpCardHolderFailure, sendOtpCardHolderSuccess, } from '../spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer';
|
|
8
|
+
import { resendOtpCardHolder, sendOtpCardHolderFailure, sendOtpCardHolderSuccess, } from '../spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer';
|
|
9
9
|
import { resendOtpSpendManagementSetUp, sendOtpFailureSpendManagementSetUp, sendOtpSuccessSpendManagementSetUp, } from '../spendManagement/commonSetup/setupViewReducer';
|
|
10
10
|
import { resendOtp, sendOtpFailure, sendOtpSuccess, } from './twoFactorAuthenticationReducer';
|
|
11
|
-
export const resendOtpEpic = (actions$,
|
|
11
|
+
export const resendOtpEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(resendOtp.match), mergeMap((action) => {
|
|
12
12
|
const resendOtpActions = [];
|
|
13
13
|
const { otpChallenge, twoFASource, entityId } = action.payload;
|
|
14
|
+
const chargeCard = twoFASource === 'ChargeCardHolder' && entityId != null
|
|
15
|
+
? state$.value.chargeCardState.chargeCardByID[entityId]
|
|
16
|
+
: null;
|
|
14
17
|
const payload = {
|
|
15
18
|
otp_challenge: otpChallenge,
|
|
19
|
+
...(chargeCard != null
|
|
20
|
+
? {
|
|
21
|
+
provider_card_id: chargeCard.cardProviderID,
|
|
22
|
+
is_for_charge_cards: true,
|
|
23
|
+
}
|
|
24
|
+
: {}),
|
|
16
25
|
};
|
|
17
26
|
switch (twoFASource) {
|
|
18
27
|
case 'SpendManagementSetup':
|
|
@@ -30,6 +39,11 @@ export const resendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filte
|
|
|
30
39
|
case 'CardUserOnboarding':
|
|
31
40
|
resendOtpActions.push(resendOtpCardUserOnboarding());
|
|
32
41
|
break;
|
|
42
|
+
case 'ChargeCardHolder':
|
|
43
|
+
if (entityId != null) {
|
|
44
|
+
resendOtpActions.push(resendOtpCardHolder({ chargeCardId: entityId }));
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
33
47
|
}
|
|
34
48
|
const resendOtp$ = zeniAPI
|
|
35
49
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/otp/resend`, payload)
|