@zeniai/client-epic-state 5.2.52-betaRD1 → 5.2.53-beta0ND
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/jeSchedules/jeSchedulesReducer.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +5 -47
- package/lib/entity/notificationRegistry/notificationRegistryReducer.d.ts +2 -1
- package/lib/entity/notificationRegistry/notificationRegistryReducer.js +20 -9
- package/lib/entity/notificationRegistry/notificationRegistrySelector.d.ts +2 -1
- package/lib/entity/notificationRegistry/notificationRegistrySelector.js +7 -1
- package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +5 -0
- package/lib/entity/notificationRegistry/notificationRegistryState.js +7 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +3 -1
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +0 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +4 -46
- package/lib/esm/entity/notificationRegistry/notificationRegistryReducer.js +20 -9
- package/lib/esm/entity/notificationRegistry/notificationRegistrySelector.js +5 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistryState.js +5 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +3 -1
- package/lib/esm/epic.js +0 -2
- package/lib/esm/index.js +7 -7
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +4 -2
- package/lib/esm/view/aiCfoView/epics/fetchRoutineRunsEpic.js +3 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -9
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +13 -10
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +15 -34
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -12
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +15 -4
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -60
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +10 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +12 -20
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +28 -11
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +45 -21
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +4 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +19 -3
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +16 -3
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +6 -2
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +4 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +21 -21
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.js +6 -2
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +10 -2
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +33 -0
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +43 -17
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.js +6 -2
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.js +10 -2
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +34 -0
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +44 -18
- package/lib/esm/view/invoicing/invoicingFormDraft.js +13 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +57 -9
- package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +20 -7
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +43 -17
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +24 -4
- package/lib/esm/view/settingsView/epic/fetchNotificationSettingsEpic.js +12 -2
- package/lib/index.d.ts +7 -7
- package/lib/index.js +56 -50
- package/lib/view/aiCfoView/aiCfoViewReducer.js +4 -2
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -1
- package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.js +3 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +11 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +15 -34
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -12
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +15 -4
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -18
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +18 -7
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -8
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +3 -62
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +10 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +8 -4
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +12 -20
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +27 -10
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -15
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +8 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +22 -6
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +47 -22
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +3 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +7 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +18 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +14 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +6 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +3 -0
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +3 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +19 -19
- package/lib/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.js +6 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +10 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +7 -7
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +33 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +6 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.d.ts +15 -10
- package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +42 -16
- package/lib/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.js +6 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.js +10 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +7 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +34 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +6 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.d.ts +15 -11
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +42 -16
- package/lib/view/invoicing/invoicingFormDraft.d.ts +10 -1
- package/lib/view/invoicing/invoicingFormDraft.js +14 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +49 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +59 -10
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +19 -6
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +8 -5
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +43 -17
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.d.ts +4 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +30 -5
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +4 -3
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +12 -2
- package/lib/view/settingsView/settingsViewPayload.d.ts +2 -0
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +0 -40
- package/lib/tsconfig.mocks.tsbuildinfo +0 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.d.ts +0 -20
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +0 -44
package/lib/esm/index.js
CHANGED
|
@@ -64,8 +64,8 @@ import { ALL_JE_SCHEDULE_IGNORE_REASONS, ALL_JE_SCHEDULE_REVERT_REASONS, ALL_ONE
|
|
|
64
64
|
import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
65
65
|
import { updateCommentsNotifications, updateCommentsNotificationsStatuses, } from './entity/notification/notificationReducer';
|
|
66
66
|
import { toNotificationModeStrict, } from './entity/notification/types/notificationTypes';
|
|
67
|
-
import { getNotificationRegistry } from './entity/notificationRegistry/notificationRegistrySelector';
|
|
68
|
-
import { toNotificationChannel, toNotificationFrequency, } from './entity/notificationRegistry/notificationRegistryState';
|
|
67
|
+
import { getNotificationRegistry, getNotificationRegistryForDomain, } from './entity/notificationRegistry/notificationRegistrySelector';
|
|
68
|
+
import { DEFAULT_NOTIFICATION_DOMAIN, NOTIFICATION_DOMAINS, toNotificationChannel, toNotificationDomain, toNotificationFrequency, } from './entity/notificationRegistry/notificationRegistryState';
|
|
69
69
|
import { getPlaidPaymentAccounts } from './entity/paymentAccount/paymentAccountSelector';
|
|
70
70
|
import { VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS, } from './entity/paymentAccount/paymentAccountState';
|
|
71
71
|
import { closeSnackbar, openSnackbar } from './entity/snackbar/snackbarReducer';
|
|
@@ -188,9 +188,9 @@ import { toExpenseAutomationViewType, toExpenseAutomationViewTypeStrict, } from
|
|
|
188
188
|
import { computeNewScheduleJeDetails } from './view/expenseAutomationView/helpers/newScheduleLocalDataHelper';
|
|
189
189
|
import { isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardCreditType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, } from './view/expenseAutomationView/helpers/reconciliationHelpers';
|
|
190
190
|
import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, } from './view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
|
|
191
|
-
import { ackCloseMatchAfterUndo, clearActualMatchingView as clearExpenseAutomationActualMatchingView, clearMatchNewModal, closeMatchNewModal,
|
|
191
|
+
import { ackCloseMatchAfterUndo, clearActualMatchingView as clearExpenseAutomationActualMatchingView, clearMatchNewModal, closeMatchNewModal, fetchActualMatching as fetchExpenseAutomationActualMatching, fetchActualMatchingMatch, fetchActualMatchingPage as fetchExpenseAutomationActualMatchingPage, matchAndReverseAccruals, openMatchNewModal, searchMatchAccruals, searchMatchTransactions, undoReversalAccruals, updateActualMatchingUIState as updateExpenseAutomationActualMatchingUIState, } from './view/expenseAutomationView/reducers/actualMatchingViewReducer';
|
|
192
192
|
import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
|
|
193
|
-
import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearSearchTransactionsForNewSchedule as clearJeSearchTransactionsForNewSchedule, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, fetchOneTimeAccrual, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, ignoreOneTimeAccrual, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeNewSchedule as initializeJeNewSchedule, initializeJeScheduleLocalData, promoteOneTimeAccrual, removeJeOneTimeAccrualLocalData, removeJeScheduleTransactionKey, resetNewScheduleLocalData as resetJeNewScheduleLocalData, retryJeSchedule as retryExpenseAutomationJESchedule, revertJeSchedule, revertOneTimeAccrual, 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,
|
|
193
|
+
import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearSearchTransactionsForNewSchedule as clearJeSearchTransactionsForNewSchedule, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, fetchOneTimeAccrual, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, ignoreOneTimeAccrual, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeNewSchedule as initializeJeNewSchedule, initializeJeScheduleLocalData, promoteOneTimeAccrual, removeJeOneTimeAccrualLocalData, removeJeScheduleTransactionKey, resetNewScheduleLocalData as resetJeNewScheduleLocalData, retryJeSchedule as retryExpenseAutomationJESchedule, revertJeSchedule, revertOneTimeAccrual, 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, updateJeOneTimeAccrualLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
|
|
194
194
|
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';
|
|
195
195
|
import { clearStatementDateConflict, confirmStatementMapping, deleteAccountStatement, deleteCombinedStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, parseCombinedStatement, parseStatement, parseStatementFailure, parseStatementSuccess, reparseStatement, reparseStatementFailure, reparseStatementSuccess, resetReparseStatementStatus, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, setStatementProcessingDismissedToBackground, submitCombinedStatementUpdate, 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';
|
|
196
196
|
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, updateTransactionGroup, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
@@ -236,7 +236,7 @@ import { toAverageMonthsCount } from './view/netBurnOrIncomeStoryCard/epic/updat
|
|
|
236
236
|
import { fetchNetBurnOrIncomeStoryCard, updateNetBurnOrIncomeStoryCardSettings, } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer';
|
|
237
237
|
import { getNetBurnOrIncomeStoryCardReport } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelector';
|
|
238
238
|
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
|
|
239
|
-
import { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, hasUnsavedNotificationPreferences, } from './view/notificationPreferencesView/notificationPreferencesViewSelector';
|
|
239
|
+
import { getEffectiveNotificationPreferences, getEffectiveNotificationPreferencesForDomain, getNotificationLocalOverrides, getNotificationLocalOverridesForDomain, getNotificationPreferencesSaveState, hasUnsavedNotificationPreferences, hasUnsavedNotificationPreferencesForDomain, } from './view/notificationPreferencesView/notificationPreferencesViewSelector';
|
|
240
240
|
import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationView, updateNotificationViewAllNotificationsStatus, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewNotificationStatus, updateNotificationViewSubTab, updateNotificationViewTabState, updateNotificationViewUIState, } from './view/notificationView/notificationViewReducer';
|
|
241
241
|
import { getExternalNotificationsForSelectedSubTab, getNotificationView, getNotificationsForSelectedSubTab, } from './view/notificationView/notificationViewSelector';
|
|
242
242
|
import { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, } from './view/notificationView/notificationViewState';
|
|
@@ -491,7 +491,7 @@ export { stringToUnion, stringToUnionStrict };
|
|
|
491
491
|
export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
|
|
492
492
|
export {
|
|
493
493
|
// Bulk Upload Types
|
|
494
|
-
BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, toTransactionGroup, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, actualMatchingTransactionLineKey, ALL_JE_PAGE_TABS, MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, toExpenseAutomationJEScheduleSortKey, toExpenseAutomationActualMatchingSortKey, toJEPageTab, toMatchAndReverseResultStatus, toUndoReversalResultStatus, toggleJECreatedGroupCollapsed,
|
|
494
|
+
BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, toTransactionGroup, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, actualMatchingTransactionLineKey, ALL_JE_PAGE_TABS, MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, toExpenseAutomationJEScheduleSortKey, toExpenseAutomationActualMatchingSortKey, toJEPageTab, toMatchAndReverseResultStatus, toUndoReversalResultStatus, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJEScheduleTypeFilter, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, toExpenseAutomationViewTypeStrict, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionGroup, fetchExpenseAutomationMissingReceipts,
|
|
495
495
|
// Bulk Upload Actions
|
|
496
496
|
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, getLedgerAccountIdsWithStatementOverrideWarning, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, updateStatementProcessingFailed, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, deleteCombinedStatement, uploadAccountStatement, parseCombinedStatement, parseStatement, parseStatementSuccess, parseStatementFailure, reparseStatement, reparseStatementSuccess, reparseStatementFailure, resetReparseStatementStatus, updateParsedStatementData, updateNodeCollapseState, updateStatementUploadChosen, submitCombinedStatementUpdate, submitStatementUpdate, clearStatementDateConflict, confirmStatementMapping, updateStatementUpdateLocalData, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, setStatementProcessingDismissedToBackground, updateStatementProcessingBackgroundCompletedSteps, };
|
|
497
497
|
export { computeNewScheduleJeDetails, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchOneTimeAccrual, getJeNewAccrualAccountsView, ignoreOneTimeAccrual, promoteOneTimeAccrual, revertJeSchedule, revertOneTimeAccrual, getJeNewScheduleSearchTransactionsView, getJeNewScheduleView, };
|
|
@@ -680,7 +680,7 @@ export { toNotificationModeStrict, updateCommentsNotifications, updateCommentsNo
|
|
|
680
680
|
export { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, fetchNotificationView, fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, updateNotificationViewAllNotificationsStatus, updateNotificationViewNotificationStatus, updateNotificationViewTabState, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewSubTab, updateNotificationViewUIState, getNotificationView, getExternalNotificationsForSelectedSubTab, getNotificationsForSelectedSubTab, };
|
|
681
681
|
export { fetchRegisteredInterests, notifyMeForFeature, getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, };
|
|
682
682
|
export { pushToastNotification, getLastNotificationTime, getNotifications, };
|
|
683
|
-
export { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, getNotificationRegistry, hasUnsavedNotificationPreferences, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationFrequency, };
|
|
683
|
+
export { getEffectiveNotificationPreferences, getEffectiveNotificationPreferencesForDomain, getNotificationLocalOverrides, getNotificationLocalOverridesForDomain, getNotificationPreferencesSaveState, getNotificationRegistry, getNotificationRegistryForDomain, hasUnsavedNotificationPreferences, hasUnsavedNotificationPreferencesForDomain, NOTIFICATION_DOMAINS, DEFAULT_NOTIFICATION_DOMAIN, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationDomain, toNotificationFrequency, };
|
|
684
684
|
export { getReferralListView, getInviteFormView, toReferralListViewSortKeyType, StatusTypes, AmountStatusTypes, DEFAULT_REFERRER_AMOUNT, fetchReferrals, sendReferralInvite, clearReferrals, saveReferralFormDataInLocalStore, updateReferralListSortUiState, resendReferralInvite, fetchRewardsPlan, getRewardsPlanCard, updateReferViewed, };
|
|
685
685
|
export { ALL_WEEK_DAYS, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
686
686
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, getCompanyTaskManagerView, createTaskFromTaskGroupTemplate, };
|
|
@@ -835,7 +835,8 @@ const aiCfoView = createSlice({
|
|
|
835
835
|
// The server has it. Nothing it sends from here on will contain this row,
|
|
836
836
|
// so the tombstone has done its job and holding it any longer is what
|
|
837
837
|
// makes a routine recreated under the same id invisible forever.
|
|
838
|
-
draft.routines.deletedScheduleIds =
|
|
838
|
+
draft.routines.deletedScheduleIds =
|
|
839
|
+
draft.routines.deletedScheduleIds.filter((id) => id !== action.payload.scheduleId);
|
|
839
840
|
draft.routineMutation = {
|
|
840
841
|
fetchState: 'Completed',
|
|
841
842
|
error: undefined,
|
|
@@ -847,7 +848,8 @@ const aiCfoView = createSlice({
|
|
|
847
848
|
// is what lets the refetch put the row back — leaving it hidden would
|
|
848
849
|
// tell the user they had stopped something they had not, which is the
|
|
849
850
|
// worst outcome this list can produce.
|
|
850
|
-
draft.routines.deletedScheduleIds =
|
|
851
|
+
draft.routines.deletedScheduleIds =
|
|
852
|
+
draft.routines.deletedScheduleIds.filter((id) => id !== action.payload.scheduleId);
|
|
851
853
|
// Its own slice: the refetch that puts the row back would otherwise wipe
|
|
852
854
|
// this error, leaving the row silently reappearing with no explanation.
|
|
853
855
|
draft.routineMutation = {
|
|
@@ -27,7 +27,9 @@ export const fetchRoutineRunsEpic = (actions$, _state$, zeniAPI) => actions$.pip
|
|
|
27
27
|
// Filtered, not trusted: one malformed row must not take the
|
|
28
28
|
// whole history down, and a run without an id is not addressable
|
|
29
29
|
// by anything the UI does with it.
|
|
30
|
-
runs: (data.runs ?? [])
|
|
30
|
+
runs: (data.runs ?? [])
|
|
31
|
+
.filter(isRoutineRunPayload)
|
|
32
|
+
.map(toRoutineRun),
|
|
31
33
|
scheduleId,
|
|
32
34
|
sessionId: data.session_id ?? null,
|
|
33
35
|
});
|
|
@@ -3,7 +3,7 @@ import { filter, mergeMap } from 'rxjs/operators';
|
|
|
3
3
|
import { fetchAccountList } from '../../../accountList/accountListReducer';
|
|
4
4
|
import { getAccountsTypesForScheduleEpics } from '../../../scheduleView/scheduleListView/scheduleListHelper';
|
|
5
5
|
import { fetchActualMatchingPage } from '../../reducers/actualMatchingViewReducer';
|
|
6
|
-
import {
|
|
6
|
+
import { fetchJeSchedules, fetchJeSchedulesPage, initializeAccountSettingsView, } from '../../reducers/jeSchedulesViewReducer';
|
|
7
7
|
export const fetchJeSchedulesPageEpic = (actions$, state$) => actions$.pipe(filter(fetchJeSchedulesPage.match), mergeMap((action) => {
|
|
8
8
|
const jeSchedulePageActions = [];
|
|
9
9
|
const { period, refreshViewInBackground } = action.payload;
|
|
@@ -24,14 +24,6 @@ export const fetchJeSchedulesPageEpic = (actions$, state$) => actions$.pipe(filt
|
|
|
24
24
|
else {
|
|
25
25
|
jeSchedulePageActions.push(fetchJeSchedules(period, refreshViewInBackground));
|
|
26
26
|
}
|
|
27
|
-
// Failed postings are tenant-wide and carry no period, so a period change or a tab switch
|
|
28
|
-
// cannot invalidate them -- fetch once and let retry keep the list current from then on.
|
|
29
|
-
// Refreshes still refetch, silently, so a failure resolved elsewhere leaves eventually.
|
|
30
|
-
const { fetchState: failedPostingsFetchState } = state.expenseAutomationJESchedulesViewState.failedJePostings.fetchState;
|
|
31
|
-
const isBackgroundRefresh = refreshViewInBackground === true;
|
|
32
|
-
if (failedPostingsFetchState === 'Not-Started' || isBackgroundRefresh) {
|
|
33
|
-
jeSchedulePageActions.push(fetchFailedJePostings(isBackgroundRefresh));
|
|
34
|
-
}
|
|
35
27
|
// Only on the first page load. Account settings cannot change from a tab switch or a
|
|
36
28
|
// refresh, and re-initializing puts accountSettingsView back to 'In-Progress' -- which the
|
|
37
29
|
// page reads as "still loading" and answers with a full skeleton over rows it already has.
|
|
@@ -2,13 +2,13 @@ import { from, of } from 'rxjs';
|
|
|
2
2
|
import { catchError, filter, mergeMap, takeUntil } from 'rxjs/operators';
|
|
3
3
|
import { DEFAULT_DATE_FORMAT } from '../../../../commonStateTypes/timePeriod';
|
|
4
4
|
import { toAbsoluteDay, toString } from '../../../../commonStateTypes/timePeriod';
|
|
5
|
-
import { updateAccruedJESchedules, updateAccruedJESchedulesDetails, updateJEOneTimeAccruals, updateJESchedules, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
5
|
+
import { updateAccruedJESchedules, updateAccruedJESchedulesDetails, updateJEOneTimeAccruals, updateJESchedules, updateJESchedulesDetails, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
6
6
|
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
7
7
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
8
8
|
import { clearAll } from '../../../../rootActions';
|
|
9
9
|
import { date } from '../../../../zeniDayJS';
|
|
10
10
|
import { SERVICE_MONTH_FORMAT, } from '../../payload/jeSchedulesPayload';
|
|
11
|
-
import { fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesSuccess, } from '../../reducers/jeSchedulesViewReducer';
|
|
11
|
+
import { fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesSuccess, initializeJeScheduleLocalData, } from '../../reducers/jeSchedulesViewReducer';
|
|
12
12
|
/**
|
|
13
13
|
* How far back to look for accrued schedules, matching the Vendors page
|
|
14
14
|
* (`getDefaultSelectedTimeframeForScheduleType`, 'accrued_expenses'), which queries the same
|
|
@@ -81,9 +81,8 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
81
81
|
one_time_accrual_service_month_end: parsedEndDate.format(SERVICE_MONTH_FORMAT),
|
|
82
82
|
// Existing lists what actually reached the books.
|
|
83
83
|
one_time_accrual_statuses: ['posted'],
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
// on Review. Dropping the key from the response is a server-side follow-up.
|
|
84
|
+
// A failed posting from an earlier month still needs to surface here, so this list
|
|
85
|
+
// is deliberately not windowed.
|
|
87
86
|
filter_failed_je_postings_by_date: false,
|
|
88
87
|
}),
|
|
89
88
|
};
|
|
@@ -94,10 +93,12 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
94
93
|
const updateActions = [];
|
|
95
94
|
const accruedJeSchedules = response.data.accrued_je_schedules?.je_schedules ?? [];
|
|
96
95
|
const oneTimeAccruals = response.data.one_time_accruals ?? [];
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
updateActions.push(updateJESchedules([
|
|
97
|
+
...response.data.je_schedules,
|
|
98
|
+
...response.data.failed_je_postings.je_schedules,
|
|
99
|
+
]), updateJESchedulesDetails([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), initializeJeScheduleLocalData([
|
|
100
|
+
...response.data.failed_je_postings.je_schedules,
|
|
101
|
+
]));
|
|
101
102
|
if (accruedJeSchedules.length > 0) {
|
|
102
103
|
updateActions.push(updateAccruedJESchedules(accruedJeSchedules), updateAccruedJESchedulesDetails(accruedJeSchedules, response.data.accrued_je_schedules
|
|
103
104
|
?.scheduled_journal_entries));
|
|
@@ -110,7 +111,9 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
110
111
|
}
|
|
111
112
|
updateActions.push(fetchJeSchedulesSuccess({
|
|
112
113
|
jeSchedules: [...response.data.je_schedules],
|
|
113
|
-
failedJeSchedules: [
|
|
114
|
+
failedJeSchedules: [
|
|
115
|
+
...response.data.failed_je_postings.je_schedules,
|
|
116
|
+
],
|
|
114
117
|
accruedJeSchedules: accruedJeSchedules,
|
|
115
118
|
oneTimeAccruals: oneTimeAccruals,
|
|
116
119
|
selectedPeriod: selectedPeriod,
|
package/lib/esm/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js
CHANGED
|
@@ -7,41 +7,22 @@ export const initializeJeScheduleLocalDataEpic = (actions$, state$) => actions$.
|
|
|
7
7
|
const actions = [];
|
|
8
8
|
const { jeScheduleTransactionKeys } = action.payload;
|
|
9
9
|
jeScheduleTransactionKeys.forEach((jeScheduleTransactionKey) => {
|
|
10
|
-
// Checked before the selector runs, not after: the selector destructures the record it
|
|
11
|
-
// looks up, so a key that is not in the store throws a TypeError rather than returning
|
|
12
|
-
// undefined. This epic is a mergeMap with no catchError, so that throw would take its
|
|
13
|
-
// subscription down for the rest of the session and silently stop local-data
|
|
14
|
-
// initialisation everywhere -- not just for this row.
|
|
15
|
-
if (state.jeSchedulesState.schedulesByTransactionKey[jeScheduleTransactionKey] == null) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
10
|
const jeScheduledTransaction = getJEScheduledTransactionByJEScheduleTransactionKey(jeScheduleTransactionKey, state);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
jeScheduleType: jeScheduledTransaction.jeScheduleType,
|
|
35
|
-
jeScheduleID: jeScheduledTransaction.jeScheduleId,
|
|
36
|
-
scheduledJournalEntryID,
|
|
37
|
-
updatedVendor: undefined,
|
|
38
|
-
updatedCategoryId: undefined,
|
|
39
|
-
updatedAccumulatedDepreciationCategoryID: undefined,
|
|
40
|
-
updatedClassId: undefined,
|
|
41
|
-
},
|
|
42
|
-
scheduledJournalEntryID,
|
|
43
|
-
}));
|
|
44
|
-
});
|
|
11
|
+
const initLocalData = {
|
|
12
|
+
jeScheduleType: jeScheduledTransaction.jeScheduleType,
|
|
13
|
+
jeScheduleID: jeScheduledTransaction.jeScheduleId,
|
|
14
|
+
scheduledJournalEntryID: jeScheduledTransaction.scheduledJournalEntry[0]
|
|
15
|
+
.scheduledJournalEntryID,
|
|
16
|
+
updatedVendor: undefined,
|
|
17
|
+
updatedCategoryId: undefined,
|
|
18
|
+
updatedAccumulatedDepreciationCategoryID: undefined,
|
|
19
|
+
updatedClassId: undefined,
|
|
20
|
+
};
|
|
21
|
+
actions.push(updateJeScheduleLocalDataById({
|
|
22
|
+
localData: initLocalData,
|
|
23
|
+
scheduledJournalEntryID: jeScheduledTransaction.scheduledJournalEntry[0]
|
|
24
|
+
.scheduledJournalEntryID,
|
|
25
|
+
}));
|
|
45
26
|
});
|
|
46
27
|
return from(actions);
|
|
47
28
|
}));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { from } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { removeScheduledJournalEntryFromJESchedule, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
3
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
5
4
|
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
6
5
|
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../responsePayload';
|
|
@@ -23,16 +22,9 @@ export const retryJeScheduleEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
23
22
|
.pipe(mergeMap((response) => {
|
|
24
23
|
if (isSuccessStatus(response)) {
|
|
25
24
|
const updateActions = [];
|
|
26
|
-
// Retire this entry, and the schedule itself only when this was its last failed
|
|
27
|
-
// one. A schedule that failed in several months is several rows sharing one
|
|
28
|
-
// schedule key, so dropping the key outright took the still-failing months off the
|
|
29
|
-
// list with it and nothing would have surfaced them again.
|
|
30
|
-
const failedEntriesForSchedule = state.jeSchedulesState.schedulesByTransactionKey[jeScheduleTransactionKey]?.scheduledJournalEntry ?? [];
|
|
31
|
-
const wasLastFailedEntryForSchedule = failedEntriesForSchedule.filter((journalEntry) => journalEntry.scheduledJournalEntryID !==
|
|
32
|
-
scheduledJournalEntryID).length === 0;
|
|
33
25
|
updateActions.push(retryJeScheduleSuccess({
|
|
34
26
|
scheduledJournalEntryID,
|
|
35
|
-
}),
|
|
27
|
+
}), removeFailedJeScheduleTransactionKey(jeScheduleTransactionKey, selectedPeriod), removeJeScheduleLocalDataById({ scheduledJournalEntryID }), // Important to remove localdata after success.
|
|
36
28
|
fetchMonthEndCloseChecks({
|
|
37
29
|
tenantId: currentTenant.tenantId,
|
|
38
30
|
period: selectedPeriod,
|
|
@@ -42,9 +34,6 @@ export const retryJeScheduleEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
42
34
|
messageText: 'success',
|
|
43
35
|
type: 'success',
|
|
44
36
|
}));
|
|
45
|
-
if (wasLastFailedEntryForSchedule) {
|
|
46
|
-
updateActions.push(removeFailedJeScheduleTransactionKey(jeScheduleTransactionKey, selectedPeriod));
|
|
47
|
-
}
|
|
48
37
|
return from(updateActions);
|
|
49
38
|
}
|
|
50
39
|
else {
|
|
@@ -6,7 +6,6 @@ import { updateTransactions } from '../../../../entity/transaction/transactionRe
|
|
|
6
6
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
7
7
|
import { getLineItemsByTransactionsIdsFromResponse } from '../../helpers/transactionCategorizationLocalDataHelper';
|
|
8
8
|
import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateParentTotalCountForTab, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState, } from '../../reducers/transactionsViewReducer';
|
|
9
|
-
import { DEFAULT_COMPLETED_SUB_TAB } from '../../types/completedSubTab';
|
|
10
9
|
import { TRANSACTIONS_TABS, toTransactionsSortKey, } from '../../types/transactionsViewState';
|
|
11
10
|
export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTransactionCategorization.match),
|
|
12
11
|
// Per-tab switchMap: cancels in-flight requests for the same tab on a new
|
|
@@ -33,9 +32,10 @@ groupBy((action) => action.payload.selectedTab), mergeMap((group$) => group$.pip
|
|
|
33
32
|
// cross-status search (omit or true) is reserved for Receipts
|
|
34
33
|
// manual-match.
|
|
35
34
|
search_all_statuses: false,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
// Sent on both tabs: the backend ignores it for Review's own rows but uses
|
|
36
|
+
// it to scope the Completed badge it returns alongside them.
|
|
37
|
+
sub_tab: expenseAutomationTransactionsViewState
|
|
38
|
+
.selectedTransactionCategorizationCompletedSubTab,
|
|
39
39
|
transaction_group: expenseAutomationTransactionsViewState.selectedTransactionGroup,
|
|
40
40
|
};
|
|
41
41
|
return zeniAPI
|
|
@@ -87,6 +87,17 @@ groupBy((action) => action.payload.selectedTab), mergeMap((group$) => group$.pip
|
|
|
87
87
|
parentTotalCount: response.data.parent_tab_total_count ??
|
|
88
88
|
response.data.total_count,
|
|
89
89
|
}));
|
|
90
|
+
// The inactive tab's badge, counted under the same filters. Absent on
|
|
91
|
+
// pages after the first and on the cross-tab search path, where the
|
|
92
|
+
// last known value stays correct.
|
|
93
|
+
const otherTabTotalCount = response.data.other_tab_total_count;
|
|
94
|
+
if (otherTabTotalCount != null) {
|
|
95
|
+
updateActions.push(updateParentTotalCountForTab({
|
|
96
|
+
selectedPeriod,
|
|
97
|
+
selectedTab: selectedTab === 'review' ? 'autoCategorized' : 'review',
|
|
98
|
+
parentTotalCount: otherTabTotalCount,
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
90
101
|
updateActions.push(resetOtherTabsFetchState({
|
|
91
102
|
refreshViewInBackground,
|
|
92
103
|
tabs: TRANSACTIONS_TABS.filter((tab) => selectedTab !== tab),
|
|
@@ -62,10 +62,6 @@ export const initialState = {
|
|
|
62
62
|
jeScheduleAccruedKeysByPeriodAndTab: {},
|
|
63
63
|
jeScheduleOneTimeAccrualKeysByPeriodAndTab: {},
|
|
64
64
|
failedJeScheduleTransactionKeysByPeriodAndTab: {},
|
|
65
|
-
failedJePostings: {
|
|
66
|
-
fetchState: { fetchState: 'Not-Started', error: undefined },
|
|
67
|
-
jeScheduleTransactionKeys: [],
|
|
68
|
-
},
|
|
69
65
|
postStatusById: {},
|
|
70
66
|
ignoreStatusById: {},
|
|
71
67
|
revertStatusById: {},
|
|
@@ -75,9 +71,6 @@ export const initialState = {
|
|
|
75
71
|
oneTimeAccrualFetchStatusById: {},
|
|
76
72
|
uiState: {
|
|
77
73
|
createdGroupCollapsed: false,
|
|
78
|
-
// Expanded, like the other two. A failed posting is the only thing on this page that is
|
|
79
|
-
// actively wrong, so folding it away by default would hide the reason to open the tab.
|
|
80
|
-
failedGroupCollapsed: false,
|
|
81
74
|
pendingGroupCollapsed: false,
|
|
82
75
|
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
83
76
|
searchString: '',
|
|
@@ -149,53 +142,6 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
149
142
|
};
|
|
150
143
|
},
|
|
151
144
|
},
|
|
152
|
-
/**
|
|
153
|
-
* The Failed Postings list, fetched separately from the schedules it belongs to.
|
|
154
|
-
*
|
|
155
|
-
* No period and no tab in any of these three: the endpoint applies no date window, so there is
|
|
156
|
-
* one list per tenant and one slot to hold it. `refreshInBackground` keeps a silent refetch
|
|
157
|
-
* from dropping a skeleton over rows already on screen, the same way refreshStatus does for
|
|
158
|
-
* the schedules list.
|
|
159
|
-
*/
|
|
160
|
-
fetchFailedJePostings: {
|
|
161
|
-
reducer(draft, action) {
|
|
162
|
-
if (!action.payload.refreshInBackground) {
|
|
163
|
-
draft.failedJePostings.fetchState = {
|
|
164
|
-
fetchState: 'In-Progress',
|
|
165
|
-
error: undefined,
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
prepare(refreshInBackground = false) {
|
|
170
|
-
return { payload: { refreshInBackground } };
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
fetchFailedJePostingsSuccess: {
|
|
174
|
-
reducer(draft, action) {
|
|
175
|
-
draft.failedJePostings = {
|
|
176
|
-
fetchState: { fetchState: 'Completed', error: undefined },
|
|
177
|
-
jeScheduleTransactionKeys: action.payload.failedJeSchedules.map((schedule) => getJEScheduleTransactionDetailKeyPayload(schedule.base_transaction)),
|
|
178
|
-
};
|
|
179
|
-
},
|
|
180
|
-
prepare(failedJeSchedules) {
|
|
181
|
-
return { payload: { failedJeSchedules } };
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
fetchFailedJePostingsFailure: {
|
|
185
|
-
reducer(draft, action) {
|
|
186
|
-
// Keys are deliberately left alone. The schedules list clears its buckets on failure so an
|
|
187
|
-
// errored tab cannot read as "these are all the schedules there are", but this list is a
|
|
188
|
-
// set of outstanding problems -- showing the last known ones beside an error beats
|
|
189
|
-
// implying there are none.
|
|
190
|
-
draft.failedJePostings.fetchState = {
|
|
191
|
-
fetchState: 'Error',
|
|
192
|
-
error: action.payload.status,
|
|
193
|
-
};
|
|
194
|
-
},
|
|
195
|
-
prepare(status) {
|
|
196
|
-
return { payload: { status } };
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
145
|
fetchJeSchedulesSuccess(draft, action) {
|
|
200
146
|
const { jeSchedules, selectedPeriod, selectedPageTab, failedJeSchedules, accruedJeSchedules, oneTimeAccruals, refreshViewInBackground, } = action.payload;
|
|
201
147
|
const periodTabKey = getJESchedulePeriodTabKey(selectedPageTab, toMonthYearPeriodId(selectedPeriod));
|
|
@@ -412,8 +358,6 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
412
358
|
reducer(draft, action) {
|
|
413
359
|
const { failedJeScheduleKey } = action.payload;
|
|
414
360
|
removeKeyFromEveryTabSlot(draft.failedJeScheduleTransactionKeysByPeriodAndTab, failedJeScheduleKey);
|
|
415
|
-
draft.failedJePostings.jeScheduleTransactionKeys =
|
|
416
|
-
draft.failedJePostings.jeScheduleTransactionKeys.filter((jeScheduleKey) => jeScheduleKey !== failedJeScheduleKey);
|
|
417
361
|
},
|
|
418
362
|
},
|
|
419
363
|
initializeJeScheduleLocalData: {
|
|
@@ -756,9 +700,6 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
756
700
|
draft.uiState.createdGroupCollapsed =
|
|
757
701
|
!draft.uiState.createdGroupCollapsed;
|
|
758
702
|
},
|
|
759
|
-
toggleJEFailedGroupCollapsed(draft) {
|
|
760
|
-
draft.uiState.failedGroupCollapsed = !draft.uiState.failedGroupCollapsed;
|
|
761
|
-
},
|
|
762
703
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
763
704
|
Object.assign(draft, initialState);
|
|
764
705
|
},
|
|
@@ -769,7 +710,7 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
769
710
|
});
|
|
770
711
|
},
|
|
771
712
|
});
|
|
772
|
-
export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, clearSearchTransactionsForNewSchedule, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, ignoreOneTimeAccrual, oneTimeAccrualActionFailure, oneTimeAccrualActionSuccess, promoteOneTimeAccrual, revertJeSchedule, revertJeScheduleFailure, revertJeScheduleSuccess, revertOneTimeAccrual, fetchAccountSettingsListForAccountTypes, fetchJeSchedules,
|
|
713
|
+
export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, clearSearchTransactionsForNewSchedule, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, ignoreOneTimeAccrual, oneTimeAccrualActionFailure, oneTimeAccrualActionSuccess, promoteOneTimeAccrual, revertJeSchedule, revertJeScheduleFailure, revertJeScheduleSuccess, revertOneTimeAccrual, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchOneTimeAccrual, fetchOneTimeAccrualFailure, fetchOneTimeAccrualSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, initializeNewSchedule, removeFailedJeScheduleTransactionKey, removeJeOneTimeAccrualLocalData, removeJeScheduleLocalDataById, removeJeAccruedScheduleKey, removeJeScheduleTransactionKey, resetNewScheduleLocalData, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, saveNewSchedule, saveNewScheduleFailure, saveNewScheduleSuccess, searchTransactionsForNewSchedule, searchTransactionsForNewScheduleFailure, searchTransactionsForNewScheduleSuccess, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJESchedulesUIState, updateJEScheduleTypeFilter, updateJeOneTimeAccrualLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateNewScheduleLocalData, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
|
|
773
714
|
export default expenseAutomationJESchedulesView.reducer;
|
|
774
715
|
const doUpdateRecommendationForAccountSettings = (draft, payload) => {
|
|
775
716
|
const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = mapAccountTypeRecommendationPayloadToAccountRecommendationByType(payload);
|
|
@@ -373,6 +373,16 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
373
373
|
if (cached != null) {
|
|
374
374
|
autoCat.uiState.pageToken = cached.pageToken;
|
|
375
375
|
autoCat.uiState.totalCount = { ...cached.totalCount };
|
|
376
|
+
// Keep the stored badge in step with the restored sub-tab: the selector
|
|
377
|
+
// falls back to it for any period this sub-tab has not loaded. Merged,
|
|
378
|
+
// not replaced -- the snapshot only holds periods this sub-tab actually
|
|
379
|
+
// loaded, while the badge map also carries periods filled from a Review
|
|
380
|
+
// response's `other_tab_total_count`. Overwriting would drop those and
|
|
381
|
+
// leave the badge at 0 for any period this sub-tab never visited.
|
|
382
|
+
draft.parentTotalCountByTab.autoCategorized = {
|
|
383
|
+
...draft.parentTotalCountByTab.autoCategorized,
|
|
384
|
+
...cached.totalCount,
|
|
385
|
+
};
|
|
376
386
|
autoCat.uiState.scrollPosition = cached.scrollPosition;
|
|
377
387
|
autoCat.transactionIdsBySelectedPeriod = {
|
|
378
388
|
...cached.transactionIdsBySelectedPeriod,
|
|
@@ -210,7 +210,7 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
210
210
|
const accruedSchedules = [];
|
|
211
211
|
const oneTimeAccruals = [];
|
|
212
212
|
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, } = state;
|
|
213
|
-
const { jeScheduleTransactionKeysByPeriodAndTab, jeScheduleAccruedKeysByPeriodAndTab, jeScheduleOneTimeAccrualKeysByPeriodAndTab,
|
|
213
|
+
const { jeScheduleTransactionKeysByPeriodAndTab, jeScheduleAccruedKeysByPeriodAndTab, jeScheduleOneTimeAccrualKeysByPeriodAndTab, failedJeScheduleTransactionKeysByPeriodAndTab, jeScheduleLocalDataById, postStatusById, ignoreStatusById, revertStatusById, oneTimeAccrualActionStatusById, uiState, error, fetchState, refreshStatus, newSchedule, } = expenseAutomationJESchedulesViewState;
|
|
214
214
|
const accountSettingsView = getJEAccountSettingsView(state);
|
|
215
215
|
const newScheduleView = newSchedule.selectedDetailScheduleType === 'fixed_assets' ||
|
|
216
216
|
newSchedule.selectedDetailScheduleType === 'prepaid_expenses'
|
|
@@ -249,11 +249,15 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
249
249
|
const jeScheduleTransactionKeysForSelectedTab = selectedPeriodTabKey != null
|
|
250
250
|
? jeScheduleTransactionKeysByPeriodAndTab[selectedPeriodTabKey]
|
|
251
251
|
: undefined;
|
|
252
|
+
const failedJeScheduleTransactionKeysForSelectedTab = selectedPeriodTabKey != null
|
|
253
|
+
? failedJeScheduleTransactionKeysByPeriodAndTab[selectedPeriodTabKey]
|
|
254
|
+
: undefined;
|
|
252
255
|
// Distinguishes "this tab has never been fetched for this period" from "fetched and genuinely
|
|
253
256
|
// empty". Without it the page cannot tell a first visit from a real empty state, and renders an
|
|
254
257
|
// empty table where it should render a skeleton.
|
|
255
258
|
const hasLoadedForSelectedTab = jeScheduleTransactionKeysForSelectedTab != null;
|
|
256
259
|
const jeScheduleTransactionKeys = jeScheduleTransactionKeysForSelectedTab ?? [];
|
|
260
|
+
const failedJeScheduleTransactionKeys = failedJeScheduleTransactionKeysForSelectedTab ?? [];
|
|
257
261
|
const jeScheduleAccruedKeys = (selectedPeriodTabKey != null
|
|
258
262
|
? jeScheduleAccruedKeysByPeriodAndTab[selectedPeriodTabKey]
|
|
259
263
|
: undefined) ?? [];
|
|
@@ -276,34 +280,24 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
276
280
|
accruedSchedules.push(accruedScheduleDetails);
|
|
277
281
|
}
|
|
278
282
|
});
|
|
279
|
-
|
|
280
|
-
// close month, and windowing it is what kept older failures off the only tab that can resolve
|
|
281
|
-
// them.
|
|
282
|
-
failedJePostings.jeScheduleTransactionKeys.forEach((jeScheduleKey) => {
|
|
283
|
+
failedJeScheduleTransactionKeys.forEach((jeScheduleKey) => {
|
|
283
284
|
const jeScheduleDetails = getJEScheduledTransactionByJEScheduleTransactionKey(jeScheduleKey, state);
|
|
284
285
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
285
286
|
});
|
|
286
287
|
const { sortKey, sortOrder, selectedJETypeFilter } = uiState;
|
|
287
|
-
const matchesTypeFilter = (schedule) => selectedJETypeFilter == null ||
|
|
288
|
-
getJEScheduleRowType(schedule) === selectedJETypeFilter;
|
|
289
288
|
const unsortedResolveSchedules = [];
|
|
290
289
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
291
|
-
|
|
292
|
-
// opening a schedule's detail page or Quick View replaces it with every month the schedule
|
|
293
|
-
// has, posted ones included, so fanning out over all of them turned one failed posting into a
|
|
294
|
-
// row per month -- and a month that never failed has nothing to resolve, so it rendered with
|
|
295
|
-
// an empty action column. Keying on `error` also makes the list self-correcting: an entry the
|
|
296
|
-
// server no longer reports as failing drops out on the next fetch.
|
|
297
|
-
schedule.scheduledJournalEntry
|
|
298
|
-
.filter((journalEntry) => journalEntry.error.length > 0)
|
|
299
|
-
.forEach((journalEntry) => {
|
|
290
|
+
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
300
291
|
unsortedResolveSchedules.push({
|
|
301
292
|
...schedule,
|
|
302
293
|
scheduledJournalEntry: journalEntry,
|
|
303
294
|
});
|
|
304
295
|
});
|
|
305
296
|
});
|
|
306
|
-
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules
|
|
297
|
+
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
298
|
+
const validResolveForPending = unsortedResolveSchedules.filter((r) => jeScheduleLocalDataById[r.scheduledJournalEntry.scheduledJournalEntryID] != null);
|
|
299
|
+
const matchesTypeFilter = (schedule) => selectedJETypeFilter == null ||
|
|
300
|
+
getJEScheduleRowType(schedule) === selectedJETypeFilter;
|
|
307
301
|
const isCreatedStatus = (schedule) => {
|
|
308
302
|
// An accrual is "created" once it is not review work: posted, reversing, reversed, or in a
|
|
309
303
|
// transient posting claim.
|
|
@@ -321,6 +315,7 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
321
315
|
];
|
|
322
316
|
const pendingReviewSchedules = sortJEScheduledTransactions([
|
|
323
317
|
...allScheduleRows.filter((schedule) => isPendingReviewRow(schedule) && matchesTypeFilter(schedule)),
|
|
318
|
+
...validResolveForPending,
|
|
324
319
|
], sortKey, sortOrder);
|
|
325
320
|
const createdSchedules = sortJEScheduledTransactions(allScheduleRows.filter((schedule) => isCreatedStatus(schedule) && matchesTypeFilter(schedule)), sortKey, sortOrder);
|
|
326
321
|
// KPI summary — derived from unfiltered schedules so counts are always accurate
|
|
@@ -439,9 +434,6 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
439
434
|
kpiSummary,
|
|
440
435
|
pendingReviewSchedules,
|
|
441
436
|
pendingReviewTotal,
|
|
442
|
-
failedPostings: resolveSchedules,
|
|
443
|
-
// Deprecated alias of failedPostings. Still read by the section's footer-form effect and by
|
|
444
|
-
// app-ui analytics; remove once both are repointed.
|
|
445
437
|
resolveSchedules: resolveSchedules,
|
|
446
438
|
accountSettingsView,
|
|
447
439
|
newScheduleView,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
2
|
import omit from 'lodash/omit';
|
|
3
|
-
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
3
|
+
import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
|
|
4
4
|
import { getCurrentTenant, getIsAccountingProjectsEnabled, } from '../../../entity/tenant/tenantSelector';
|
|
5
5
|
import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
|
|
6
6
|
import { getSupportedTransactionsByIds } from '../../../entity/transaction/transactionSelector';
|
|
@@ -172,18 +172,35 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
172
172
|
review: monthYearPeriodId != null ? totalCountByReview[monthYearPeriodId] : 0,
|
|
173
173
|
autoCategorized: monthYearPeriodId != null ? totalCountByAutoCat[monthYearPeriodId] : 0,
|
|
174
174
|
};
|
|
175
|
-
//
|
|
176
|
-
//
|
|
177
|
-
//
|
|
178
|
-
//
|
|
175
|
+
// Tab badge counts, used exclusively by the navbar / tab strip badges. Both
|
|
176
|
+
// tabs are counted under the filters applied to the list, so a badge always
|
|
177
|
+
// equals the number of rows that tab shows.
|
|
178
|
+
//
|
|
179
|
+
// The ACTIVE tab prefers its own list count: the two are the same number (the
|
|
180
|
+
// backend's parent_tab_total_count mirrors total_count), but `uiState.totalCount`
|
|
181
|
+
// is restored by every cache path that skips a fetch -- switching back to an
|
|
182
|
+
// already-loaded period, or to a cached Completed sub-tab -- whereas the stored
|
|
183
|
+
// badge is only written when a response lands, so on those paths it would keep
|
|
184
|
+
// showing whatever was fetched last.
|
|
185
|
+
//
|
|
186
|
+
// The `in` check is load-bearing, not defensive: `totalCount` is a per-period
|
|
187
|
+
// map typed as `Record<MonthYearPeriodId, number>`, so indexing it is typed
|
|
188
|
+
// `number` but is `undefined` for any period the active (sub-)tab has not
|
|
189
|
+
// loaded -- the window between switching to a fresh sub-tab and its response
|
|
190
|
+
// landing. Falling back to the stored badge there keeps a real number in the
|
|
191
|
+
// label instead of blanking it.
|
|
179
192
|
const parentTotalCountByTab = expenseAutomationTransactionsViewState.parentTotalCountByTab;
|
|
193
|
+
const storedBadgeByTab = (tab) => monthYearPeriodId != null
|
|
194
|
+
? (parentTotalCountByTab[tab][monthYearPeriodId] ?? 0)
|
|
195
|
+
: 0;
|
|
196
|
+
const badgeForTab = (tab, listCountByPeriod) => selectedTransactionCategorizationTab === tab &&
|
|
197
|
+
monthYearPeriodId != null &&
|
|
198
|
+
monthYearPeriodId in listCountByPeriod
|
|
199
|
+
? listCountByPeriod[monthYearPeriodId]
|
|
200
|
+
: storedBadgeByTab(tab);
|
|
180
201
|
const parentTabTotalCountByTab = {
|
|
181
|
-
review:
|
|
182
|
-
|
|
183
|
-
: 0,
|
|
184
|
-
autoCategorized: monthYearPeriodId != null
|
|
185
|
-
? (parentTotalCountByTab.autoCategorized[monthYearPeriodId] ?? 0)
|
|
186
|
-
: 0,
|
|
202
|
+
review: badgeForTab('review', totalCountByReview),
|
|
203
|
+
autoCategorized: badgeForTab('autoCategorized', totalCountByAutoCat),
|
|
187
204
|
};
|
|
188
205
|
const fetchStateByTab = {
|
|
189
206
|
review: {
|