@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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { getUserByUserId } from '../user/userSelector';
|
|
2
|
+
// ── Selectors ──
|
|
3
|
+
export function getAiAccountantCustomers(customerState, userState) {
|
|
4
|
+
return Object.values(customerState.customerByTenantId).map((customer) => toCustomerView(customer, userState));
|
|
5
|
+
}
|
|
6
|
+
export function getAiAccountantJobsByTenantId(customerState, userState, tenantId) {
|
|
7
|
+
const jobs = customerState.jobsByTenantId[tenantId] ?? [];
|
|
8
|
+
return jobs.map((job) => toJobView(job, userState));
|
|
9
|
+
}
|
|
10
|
+
// ── Helpers ──
|
|
11
|
+
function toCustomerView(customer, userState) {
|
|
12
|
+
return {
|
|
13
|
+
averageAccuracy: calcAverageAccuracy(customer),
|
|
14
|
+
companyId: customer.companyId,
|
|
15
|
+
companyName: customer.companyName,
|
|
16
|
+
tenantId: customer.tenantId,
|
|
17
|
+
bookcloseDate: customer.bookcloseDate,
|
|
18
|
+
enrollment: customer.enrollment != null
|
|
19
|
+
? {
|
|
20
|
+
...customer.enrollment,
|
|
21
|
+
offboardedBy: customer.enrollment.offboardedBy != null
|
|
22
|
+
? getUserByUserId(userState, customer.enrollment.offboardedBy)
|
|
23
|
+
: undefined,
|
|
24
|
+
onboardedBy: customer.enrollment.onboardedBy != null
|
|
25
|
+
? getUserByUserId(userState, customer.enrollment.onboardedBy)
|
|
26
|
+
: undefined,
|
|
27
|
+
}
|
|
28
|
+
: undefined,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function toJobView(job, userState) {
|
|
32
|
+
return {
|
|
33
|
+
companyId: job.companyId,
|
|
34
|
+
createdAt: job.createdAt,
|
|
35
|
+
jobId: job.jobId,
|
|
36
|
+
operationType: job.operationType,
|
|
37
|
+
status: job.status,
|
|
38
|
+
tenantId: job.tenantId,
|
|
39
|
+
triggeredBy: job.triggeredBy != null
|
|
40
|
+
? getUserByUserId(userState, job.triggeredBy)
|
|
41
|
+
: undefined,
|
|
42
|
+
companyNamespace: job.companyNamespace,
|
|
43
|
+
completedAt: job.completedAt,
|
|
44
|
+
errorMessage: job.errorMessage,
|
|
45
|
+
parameters: job.parameters,
|
|
46
|
+
retryCount: job.retryCount,
|
|
47
|
+
startedAt: job.startedAt,
|
|
48
|
+
steps: job.steps,
|
|
49
|
+
validationResults: job.validationResults,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function calcAverageAccuracy(customer) {
|
|
53
|
+
const accuracy = customer.enrollment?.accuracy;
|
|
54
|
+
if (accuracy == null) {
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
const values = Object.values(accuracy);
|
|
58
|
+
if (values.length === 0) {
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
return values.reduce((sum, value) => sum + value, 0) / values.length;
|
|
62
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { stringToUnion } from '../../commonStateTypes/stringToUnion';
|
|
2
|
+
// ── Operation Type ──
|
|
3
|
+
const ALL_OPERATION_TYPES = [
|
|
4
|
+
'onboard',
|
|
5
|
+
'offboard',
|
|
6
|
+
'retrain',
|
|
7
|
+
'full_pipeline',
|
|
8
|
+
'cancel_onboarding',
|
|
9
|
+
];
|
|
10
|
+
export const toAiAccountantOperationType = (v) => stringToUnion(v, ALL_OPERATION_TYPES);
|
|
11
|
+
// ── Enrollment Status ──
|
|
12
|
+
const ALL_ENROLLMENT_STATUSES = [
|
|
13
|
+
'active',
|
|
14
|
+
'pending',
|
|
15
|
+
'onboarding',
|
|
16
|
+
'offboarding',
|
|
17
|
+
'offboarded',
|
|
18
|
+
'failed',
|
|
19
|
+
'error',
|
|
20
|
+
];
|
|
21
|
+
export const toAiAccountantEnrollmentStatus = (v) => stringToUnion(v, ALL_ENROLLMENT_STATUSES);
|
|
22
|
+
// ── Job Status ──
|
|
23
|
+
const ALL_JOB_STATUSES = [
|
|
24
|
+
'queued',
|
|
25
|
+
'running',
|
|
26
|
+
'completed',
|
|
27
|
+
'failed',
|
|
28
|
+
'cancelled',
|
|
29
|
+
'retried',
|
|
30
|
+
];
|
|
31
|
+
export const toAiAccountantJobStatus = (v) => stringToUnion(v, ALL_JOB_STATUSES);
|
|
@@ -136,6 +136,81 @@ function toJEScheduleOtherAttributes(payload) {
|
|
|
136
136
|
assetId: payload.asset_id ?? undefined,
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
+
function toJEScheduleAISummaries(payload) {
|
|
140
|
+
if (payload == null) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
const result = {};
|
|
144
|
+
if (payload.debit_account != null) {
|
|
145
|
+
result.debitAccount = {
|
|
146
|
+
confidence: payload.debit_account.confidence,
|
|
147
|
+
reasoning: payload.debit_account.reasoning,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
if (payload.credit_account != null) {
|
|
151
|
+
result.creditAccount = {
|
|
152
|
+
confidence: payload.credit_account.confidence,
|
|
153
|
+
reasoning: payload.credit_account.reasoning,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (payload.debit_accounting_class != null) {
|
|
157
|
+
result.debitClass = {
|
|
158
|
+
confidence: payload.debit_accounting_class.confidence,
|
|
159
|
+
reasoning: payload.debit_accounting_class.reasoning,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
if (payload.credit_accounting_class != null) {
|
|
163
|
+
result.creditClass = {
|
|
164
|
+
confidence: payload.credit_accounting_class.confidence,
|
|
165
|
+
reasoning: payload.credit_accounting_class.reasoning,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (payload.period != null) {
|
|
169
|
+
result.period = {
|
|
170
|
+
confidence: payload.period.confidence,
|
|
171
|
+
reasoning: payload.period.reasoning,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
if (payload.posting_date != null) {
|
|
175
|
+
result.postingDate = {
|
|
176
|
+
confidence: payload.posting_date.confidence,
|
|
177
|
+
reasoning: payload.posting_date.reasoning,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
if (payload.schedule_type != null) {
|
|
181
|
+
result.scheduleType = {
|
|
182
|
+
confidence: payload.schedule_type.confidence,
|
|
183
|
+
reasoning: payload.schedule_type.reasoning,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
187
|
+
}
|
|
188
|
+
function toJEScheduleRecommendations(payload) {
|
|
189
|
+
if (payload == null) {
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
creditAccountConfidence: payload.credit_account_confidence,
|
|
194
|
+
creditClassConfidence: payload.credit_class_confidence,
|
|
195
|
+
debitAccountConfidence: payload.debit_account_confidence,
|
|
196
|
+
debitClassConfidence: payload.debit_class_confidence,
|
|
197
|
+
endDate: payload.end_date ?? undefined,
|
|
198
|
+
jeCreditAccountId: payload.je_credit_account_id ?? undefined,
|
|
199
|
+
jeCreditAccountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
200
|
+
jeDebitAccountId: payload.je_debit_account_id ?? undefined,
|
|
201
|
+
jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
|
|
202
|
+
jeScheduleType: payload.je_schedule_type ?? undefined,
|
|
203
|
+
jeScheduleTypeConfidence: payload.je_schedule_type_confidence,
|
|
204
|
+
period: payload.period ?? undefined,
|
|
205
|
+
periodConfidence: payload.period_confidence,
|
|
206
|
+
postingDate: payload.posting_date ?? undefined,
|
|
207
|
+
postingDateConfidence: payload.posting_date_confidence,
|
|
208
|
+
similarTransactions: payload.similar_transactions,
|
|
209
|
+
startDate: payload.start_date ?? undefined,
|
|
210
|
+
startingMonth: payload.starting_month ?? undefined,
|
|
211
|
+
startingMonthConfidence: payload.starting_month_confidence,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
139
214
|
export function toJEScheduledTransaction(payload) {
|
|
140
215
|
return {
|
|
141
216
|
jeScheduleId: payload.je_schedule_id ?? undefined,
|
|
@@ -180,6 +255,9 @@ export function toJEScheduledTransaction(payload) {
|
|
|
180
255
|
? toJEScheduleOtherAttributes(payload.other_attributes)
|
|
181
256
|
: {},
|
|
182
257
|
scheduledJournalEntry: [],
|
|
258
|
+
aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
|
|
259
|
+
createdByUserID: payload.created_by?.user_id ?? undefined,
|
|
260
|
+
recommendations: toJEScheduleRecommendations(payload.recommendations),
|
|
183
261
|
};
|
|
184
262
|
}
|
|
185
263
|
export function toJEAccruedScheduledTransaction(payload) {
|
|
@@ -70,12 +70,13 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
|
|
|
70
70
|
export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
71
71
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
72
72
|
const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
73
|
-
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
|
|
73
|
+
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
|
|
74
74
|
const vendorDetails = getVendorByVendorId(vendorState, vendorId);
|
|
75
75
|
if (vendorDetails == null) {
|
|
76
76
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
77
77
|
}
|
|
78
78
|
const userDetails = updatedBy != null ? getUserByUserId(userState, updatedBy) : undefined;
|
|
79
|
+
const createdByUserDetails = createdBy != null ? getUserByUserId(userState, createdBy) : undefined;
|
|
79
80
|
const baseTransactionObject = getScheduleTransactionById(transactionState, baseTransaction);
|
|
80
81
|
if (baseTransactionObject == null) {
|
|
81
82
|
throw Error('Base Schedule transaction cannot be null');
|
|
@@ -127,5 +128,8 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
|
|
|
127
128
|
account: accountDebit,
|
|
128
129
|
},
|
|
129
130
|
scheduledJournalEntry,
|
|
131
|
+
aiSummaries,
|
|
132
|
+
createdByUser: createdByUserDetails,
|
|
133
|
+
recommendations,
|
|
130
134
|
};
|
|
131
135
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { date } from '../../zeniDayJS';
|
|
2
|
+
export const mapProjectMetadataPayloadToProject = (payload) => ({
|
|
3
|
+
projectId: payload.zeni_project_id,
|
|
4
|
+
projectName: payload.project_name,
|
|
5
|
+
...(payload.status != null ? { status: payload.status } : {}),
|
|
6
|
+
...(payload.start_date != null ? { startDate: date(payload.start_date) } : {}),
|
|
7
|
+
...(payload.parent_customer_accounting_provider_id != null
|
|
8
|
+
? {
|
|
9
|
+
parentCustomerAccountingProviderId: payload.parent_customer_accounting_provider_id,
|
|
10
|
+
}
|
|
11
|
+
: {}),
|
|
12
|
+
...(payload.accounting_provider_project_customer_id != null
|
|
13
|
+
? {
|
|
14
|
+
accountingProviderProjectCustomerId: payload.accounting_provider_project_customer_id,
|
|
15
|
+
}
|
|
16
|
+
: {}),
|
|
17
|
+
...(payload.accounting_provider_project_id != null
|
|
18
|
+
? { accountingProviderProjectId: payload.accounting_provider_project_id }
|
|
19
|
+
: {}),
|
|
20
|
+
...(payload.zeni_parent_customer_id != null
|
|
21
|
+
? { zeniParentCustomerId: payload.zeni_parent_customer_id }
|
|
22
|
+
: {}),
|
|
23
|
+
...(payload.zeni_project_customer_id != null
|
|
24
|
+
? { zeniProjectCustomerId: payload.zeni_project_customer_id }
|
|
25
|
+
: {}),
|
|
26
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
import { mapProjectMetadataPayloadToProject, } from './projectPayload';
|
|
3
|
+
export const initialState = {
|
|
4
|
+
projects: {},
|
|
5
|
+
};
|
|
6
|
+
const projectSlice = createSlice({
|
|
7
|
+
name: 'project',
|
|
8
|
+
initialState,
|
|
9
|
+
reducers: {
|
|
10
|
+
updateProjects: {
|
|
11
|
+
reducer(draft, action) {
|
|
12
|
+
action.payload.forEach((projectPayload) => {
|
|
13
|
+
const project = mapProjectMetadataPayloadToProject(projectPayload);
|
|
14
|
+
draft.projects[project.projectId] = project;
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
prepare(payload) {
|
|
18
|
+
return { payload };
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
clearAllProjects(draft) {
|
|
22
|
+
Object.assign(draft, initialState);
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
export const { updateProjects, clearAllProjects } = projectSlice.actions;
|
|
27
|
+
export default projectSlice.reducer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function getProjectById(projectState, projectId) {
|
|
2
|
+
return projectState.projects[projectId];
|
|
3
|
+
}
|
|
4
|
+
export function getProjectsByIds(projectState, projectIds) {
|
|
5
|
+
return projectIds
|
|
6
|
+
.map((projectId) => getProjectById(projectState, projectId))
|
|
7
|
+
.filter((project) => project != null);
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
|
+
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { getAllAccountMetadataRecordsByID, getParentAccountId, } from '../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport';
|
|
4
|
+
import { updateMultipleSubAccountsWithBalances } from '../account/accountReducer';
|
|
5
|
+
import { updateSectionProjectView } from './sectionProjectViewReducer';
|
|
6
|
+
export const updateSectionProjectViewEpic = (actions$) => actions$.pipe(filter(updateSectionProjectView.match), mergeMap((action) => {
|
|
7
|
+
const actions = [];
|
|
8
|
+
const sectionPayload = action.payload.sectionPayload;
|
|
9
|
+
const sectionId = action.payload.sectionId;
|
|
10
|
+
const timeframe = action.payload.timeframe;
|
|
11
|
+
const reportId = action.payload.reportId;
|
|
12
|
+
const currencyPayload = action.payload.currencyPayload;
|
|
13
|
+
const accountsMetadataPayload = action.payload.accountsMetadataPayload;
|
|
14
|
+
const accountMetadataRecordsByID = getAllAccountMetadataRecordsByID(accountsMetadataPayload);
|
|
15
|
+
const accountMetadataWithBalancesPayloads = [];
|
|
16
|
+
if (sectionPayload.projects != null) {
|
|
17
|
+
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
18
|
+
const projectAccounts = sectionPayload.projects[projectId].accounts;
|
|
19
|
+
const projectsViewParentID = {
|
|
20
|
+
projectId,
|
|
21
|
+
sectionId,
|
|
22
|
+
};
|
|
23
|
+
getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (accountMetadataWithBalancesPayloads.length > 0) {
|
|
27
|
+
actions.push(updateMultipleSubAccountsWithBalances(accountMetadataWithBalancesPayloads, currencyPayload, reportId, timeframe));
|
|
28
|
+
}
|
|
29
|
+
return from(actions);
|
|
30
|
+
}));
|
|
31
|
+
const getSubAccountsMetadataForProjectAccountList = (accountListWithBalances, accountMetadataRecordsByID, sectionId, projectsViewParentID, result) => {
|
|
32
|
+
if (accountListWithBalances != null) {
|
|
33
|
+
Object.keys(accountListWithBalances).forEach((eachAccountId) => {
|
|
34
|
+
const accountMetadataRecord = accountMetadataRecordsByID[eachAccountId];
|
|
35
|
+
if (accountMetadataRecord != null) {
|
|
36
|
+
const accountId = accountMetadataRecord.nestedAccountId;
|
|
37
|
+
result.push({
|
|
38
|
+
accountsViewParentID: {
|
|
39
|
+
parentAccountId: getParentAccountId(accountId),
|
|
40
|
+
sectionId,
|
|
41
|
+
},
|
|
42
|
+
accountMetadataPayload: accountMetadataRecord.accountMetadataPayload,
|
|
43
|
+
accountBalancesPayload: accountListWithBalances[eachAccountId],
|
|
44
|
+
projectsViewParentID,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
console.warn(`Account ${eachAccountId} in Section ${sectionId} Project ${projectsViewParentID.projectId} is missing metadata.`);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod, } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
2
|
+
import { getSectionProjectViewKey, } from './sectionProjectView';
|
|
3
|
+
export const mapProjectCOABalanceGroupedPayloadToSectionProjectView = (timeframe, projectBalancesPayload, currencyPayload, id, nestedAccountIds) => {
|
|
4
|
+
return {
|
|
5
|
+
key: getSectionProjectViewKey(id.sectionId, id.projectId, id.reportId),
|
|
6
|
+
projectId: id.projectId,
|
|
7
|
+
sectionId: id.sectionId,
|
|
8
|
+
balancesByPeriod: mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod(projectBalancesPayload, currencyPayload, timeframe),
|
|
9
|
+
nestedAccountIds,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
3
|
+
import { mapAccountMetadataPayloadToAccountMetadata, } from '../account/accountPayload';
|
|
4
|
+
import { getNestedAccountIDHierarchyForAccounts } from '../sectionAccountsView/getNestedAccountIDHierarchyForSection';
|
|
5
|
+
import { getSectionProjectViewKey } from './sectionProjectView';
|
|
6
|
+
import { mapProjectCOABalanceGroupedPayloadToSectionProjectView } from './sectionProjectViewHelper';
|
|
7
|
+
export const initialState = {
|
|
8
|
+
sectionsByKey: {},
|
|
9
|
+
};
|
|
10
|
+
const sectionProjectView = createSlice({
|
|
11
|
+
name: 'sectionProjectView',
|
|
12
|
+
initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
updateSectionProjectView: {
|
|
15
|
+
prepare(timeframe, sectionId, reportId, sectionPayload, accountsMetadataPayload, currencyPayload) {
|
|
16
|
+
return {
|
|
17
|
+
payload: {
|
|
18
|
+
timeframe,
|
|
19
|
+
reportId,
|
|
20
|
+
sectionId,
|
|
21
|
+
sectionPayload,
|
|
22
|
+
accountsMetadataPayload,
|
|
23
|
+
currencyPayload,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
reducer(draft, action) {
|
|
28
|
+
const { timeframe, sectionPayload, sectionId, reportId, currencyPayload, accountsMetadataPayload, } = action.payload;
|
|
29
|
+
if (sectionPayload.projects != null) {
|
|
30
|
+
const accountsMetadata = accountsMetadataPayload.map((eachAccount) => mapAccountMetadataPayloadToAccountMetadata(eachAccount));
|
|
31
|
+
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
32
|
+
const projectPayload = sectionPayload.projects[projectId];
|
|
33
|
+
const projectAccountIds = projectPayload.accounts != null
|
|
34
|
+
? Object.keys(projectPayload.accounts)
|
|
35
|
+
: [];
|
|
36
|
+
const nestedAccountIds = getNestedAccountIDHierarchyForAccounts(projectAccountIds, accountsMetadata);
|
|
37
|
+
updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
clearAllSectionsProjectView(draft) {
|
|
43
|
+
Object.assign(draft, initialState);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
export const { updateSectionProjectView, clearAllSectionsProjectView } = sectionProjectView.actions;
|
|
48
|
+
export default sectionProjectView.reducer;
|
|
49
|
+
const updateSectionProject = (draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds) => {
|
|
50
|
+
const sectionKey = getSectionProjectViewKey(sectionId, projectId, reportId);
|
|
51
|
+
const section = draft.sectionsByKey[sectionKey];
|
|
52
|
+
if (section != null) {
|
|
53
|
+
draft.sectionsByKey[sectionKey].balancesByPeriod = Object.assign({}, draft.sectionsByKey[sectionKey].balancesByPeriod, mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod(projectPayload, currencyPayload, timeframe));
|
|
54
|
+
draft.sectionsByKey[sectionKey].nestedAccountIds = nestedAccountIds;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
draft.sectionsByKey[sectionKey] =
|
|
58
|
+
mapProjectCOABalanceGroupedPayloadToSectionProjectView(timeframe, projectPayload, currencyPayload, { sectionId, projectId, reportId }, nestedAccountIds);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import recordGet from 'lodash/get';
|
|
2
|
+
import { getCOABalances, } from '../../commonStateTypes/coaBalance/coaBalance';
|
|
3
|
+
import { getSumOfBalancesByGroupedByPeriod } from '../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod';
|
|
4
|
+
import { getNestedAccountReportForAccount, } from '../account/subAccountSelector';
|
|
5
|
+
import { getProjectById } from '../project/projectSelector';
|
|
6
|
+
import { getSectionProjectViewKey } from './sectionProjectView';
|
|
7
|
+
export const getSectionProjectViewReport = (accountState, projectState, sectionState, projectIds, id, filter) => {
|
|
8
|
+
const projectIdsToShow = projectIds.filter((projectId) => !filter.projectsToFilterOut.includes(projectId));
|
|
9
|
+
const projectReports = [];
|
|
10
|
+
const sectionBalancesTotalByPeriodArray = [];
|
|
11
|
+
projectIdsToShow.forEach((projectId) => {
|
|
12
|
+
const project = getProjectById(projectState, projectId);
|
|
13
|
+
if (project == null) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const projectSectionKey = getSectionProjectViewKey(id.sectionId, projectId, id.reportId);
|
|
17
|
+
const projectSectionView = recordGet(sectionState.sectionsByKey, projectSectionKey, undefined);
|
|
18
|
+
const nestedAccountHierarchy = projectSectionView?.nestedAccountIds ?? [];
|
|
19
|
+
const nestedAccountReports = [];
|
|
20
|
+
nestedAccountHierarchy.forEach((accountIdHierarchy) => {
|
|
21
|
+
const report = getNestedAccountReportForAccount(accountState, {
|
|
22
|
+
accountIdHierarchy,
|
|
23
|
+
reportId: id.reportId,
|
|
24
|
+
projectsViewParentId: {
|
|
25
|
+
projectId,
|
|
26
|
+
sectionId: id.sectionId,
|
|
27
|
+
},
|
|
28
|
+
}, filter, nestedAccountHierarchy.length > 1);
|
|
29
|
+
if (report != null) {
|
|
30
|
+
nestedAccountReports.push(report);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const projectBalancesTotalByPeriod = projectSectionView?.balancesByPeriod ?? {};
|
|
34
|
+
const projectReport = {
|
|
35
|
+
projectId,
|
|
36
|
+
projectName: project.projectName,
|
|
37
|
+
accounts: nestedAccountReports,
|
|
38
|
+
...getCOABalances(projectBalancesTotalByPeriod, filter),
|
|
39
|
+
projectBalancesTotalByPeriod,
|
|
40
|
+
};
|
|
41
|
+
projectReports.push(projectReport);
|
|
42
|
+
sectionBalancesTotalByPeriodArray.push(projectBalancesTotalByPeriod);
|
|
43
|
+
});
|
|
44
|
+
const sectionBalancesTotalByPeriod = getSumOfBalancesByGroupedByPeriod(sectionBalancesTotalByPeriodArray) ?? {};
|
|
45
|
+
return {
|
|
46
|
+
projects: projectReports,
|
|
47
|
+
...getCOABalances(sectionBalancesTotalByPeriod, filter),
|
|
48
|
+
sectionBalancesTotalByPeriod,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -151,6 +151,7 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
151
151
|
'flux_analysis_reviewed',
|
|
152
152
|
'receipt_match',
|
|
153
153
|
'receipts_upload',
|
|
154
|
+
'receipts_bulk_match',
|
|
154
155
|
'billing_address_view',
|
|
155
156
|
'express_pay_submit',
|
|
156
157
|
'exclude_transaction',
|
|
@@ -168,6 +169,11 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
168
169
|
'treasury_accept_term',
|
|
169
170
|
'treasury_transfer_money',
|
|
170
171
|
'treasury_transfer_money_failed',
|
|
172
|
+
'auto_transfer_rule_create',
|
|
173
|
+
'auto_transfer_rule_update',
|
|
174
|
+
'auto_transfer_rule_delete',
|
|
175
|
+
'auto_transfer_rule_pause',
|
|
176
|
+
'auto_transfer_rule_resume',
|
|
171
177
|
'treasury_update_portfolio_allocation',
|
|
172
178
|
'send_email_magic_link_to_user',
|
|
173
179
|
'complete_profile_done',
|
|
@@ -195,6 +201,10 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
195
201
|
'transactionCategorized_transactionsUpdated_transactionFailed',
|
|
196
202
|
'transactionCategorized_transactionUpdated_transactionsFailed',
|
|
197
203
|
'transactionCategorized_transactionUpdated_transactionFailed',
|
|
204
|
+
'accounting_classes_enabled_update',
|
|
205
|
+
'account_excluded_from_reconciliation',
|
|
206
|
+
'account_included_in_reconciliation',
|
|
207
|
+
'ai_accountant_trigger_job',
|
|
198
208
|
];
|
|
199
209
|
export const toSnackbarMessageSection = (v) => stringToUnion(v, ALL_SNACKBAR_MESSAGE_SECTIONS);
|
|
200
210
|
// Keeping this different from the message type, since we may not have messages in all instances
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { clearAllAiAccountantCustomers } from '../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
|
|
3
4
|
import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
|
|
4
5
|
import { clearAllApprovalRules } from '../../entity/approvalRule/approvalRuleReducer';
|
|
5
6
|
import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
|
|
6
7
|
import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
|
|
7
8
|
import { clearAllNotifications } from '../../entity/notification/notificationReducer';
|
|
8
9
|
import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
|
|
10
|
+
import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
|
|
9
11
|
import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
|
|
10
12
|
import { clearAllToastNotifications } from '../../entity/toastNotification/toastNotificationReducer';
|
|
11
13
|
import { clearAccountList } from '../../view/accountList/accountListReducer';
|
|
12
14
|
import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
|
|
13
15
|
import { clearAddressView } from '../../view/addressView/addressViewReducer';
|
|
14
16
|
import { clearAggregatedReport } from '../../view/aiAgentPerformance/aggregatedReportViewReducer';
|
|
17
|
+
import { clearAiAccountantView } from '../../view/aiAccountantView/aiAccountantViewReducer';
|
|
15
18
|
import { clearAiCfoView } from '../../view/aiCfoView/aiCfoViewReducer';
|
|
16
19
|
import { clearApAgingDetail } from '../../view/apAgingView/apAgingDetail/apAgingDetailReducer';
|
|
17
20
|
import { clearApAging } from '../../view/apAgingView/apAgingReport/apAgingReducer';
|
|
@@ -64,6 +67,7 @@ import { clearOwnerList } from '../../view/ownerList/ownerListReducer';
|
|
|
64
67
|
import { clearPeople } from '../../view/people/peopleReducer';
|
|
65
68
|
import { clearProfitAndLoss } from '../../view/profitAndLoss/profitAndLossReducer';
|
|
66
69
|
import { clearProfitAndLossClassesView } from '../../view/profitAndLossClassesView/profitAndLossClassesViewReducer';
|
|
70
|
+
import { clearProfitAndLossProjectView } from '../../view/profitAndLossProjectView/profitAndLossProjectViewReducer';
|
|
67
71
|
import { clearRecommendation } from '../../view/recommendation/recommendationReducer';
|
|
68
72
|
import { clearReferrals } from '../../view/referralView/referralReducer';
|
|
69
73
|
import { clearReimbursementCard } from '../../view/reimbursementCard/reimbursementCardReducer';
|
|
@@ -161,6 +165,7 @@ import { clearAllChargeCardRepayments } from '../chargeCardRepayment/chargeCardR
|
|
|
161
165
|
import { clearAllChargeCardTransactions } from '../chargeCardTransaction/chargeCardTransactionReducer';
|
|
162
166
|
import { clearAllClasses } from '../class/classReducer';
|
|
163
167
|
import { clearAllCompanies } from '../company/companyReducer';
|
|
168
|
+
import { clearAllProjects } from '../project/projectReducer';
|
|
164
169
|
import { clearCompanyHealthMetric } from '../companyHealthMetric/companyHealthMetricReducer';
|
|
165
170
|
import { clearAllConnectedAccounts } from '../connectedAccount/connectedAccountReducer';
|
|
166
171
|
import { clearCountryList } from '../countryList/countryListReducer';
|
|
@@ -207,8 +212,11 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
|
|
|
207
212
|
clearActivityHistory(),
|
|
208
213
|
clearActivityRealTimeApproval(),
|
|
209
214
|
clearAddressView(),
|
|
215
|
+
clearAiAccountantView(),
|
|
216
|
+
clearAllAiAccountantCustomers(),
|
|
210
217
|
clearAiCfoView(),
|
|
211
218
|
clearAllClasses(),
|
|
219
|
+
clearAllProjects(),
|
|
212
220
|
clearAllMonthEndCloseChecksView(),
|
|
213
221
|
clearApAging(),
|
|
214
222
|
clearApAgingDetail(),
|
|
@@ -288,6 +296,7 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
|
|
|
288
296
|
clearPreviousBills(),
|
|
289
297
|
clearProfitAndLoss(),
|
|
290
298
|
clearProfitAndLossClassesView(),
|
|
299
|
+
clearProfitAndLossProjectView(),
|
|
291
300
|
clearRecommendation(),
|
|
292
301
|
clearReferrals(),
|
|
293
302
|
clearReimbursementCard(),
|
|
@@ -382,6 +391,7 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
|
|
|
382
391
|
clearAllReimbursements(),
|
|
383
392
|
clearAllSectionsAccountsView(),
|
|
384
393
|
clearAllSectionsClassesViewV2(),
|
|
394
|
+
clearAllSectionsProjectView(),
|
|
385
395
|
clearAllSubscriptionAddOns(),
|
|
386
396
|
clearAllSubscriptionCoupons(),
|
|
387
397
|
clearAllSubscriptionPlans(),
|
|
@@ -125,6 +125,12 @@ const tenant = createSlice({
|
|
|
125
125
|
draft.tenantIds = [...new Set([...draft.tenantIds, ...tenantIds])];
|
|
126
126
|
draft.loggedInUser = assignWith(draft.loggedInUser ?? {}, firstUser, (objValue, srcValue) => srcValue ?? objValue);
|
|
127
127
|
},
|
|
128
|
+
updateTenantAccountingClassesEnabled(draft, action) {
|
|
129
|
+
const { tenantId, enabled } = action.payload;
|
|
130
|
+
if (draft.tenantsById[tenantId] != null) {
|
|
131
|
+
draft.tenantsById[tenantId].isAccountingClassesEnabled = enabled;
|
|
132
|
+
}
|
|
133
|
+
},
|
|
128
134
|
updateTenantMasterTOSInfo(draft, action) {
|
|
129
135
|
const { tenant_id, user_role_id, master_tos_info } = action.payload;
|
|
130
136
|
if (draft.tenantsById[tenant_id] != null &&
|
|
@@ -529,7 +535,7 @@ const tenant = createSlice({
|
|
|
529
535
|
},
|
|
530
536
|
},
|
|
531
537
|
});
|
|
532
|
-
export const { updateTenants, fetchAllTenants, updateTenantsSuccess, updateTenantsFailure, fetchActiveTenant, updateTenantSuccess, updateTenantFailure, updateCurrentTenant, fetchExcludedResources, updateExcludedResourcesSuccess, updateExcludedResourcesFailure, doSignIn, doMagicLinkSignIn, magicLinkSignInSuccess, magicLinkSignInFailure, sendEmailMagicLinkToUser, sendEmailMagicLinkToUserSuccess, sendEmailMagicLinkToUserFailure, updateSignInState, doSignOut, signOutSuccess, updateLoggedInUser, fetchExternalConnections, saveExternalConnection, saveExternalConnectionSuccess, saveExternalConnectionFailure, fetchExternalConnectionsFailure, fetchExternalConnectionsSuccess, clearAll, fetchSubscriptionSummaryForTenant, updateSubscriptionSummaryForTenantSuccess, updateSubscriptionSummaryForTenantFailure, updateOnboardingTenants, removeOnboardingTenant, updateTenantReimbursementInfo, updateReferViewedForLoggedInUser, updateTreasuryVideoViewedForLoggedInUser, resetSignInState, trigger2FA, updateTenantMasterTOSInfo, verifyDeviceWithTwoFA, verifyDeviceWithTwoFASuccess, verifyDeviceWithTwoFAFailure, resendVerifyDeviceOTP, resendVerifyDeviceOTPSuccess, resendVerifyDeviceOTPFailure, } = tenant.actions;
|
|
538
|
+
export const { updateTenants, fetchAllTenants, updateTenantsSuccess, updateTenantsFailure, fetchActiveTenant, updateTenantSuccess, updateTenantFailure, updateCurrentTenant, fetchExcludedResources, updateExcludedResourcesSuccess, updateExcludedResourcesFailure, doSignIn, doMagicLinkSignIn, magicLinkSignInSuccess, magicLinkSignInFailure, sendEmailMagicLinkToUser, sendEmailMagicLinkToUserSuccess, sendEmailMagicLinkToUserFailure, updateSignInState, doSignOut, signOutSuccess, updateLoggedInUser, fetchExternalConnections, saveExternalConnection, saveExternalConnectionSuccess, saveExternalConnectionFailure, fetchExternalConnectionsFailure, fetchExternalConnectionsSuccess, clearAll, fetchSubscriptionSummaryForTenant, updateSubscriptionSummaryForTenantSuccess, updateSubscriptionSummaryForTenantFailure, updateOnboardingTenants, removeOnboardingTenant, updateTenantReimbursementInfo, updateReferViewedForLoggedInUser, updateTreasuryVideoViewedForLoggedInUser, resetSignInState, trigger2FA, updateTenantAccountingClassesEnabled, updateTenantMasterTOSInfo, verifyDeviceWithTwoFA, verifyDeviceWithTwoFASuccess, verifyDeviceWithTwoFAFailure, resendVerifyDeviceOTP, resendVerifyDeviceOTPSuccess, resendVerifyDeviceOTPFailure, } = tenant.actions;
|
|
533
539
|
export default tenant.reducer;
|
|
534
540
|
/**
|
|
535
541
|
* Converts tenants payload to Tenant and User State
|
|
@@ -553,6 +559,8 @@ function mapTenantsPayloadToState(tenantsPayload, userTenantPayload) {
|
|
|
553
559
|
function mapTenantPayloadToTenant(payload, userTenantPayload) {
|
|
554
560
|
const tenant = {
|
|
555
561
|
accountingClassIDs: payload.accounting_class_ids,
|
|
562
|
+
isAccountingClassesEnabled: payload.is_accounting_classes_enabled ?? true,
|
|
563
|
+
isAccountingProjectsEnabled: payload.is_accounting_projects_enabled ?? false,
|
|
556
564
|
bookCloseDate: payload.book_close_date != null
|
|
557
565
|
? date(payload.book_close_date)
|
|
558
566
|
: undefined,
|
|
@@ -265,6 +265,20 @@ export const isTenantCardsOnly = (tenant) => {
|
|
|
265
265
|
tenant.productSettings.isSpendManagementEnabled === false
|
|
266
266
|
: false;
|
|
267
267
|
};
|
|
268
|
+
export const getIsAccountingClassesEnabled = (state) => {
|
|
269
|
+
const { currentTenantId, tenantsById } = state.tenantState;
|
|
270
|
+
if (currentTenantId == null) {
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
return tenantsById[currentTenantId]?.isAccountingClassesEnabled ?? true;
|
|
274
|
+
};
|
|
275
|
+
export const getIsAccountingProjectsEnabled = (state) => {
|
|
276
|
+
const { currentTenantId, tenantsById } = state.tenantState;
|
|
277
|
+
if (currentTenantId == null) {
|
|
278
|
+
return false;
|
|
279
|
+
}
|
|
280
|
+
return tenantsById[currentTenantId]?.isAccountingProjectsEnabled ?? false;
|
|
281
|
+
};
|
|
268
282
|
export const isTenantBookkeepingEnabled = (tenant) => {
|
|
269
283
|
// if the tenants API takes time, tenant can be non null with productSettings as null
|
|
270
284
|
return tenant != null && tenant.productSettings != null
|