@zeniai/client-epic-state 5.1.86 → 5.1.88-betaRD0
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/entity/aiCfo/aiCfoPayload.d.ts +7 -0
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +3 -2
- package/lib/entity/aiCfo/aiCfoReducer.js +25 -2
- package/lib/entity/aiCfo/aiCfoState.d.ts +9 -2
- package/lib/entity/customerSatisfaction/customerSatisfactionReducer.d.ts +1 -1
- package/lib/entity/customerSatisfaction/customerSatisfactionReducer.js +6 -2
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +2 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +34 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +68 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +24 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +10 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +28 -3
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +41 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +12 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +40 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +29 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
- package/lib/epic.d.ts +6 -1
- package/lib/epic.js +8 -1
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +23 -1
- package/lib/esm/entity/customerSatisfaction/customerSatisfactionReducer.js +4 -1
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +68 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +24 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +26 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +34 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +29 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/esm/epic.js +8 -1
- package/lib/esm/index.js +14 -8
- package/lib/esm/view/companyHealthMetricView/companyHealthMetricConfigReducer.js +4 -1
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +34 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +81 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +21 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +110 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +73 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +187 -28
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +102 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +260 -22
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -6
- package/lib/esm/view/invoicing/createCreditNote/createCreditNoteEpic.js +24 -4
- package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +24 -4
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +37 -10
- package/lib/esm/view/invoicing/discountAction/discountActionEpic.js +33 -9
- package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +35 -9
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +5 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +32 -5
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +23 -3
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +24 -4
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +24 -4
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +20 -3
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +60 -17
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +30 -0
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +4 -29
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js +26 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.js +16 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js +9 -1
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js +50 -1
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +14 -1
- package/lib/esm/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +29 -10
- package/lib/esm/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +28 -5
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +24 -4
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +22 -14
- package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +46 -7
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +26 -8
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -1
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +4 -1
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +41 -9
- package/lib/esm/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +4 -1
- package/lib/esm/view/vendorTabView/vendorTabViewReducer.js +4 -1
- package/lib/index.d.ts +23 -17
- package/lib/index.js +84 -50
- package/lib/view/companyHealthMetricView/companyHealthMetricConfigReducer.d.ts +1 -1
- package/lib/view/companyHealthMetricView/companyHealthMetricConfigReducer.js +5 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +32 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +85 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +45 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +114 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +77 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +44 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +49 -10
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +189 -28
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +40 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +34 -8
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +20 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +108 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +10 -1
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +266 -21
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +79 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
- package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.d.ts +2 -1
- package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.js +23 -3
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +2 -1
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +23 -3
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +22 -8
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +37 -10
- package/lib/view/invoicing/discountAction/discountActionEpic.d.ts +2 -1
- package/lib/view/invoicing/discountAction/discountActionEpic.js +32 -8
- package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +2 -1
- package/lib/view/invoicing/dunningAction/dunningActionEpic.js +34 -8
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +5 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +31 -4
- package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +22 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +23 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +23 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +19 -2
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +2 -1
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +59 -16
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +13 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +30 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +11 -31
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +4 -29
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +15 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.d.ts +7 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js +30 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.js +20 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewEpics.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.d.ts +12 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js +11 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.d.ts +21 -4
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js +51 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +3 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +16 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewState.d.ts +13 -0
- package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.d.ts +2 -1
- package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +28 -9
- package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +27 -4
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.d.ts +2 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +23 -3
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +24 -7
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +23 -16
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +2 -1
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +45 -6
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +2 -1
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +25 -7
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +10 -1
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +1 -1
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +4 -2
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +4 -1
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +2 -1
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +40 -8
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +5 -2
- package/lib/view/vendorTabView/vendorTabViewReducer.d.ts +1 -1
- package/lib/view/vendorTabView/vendorTabViewReducer.js +5 -2
- package/package.json +1 -1
package/lib/esm/index.js
CHANGED
|
@@ -172,19 +172,21 @@ import uploadAccountStatementIntoDocumentAI from './view/expenseAutomationView/e
|
|
|
172
172
|
import { fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedPeriod, updateCurrentSelectedView, } from './view/expenseAutomationView/expenseAutomationViewReducer';
|
|
173
173
|
import { getExpenseAutomationView } from './view/expenseAutomationView/expenseAutomationViewSelector';
|
|
174
174
|
import { toExpenseAutomationViewType, } from './view/expenseAutomationView/expenseAutomationViewState';
|
|
175
|
+
import { computeNewScheduleJeDetails } from './view/expenseAutomationView/helpers/newScheduleLocalDataHelper';
|
|
175
176
|
import { isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardCreditType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, } from './view/expenseAutomationView/helpers/reconciliationHelpers';
|
|
176
177
|
import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, } from './view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
|
|
177
178
|
import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
|
|
178
|
-
import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
|
|
179
|
+
import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearSearchTransactionsForNewSchedule as clearJeSearchTransactionsForNewSchedule, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeNewSchedule as initializeJeNewSchedule, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, resetNewScheduleLocalData as resetJeNewScheduleLocalData, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, saveNewSchedule as saveJeNewSchedule, saveNewScheduleFailure as saveJeNewScheduleFailure, saveNewScheduleSuccess as saveJeNewScheduleSuccess, searchTransactionsForNewSchedule as searchJeTransactionsForNewSchedule, searchTransactionsForNewScheduleFailure as searchJeTransactionsForNewScheduleFailure, searchTransactionsForNewScheduleSuccess as searchJeTransactionsForNewScheduleSuccess, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJEScheduleTypeFilter, updateNewScheduleLocalData as updateJeNewScheduleLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
|
|
179
180
|
import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearBulkUploadBatchDetailsForScopeChange, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markBatchDetailRefreshAttempted, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, refreshBatchDetailsForBatchId, requestMissingReceiptsTabNavigation, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, setBulkUploadCompletedSubTab, setBulkUploadResultsTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, storeBatchDetails, updateBulkUploadProgress, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
|
|
180
181
|
import { clearStatementDateConflict, deleteAccountStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, parseStatement, parseStatementFailure, parseStatementSuccess, reparseStatement, reparseStatementFailure, reparseStatementSuccess, resetReparseStatementStatus, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, setStatementProcessingDismissedToBackground, submitStatementUpdate, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateNodeCollapseState, updateParsedStatementData, updateStatementProcessingBackgroundCompletedSteps, updateStatementProcessingFailed, updateStatementUpdateLocalData, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
|
|
181
182
|
import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markCategoryClassRecommendationsFailureForCategorization, markTransactionAsNotMiscategorized, removeTransactionFromAllTabs, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, updateTransactionFilters, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
182
183
|
import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
|
|
184
|
+
import { getNewOneTimeAccrualView as getJeNewOneTimeAccrualView, getNewScheduleSearchTransactionsView as getJeNewScheduleSearchTransactionsView, getNewScheduleView as getJeNewScheduleView, } from './view/expenseAutomationView/selectors/jeNewScheduleViewSelector';
|
|
183
185
|
import { getExpenseAutomationReconciliationView, getReparseStatementStatusByAccountId, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
|
|
184
186
|
import { getExpenseAutomationTransactionView, getLastTransferEntryReplacement, } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
|
|
185
187
|
import { TRANSACTION_FILTER_CATEGORIES, applyTransactionFilters, } from './view/expenseAutomationView/transactionFilterHelpers';
|
|
186
188
|
import { DEFAULT_COMPLETED_SUB_TAB, toCompletedSubTab, } from './view/expenseAutomationView/types/completedSubTab';
|
|
187
|
-
import {
|
|
189
|
+
import { toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, toJEPageTab, } from './view/expenseAutomationView/types/jeSchedulesViewState';
|
|
188
190
|
import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
|
|
189
191
|
import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
|
|
190
192
|
import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
|
|
@@ -472,9 +474,10 @@ export { stringToUnion, stringToUnionStrict };
|
|
|
472
474
|
export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
|
|
473
475
|
export {
|
|
474
476
|
// Bulk Upload Types
|
|
475
|
-
BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab,
|
|
477
|
+
BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleSortKey, toJEPageTab, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJEScheduleTypeFilter, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, fetchExpenseAutomationMissingReceipts,
|
|
476
478
|
// Bulk Upload Actions
|
|
477
479
|
bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, clearBulkUploadBatchDetailsForScopeChange, markBatchDetailRefreshAttempted, refreshBatchDetailsForBatchId, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, getLastTransferEntryReplacement, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, getReparseStatementStatusByAccountId, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, updateStatementProcessingFailed, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, parseStatement, parseStatementSuccess, parseStatementFailure, reparseStatement, reparseStatementSuccess, reparseStatementFailure, resetReparseStatementStatus, updateParsedStatementData, updateNodeCollapseState, updateStatementUploadChosen, submitStatementUpdate, clearStatementDateConflict, updateStatementUpdateLocalData, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, setStatementProcessingDismissedToBackground, updateStatementProcessingBackgroundCompletedSteps, };
|
|
480
|
+
export { computeNewScheduleJeDetails, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, getJeNewOneTimeAccrualView, getJeNewScheduleSearchTransactionsView, getJeNewScheduleView, };
|
|
478
481
|
export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateTransactionFilters, updateSelectedCheckboxTransactionIds, markCategoryClassRecommendationsFailureForCategorization, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, resetCreateTransferEntryStatus, clearTransferEntryRouteReplacement, fetchAccountsForTransferFlow, removeTransactionFromAllTabs, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
|
|
479
482
|
export { TOP_EX_TIME_PERIODS };
|
|
480
483
|
export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
|
|
@@ -639,7 +642,7 @@ export { updateChargeCardTransactionAttachments, updateChargeCardStatusFromPushe
|
|
|
639
642
|
export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
|
|
640
643
|
export { fetchApAging, getApAgingReport, updateApAgingUIState, };
|
|
641
644
|
export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
|
|
642
|
-
export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
|
|
645
|
+
export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearJeSearchTransactionsForNewSchedule, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeNewSchedule, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, resetJeNewScheduleLocalData, retryExpenseAutomationJESchedule, saveJeNewSchedule, saveJeNewScheduleFailure, saveJeNewScheduleSuccess, searchJeTransactionsForNewSchedule, searchJeTransactionsForNewScheduleFailure, searchJeTransactionsForNewScheduleSuccess, updateExpenseAutomationJESchedulesUIState, updateJeNewScheduleLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
|
|
643
646
|
export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
|
|
644
647
|
export { getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
|
|
645
648
|
export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
|
|
@@ -674,7 +677,7 @@ export { cancelAiAccountantOnboarding, clearAiAccountantView, fetchAiAccountantC
|
|
|
674
677
|
export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
|
|
675
678
|
export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, clearInput, setSession, clearAiCfoView, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, submitFeedback, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
|
|
676
679
|
export { getAiCfoView, getSuggestedQuestionsForPageContext, getSkills, } from './view/aiCfoView/aiCfoViewSelector';
|
|
677
|
-
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, clearAiCfo, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, clearSyntheticAiCfoAnswers, } from './entity/aiCfo/aiCfoReducer';
|
|
680
|
+
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, clearAiCfo, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, clearSyntheticAiCfoAnswers, } from './entity/aiCfo/aiCfoReducer';
|
|
678
681
|
export { getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, } from './entity/aiCfo/aiCfoSelector';
|
|
679
682
|
export { ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, } from './entity/aiCfo/aiCfoState';
|
|
680
683
|
// ── Card Policy (shared between manual + AI-driven flows) ────────────
|
|
@@ -735,7 +738,7 @@ export { resetRecordPayment, initializeRecordPaymentDraft, submitRecordPayment,
|
|
|
735
738
|
export { initializeIssueCreditNoteDraft, issueCreditNoteFailure, issueCreditNoteSuccess, resetIssueCreditNote, submitIssueCreditNote, updateIssueCreditNoteFormDraft, } from './view/invoicing/issueCreditNote/issueCreditNoteReducer';
|
|
736
739
|
export { computeIssueCreditNoteTotal, initializeIssueCreditNoteDraftFromInvoice, localDataToIssueCreditNotePayload, } from './view/invoicing/issueCreditNote/issueCreditNotePayload';
|
|
737
740
|
export { INVOICING_CREDIT_NOTE_REASON_CODES, initialIssueCreditNoteFormLocalData, } from './view/invoicing/issueCreditNote/issueCreditNoteFormConfig';
|
|
738
|
-
export {
|
|
741
|
+
export { getIssueCreditNoteView } from './view/invoicing/issueCreditNote/issueCreditNoteSelector';
|
|
739
742
|
export { createCreditNoteFailure, createCreditNoteSuccess, resetCreateCreditNote, submitCreateCreditNote, updateCreateCreditNoteFormDraft, } from './view/invoicing/createCreditNote/createCreditNoteReducer';
|
|
740
743
|
export { localDataToCreateCreditNotePayload } from './view/invoicing/createCreditNote/createCreditNotePayload';
|
|
741
744
|
export { initialCreateCreditNoteFormLocalData } from './view/invoicing/createCreditNote/createCreditNoteFormConfig';
|
|
@@ -824,8 +827,8 @@ export { clearAllInvoicingDunningCases, removeInvoicingDunningCase, updateInvoic
|
|
|
824
827
|
export { clearInvoicingDunningCaseListView, fetchInvoicingDunningCaseCounts, fetchInvoicingDunningCaseList, fetchInvoicingDunningCaseListPage, setInvoicingDunningCaseActiveTab, updateInvoicingDunningCaseFilters, } from './view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer';
|
|
825
828
|
export { ALL_INVOICING_DUNNING_CASE_SORT_KEYS, ALL_INVOICING_DUNNING_CASE_TAB_IDS, INVOICING_DUNNING_CASE_COLUMNS, INVOICING_DUNNING_CASE_TABS, } from './view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState';
|
|
826
829
|
export { getInvoicingDunningCaseListView } from './view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector';
|
|
827
|
-
export { clearInvoicingDunningCaseDetailView, fetchInvoicingDunningCaseDetail, } from './view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer';
|
|
828
|
-
export { getInvoicingDunningCaseById, getInvoicingDunningCaseDetail, } from './view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector';
|
|
830
|
+
export { clearInvoicingDunningCaseDetailView, fetchInvoicingDunningCaseDetail, fetchInvoicingDunningEmailPreviewPage, invalidateInvoicingDunningEmailPreview, } from './view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer';
|
|
831
|
+
export { getInvoicingDunningCaseById, getInvoicingDunningCaseDetail, getInvoicingDunningEmailPreview, } from './view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector';
|
|
829
832
|
// ── Invoicing: catalog (plans + products) ─────────────────────────────────────
|
|
830
833
|
export { clearAllInvoicingPlans, mergeInvoicingPlanSubFamily, removeInvoicingPlan, updateInvoicingPlans, } from './entity/invoicing/plan/planReducer';
|
|
831
834
|
export { clearAllInvoicingProducts, removeInvoicingProduct, updateInvoicingProducts, } from './entity/invoicing/product/productReducer';
|
|
@@ -848,3 +851,6 @@ export { INVOICING_QBO_CUSTOMER_MATCHING_MODES, getInvoicingQboAccountMappingId,
|
|
|
848
851
|
// ── Invoicing: config ─────────────────────────────────────────────────────────
|
|
849
852
|
export { acceptInvoicingTerms, clearInvoicingConfig, enableInvoicing, fetchInvoicingConfig, resetInvoicingConfigActionStates, updateInvoicingConfig, } from './view/invoicing/invoicingConfigView/invoicingConfigViewReducer';
|
|
850
853
|
export { getInvoicingConfigView } from './view/invoicing/invoicingConfigView/invoicingConfigViewSelector';
|
|
854
|
+
// Accrued JE schedules are not a discriminated union member, so consumers need this guard to
|
|
855
|
+
// narrow a JEScheduleRow before reading baseTransaction / recurringAmount.
|
|
856
|
+
export { getJEScheduleRowType, isAccruedScheduleRow, isAiAccountantSchedule, isExistingTabRow, isOneTimeAccrualRow, isPendingReviewRow, } from './view/expenseAutomationView/selectors/jeSchedulesViewSelector';
|
|
@@ -31,10 +31,13 @@ const companyHealthMetricConfigView = createSlice({
|
|
|
31
31
|
draft.fetchState = 'Error';
|
|
32
32
|
draft.error = action.payload;
|
|
33
33
|
},
|
|
34
|
+
clearCompanyHealthMetricConfigView() {
|
|
35
|
+
return initialState;
|
|
36
|
+
},
|
|
34
37
|
},
|
|
35
38
|
extraReducers: (builder) => {
|
|
36
39
|
builder.addCase(clearAll, () => initialState);
|
|
37
40
|
},
|
|
38
41
|
});
|
|
39
|
-
export const { fetchCompanyHealthMetricConfig, updateCompanyHealthMetricConfig, updateCompanyHealthMetricConfigFailure, } = companyHealthMetricConfigView.actions;
|
|
42
|
+
export const { clearCompanyHealthMetricConfigView, fetchCompanyHealthMetricConfig, updateCompanyHealthMetricConfig, updateCompanyHealthMetricConfigFailure, } = companyHealthMetricConfigView.actions;
|
|
40
43
|
export default companyHealthMetricConfigView.reducer;
|
package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js
CHANGED
|
@@ -8,6 +8,7 @@ import { fetchJeSchedulesPage } from '../../reducers/jeSchedulesViewReducer';
|
|
|
8
8
|
import { fetchMissingReceipts } from '../../reducers/missingReceiptsViewReducer';
|
|
9
9
|
import { fetchReconciliation } from '../../reducers/reconciliationViewReducer';
|
|
10
10
|
import { fetchTransactionCategorizationView } from '../../reducers/transactionsViewReducer';
|
|
11
|
+
import { getJESchedulePeriodTabKey } from '../../types/jeSchedulesViewState';
|
|
11
12
|
export const fetchAllExpenseAutomationTabsEpic = (actions$, state$) => actions$.pipe(filter(fetchAllExpenseAutomationTabs.match), switchMap((action) => {
|
|
12
13
|
const { cacheOverride, refreshViewInBackground } = action.payload;
|
|
13
14
|
const state = state$.value;
|
|
@@ -59,14 +60,16 @@ export const fetchAllExpenseAutomationTabsEpic = (actions$, state$) => actions$.
|
|
|
59
60
|
state.expenseAutomationFluxAnalysisViewState.groupsBySelectedPeriod[monthYearPeriodId] == null)) {
|
|
60
61
|
fetchActions.push(fetchFluxAnalysisView(selectedPeriod, cacheOverride, refreshViewInBackground, null));
|
|
61
62
|
}
|
|
63
|
+
// The two JE tabs cache separately, so only the tab actually being shown decides whether a
|
|
64
|
+
// fetch is still needed.
|
|
65
|
+
const jeSchedulesPeriodTabKey = getJESchedulePeriodTabKey(state.expenseAutomationJESchedulesViewState.uiState.selectedPageTab, monthYearPeriodId);
|
|
62
66
|
if (state.expenseAutomationJESchedulesViewState.fetchState !==
|
|
63
67
|
'In-Progress' &&
|
|
64
68
|
(!state.expenseAutomationJESchedulesViewState.hasValidState() ||
|
|
65
69
|
state.expenseAutomationJESchedulesViewState
|
|
66
|
-
.
|
|
70
|
+
.jeScheduleTransactionKeysByPeriodAndTab[jeSchedulesPeriodTabKey] == null ||
|
|
67
71
|
state.expenseAutomationJESchedulesViewState
|
|
68
|
-
.
|
|
69
|
-
null)) {
|
|
72
|
+
.failedJeScheduleTransactionKeysByPeriodAndTab[jeSchedulesPeriodTabKey] == null)) {
|
|
70
73
|
fetchActions.push(fetchJeSchedulesPage({ start: timePeriodStart, end: timePeriodEnd }, cacheOverride));
|
|
71
74
|
}
|
|
72
75
|
if (state.expenseAutomationReconciliationViewState.fetchState !==
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { from, of } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { DEFAULT_DATE_FORMAT } from '../../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY';
|
|
4
|
+
import { toAbsoluteDay, toString } from '../../../../commonStateTypes/timePeriod';
|
|
5
|
+
import { updateAccruedJESchedules, updateAccruedJESchedulesDetails, updateJEOneTimeAccruals, updateJESchedules, updateJESchedulesDetails, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
5
6
|
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
6
7
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
8
|
+
import { date } from '../../../../zeniDayJS';
|
|
7
9
|
import { fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesSuccess, initializeJeScheduleLocalData, } from '../../reducers/jeSchedulesViewReducer';
|
|
8
10
|
export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchJeSchedules.match), mergeMap((action) => {
|
|
9
11
|
const state = state$.value;
|
|
@@ -11,27 +13,54 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
11
13
|
const { period, refreshViewInBackground } = action.payload;
|
|
12
14
|
const currentTenant = getCurrentTenant(state);
|
|
13
15
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
16
|
+
const { selectedPageTab } = state.expenseAutomationJESchedulesViewState.uiState;
|
|
17
|
+
const isClosePeriodTab = selectedPageTab === 'schedules';
|
|
18
|
+
const existingEndDate = toAbsoluteDay(date(toString(period.start))
|
|
19
|
+
.subtract(1, 'month')
|
|
20
|
+
.endOf('month')
|
|
21
|
+
.format(DEFAULT_DATE_FORMAT));
|
|
14
22
|
const queryParam = {
|
|
15
23
|
start_date: toString(period.start),
|
|
16
|
-
end_date:
|
|
24
|
+
end_date: isClosePeriodTab || existingEndDate == null
|
|
25
|
+
? toString(period.end)
|
|
26
|
+
: toString(existingEndDate),
|
|
27
|
+
include_accrued: true,
|
|
28
|
+
...(isClosePeriodTab
|
|
29
|
+
? { close_period_start_date: toString(period.start) }
|
|
30
|
+
: {}),
|
|
17
31
|
};
|
|
18
32
|
return zeniAPI
|
|
19
33
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/je_schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
20
34
|
.pipe(mergeMap((response) => {
|
|
21
35
|
if (isSuccessResponse(response) && response.data != null) {
|
|
22
36
|
const updateActions = [];
|
|
37
|
+
const accruedJeSchedules = response.data.accrued_je_schedules?.je_schedules ?? [];
|
|
38
|
+
const oneTimeAccruals = response.data.one_time_accruals ?? [];
|
|
23
39
|
updateActions.push(updateJESchedules([
|
|
24
40
|
...response.data.je_schedules,
|
|
25
41
|
...response.data.failed_je_postings.je_schedules,
|
|
26
42
|
]), updateJESchedulesDetails([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), initializeJeScheduleLocalData([
|
|
27
43
|
...response.data.failed_je_postings.je_schedules,
|
|
28
44
|
]));
|
|
45
|
+
if (accruedJeSchedules.length > 0) {
|
|
46
|
+
updateActions.push(updateAccruedJESchedules(accruedJeSchedules), updateAccruedJESchedulesDetails(accruedJeSchedules, response.data.accrued_je_schedules
|
|
47
|
+
?.scheduled_journal_entries));
|
|
48
|
+
}
|
|
49
|
+
if (oneTimeAccruals.length > 0) {
|
|
50
|
+
// Single action, unlike the accrued pair above: this one writes the entity
|
|
51
|
+
// directly because an accrual denormalizes its vendor, accounts and classes, so
|
|
52
|
+
// there is no fan-out fetch to trigger.
|
|
53
|
+
updateActions.push(updateJEOneTimeAccruals(oneTimeAccruals));
|
|
54
|
+
}
|
|
29
55
|
updateActions.push(fetchJeSchedulesSuccess({
|
|
30
56
|
jeSchedules: [...response.data.je_schedules],
|
|
31
57
|
failedJeSchedules: [
|
|
32
58
|
...response.data.failed_je_postings.je_schedules,
|
|
33
59
|
],
|
|
60
|
+
accruedJeSchedules: accruedJeSchedules,
|
|
61
|
+
oneTimeAccruals: oneTimeAccruals,
|
|
34
62
|
selectedPeriod: selectedPeriod,
|
|
63
|
+
selectedPageTab: selectedPageTab,
|
|
35
64
|
refreshViewInBackground: refreshViewInBackground,
|
|
36
65
|
}));
|
|
37
66
|
return from(updateActions);
|
|
@@ -40,11 +69,13 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
40
69
|
return of(fetchJeSchedulesFailure({
|
|
41
70
|
status: response.status,
|
|
42
71
|
selectedPeriod,
|
|
72
|
+
selectedPageTab,
|
|
43
73
|
}));
|
|
44
74
|
}
|
|
45
75
|
}), catchError((error) => of(fetchJeSchedulesFailure({
|
|
46
76
|
status: createZeniAPIStatus('Unexpected Error', 'fetch JE schedules REST API call errored out' +
|
|
47
77
|
JSON.stringify(error)),
|
|
48
78
|
selectedPeriod,
|
|
79
|
+
selectedPageTab,
|
|
49
80
|
}))));
|
|
50
81
|
}));
|
package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { convertToPeriod, toAbsoluteDay, } from '../../../../../commonStateTypes/timePeriod';
|
|
4
|
+
import { updateJEOneTimeAccruals } from '../../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
5
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
6
|
+
import { getCurrentTenant } from '../../../../../entity/tenant/tenantSelector';
|
|
7
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
8
|
+
import { prepareCreateOneTimeAccrualPayload, } from '../../../payload/jeSchedulesPayload';
|
|
9
|
+
import { createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchJeSchedules, } from '../../../reducers/jeSchedulesViewReducer';
|
|
10
|
+
export const createOneTimeAccrualEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(createOneTimeAccrual.match), mergeMap((action) => {
|
|
11
|
+
const state = state$.value;
|
|
12
|
+
const { localData } = action.payload;
|
|
13
|
+
const payload = { ...prepareCreateOneTimeAccrualPayload(state, localData) };
|
|
14
|
+
// convertToPeriod destructures, so an unset period would throw here and take the epic
|
|
15
|
+
// subscription down for the whole session — a missed refresh is the cheaper failure.
|
|
16
|
+
const selectedMonthYear = state.expenseAutomationViewState.selectedPeriodByTenantId[getCurrentTenant(state).tenantId];
|
|
17
|
+
const selectedPeriod = selectedMonthYear != null
|
|
18
|
+
? convertToPeriod(selectedMonthYear)
|
|
19
|
+
: undefined;
|
|
20
|
+
const periodStart = selectedPeriod != null
|
|
21
|
+
? toAbsoluteDay(selectedPeriod.start)
|
|
22
|
+
: undefined;
|
|
23
|
+
const periodEnd = selectedPeriod != null ? toAbsoluteDay(selectedPeriod.end) : undefined;
|
|
24
|
+
return zeniAPI
|
|
25
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals`, payload)
|
|
26
|
+
.pipe(mergeMap((response) => {
|
|
27
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
28
|
+
const successActions = [
|
|
29
|
+
updateJEOneTimeAccruals([response.data.accrual]),
|
|
30
|
+
createOneTimeAccrualSuccess(),
|
|
31
|
+
openSnackbar({
|
|
32
|
+
messageSection: 'create_schedule',
|
|
33
|
+
messageText: 'success',
|
|
34
|
+
type: 'success',
|
|
35
|
+
variables: [
|
|
36
|
+
{
|
|
37
|
+
variableName: '_vendor_name_',
|
|
38
|
+
variableValue: localData.vendorName,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
];
|
|
43
|
+
// The tab buckets (jeScheduleOneTimeAccrualKeysByPeriodAndTab) are rebuilt wholesale
|
|
44
|
+
// per fetch, and the backend decides whether a freshly posted accrual belongs to
|
|
45
|
+
// Review or Existing — so refetch rather than guess which bucket to insert into.
|
|
46
|
+
if (periodStart != null && periodEnd != null) {
|
|
47
|
+
successActions.push(fetchJeSchedules({ start: periodStart, end: periodEnd }, true));
|
|
48
|
+
}
|
|
49
|
+
return from(successActions);
|
|
50
|
+
}
|
|
51
|
+
return from([
|
|
52
|
+
createOneTimeAccrualFailure({ status: response.status }),
|
|
53
|
+
openSnackbar({
|
|
54
|
+
messageSection: 'create_schedule',
|
|
55
|
+
messageText: 'failed',
|
|
56
|
+
type: 'error',
|
|
57
|
+
variables: [
|
|
58
|
+
{
|
|
59
|
+
variableName: '_api-error_',
|
|
60
|
+
variableValue: response.status.message,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
}),
|
|
64
|
+
]);
|
|
65
|
+
}), catchError((error) => from([
|
|
66
|
+
openSnackbar({
|
|
67
|
+
messageSection: 'create_schedule',
|
|
68
|
+
messageText: 'failed',
|
|
69
|
+
type: 'error',
|
|
70
|
+
variables: [
|
|
71
|
+
{
|
|
72
|
+
variableName: '_api-error_',
|
|
73
|
+
variableValue: JSON.stringify(error),
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
}),
|
|
77
|
+
createOneTimeAccrualFailure({
|
|
78
|
+
status: createZeniAPIStatus('Unexpected Error', `Create One Time Accrual REST API call errored out ${JSON.stringify(error)}`),
|
|
79
|
+
}),
|
|
80
|
+
])));
|
|
81
|
+
}));
|
package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
|
+
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { fetchAccountList } from '../../../../accountList/accountListReducer';
|
|
4
|
+
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
5
|
+
import { getAccountsTypesForScheduleEpics } from '../../../../scheduleView/scheduleListView/scheduleListHelper';
|
|
6
|
+
import { clearSearchTransactionsForNewSchedule, initializeNewSchedule, resetNewScheduleLocalData, } from '../../../reducers/jeSchedulesViewReducer';
|
|
7
|
+
export const initializeNewScheduleEpic = (actions$, state$) => actions$.pipe(filter(initializeNewSchedule.match), mergeMap((action) => {
|
|
8
|
+
const newScheduleActions = [];
|
|
9
|
+
const accountType = getAccountsTypesForScheduleEpics();
|
|
10
|
+
const { accountListState, classListState } = state$.value;
|
|
11
|
+
if (accountListState.byReportId[accountType.accountListKey]?.fetchState ===
|
|
12
|
+
'Not-Started') {
|
|
13
|
+
newScheduleActions.push(fetchAccountList(accountType.accountListKey, true, false, false, false, accountType.allowedAccountList));
|
|
14
|
+
}
|
|
15
|
+
if (classListState.fetchState === 'Not-Started') {
|
|
16
|
+
newScheduleActions.push(fetchClassList());
|
|
17
|
+
}
|
|
18
|
+
newScheduleActions.push(resetNewScheduleLocalData({ scheduleType: action.payload.scheduleType }));
|
|
19
|
+
newScheduleActions.push(clearSearchTransactionsForNewSchedule());
|
|
20
|
+
return from(newScheduleActions);
|
|
21
|
+
}));
|
package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { updateJESchedules, updateJESchedulesDetails, } from '../../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
|
+
import { getJEScheduleTransactionKey } from '../../../../../entity/jeSchedules/jeSchedulesTypes';
|
|
5
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
6
|
+
import { getScheduleTransactionById } from '../../../../../entity/transaction/transactionSelector';
|
|
7
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
8
|
+
import { prepareNewSchedulePayload, } from '../../../helpers/newScheduleLocalDataHelper';
|
|
9
|
+
import { resetNewScheduleLocalData, saveNewSchedule, saveNewScheduleFailure, saveNewScheduleSuccess, } from '../../../reducers/jeSchedulesViewReducer';
|
|
10
|
+
const FAILURE_REASON_MESSAGES = {
|
|
11
|
+
missing_third_party_id: 'This transaction is missing a QuickBooks reference and cannot be scheduled.',
|
|
12
|
+
missing_vendor: 'Select a vendor before saving this schedule.',
|
|
13
|
+
};
|
|
14
|
+
export const saveNewScheduleEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(saveNewSchedule.match), mergeMap((action) => {
|
|
15
|
+
const { scheduleType } = action.payload;
|
|
16
|
+
const state = state$.value;
|
|
17
|
+
const localData = state.expenseAutomationJESchedulesViewState.newSchedule
|
|
18
|
+
.newScheduleState[scheduleType];
|
|
19
|
+
const { selectedBaseTransactionId } = localData;
|
|
20
|
+
const transaction = selectedBaseTransactionId != null
|
|
21
|
+
? getScheduleTransactionById(state.transactionState, getJEScheduleTransactionKey(selectedBaseTransactionId))
|
|
22
|
+
: undefined;
|
|
23
|
+
if (transaction == null) {
|
|
24
|
+
return from([
|
|
25
|
+
saveNewScheduleFailure({
|
|
26
|
+
status: createZeniAPIStatus('Unexpected Error', 'No base transaction selected for this schedule.'),
|
|
27
|
+
}),
|
|
28
|
+
openSnackbar({
|
|
29
|
+
messageSection: 'create_schedule',
|
|
30
|
+
messageText: 'failed',
|
|
31
|
+
type: 'error',
|
|
32
|
+
variables: [
|
|
33
|
+
{
|
|
34
|
+
variableName: '_api-error_',
|
|
35
|
+
variableValue: 'No base transaction selected.',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}),
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
const result = prepareNewSchedulePayload(transaction, localData, scheduleType);
|
|
42
|
+
if (!result.ok) {
|
|
43
|
+
const message = FAILURE_REASON_MESSAGES[result.reason];
|
|
44
|
+
return from([
|
|
45
|
+
saveNewScheduleFailure({
|
|
46
|
+
status: createZeniAPIStatus('Unexpected Error', message),
|
|
47
|
+
}),
|
|
48
|
+
openSnackbar({
|
|
49
|
+
messageSection: 'create_schedule',
|
|
50
|
+
messageText: 'failed',
|
|
51
|
+
type: 'error',
|
|
52
|
+
variables: [{ variableName: '_api-error_', variableValue: message }],
|
|
53
|
+
}),
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
const vendorName = localData.selectedVendor?.name ?? transaction.vendorName ?? '';
|
|
57
|
+
const queryParam = {
|
|
58
|
+
je_schedule_type: scheduleType,
|
|
59
|
+
};
|
|
60
|
+
const payload = { ...result.payload };
|
|
61
|
+
return zeniAPI
|
|
62
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`, payload)
|
|
63
|
+
.pipe(mergeMap((response) => {
|
|
64
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
65
|
+
return from([
|
|
66
|
+
updateJESchedules(response.data.je_schedules),
|
|
67
|
+
updateJESchedulesDetails(response.data.je_schedules, response.data.scheduled_journal_entries),
|
|
68
|
+
resetNewScheduleLocalData({ scheduleType }),
|
|
69
|
+
saveNewScheduleSuccess(),
|
|
70
|
+
openSnackbar({
|
|
71
|
+
messageSection: 'create_schedule',
|
|
72
|
+
messageText: 'success',
|
|
73
|
+
type: 'success',
|
|
74
|
+
variables: [
|
|
75
|
+
{ variableName: '_vendor_name_', variableValue: vendorName },
|
|
76
|
+
],
|
|
77
|
+
}),
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
return from([
|
|
81
|
+
saveNewScheduleFailure({ status: response.status }),
|
|
82
|
+
openSnackbar({
|
|
83
|
+
messageSection: 'create_schedule',
|
|
84
|
+
messageText: 'failed',
|
|
85
|
+
type: 'error',
|
|
86
|
+
variables: [
|
|
87
|
+
{
|
|
88
|
+
variableName: '_api-error_',
|
|
89
|
+
variableValue: response.status.message,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
}),
|
|
93
|
+
]);
|
|
94
|
+
}), catchError((error) => from([
|
|
95
|
+
openSnackbar({
|
|
96
|
+
messageSection: 'create_schedule',
|
|
97
|
+
messageText: 'failed',
|
|
98
|
+
type: 'error',
|
|
99
|
+
variables: [
|
|
100
|
+
{
|
|
101
|
+
variableName: '_api-error_',
|
|
102
|
+
variableValue: JSON.stringify(error),
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
}),
|
|
106
|
+
saveNewScheduleFailure({
|
|
107
|
+
status: createZeniAPIStatus('Unexpected Error', `Save New Schedule REST API call errored out ${JSON.stringify(error)}`),
|
|
108
|
+
}),
|
|
109
|
+
])));
|
|
110
|
+
}));
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { EMPTY, from, merge, of } from 'rxjs';
|
|
2
|
+
import { catchError, debounceTime, filter, mergeMap, switchMap, } from 'rxjs/operators';
|
|
3
|
+
import { getJEScheduleTransactionKey } from '../../../../../entity/jeSchedules/jeSchedulesTypes';
|
|
4
|
+
import { toTransactionType } from '../../../../../entity/transaction/stateTypes/transactionType';
|
|
5
|
+
import { updateScheduleTransactions } from '../../../../../entity/transaction/transactionReducer';
|
|
6
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
7
|
+
import { searchTransactionsForNewSchedule, searchTransactionsForNewScheduleFailure, searchTransactionsForNewScheduleSuccess, } from '../../../reducers/jeSchedulesViewReducer';
|
|
8
|
+
import { MIN_NEW_SCHEDULE_SEARCH_LENGTH } from '../../../types/jeSchedulesViewState';
|
|
9
|
+
/** Dropdown-sized result set — no pagination for Base Transaction search. */
|
|
10
|
+
const NEW_SCHEDULE_SEARCH_PAGE_SIZE = 10;
|
|
11
|
+
/** Fallback when the backend sends a null currency for a search result. */
|
|
12
|
+
const DEFAULT_CURRENCY_CODE = 'USD';
|
|
13
|
+
const DEFAULT_CURRENCY_SYMBOL = '$';
|
|
14
|
+
export const searchTransactionsForNewScheduleEpic = (actions$, _state$, zeniAPI) => {
|
|
15
|
+
const searchActions$ = actions$.pipe(filter(searchTransactionsForNewSchedule.match));
|
|
16
|
+
/** No API for empty or 1-char queries; immediate merge so switchMap cancels any in-flight HTTP. */
|
|
17
|
+
const newSearchTooShortOrClear$ = searchActions$.pipe(filter((action) => action.payload.query.trim().length < MIN_NEW_SCHEDULE_SEARCH_LENGTH));
|
|
18
|
+
const newSearchDebounced$ = searchActions$.pipe(filter((action) => action.payload.query.trim().length >= MIN_NEW_SCHEDULE_SEARCH_LENGTH), debounceTime(300));
|
|
19
|
+
return merge(newSearchTooShortOrClear$, newSearchDebounced$).pipe(switchMap((action) => {
|
|
20
|
+
const query = action.payload.query.trim();
|
|
21
|
+
if (query.length < MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
|
|
22
|
+
return EMPTY;
|
|
23
|
+
}
|
|
24
|
+
const queryParam = {
|
|
25
|
+
page_size: NEW_SCHEDULE_SEARCH_PAGE_SIZE,
|
|
26
|
+
search_text: query,
|
|
27
|
+
je_schedule_type: action.payload.scheduleType,
|
|
28
|
+
};
|
|
29
|
+
return zeniAPI
|
|
30
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/base_transaction_search?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
31
|
+
.pipe(mergeMap((response) => {
|
|
32
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
33
|
+
const { transactions } = response.data;
|
|
34
|
+
const transactionsPerCurrency = {};
|
|
35
|
+
transactions.forEach((transaction) => {
|
|
36
|
+
const { currency_code, currency_symbol } = transaction;
|
|
37
|
+
const currencyCode = currency_code ?? DEFAULT_CURRENCY_CODE;
|
|
38
|
+
const existing = transactionsPerCurrency[currencyCode];
|
|
39
|
+
transactionsPerCurrency[currencyCode] =
|
|
40
|
+
existing != null
|
|
41
|
+
? {
|
|
42
|
+
currencySymbol: existing.currencySymbol,
|
|
43
|
+
transactions: [...existing.transactions, transaction],
|
|
44
|
+
}
|
|
45
|
+
: {
|
|
46
|
+
currencySymbol: currency_code == null
|
|
47
|
+
? DEFAULT_CURRENCY_SYMBOL
|
|
48
|
+
: currency_symbol,
|
|
49
|
+
transactions: [transaction],
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
const actionsOut = Object.keys(transactionsPerCurrency).map((currencyCode) => {
|
|
53
|
+
const perCurrency = transactionsPerCurrency[currencyCode];
|
|
54
|
+
return updateScheduleTransactions(perCurrency.transactions, currencyCode, perCurrency.currencySymbol, 'merge');
|
|
55
|
+
});
|
|
56
|
+
actionsOut.push(searchTransactionsForNewScheduleSuccess({
|
|
57
|
+
searchResults: transactions.map((transaction) => getJEScheduleTransactionKey({
|
|
58
|
+
id: transaction.transaction_id,
|
|
59
|
+
type: toTransactionType(transaction.transaction_type),
|
|
60
|
+
lineId: transaction.line_id,
|
|
61
|
+
})),
|
|
62
|
+
}));
|
|
63
|
+
return from(actionsOut);
|
|
64
|
+
}
|
|
65
|
+
return of(searchTransactionsForNewScheduleFailure({
|
|
66
|
+
status: response.status,
|
|
67
|
+
}));
|
|
68
|
+
}), catchError((error) => of(searchTransactionsForNewScheduleFailure({
|
|
69
|
+
status: createZeniAPIStatus('Unexpected Error', 'Search transactions for new schedule errored: ' +
|
|
70
|
+
JSON.stringify(error)),
|
|
71
|
+
}))));
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EMPTY, of } from 'rxjs';
|
|
2
|
+
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { convertToPeriod, toAbsoluteDay, } from '../../../../commonStateTypes/timePeriod';
|
|
4
|
+
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
5
|
+
import { fetchJeSchedulesPage, updateJESchedulesUIState, } from '../../reducers/jeSchedulesViewReducer';
|
|
6
|
+
export const switchJESchedulesTabEpic = (actions$, state$) => actions$.pipe(filter(updateJESchedulesUIState.match), filter((action) => action.payload.selectedPageTab != null), mergeMap(() => {
|
|
7
|
+
const state = state$.value;
|
|
8
|
+
const { fetchState, refreshStatus } = state.expenseAutomationJESchedulesViewState;
|
|
9
|
+
if (fetchState === 'In-Progress' ||
|
|
10
|
+
refreshStatus.fetchState === 'In-Progress') {
|
|
11
|
+
return EMPTY;
|
|
12
|
+
}
|
|
13
|
+
const currentTenant = getCurrentTenant(state);
|
|
14
|
+
const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
|
|
15
|
+
const period = convertToPeriod(selectedPeriod);
|
|
16
|
+
const timePeriodStart = toAbsoluteDay(period.start);
|
|
17
|
+
const timePeriodEnd = toAbsoluteDay(period.end);
|
|
18
|
+
if (timePeriodStart == null || timePeriodEnd == null) {
|
|
19
|
+
return EMPTY;
|
|
20
|
+
}
|
|
21
|
+
return of(fetchJeSchedulesPage({ start: timePeriodStart, end: timePeriodEnd }, true));
|
|
22
|
+
}));
|