@zeniai/client-epic-state 4.20.3-betaSS11 → 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 +2 -42
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -6
- package/lib/esm/view/creditAgentView/epics/downloadCreditReportEpic.js +49 -25
- 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 +3 -5
- package/lib/view/creditAgentView/creditAgentViewReducer.js +3 -43
- 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/creditAgentView/epics/downloadCreditReportEpic.d.ts +1 -1
- package/lib/view/creditAgentView/epics/downloadCreditReportEpic.js +47 -23
- 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
|
@@ -146,6 +146,81 @@ function toJEScheduleOtherAttributes(payload) {
|
|
|
146
146
|
assetId: payload.asset_id ?? undefined,
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
+
function toJEScheduleAISummaries(payload) {
|
|
150
|
+
if (payload == null) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
const result = {};
|
|
154
|
+
if (payload.debit_account != null) {
|
|
155
|
+
result.debitAccount = {
|
|
156
|
+
confidence: payload.debit_account.confidence,
|
|
157
|
+
reasoning: payload.debit_account.reasoning,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (payload.credit_account != null) {
|
|
161
|
+
result.creditAccount = {
|
|
162
|
+
confidence: payload.credit_account.confidence,
|
|
163
|
+
reasoning: payload.credit_account.reasoning,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
if (payload.debit_accounting_class != null) {
|
|
167
|
+
result.debitClass = {
|
|
168
|
+
confidence: payload.debit_accounting_class.confidence,
|
|
169
|
+
reasoning: payload.debit_accounting_class.reasoning,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (payload.credit_accounting_class != null) {
|
|
173
|
+
result.creditClass = {
|
|
174
|
+
confidence: payload.credit_accounting_class.confidence,
|
|
175
|
+
reasoning: payload.credit_accounting_class.reasoning,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
if (payload.period != null) {
|
|
179
|
+
result.period = {
|
|
180
|
+
confidence: payload.period.confidence,
|
|
181
|
+
reasoning: payload.period.reasoning,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (payload.posting_date != null) {
|
|
185
|
+
result.postingDate = {
|
|
186
|
+
confidence: payload.posting_date.confidence,
|
|
187
|
+
reasoning: payload.posting_date.reasoning,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (payload.schedule_type != null) {
|
|
191
|
+
result.scheduleType = {
|
|
192
|
+
confidence: payload.schedule_type.confidence,
|
|
193
|
+
reasoning: payload.schedule_type.reasoning,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
197
|
+
}
|
|
198
|
+
function toJEScheduleRecommendations(payload) {
|
|
199
|
+
if (payload == null) {
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
creditAccountConfidence: payload.credit_account_confidence,
|
|
204
|
+
creditClassConfidence: payload.credit_class_confidence,
|
|
205
|
+
debitAccountConfidence: payload.debit_account_confidence,
|
|
206
|
+
debitClassConfidence: payload.debit_class_confidence,
|
|
207
|
+
endDate: payload.end_date ?? undefined,
|
|
208
|
+
jeCreditAccountId: payload.je_credit_account_id ?? undefined,
|
|
209
|
+
jeCreditAccountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
210
|
+
jeDebitAccountId: payload.je_debit_account_id ?? undefined,
|
|
211
|
+
jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
|
|
212
|
+
jeScheduleType: payload.je_schedule_type ?? undefined,
|
|
213
|
+
jeScheduleTypeConfidence: payload.je_schedule_type_confidence,
|
|
214
|
+
period: payload.period ?? undefined,
|
|
215
|
+
periodConfidence: payload.period_confidence,
|
|
216
|
+
postingDate: payload.posting_date ?? undefined,
|
|
217
|
+
postingDateConfidence: payload.posting_date_confidence,
|
|
218
|
+
similarTransactions: payload.similar_transactions,
|
|
219
|
+
startDate: payload.start_date ?? undefined,
|
|
220
|
+
startingMonth: payload.starting_month ?? undefined,
|
|
221
|
+
startingMonthConfidence: payload.starting_month_confidence,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
149
224
|
function toJEScheduledTransaction(payload) {
|
|
150
225
|
return {
|
|
151
226
|
jeScheduleId: payload.je_schedule_id ?? undefined,
|
|
@@ -190,6 +265,9 @@ function toJEScheduledTransaction(payload) {
|
|
|
190
265
|
? toJEScheduleOtherAttributes(payload.other_attributes)
|
|
191
266
|
: {},
|
|
192
267
|
scheduledJournalEntry: [],
|
|
268
|
+
aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
|
|
269
|
+
createdByUserID: payload.created_by?.user_id ?? undefined,
|
|
270
|
+
recommendations: toJEScheduleRecommendations(payload.recommendations),
|
|
193
271
|
};
|
|
194
272
|
}
|
|
195
273
|
function toJEAccruedScheduledTransaction(payload) {
|
|
@@ -9,7 +9,7 @@ import { ScheduleTransaction } from '../transaction/stateTypes/scheduleTransacti
|
|
|
9
9
|
import { TransactionID } from '../transaction/stateTypes/transaction';
|
|
10
10
|
import { User } from '../user/userState';
|
|
11
11
|
import { Vendor } from '../vendor/vendorState';
|
|
12
|
-
import { JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
|
|
12
|
+
import { JEScheduleAISummaries, JEScheduleOtherAttributes, JEScheduleRecommendations, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
|
|
13
13
|
import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleTypes } from './jeSchedulesTypes';
|
|
14
14
|
export interface ScheduledJournalEntry {
|
|
15
15
|
error: JournalEntryErrorCodeType[];
|
|
@@ -59,13 +59,16 @@ export interface JEScheduledTransaction {
|
|
|
59
59
|
scheduledJournalEntry: ScheduledJournalEntry[];
|
|
60
60
|
status: ScheduleStatus;
|
|
61
61
|
vendor: Vendor;
|
|
62
|
+
aiSummaries?: JEScheduleAISummaries;
|
|
62
63
|
balanceAsOfToday?: Amount;
|
|
64
|
+
createdByUser?: User;
|
|
63
65
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
64
66
|
endDate?: ZeniDate;
|
|
65
67
|
jeScheduleId?: ID;
|
|
66
68
|
jeScheduleType?: ScheduleTypes;
|
|
67
69
|
lastDayOfMonth?: boolean;
|
|
68
70
|
period?: number;
|
|
71
|
+
recommendations?: JEScheduleRecommendations;
|
|
69
72
|
startDate?: ZeniDate;
|
|
70
73
|
updatedAt?: ZeniDate;
|
|
71
74
|
updatedByUser?: User;
|
|
@@ -77,12 +77,13 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
|
|
|
77
77
|
const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
78
78
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
79
79
|
const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
80
|
-
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
|
|
80
|
+
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;
|
|
81
81
|
const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
|
|
82
82
|
if (vendorDetails == null) {
|
|
83
83
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
84
84
|
}
|
|
85
85
|
const userDetails = updatedBy != null ? (0, userSelector_1.getUserByUserId)(userState, updatedBy) : undefined;
|
|
86
|
+
const createdByUserDetails = createdBy != null ? (0, userSelector_1.getUserByUserId)(userState, createdBy) : undefined;
|
|
86
87
|
const baseTransactionObject = (0, transactionSelector_1.getScheduleTransactionById)(transactionState, baseTransaction);
|
|
87
88
|
if (baseTransactionObject == null) {
|
|
88
89
|
throw Error('Base Schedule transaction cannot be null');
|
|
@@ -134,6 +135,9 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
134
135
|
account: accountDebit,
|
|
135
136
|
},
|
|
136
137
|
scheduledJournalEntry,
|
|
138
|
+
aiSummaries,
|
|
139
|
+
createdByUser: createdByUserDetails,
|
|
140
|
+
recommendations,
|
|
137
141
|
};
|
|
138
142
|
};
|
|
139
143
|
exports.getJEScheduledTransactionByJEScheduleTransactionKey = getJEScheduledTransactionByJEScheduleTransactionKey;
|
|
@@ -12,6 +12,40 @@ export interface ScheduleJournalStatusCode {
|
|
|
12
12
|
code: ScheduleJournalEntryStatusCodeType;
|
|
13
13
|
label: string;
|
|
14
14
|
}
|
|
15
|
+
export interface JEScheduleFieldRecommendation {
|
|
16
|
+
confidence: number;
|
|
17
|
+
reasoning: string;
|
|
18
|
+
}
|
|
19
|
+
export interface JEScheduleAISummaries {
|
|
20
|
+
creditAccount?: JEScheduleFieldRecommendation;
|
|
21
|
+
creditClass?: JEScheduleFieldRecommendation;
|
|
22
|
+
debitAccount?: JEScheduleFieldRecommendation;
|
|
23
|
+
debitClass?: JEScheduleFieldRecommendation;
|
|
24
|
+
period?: JEScheduleFieldRecommendation;
|
|
25
|
+
postingDate?: JEScheduleFieldRecommendation;
|
|
26
|
+
scheduleType?: JEScheduleFieldRecommendation;
|
|
27
|
+
}
|
|
28
|
+
export interface JEScheduleRecommendations {
|
|
29
|
+
creditAccountConfidence?: number;
|
|
30
|
+
creditClassConfidence?: number;
|
|
31
|
+
debitAccountConfidence?: number;
|
|
32
|
+
debitClassConfidence?: number;
|
|
33
|
+
endDate?: string;
|
|
34
|
+
jeCreditAccountId?: string;
|
|
35
|
+
jeCreditAccountingClassId?: string;
|
|
36
|
+
jeDebitAccountId?: string;
|
|
37
|
+
jeDebitAccountingClassId?: string;
|
|
38
|
+
jeScheduleType?: string;
|
|
39
|
+
jeScheduleTypeConfidence?: number;
|
|
40
|
+
period?: number;
|
|
41
|
+
periodConfidence?: number;
|
|
42
|
+
postingDate?: string;
|
|
43
|
+
postingDateConfidence?: number;
|
|
44
|
+
similarTransactions?: unknown[];
|
|
45
|
+
startDate?: string;
|
|
46
|
+
startingMonth?: string;
|
|
47
|
+
startingMonthConfidence?: number;
|
|
48
|
+
}
|
|
15
49
|
export interface JEScheduleOtherAttributes {
|
|
16
50
|
assetId?: string;
|
|
17
51
|
startingBalance?: Amount;
|
|
@@ -56,13 +90,16 @@ export interface JEScheduledTransactionState {
|
|
|
56
90
|
scheduledJournalEntry: ScheduledJournalEntryState[];
|
|
57
91
|
status: ScheduleStatus;
|
|
58
92
|
vendorId: ID;
|
|
93
|
+
aiSummaries?: JEScheduleAISummaries;
|
|
59
94
|
balanceAsOfToday?: number;
|
|
95
|
+
createdByUserID?: ID;
|
|
60
96
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
61
97
|
endDate?: ZeniDate;
|
|
62
98
|
jeScheduleId?: ID;
|
|
63
99
|
jeScheduleType?: ScheduleTypes;
|
|
64
100
|
lastDayOfMonth?: boolean;
|
|
65
101
|
period?: number;
|
|
102
|
+
recommendations?: JEScheduleRecommendations;
|
|
66
103
|
startDate?: ZeniDate;
|
|
67
104
|
updatedAt?: ZeniDate;
|
|
68
105
|
updatedByUserID?: ID;
|
|
@@ -12,7 +12,7 @@ export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
|
|
|
12
12
|
export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
|
|
13
13
|
export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "unknown" | "canceled" | "recorded";
|
|
14
14
|
export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
|
|
15
|
-
export declare const toScheduleStatusCodeType: (v: string) => "
|
|
15
|
+
export declare const toScheduleStatusCodeType: (v: string) => "completed" | "draft" | "new" | "ongoing" | "marked_as_completed";
|
|
16
16
|
export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
|
|
17
17
|
export declare const toJournalEntryErrorCodeType: (v: string) => "vendor_deleted" | "debit_category_deleted" | "credit_category_deleted" | "qbo_error" | "qbo_authorization_error" | "qbo_invalid_company_status_error" | "qbo_book_close_date_error";
|
|
18
18
|
export type JournalEntryErrorCodeType = ReturnType<typeof toJournalEntryErrorCodeType>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Project } from './projectState';
|
|
2
|
+
export interface ProjectMetadataPayload {
|
|
3
|
+
accounting_provider_project_customer_id: string | null;
|
|
4
|
+
accounting_provider_project_id: string | null;
|
|
5
|
+
parent_customer_accounting_provider_id: string | null;
|
|
6
|
+
project_name: string;
|
|
7
|
+
start_date: string | null;
|
|
8
|
+
status: string | null;
|
|
9
|
+
zeni_parent_customer_id: string | null;
|
|
10
|
+
zeni_project_customer_id: string | null;
|
|
11
|
+
zeni_project_id: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const mapProjectMetadataPayloadToProject: (payload: ProjectMetadataPayload) => Project;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapProjectMetadataPayloadToProject = void 0;
|
|
4
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
5
|
+
const mapProjectMetadataPayloadToProject = (payload) => ({
|
|
6
|
+
projectId: payload.zeni_project_id,
|
|
7
|
+
projectName: payload.project_name,
|
|
8
|
+
...(payload.status != null ? { status: payload.status } : {}),
|
|
9
|
+
...(payload.start_date != null ? { startDate: (0, zeniDayJS_1.date)(payload.start_date) } : {}),
|
|
10
|
+
...(payload.parent_customer_accounting_provider_id != null
|
|
11
|
+
? {
|
|
12
|
+
parentCustomerAccountingProviderId: payload.parent_customer_accounting_provider_id,
|
|
13
|
+
}
|
|
14
|
+
: {}),
|
|
15
|
+
...(payload.accounting_provider_project_customer_id != null
|
|
16
|
+
? {
|
|
17
|
+
accountingProviderProjectCustomerId: payload.accounting_provider_project_customer_id,
|
|
18
|
+
}
|
|
19
|
+
: {}),
|
|
20
|
+
...(payload.accounting_provider_project_id != null
|
|
21
|
+
? { accountingProviderProjectId: payload.accounting_provider_project_id }
|
|
22
|
+
: {}),
|
|
23
|
+
...(payload.zeni_parent_customer_id != null
|
|
24
|
+
? { zeniParentCustomerId: payload.zeni_parent_customer_id }
|
|
25
|
+
: {}),
|
|
26
|
+
...(payload.zeni_project_customer_id != null
|
|
27
|
+
? { zeniProjectCustomerId: payload.zeni_project_customer_id }
|
|
28
|
+
: {}),
|
|
29
|
+
});
|
|
30
|
+
exports.mapProjectMetadataPayloadToProject = mapProjectMetadataPayloadToProject;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ProjectMetadataPayload } from './projectPayload';
|
|
3
|
+
import { Project } from './projectState';
|
|
4
|
+
export interface ProjectState {
|
|
5
|
+
projects: Record<ID, Project>;
|
|
6
|
+
}
|
|
7
|
+
export declare const initialState: ProjectState;
|
|
8
|
+
export declare const updateProjects: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: ProjectMetadataPayload[]], ProjectMetadataPayload[], "project/updateProjects", never, never>, clearAllProjects: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"project/clearAllProjects">;
|
|
9
|
+
declare const _default: import("redux").Reducer<ProjectState>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAllProjects = exports.updateProjects = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const projectPayload_1 = require("./projectPayload");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
projects: {},
|
|
9
|
+
};
|
|
10
|
+
const projectSlice = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'project',
|
|
12
|
+
initialState: exports.initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
updateProjects: {
|
|
15
|
+
reducer(draft, action) {
|
|
16
|
+
action.payload.forEach((projectPayload) => {
|
|
17
|
+
const project = (0, projectPayload_1.mapProjectMetadataPayloadToProject)(projectPayload);
|
|
18
|
+
draft.projects[project.projectId] = project;
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
prepare(payload) {
|
|
22
|
+
return { payload };
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
clearAllProjects(draft) {
|
|
26
|
+
Object.assign(draft, exports.initialState);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
_a = projectSlice.actions, exports.updateProjects = _a.updateProjects, exports.clearAllProjects = _a.clearAllProjects;
|
|
31
|
+
exports.default = projectSlice.reducer;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ProjectState } from './projectReducer';
|
|
3
|
+
import { Project } from './projectState';
|
|
4
|
+
export declare function getProjectById(projectState: ProjectState, projectId: ID): Project | undefined;
|
|
5
|
+
export declare function getProjectsByIds(projectState: ProjectState, projectIds: ID[]): Project[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProjectById = getProjectById;
|
|
4
|
+
exports.getProjectsByIds = getProjectsByIds;
|
|
5
|
+
function getProjectById(projectState, projectId) {
|
|
6
|
+
return projectState.projects[projectId];
|
|
7
|
+
}
|
|
8
|
+
function getProjectsByIds(projectState, projectIds) {
|
|
9
|
+
return projectIds
|
|
10
|
+
.map((projectId) => getProjectById(projectState, projectId))
|
|
11
|
+
.filter((project) => project != null);
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ZeniDate } from '../../zeniDayJS';
|
|
3
|
+
export interface Project {
|
|
4
|
+
projectId: ID;
|
|
5
|
+
projectName: string;
|
|
6
|
+
accountingProviderProjectCustomerId?: ID;
|
|
7
|
+
accountingProviderProjectId?: ID;
|
|
8
|
+
parentCustomerAccountingProviderId?: ID;
|
|
9
|
+
startDate?: ZeniDate;
|
|
10
|
+
status?: string;
|
|
11
|
+
zeniParentCustomerId?: ID;
|
|
12
|
+
zeniProjectCustomerId?: ID;
|
|
13
|
+
}
|
|
@@ -10,5 +10,5 @@ export interface SectionAccountsView {
|
|
|
10
10
|
sectionId: ID;
|
|
11
11
|
balancesByPeriod?: COABalanceGroupedByPeriod;
|
|
12
12
|
}
|
|
13
|
-
export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}`;
|
|
13
|
+
export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-profit_and_loss_by_projects+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}`;
|
|
14
14
|
export type SectionAccountKey = ReturnType<typeof getSectionAccountViewKey>;
|
|
@@ -8,5 +8,5 @@ export interface SectionClassesView {
|
|
|
8
8
|
sectionId: ID;
|
|
9
9
|
balancesByPeriod?: COABalanceGroupedByPeriod;
|
|
10
10
|
}
|
|
11
|
-
export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card`;
|
|
11
|
+
export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
|
|
12
12
|
export type SectionClassesKey = ReturnType<typeof getSectionClassesViewKey>;
|
|
@@ -4,9 +4,9 @@ import { AccountMetadataPayload } from '../account/accountPayload';
|
|
|
4
4
|
import { ClassMetadataPayload } from '../class/classPayload';
|
|
5
5
|
import { SectionClassesViewStateV2 } from './sectionClassesViewState';
|
|
6
6
|
export declare const initialState: SectionClassesViewStateV2;
|
|
7
|
-
export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
7
|
+
export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
8
8
|
timeframe: "month" | "year" | "quarter";
|
|
9
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
9
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
10
10
|
sectionId: string;
|
|
11
11
|
sectionPayload: SectionByClassCOABalanceGroupedPayloadV2;
|
|
12
12
|
classesMetadataPayload: ClassMetadataPayload[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NestedAccountIDHierarchy } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
|
+
import { COABalanceGroupedByPeriod } from '../../commonStateTypes/coaBalance/coaBalance';
|
|
3
|
+
import { ID } from '../../commonStateTypes/common';
|
|
4
|
+
import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
+
export interface SectionProjectView {
|
|
6
|
+
key: SectionProjectKey;
|
|
7
|
+
projectId: ID;
|
|
8
|
+
sectionId: ID;
|
|
9
|
+
balancesByPeriod?: COABalanceGroupedByPeriod;
|
|
10
|
+
nestedAccountIds?: NestedAccountIDHierarchy[];
|
|
11
|
+
}
|
|
12
|
+
export declare function getSectionProjectViewKey(sectionId: ID, projectId: ID, reportId: ReportID): `${string}-${string}-cash_balance` | `${string}-${string}-card_balance` | `${string}-${string}-expense_automation_card` | `${string}-${string}-operating_expenses` | `${string}-${string}-operating_expenses_by_classes` | `${string}-${string}-revenue` | `${string}-${string}-revenue_by_classes` | `${string}-${string}-net_burn_or_income` | `${string}-${string}-net_burn_or_income_story_card` | `${string}-${string}-net_burn_or_income_by_classes` | `${string}-${string}-cash_position` | `${string}-${string}-top_expenses` | `${string}-${string}-profit_and_loss` | `${string}-${string}-profit_and_loss_by_classes` | `${string}-${string}-profit_and_loss_by_projects` | `${string}-${string}-balance_sheet` | `${string}-${string}-cash_flow` | `${string}-${string}-dashboard` | `${string}-${string}-finance_statement` | `${string}-${string}-transaction_list_of_account` | `${string}-${string}-transaction_list_missing_receipt` | `${string}-${string}-transaction_list_of_account_by_class` | `${string}-${string}-transaction_detail` | `${string}-${string}-cash_in_cash_out` | `${string}-${string}-insights_dashboard` | `${string}-${string}-company_details` | `${string}-${string}-class_list` | `${string}-${string}-account_list` | `${string}-${string}-account_list_by_type` | `${string}-${string}-vendor` | `${string}-${string}-task_card` | `${string}-${string}-bill_pay` | `${string}-${string}-reimbursement` | `${string}-${string}-bill_pay_card` | `${string}-${string}-reimbursement_card` | `${string}-${string}-bill_pay_promo_card` | `${string}-${string}-zeni_accounts` | `${string}-${string}-zeni_accounts_promo_card` | `${string}-${string}-zeni_treasury` | `${string}-${string}-charge_cards` | `${string}-${string}-other_connection` | `${string}-${string}-reimbursement_promo_card` | `${string}-${string}-onboarding` | `${string}-${string}-operating_expenses_by_vendor` | `${string}-${string}-operating_expenses_by_vendor_summary` | `${string}-${string}-vendors_tab` | `${string}-${string}-accounts_payable_aging` | `${string}-${string}-accounts_receivable_aging` | `${string}-${string}-vendor_global_review` | `${string}-${string}-prepaid_expenses` | `${string}-${string}-fixed_assets` | `${string}-${string}-notification` | `${string}-${string}-rewards_card` | `${string}-${string}-billing` | `${string}-${string}-flux_analysis_operating_expense` | `${string}-${string}-account_reconciliation` | `${string}-${string}-zeni_credit_promo_card` | `${string}-${string}-treasury_promo_card` | `${string}-${string}-excluded_account_reconciliation`;
|
|
13
|
+
export type SectionProjectKey = ReturnType<typeof getSectionProjectViewKey>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateMultipleSubAccountsWithBalances } from '../account/accountReducer';
|
|
4
|
+
import { updateSectionProjectView } from './sectionProjectViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof updateSectionProjectView> | ReturnType<typeof updateMultipleSubAccountsWithBalances>;
|
|
6
|
+
export declare const updateSectionProjectViewEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateSectionProjectViewEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
|
|
7
|
+
const accountReducer_1 = require("../account/accountReducer");
|
|
8
|
+
const sectionProjectViewReducer_1 = require("./sectionProjectViewReducer");
|
|
9
|
+
const updateSectionProjectViewEpic = (actions$) => actions$.pipe((0, operators_1.filter)(sectionProjectViewReducer_1.updateSectionProjectView.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const actions = [];
|
|
11
|
+
const sectionPayload = action.payload.sectionPayload;
|
|
12
|
+
const sectionId = action.payload.sectionId;
|
|
13
|
+
const timeframe = action.payload.timeframe;
|
|
14
|
+
const reportId = action.payload.reportId;
|
|
15
|
+
const currencyPayload = action.payload.currencyPayload;
|
|
16
|
+
const accountsMetadataPayload = action.payload.accountsMetadataPayload;
|
|
17
|
+
const accountMetadataRecordsByID = (0, getNestedAccountIDHierarchyForReport_1.getAllAccountMetadataRecordsByID)(accountsMetadataPayload);
|
|
18
|
+
const accountMetadataWithBalancesPayloads = [];
|
|
19
|
+
if (sectionPayload.projects != null) {
|
|
20
|
+
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
21
|
+
const projectAccounts = sectionPayload.projects[projectId].accounts;
|
|
22
|
+
const projectsViewParentID = {
|
|
23
|
+
projectId,
|
|
24
|
+
sectionId,
|
|
25
|
+
};
|
|
26
|
+
getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
if (accountMetadataWithBalancesPayloads.length > 0) {
|
|
30
|
+
actions.push((0, accountReducer_1.updateMultipleSubAccountsWithBalances)(accountMetadataWithBalancesPayloads, currencyPayload, reportId, timeframe));
|
|
31
|
+
}
|
|
32
|
+
return (0, rxjs_1.from)(actions);
|
|
33
|
+
}));
|
|
34
|
+
exports.updateSectionProjectViewEpic = updateSectionProjectViewEpic;
|
|
35
|
+
const getSubAccountsMetadataForProjectAccountList = (accountListWithBalances, accountMetadataRecordsByID, sectionId, projectsViewParentID, result) => {
|
|
36
|
+
if (accountListWithBalances != null) {
|
|
37
|
+
Object.keys(accountListWithBalances).forEach((eachAccountId) => {
|
|
38
|
+
const accountMetadataRecord = accountMetadataRecordsByID[eachAccountId];
|
|
39
|
+
if (accountMetadataRecord != null) {
|
|
40
|
+
const accountId = accountMetadataRecord.nestedAccountId;
|
|
41
|
+
result.push({
|
|
42
|
+
accountsViewParentID: {
|
|
43
|
+
parentAccountId: (0, getNestedAccountIDHierarchyForReport_1.getParentAccountId)(accountId),
|
|
44
|
+
sectionId,
|
|
45
|
+
},
|
|
46
|
+
accountMetadataPayload: accountMetadataRecord.accountMetadataPayload,
|
|
47
|
+
accountBalancesPayload: accountListWithBalances[eachAccountId],
|
|
48
|
+
projectsViewParentID,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.warn(`Account ${eachAccountId} in Section ${sectionId} Project ${projectsViewParentID.projectId} is missing metadata.`);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COABalanceGroupedByPeriodPayloadV2 } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
2
|
+
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
3
|
+
import { NestedAccountIDHierarchy } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
4
|
+
import { ID } from '../../commonStateTypes/common';
|
|
5
|
+
import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
6
|
+
import { SectionProjectView } from './sectionProjectView';
|
|
7
|
+
export declare const mapProjectCOABalanceGroupedPayloadToSectionProjectView: (timeframe: "month" | "quarter" | "year", projectBalancesPayload: COABalanceGroupedByPeriodPayloadV2, currencyPayload: CurrencyPayload, id: {
|
|
8
|
+
projectId: ID;
|
|
9
|
+
reportId: ReportID;
|
|
10
|
+
sectionId: ID;
|
|
11
|
+
}, nestedAccountIds: NestedAccountIDHierarchy[]) => SectionProjectView;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapProjectCOABalanceGroupedPayloadToSectionProjectView = void 0;
|
|
4
|
+
const coaBalancePayload_1 = require("../../commonPayloadTypes/v2/coaBalancePayload");
|
|
5
|
+
const sectionProjectView_1 = require("./sectionProjectView");
|
|
6
|
+
const mapProjectCOABalanceGroupedPayloadToSectionProjectView = (timeframe, projectBalancesPayload, currencyPayload, id, nestedAccountIds) => {
|
|
7
|
+
return {
|
|
8
|
+
key: (0, sectionProjectView_1.getSectionProjectViewKey)(id.sectionId, id.projectId, id.reportId),
|
|
9
|
+
projectId: id.projectId,
|
|
10
|
+
sectionId: id.sectionId,
|
|
11
|
+
balancesByPeriod: (0, coaBalancePayload_1.mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod)(projectBalancesPayload, currencyPayload, timeframe),
|
|
12
|
+
nestedAccountIds,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.mapProjectCOABalanceGroupedPayloadToSectionProjectView = mapProjectCOABalanceGroupedPayloadToSectionProjectView;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
2
|
+
import { AccountMetadataPayload } from '../account/accountPayload';
|
|
3
|
+
import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
|
|
4
|
+
import { SectionProjectViewState } from './sectionProjectViewState';
|
|
5
|
+
export declare const initialState: SectionProjectViewState;
|
|
6
|
+
export declare const updateSectionProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
7
|
+
timeframe: "month" | "year" | "quarter";
|
|
8
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
9
|
+
sectionId: string;
|
|
10
|
+
sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
11
|
+
accountsMetadataPayload: AccountMetadataPayload[];
|
|
12
|
+
currencyPayload: CurrencyPayload;
|
|
13
|
+
}, "sectionProjectView/updateSectionProjectView", never, never>, clearAllSectionsProjectView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"sectionProjectView/clearAllSectionsProjectView">;
|
|
14
|
+
declare const _default: import("redux").Reducer<SectionProjectViewState>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAllSectionsProjectView = exports.updateSectionProjectView = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const coaBalancePayload_1 = require("../../commonPayloadTypes/v2/coaBalancePayload");
|
|
7
|
+
const accountPayload_1 = require("../account/accountPayload");
|
|
8
|
+
const getNestedAccountIDHierarchyForSection_1 = require("../sectionAccountsView/getNestedAccountIDHierarchyForSection");
|
|
9
|
+
const sectionProjectView_1 = require("./sectionProjectView");
|
|
10
|
+
const sectionProjectViewHelper_1 = require("./sectionProjectViewHelper");
|
|
11
|
+
exports.initialState = {
|
|
12
|
+
sectionsByKey: {},
|
|
13
|
+
};
|
|
14
|
+
const sectionProjectView = (0, toolkit_1.createSlice)({
|
|
15
|
+
name: 'sectionProjectView',
|
|
16
|
+
initialState: exports.initialState,
|
|
17
|
+
reducers: {
|
|
18
|
+
updateSectionProjectView: {
|
|
19
|
+
prepare(timeframe, sectionId, reportId, sectionPayload, accountsMetadataPayload, currencyPayload) {
|
|
20
|
+
return {
|
|
21
|
+
payload: {
|
|
22
|
+
timeframe,
|
|
23
|
+
reportId,
|
|
24
|
+
sectionId,
|
|
25
|
+
sectionPayload,
|
|
26
|
+
accountsMetadataPayload,
|
|
27
|
+
currencyPayload,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
reducer(draft, action) {
|
|
32
|
+
const { timeframe, sectionPayload, sectionId, reportId, currencyPayload, accountsMetadataPayload, } = action.payload;
|
|
33
|
+
if (sectionPayload.projects != null) {
|
|
34
|
+
const accountsMetadata = accountsMetadataPayload.map((eachAccount) => (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)(eachAccount));
|
|
35
|
+
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
36
|
+
const projectPayload = sectionPayload.projects[projectId];
|
|
37
|
+
const projectAccountIds = projectPayload.accounts != null
|
|
38
|
+
? Object.keys(projectPayload.accounts)
|
|
39
|
+
: [];
|
|
40
|
+
const nestedAccountIds = (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(projectAccountIds, accountsMetadata);
|
|
41
|
+
updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
clearAllSectionsProjectView(draft) {
|
|
47
|
+
Object.assign(draft, exports.initialState);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
_a = sectionProjectView.actions, exports.updateSectionProjectView = _a.updateSectionProjectView, exports.clearAllSectionsProjectView = _a.clearAllSectionsProjectView;
|
|
52
|
+
exports.default = sectionProjectView.reducer;
|
|
53
|
+
const updateSectionProject = (draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds) => {
|
|
54
|
+
const sectionKey = (0, sectionProjectView_1.getSectionProjectViewKey)(sectionId, projectId, reportId);
|
|
55
|
+
const section = draft.sectionsByKey[sectionKey];
|
|
56
|
+
if (section != null) {
|
|
57
|
+
draft.sectionsByKey[sectionKey].balancesByPeriod = Object.assign({}, draft.sectionsByKey[sectionKey].balancesByPeriod, (0, coaBalancePayload_1.mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod)(projectPayload, currencyPayload, timeframe));
|
|
58
|
+
draft.sectionsByKey[sectionKey].nestedAccountIds = nestedAccountIds;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
draft.sectionsByKey[sectionKey] =
|
|
62
|
+
(0, sectionProjectViewHelper_1.mapProjectCOABalanceGroupedPayloadToSectionProjectView)(timeframe, projectPayload, currencyPayload, { sectionId, projectId, reportId }, nestedAccountIds);
|
|
63
|
+
}
|
|
64
|
+
};
|