@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
- package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +4 -0
- package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
- package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
- package/lib/commonStateTypes/common.d.ts +1 -1
- package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
- package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/account/accountPayload.d.ts +2 -0
- package/lib/entity/account/accountReducer.d.ts +5 -2
- package/lib/entity/account/accountReducer.js +13 -5
- package/lib/entity/account/accountSelector.d.ts +7 -0
- package/lib/entity/account/accountSelector.js +4 -2
- package/lib/entity/account/accountState.d.ts +3 -1
- package/lib/entity/account/accountState.js +4 -1
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
- package/lib/entity/account/subAccountSelector.d.ts +2 -0
- package/lib/entity/account/subAccountSelector.js +2 -0
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +4 -2
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +70 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +13 -0
- package/lib/entity/project/projectPayload.js +30 -0
- package/lib/entity/project/projectReducer.d.ts +10 -0
- package/lib/entity/project/projectReducer.js +31 -0
- package/lib/entity/project/projectSelector.d.ts +5 -0
- package/lib/entity/project/projectSelector.js +12 -0
- package/lib/entity/project/projectState.d.ts +13 -0
- package/lib/entity/project/projectState.js +2 -0
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +13 -0
- package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
- package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +11 -0
- package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +15 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +64 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +57 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
- package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
- package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.js +10 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
- package/lib/entity/tenant/clearAllEpic.js +10 -0
- package/lib/entity/tenant/tenantPayload.d.ts +2 -0
- package/lib/entity/tenant/tenantReducer.d.ts +5 -2
- package/lib/entity/tenant/tenantReducer.js +10 -2
- package/lib/entity/tenant/tenantSelector.d.ts +2 -0
- package/lib/entity/tenant/tenantSelector.js +17 -1
- package/lib/entity/tenant/tenantState.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +11 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +114 -1
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +22 -2
- package/lib/epic.js +22 -2
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
- package/lib/esm/commonStateTypes/animations.js +4 -0
- package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
- package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
- package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/entity/account/accountReducer.js +12 -4
- package/lib/esm/entity/account/accountSelector.js +4 -2
- package/lib/esm/entity/account/accountState.js +4 -1
- package/lib/esm/entity/account/subAccountSelector.js +2 -0
- package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +64 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
- package/lib/esm/entity/project/projectPayload.js +26 -0
- package/lib/esm/entity/project/projectReducer.js +27 -0
- package/lib/esm/entity/project/projectSelector.js +8 -0
- package/lib/esm/entity/project/projectState.js +1 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +11 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +60 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +50 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +10 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
- package/lib/esm/entity/tenant/tenantReducer.js +9 -1
- package/lib/esm/entity/tenant/tenantSelector.js +14 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +114 -1
- package/lib/esm/epic.js +22 -2
- package/lib/esm/index.js +32 -19
- package/lib/esm/reducer.js +20 -2
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +152 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +77 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +76 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
- package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
- package/lib/esm/view/companyView/companyViewReducer.js +26 -1
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +1 -39
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -6
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +63 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +65 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +21 -5
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/helpers/bulkUploadTiming.js +16 -0
- package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +29 -6
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
- package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
- package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
- package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
- package/lib/index.d.ts +49 -26
- package/lib/index.js +107 -39
- package/lib/reducer.d.ts +20 -2
- package/lib/reducer.js +20 -2
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +33 -0
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +156 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +16 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +83 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +80 -0
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +8 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
- package/lib/view/companyView/companyViewReducer.d.ts +6 -1
- package/lib/view/companyView/companyViewReducer.js +28 -2
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -36
- package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +2 -2
- package/lib/view/creditAgentView/creditAgentViewReducer.js +2 -40
- package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
- package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -31
- package/lib/view/creditAgentView/creditAgentViewState.js +0 -6
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +67 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +69 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
- package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +20 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.d.ts +16 -0
- package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.js +19 -0
- package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +18 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +30 -7
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +5 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
- package/lib/view/financeStatement/financeStatementSelector.js +12 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
- package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
- package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
- package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
|
|
4
|
+
exports.updateNodeCollapseState = exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.includeAccountInReconciliationFailure = exports.includeAccountInReconciliationSuccess = exports.includeAccountInReconciliation = exports.excludeAccountFromReconciliationFailure = exports.excludeAccountFromReconciliationSuccess = exports.excludeAccountFromReconciliation = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
7
|
const accountState_1 = require("../../../entity/account/accountState");
|
|
@@ -41,7 +41,15 @@ exports.initialReconciliationTabsState = {
|
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
exports.initialActionFetchState = {
|
|
44
|
+
excludeAccountFetch: {
|
|
45
|
+
fetchState: 'Not-Started',
|
|
46
|
+
error: undefined,
|
|
47
|
+
},
|
|
44
48
|
excludeFetchById: {},
|
|
49
|
+
includeAccountFetch: {
|
|
50
|
+
fetchState: 'Not-Started',
|
|
51
|
+
error: undefined,
|
|
52
|
+
},
|
|
45
53
|
reconcileFetch: {
|
|
46
54
|
fetchState: 'Not-Started',
|
|
47
55
|
error: undefined,
|
|
@@ -55,6 +63,7 @@ exports.initialActionFetchState = {
|
|
|
55
63
|
exports.initialState = {
|
|
56
64
|
accountReconciliationRecordsBySelectedPeriod: {},
|
|
57
65
|
accountConnectionStatusByAccountID: {},
|
|
66
|
+
excludedAccountExclusionInfo: {},
|
|
58
67
|
fetchState: 'Not-Started',
|
|
59
68
|
error: undefined,
|
|
60
69
|
selectedTab: 'review',
|
|
@@ -64,10 +73,12 @@ exports.initialState = {
|
|
|
64
73
|
selectedAccountId: undefined,
|
|
65
74
|
statementUploadChosen: false,
|
|
66
75
|
reconListUIState: {
|
|
76
|
+
nodeCollapseState: {},
|
|
67
77
|
scrollPosition: {
|
|
68
78
|
scrollTop: 0,
|
|
69
79
|
},
|
|
70
80
|
},
|
|
81
|
+
excludedAccountIDs: [],
|
|
71
82
|
};
|
|
72
83
|
// Create slice with reducers
|
|
73
84
|
const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
@@ -136,7 +147,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
136
147
|
fetchReconciliationSuccess: {
|
|
137
148
|
reducer(draft, action) {
|
|
138
149
|
if (action.payload.accountId == null) {
|
|
139
|
-
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground);
|
|
150
|
+
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts ?? []);
|
|
140
151
|
}
|
|
141
152
|
else if (action.payload.reconciliation.reconciliation.length > 0 &&
|
|
142
153
|
action.payload.reconciliation.accounts.length > 0) {
|
|
@@ -348,6 +359,10 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
348
359
|
updateReconListScrollPosition: (draft, action) => {
|
|
349
360
|
draft.reconListUIState.scrollPosition = action.payload.scrollPosition;
|
|
350
361
|
},
|
|
362
|
+
updateNodeCollapseState: (draft, action) => {
|
|
363
|
+
draft.reconListUIState.nodeCollapseState[action.payload.nodeId] =
|
|
364
|
+
action.payload.collapsed;
|
|
365
|
+
},
|
|
351
366
|
setConnectionInProgressForAccount: (draft, action) => {
|
|
352
367
|
if (draft.accountConnectionStatusByAccountID[action.payload.accountId] ==
|
|
353
368
|
null) {
|
|
@@ -425,6 +440,85 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
425
440
|
...localData,
|
|
426
441
|
};
|
|
427
442
|
},
|
|
443
|
+
excludeAccountFromReconciliation: {
|
|
444
|
+
reducer(draft) {
|
|
445
|
+
draft.actionFetchState.excludeAccountFetch = {
|
|
446
|
+
fetchState: 'In-Progress',
|
|
447
|
+
error: undefined,
|
|
448
|
+
};
|
|
449
|
+
},
|
|
450
|
+
prepare(payload) {
|
|
451
|
+
return { payload };
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
excludeAccountFromReconciliationSuccess: (draft, action) => {
|
|
455
|
+
draft.actionFetchState.excludeAccountFetch = {
|
|
456
|
+
fetchState: 'Completed',
|
|
457
|
+
error: undefined,
|
|
458
|
+
};
|
|
459
|
+
const { account, selectedPeriod } = action.payload;
|
|
460
|
+
if (account != null) {
|
|
461
|
+
if (!draft.excludedAccountIDs.includes(account.account_id)) {
|
|
462
|
+
draft.excludedAccountIDs.push(account.account_id);
|
|
463
|
+
}
|
|
464
|
+
updateExcludedAccountExclusionInfo(draft, account);
|
|
465
|
+
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
466
|
+
if (draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId]
|
|
467
|
+
?.accountIDs != null) {
|
|
468
|
+
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs.filter((id) => id !== account.account_id);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
excludeAccountFromReconciliationFailure: (draft, action) => {
|
|
473
|
+
draft.actionFetchState.excludeAccountFetch = {
|
|
474
|
+
fetchState: 'Error',
|
|
475
|
+
error: action.payload.error,
|
|
476
|
+
};
|
|
477
|
+
},
|
|
478
|
+
includeAccountInReconciliation: {
|
|
479
|
+
reducer(draft) {
|
|
480
|
+
draft.actionFetchState.includeAccountFetch = {
|
|
481
|
+
fetchState: 'In-Progress',
|
|
482
|
+
error: undefined,
|
|
483
|
+
};
|
|
484
|
+
},
|
|
485
|
+
prepare(payload) {
|
|
486
|
+
return { payload };
|
|
487
|
+
},
|
|
488
|
+
},
|
|
489
|
+
includeAccountInReconciliationSuccess: (draft, action) => {
|
|
490
|
+
draft.actionFetchState.includeAccountFetch = {
|
|
491
|
+
fetchState: 'Completed',
|
|
492
|
+
error: undefined,
|
|
493
|
+
};
|
|
494
|
+
const { reconciliation, selectedPeriod } = action.payload;
|
|
495
|
+
if (reconciliation == null) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
const accountId = reconciliation.account_id;
|
|
499
|
+
draft.excludedAccountIDs = draft.excludedAccountIDs.filter((id) => id !== accountId);
|
|
500
|
+
delete draft.excludedAccountExclusionInfo[accountId];
|
|
501
|
+
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
502
|
+
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId];
|
|
503
|
+
if (accountReconciliationRecords != null) {
|
|
504
|
+
if (!accountReconciliationRecords.accountIDs.includes(accountId)) {
|
|
505
|
+
accountReconciliationRecords.accountIDs.push(accountId);
|
|
506
|
+
}
|
|
507
|
+
// put this in a function
|
|
508
|
+
updateReconciliationByAccountIDOnIncludeAccount(draft, accountId, reconciliation, monthYearPeriodId);
|
|
509
|
+
}
|
|
510
|
+
draft.accountConnectionStatusByAccountID[accountId] = {
|
|
511
|
+
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
|
|
512
|
+
connectionInProgress: false,
|
|
513
|
+
paymentAccountId: undefined,
|
|
514
|
+
};
|
|
515
|
+
},
|
|
516
|
+
includeAccountInReconciliationFailure: (draft, action) => {
|
|
517
|
+
draft.actionFetchState.includeAccountFetch = {
|
|
518
|
+
fetchState: 'Error',
|
|
519
|
+
error: action.payload.error,
|
|
520
|
+
};
|
|
521
|
+
},
|
|
428
522
|
updateStatementUploadChosen: (draft, action) => {
|
|
429
523
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
430
524
|
},
|
|
@@ -434,10 +528,38 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
434
528
|
},
|
|
435
529
|
});
|
|
436
530
|
// Export actions
|
|
437
|
-
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen;
|
|
531
|
+
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.excludeAccountFromReconciliation = _a.excludeAccountFromReconciliation, exports.excludeAccountFromReconciliationSuccess = _a.excludeAccountFromReconciliationSuccess, exports.excludeAccountFromReconciliationFailure = _a.excludeAccountFromReconciliationFailure, exports.includeAccountInReconciliation = _a.includeAccountInReconciliation, exports.includeAccountInReconciliationSuccess = _a.includeAccountInReconciliationSuccess, exports.includeAccountInReconciliationFailure = _a.includeAccountInReconciliationFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen, exports.updateNodeCollapseState = _a.updateNodeCollapseState;
|
|
438
532
|
// Export reducer
|
|
439
533
|
exports.default = expenseAutomationReconciliationView.reducer;
|
|
440
|
-
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
|
|
534
|
+
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground, excludedAccounts) {
|
|
535
|
+
draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
|
|
536
|
+
draft.excludedAccountExclusionInfo = {};
|
|
537
|
+
excludedAccounts.forEach((ea) => {
|
|
538
|
+
const { exclusion_info } = ea;
|
|
539
|
+
draft.excludedAccountExclusionInfo[ea.account_id] = {
|
|
540
|
+
bankBalance: exclusion_info.bank_balance != null
|
|
541
|
+
? {
|
|
542
|
+
amount: exclusion_info.bank_balance,
|
|
543
|
+
currencyCode: ea.currency_code ?? 'USD',
|
|
544
|
+
currencySymbol: ea.currency_symbol ?? '$',
|
|
545
|
+
}
|
|
546
|
+
: undefined,
|
|
547
|
+
clearedBalance: exclusion_info.cleared_balance != null
|
|
548
|
+
? {
|
|
549
|
+
amount: exclusion_info.cleared_balance,
|
|
550
|
+
currencyCode: ea.currency_code ?? 'USD',
|
|
551
|
+
currencySymbol: ea.currency_symbol ?? '$',
|
|
552
|
+
}
|
|
553
|
+
: undefined,
|
|
554
|
+
variance: exclusion_info.variance != null
|
|
555
|
+
? {
|
|
556
|
+
amount: exclusion_info.variance,
|
|
557
|
+
currencyCode: ea.currency_code ?? 'USD',
|
|
558
|
+
currencySymbol: ea.currency_symbol ?? '$',
|
|
559
|
+
}
|
|
560
|
+
: undefined,
|
|
561
|
+
};
|
|
562
|
+
});
|
|
441
563
|
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = {
|
|
442
564
|
accountIDs: [],
|
|
443
565
|
reconciliationByAccountID: {},
|
|
@@ -475,6 +597,9 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
|
|
|
475
597
|
? (0, accountState_1.toReconciliationAccountSource)(account.reconciliation_source)
|
|
476
598
|
: undefined,
|
|
477
599
|
},
|
|
600
|
+
accountDetectionReason: account?.detection_info != null && account.detection_reason != null
|
|
601
|
+
? account.detection_reason
|
|
602
|
+
: undefined,
|
|
478
603
|
};
|
|
479
604
|
accountReconciliationRecords.accountIDs.push(reconciliation.account_id);
|
|
480
605
|
});
|
|
@@ -520,3 +645,42 @@ function updateReconciliationByAccountID(draft, accounts, selectedPeriod, accoun
|
|
|
520
645
|
};
|
|
521
646
|
}
|
|
522
647
|
}
|
|
648
|
+
const updateExcludedAccountExclusionInfo = (draft, account) => {
|
|
649
|
+
draft.excludedAccountExclusionInfo[account.account_id] = {
|
|
650
|
+
bankBalance: account.bank_balance != null
|
|
651
|
+
? {
|
|
652
|
+
amount: account.bank_balance,
|
|
653
|
+
currencyCode: account.currency_code ?? 'USD',
|
|
654
|
+
currencySymbol: account.currency_symbol ?? '$',
|
|
655
|
+
}
|
|
656
|
+
: undefined,
|
|
657
|
+
clearedBalance: account.cleared_balance != null
|
|
658
|
+
? {
|
|
659
|
+
amount: account.cleared_balance,
|
|
660
|
+
currencyCode: account.currency_code ?? 'USD',
|
|
661
|
+
currencySymbol: account.currency_symbol ?? '$',
|
|
662
|
+
}
|
|
663
|
+
: undefined,
|
|
664
|
+
variance: account.variance != null
|
|
665
|
+
? {
|
|
666
|
+
amount: account.variance,
|
|
667
|
+
currencyCode: account.currency_code ?? 'USD',
|
|
668
|
+
currencySymbol: account.currency_symbol ?? '$',
|
|
669
|
+
}
|
|
670
|
+
: undefined,
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
const updateReconciliationByAccountIDOnIncludeAccount = (draft, accountId, reconciliation, monthYearPeriodId) => {
|
|
674
|
+
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].reconciliationByAccountID[accountId] = {
|
|
675
|
+
accountId,
|
|
676
|
+
reconciliationId: reconciliation.reconciliation_id ?? undefined,
|
|
677
|
+
transactionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
678
|
+
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
679
|
+
statementDeleteStatus: { fetchState: 'Not-Started', error: undefined },
|
|
680
|
+
statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
|
|
681
|
+
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
682
|
+
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
683
|
+
localData: {},
|
|
684
|
+
accountDetectionReason: undefined,
|
|
685
|
+
};
|
|
686
|
+
};
|
|
@@ -18,10 +18,12 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
|
|
|
18
18
|
allDepreciationAccountList: AccountBase[];
|
|
19
19
|
allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
20
20
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
21
|
+
completedSchedules: JEScheduledTransaction[];
|
|
21
22
|
completionStatus: CompletionStatusType;
|
|
22
23
|
draftSchedules: JEScheduledTransaction[];
|
|
23
24
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
24
25
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
26
|
+
ongoingSchedules: JEScheduledTransaction[];
|
|
25
27
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
26
28
|
refreshStatus: FetchStateAndError;
|
|
27
29
|
resolveSchedules: JEScheduledTransactionWithFailedEntries[];
|
|
@@ -51,8 +51,10 @@ export interface BulkUploadSelectorData {
|
|
|
51
51
|
sortKey: BulkUploadSortKey;
|
|
52
52
|
sortOrder: SortOrder;
|
|
53
53
|
unmatchedFiles: ResolvedBatchFile[];
|
|
54
|
+
uploadedFileCount: number;
|
|
54
55
|
uploadProgress: number;
|
|
55
56
|
uploadStatus: FetchStateAndError;
|
|
57
|
+
currentBatchId?: ID;
|
|
56
58
|
}
|
|
57
59
|
export interface ResolvedBatchDetails {
|
|
58
60
|
batchId: ID;
|
|
@@ -11,7 +11,7 @@ import { Vendor } from '../../../entity/vendor/vendorState';
|
|
|
11
11
|
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
12
12
|
import { AccountReconciliationLocalData, ActionFetchStates, ReconListUIState, ReconciliationTabsState, ReconciliationViewTabType } from '../types/reconciliationViewState';
|
|
13
13
|
export declare const ALL_ACCOUNT_RECON_SECTION_IDS: readonly ["assets", "liabilities"];
|
|
14
|
-
declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
|
|
14
|
+
export declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
|
|
15
15
|
export type AccountReconSectionID = ReturnType<typeof toAccountReconSectionID>;
|
|
16
16
|
export interface ExpenseAutomationReconciliationViewSelector {
|
|
17
17
|
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
@@ -24,7 +24,12 @@ export interface ExpenseAutomationReconciliationViewSelector {
|
|
|
24
24
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
25
25
|
completionStatus: CompletionStatusType;
|
|
26
26
|
creditCards: AccountBase[];
|
|
27
|
+
excludeAccountFetchState: FetchStateAndError;
|
|
28
|
+
excludedAccountIDs: ID[];
|
|
29
|
+
excludedAccountReconciliationByAccountID: Record<ID, AccountReconciliationByAccount>;
|
|
30
|
+
excludedAccountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
|
|
27
31
|
fetchStatus: FetchStateAndError;
|
|
32
|
+
includeAccountFetchState: FetchStateAndError;
|
|
28
33
|
monthYearPeriod: MonthYearPeriod;
|
|
29
34
|
plaidConnectionDetails: PlaidConnectionDetails;
|
|
30
35
|
reconciliationTabsState: ReconciliationTabsState;
|
|
@@ -57,6 +62,6 @@ export interface AccountReconciliationByAccount {
|
|
|
57
62
|
statementUpdateStatus: FetchStateAndError;
|
|
58
63
|
statementUploadStatus: FetchStateAndError;
|
|
59
64
|
transactionFetchState: FetchStateAndError;
|
|
65
|
+
accountDetectionReason?: string;
|
|
60
66
|
paymentAccountId?: ID;
|
|
61
67
|
}
|
|
62
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
|
|
3
|
+
exports.toAccountReconSectionID = exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
exports.ALL_ACCOUNT_RECON_SECTION_IDS = ['assets', 'liabilities'];
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
6
|
const toAccountReconSectionID = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ACCOUNT_RECON_SECTION_IDS);
|
|
7
|
+
exports.toAccountReconSectionID = toAccountReconSectionID;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExpenseAutomationFluxAnalysisView = getExpenseAutomationFluxAnalysisView;
|
|
4
|
+
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
4
5
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
5
6
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
6
7
|
const classSelector_1 = require("../../../entity/class/classSelector");
|
|
@@ -9,7 +10,7 @@ const userSelector_1 = require("../../../entity/user/userSelector");
|
|
|
9
10
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
10
11
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
11
12
|
function getExpenseAutomationFluxAnalysisView(state) {
|
|
12
|
-
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState } = state;
|
|
13
|
+
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
13
14
|
const { fetchState, error, refreshStatus, uiState, reviewOperatingExpenseIdsByPeriod, selectedSectionIdsByPeriod, groupsBySelectedPeriod, fluxAnalysisEntities, bulkReviewStatus, currency, totalBalancesAndVariance, } = expenseAutomationFluxAnalysisViewState;
|
|
14
15
|
const fetchStateAndError = {
|
|
15
16
|
fetchState,
|
|
@@ -94,10 +95,17 @@ function getExpenseAutomationFluxAnalysisView(state) {
|
|
|
94
95
|
},
|
|
95
96
|
};
|
|
96
97
|
const completionStatus = fluxCompletionStatus != null ? fluxCompletionStatus : 'incomplete';
|
|
98
|
+
const monthEndFetchState = monthYearPeriodId != null
|
|
99
|
+
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
100
|
+
: { fetchState: 'Not-Started', error: undefined };
|
|
101
|
+
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
102
|
+
fetchStateAndError,
|
|
103
|
+
monthEndFetchState,
|
|
104
|
+
]);
|
|
97
105
|
return {
|
|
98
106
|
sections,
|
|
99
107
|
totalBalancesAndVariance,
|
|
100
|
-
fetchStatus:
|
|
108
|
+
fetchStatus: reducedFetchStatus,
|
|
101
109
|
bulkReviewStatus,
|
|
102
110
|
reviewOperatingExpensesIds,
|
|
103
111
|
selectedSectionIds,
|
|
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
7
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
+
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
|
+
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
8
10
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
9
11
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
10
12
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -16,10 +18,48 @@ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/
|
|
|
16
18
|
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
17
19
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
18
20
|
const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector");
|
|
21
|
+
function getJEScheduleSortAccessor(sortKey) {
|
|
22
|
+
switch (sortKey) {
|
|
23
|
+
case 'vendor':
|
|
24
|
+
return (s) => s.vendor.name?.toLowerCase();
|
|
25
|
+
case 'category':
|
|
26
|
+
return (s) => s.jeDebit.account?.accountName?.toLowerCase();
|
|
27
|
+
case 'class':
|
|
28
|
+
return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
|
|
29
|
+
case 'depCategory':
|
|
30
|
+
return (s) => s.jeCredit.account?.accountName?.toLowerCase();
|
|
31
|
+
case 'scheduleCategory':
|
|
32
|
+
return (s) => s.jeScheduleType;
|
|
33
|
+
case 'startMonth':
|
|
34
|
+
return (s) => s.startDate?.valueOf();
|
|
35
|
+
case 'type':
|
|
36
|
+
return (s) => s.baseTransaction.typeOfTransaction;
|
|
37
|
+
case 'amortizationPeriod':
|
|
38
|
+
return (s) => s.period;
|
|
39
|
+
case 'jePostingDate':
|
|
40
|
+
return (s) => s.dayOfPostingDate;
|
|
41
|
+
case 'remainingMonths':
|
|
42
|
+
return (s) => s.period;
|
|
43
|
+
case 'runningBalance':
|
|
44
|
+
return (s) => s.balanceAsOfToday?.amount;
|
|
45
|
+
case 'totalAmount':
|
|
46
|
+
return (s) => s.baseTransaction.amount.amount;
|
|
47
|
+
case 'transactionDate':
|
|
48
|
+
return (s) => s.baseTransaction.date.valueOf();
|
|
49
|
+
case 'memo':
|
|
50
|
+
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
51
|
+
default:
|
|
52
|
+
return (s) => s.startDate?.valueOf();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
|
|
56
|
+
const accessor = getJEScheduleSortAccessor(sortKey);
|
|
57
|
+
return (0, orderBy_1.default)(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
|
|
58
|
+
}
|
|
19
59
|
function getExpenseAutomationJESchedulesView(state) {
|
|
20
60
|
const jeScheduledTransaction = [];
|
|
21
61
|
const failedJeScheduledTransaction = [];
|
|
22
|
-
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, } = state;
|
|
62
|
+
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
23
63
|
const { jeScheduleTransactionKeysByPeriod, failedJeScheduleTransactionKeysByPeriod, jeScheduleLocalDataById, postStatusById, ignoreStatusById, uiState, error, fetchState, refreshStatus, } = expenseAutomationJESchedulesViewState;
|
|
24
64
|
const accountSettingsView = (0, jeAccountSettingsViewSelector_1.getJEAccountSettingsView)(state);
|
|
25
65
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
@@ -65,18 +105,33 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
65
105
|
const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
|
|
66
106
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
67
107
|
});
|
|
68
|
-
const
|
|
69
|
-
const
|
|
108
|
+
const { sortKey, sortOrder } = uiState;
|
|
109
|
+
const draftSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft'), sortKey, sortOrder);
|
|
110
|
+
const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
|
|
111
|
+
const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
112
|
+
schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
|
|
113
|
+
const unsortedResolveSchedules = [];
|
|
70
114
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
71
115
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
72
|
-
|
|
116
|
+
unsortedResolveSchedules.push({
|
|
117
|
+
...schedule,
|
|
118
|
+
scheduledJournalEntry: journalEntry,
|
|
119
|
+
});
|
|
73
120
|
});
|
|
74
121
|
});
|
|
122
|
+
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
75
123
|
const allSteps = monthYearPeriodId != null
|
|
76
124
|
? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
|
|
77
125
|
: [];
|
|
78
126
|
const jeCompletionStatus = allSteps.find((step) => step.step === 'je_schedules')?.completionStatus;
|
|
79
127
|
const completionStatus = jeCompletionStatus != null ? jeCompletionStatus : 'incomplete';
|
|
128
|
+
const monthEndFetchState = monthYearPeriodId != null
|
|
129
|
+
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
130
|
+
: { fetchState: 'Not-Started', error: undefined };
|
|
131
|
+
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
132
|
+
{ fetchState, error },
|
|
133
|
+
monthEndFetchState,
|
|
134
|
+
]);
|
|
80
135
|
return {
|
|
81
136
|
uncategorizedAccounts,
|
|
82
137
|
allDepreciationAccountList: filteredDepAccounts,
|
|
@@ -85,15 +140,17 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
85
140
|
allAccountList: filteredAccounts,
|
|
86
141
|
accountListNestedAccountHierarchy,
|
|
87
142
|
allClassList: allClasses,
|
|
143
|
+
completedSchedules,
|
|
88
144
|
draftSchedules,
|
|
145
|
+
ongoingSchedules,
|
|
89
146
|
resolveSchedules: resolveSchedules,
|
|
90
147
|
accountSettingsView,
|
|
91
148
|
postStatusById: postStatusById,
|
|
92
149
|
ignoreStatusById: ignoreStatusById,
|
|
93
|
-
fetchState: fetchState,
|
|
150
|
+
fetchState: reducedFetchStatus.fetchState,
|
|
94
151
|
jeScheduleLocalDataById: jeScheduleLocalDataById,
|
|
95
152
|
uiState: uiState,
|
|
96
|
-
error: error,
|
|
153
|
+
error: reducedFetchStatus.error,
|
|
97
154
|
refreshStatus,
|
|
98
155
|
completionStatus,
|
|
99
156
|
};
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationMissingReceiptsView = getExpenseAutomationMissingReceiptsView;
|
|
7
7
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
8
|
+
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
8
9
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
9
10
|
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
10
11
|
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
@@ -13,7 +14,7 @@ const missingReceiptsViewReducer_1 = require("../reducers/missingReceiptsViewRed
|
|
|
13
14
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
14
15
|
const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
|
|
15
16
|
function getExpenseAutomationMissingReceiptsView(state) {
|
|
16
|
-
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
17
|
+
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
17
18
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
18
19
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
19
20
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
@@ -42,7 +43,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
42
43
|
transaction.lines.length > 0 &&
|
|
43
44
|
transaction.lines[0]
|
|
44
45
|
?.class != null
|
|
45
|
-
? transaction.lines[0].class
|
|
46
|
+
? transaction.lines[0].class?.className.toLowerCase()
|
|
46
47
|
: null;
|
|
47
48
|
case 'vendor':
|
|
48
49
|
default:
|
|
@@ -181,9 +182,16 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
181
182
|
vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
|
|
182
183
|
};
|
|
183
184
|
});
|
|
185
|
+
const monthEndFetchState = monthYearPeriodId != null
|
|
186
|
+
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
187
|
+
: { fetchState: 'Not-Started', error: undefined };
|
|
188
|
+
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
189
|
+
{ fetchState, error },
|
|
190
|
+
monthEndFetchState,
|
|
191
|
+
]);
|
|
184
192
|
return {
|
|
185
|
-
fetchState,
|
|
186
|
-
error,
|
|
193
|
+
fetchState: reducedFetchStatus.fetchState,
|
|
194
|
+
error: reducedFetchStatus.error,
|
|
187
195
|
uploadReceiptStatusById,
|
|
188
196
|
uiState,
|
|
189
197
|
refreshStatus,
|
|
@@ -196,6 +204,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
196
204
|
batchStatus: currentBatchStatus,
|
|
197
205
|
batchDetails: resolvedBatchDetails,
|
|
198
206
|
completedSubTab: bulkUpload.completedSubTab,
|
|
207
|
+
currentBatchId: bulkUpload.currentBatchId,
|
|
199
208
|
completedTransactions: {
|
|
200
209
|
fetchState: completedTransactionsForPeriod?.fetchState ?? {
|
|
201
210
|
fetchState: 'Not-Started',
|
|
@@ -223,6 +232,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
223
232
|
...bulkUpload.manualSearch,
|
|
224
233
|
results: manualSearchResults,
|
|
225
234
|
},
|
|
235
|
+
uploadedFileCount: bulkUpload.uploadedFileCount,
|
|
226
236
|
uploadProgress: bulkUpload.uploadProgress,
|
|
227
237
|
},
|
|
228
238
|
};
|