@zeniai/client-epic-state 5.2.69-beta0MM → 5.2.69

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.
@@ -187,7 +187,6 @@ export interface JEOneTimeAccrualPayload {
187
187
  reversal_policy?: string | null;
188
188
  reversal_posting_date?: string | null;
189
189
  reversal_transaction_id?: ID | null;
190
- reversal_transaction_integration_id?: ID | null;
191
190
  reversal_trigger?: string | null;
192
191
  reversed_by_user?: UserPayload | null;
193
192
  transaction_id?: ID | null;
@@ -550,7 +550,6 @@ function toJEOneTimeAccrual(payload) {
550
550
  transactionId: payload.transaction_id ?? undefined,
551
551
  transactionIntegrationId: payload.transaction_integration_id ?? undefined,
552
552
  reversalTransactionId: payload.reversal_transaction_id ?? undefined,
553
- reversalTransactionIntegrationId: payload.reversal_transaction_integration_id ?? undefined,
554
553
  createdBy: toJEOneTimeAccrualCreator(payload.created_by_user),
555
554
  reversedBy: toJEOneTimeAccrualCreator(payload.reversed_by_user),
556
555
  };
@@ -269,7 +269,6 @@ export interface JEOneTimeAccrualState {
269
269
  profileSnapshot?: JEOneTimeAccrualProfileSnapshot;
270
270
  reversalPostingDate?: ZeniDate;
271
271
  reversalTransactionId?: ID;
272
- reversalTransactionIntegrationId?: ID;
273
272
  reversalTrigger?: OneTimeAccrualReversalTriggerType;
274
273
  reversedBy?: JEOneTimeAccrualCreator;
275
274
  transactionId?: ID;
@@ -539,7 +539,6 @@ export function toJEOneTimeAccrual(payload) {
539
539
  transactionId: payload.transaction_id ?? undefined,
540
540
  transactionIntegrationId: payload.transaction_integration_id ?? undefined,
541
541
  reversalTransactionId: payload.reversal_transaction_id ?? undefined,
542
- reversalTransactionIntegrationId: payload.reversal_transaction_integration_id ?? undefined,
543
542
  createdBy: toJEOneTimeAccrualCreator(payload.created_by_user),
544
543
  reversedBy: toJEOneTimeAccrualCreator(payload.reversed_by_user),
545
544
  };
@@ -1,5 +1,5 @@
1
- import { createSelector } from '@reduxjs/toolkit';
2
1
  import orderBy from 'lodash/orderBy';
2
+ import { createSelector } from '@reduxjs/toolkit';
3
3
  import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
4
4
  import { getActualMatchingMatchById } from '../../../entity/actualMatching/actualMatchingSelector';
5
5
  import { generateJEOneTimeAccrualKey } from '../../../entity/jeSchedules/jeScheduleHelper';
@@ -94,11 +94,7 @@ function collectGroupedMembers(members) {
94
94
  estimatedAmount: member.estimatedAmount,
95
95
  jeDebitAccountName: member.jeDebitAccountName,
96
96
  memo: member.memo,
97
- reversalTransactionId: member.reversalTransactionId,
98
- reversalTransactionIntegrationId: member.reversalTransactionIntegrationId,
99
97
  serviceMonth: member.serviceMonth,
100
- transactionId: member.transactionId,
101
- transactionIntegrationId: member.transactionIntegrationId,
102
98
  }));
103
99
  }
104
100
  function collectLeftoverMembers(leftovers) {
@@ -316,22 +312,18 @@ function toActualMatchingMatchView(match) {
316
312
  : match.leftovers.map(toMatchModalAccrual),
317
313
  };
318
314
  }
315
+ const EMPTY_ACTUAL_MATCHING_ROWS = [];
319
316
  const matchViewSelectorById = new Map();
320
317
  export function getExpenseAutomationActualMatchingMatchView(state, matchId) {
321
318
  let selector = matchViewSelectorById.get(matchId);
322
319
  if (selector == null) {
323
320
  selector = createSelector([
324
- (root) => root.expenseAutomationActualMatchingViewState
325
- .detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
321
+ (root) => root.expenseAutomationActualMatchingViewState.detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
326
322
  (root) => root.expenseAutomationActualMatchingViewState.ignoreStatusByMatchId[matchId] ?? NOT_STARTED,
327
- (root) => root.expenseAutomationActualMatchingViewState
328
- .lastMatchResultsByMatchId?.[matchId],
329
- (root) => root.expenseAutomationActualMatchingViewState
330
- .lastUndoResultsByMatchId?.[matchId],
331
- (root) => root.expenseAutomationActualMatchingViewState
332
- .detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
333
- (root) => root.expenseAutomationActualMatchingViewState
334
- .undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
323
+ (root) => root.expenseAutomationActualMatchingViewState.lastMatchResultsByMatchId?.[matchId],
324
+ (root) => root.expenseAutomationActualMatchingViewState.lastUndoResultsByMatchId?.[matchId],
325
+ (root) => root.expenseAutomationActualMatchingViewState.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
326
+ (root) => root.expenseAutomationActualMatchingViewState.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
335
327
  (root) => getActualMatchingMatchById(root.actualMatchingState, matchId),
336
328
  ], (detailFetchState, ignoreStatus, lastMatchResults, lastUndoResults, refreshStatus, undoReversalStatus, match) => ({
337
329
  detailFetchState,
@@ -361,8 +353,7 @@ export function getActualMatchingMatchModalConfirmStatus(state, matchId) {
361
353
  if (matchId != null && matchId !== '') {
362
354
  return (state.expenseAutomationActualMatchingViewState.confirmStatusByMatchId[matchId] ?? NOT_STARTED);
363
355
  }
364
- return state.expenseAutomationActualMatchingViewState.matchModal
365
- .confirmStatus;
356
+ return state.expenseAutomationActualMatchingViewState.matchModal.confirmStatus;
366
357
  }
367
358
  export function getExpenseAutomationActualMatchingView(state) {
368
359
  const { expenseAutomationActualMatchingViewState } = state;
@@ -376,8 +367,14 @@ export function getExpenseAutomationActualMatchingView(state) {
376
367
  .filter((match) => match.members.length > 0)
377
368
  .map(toActualMatchingRow);
378
369
  const rows = allRows.filter((row) => matchesSearch(row, uiState.searchString));
379
- const reversed = sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState);
380
- const pendingReview = sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState);
370
+ const includePendingReview = uiState.statusFilter !== 'reversed';
371
+ const includeReversed = uiState.statusFilter !== 'pending_review';
372
+ const reversed = includeReversed
373
+ ? sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState)
374
+ : EMPTY_ACTUAL_MATCHING_ROWS;
375
+ const pendingReview = includePendingReview
376
+ ? sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState)
377
+ : EMPTY_ACTUAL_MATCHING_ROWS;
381
378
  const kpiSummary = buildActualMatchingKpiSummary(allRows, getTenantDisplayCurrency(state)?.currencyCode);
382
379
  const searchedAccruals = matchModal.accrualSearch.results
383
380
  .map((key) => getJEOneTimeAccrualByKey(key, state.jeSchedulesState))
package/lib/index.d.ts CHANGED
@@ -316,7 +316,7 @@ import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData,
316
316
  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';
317
317
  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';
318
318
  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';
319
- import { ActualMatchingGroupedAccrual, ActualMatchingJournalEntryIds, ActualMatchingKpiSummary, ActualMatchingMatchModalView, ActualMatchingMatchView, ActualMatchingRow, ActualMatchingRowKind, ExpenseAutomationActualMatchingViewSelector } from './view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes';
319
+ import { ActualMatchingGroupedAccrual, ActualMatchingKpiSummary, ActualMatchingMatchModalView, ActualMatchingMatchView, ActualMatchingRow, ActualMatchingRowKind, ExpenseAutomationActualMatchingViewSelector } from './view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes';
320
320
  import { ExpenseAutomationStepDetails, ExpenseAutomationViewSelector } from './view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes';
321
321
  import { ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisOperatingExpenseView, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView } from './view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes';
322
322
  import { JEAccountSettingsView } from './view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes';
@@ -736,7 +736,7 @@ export { TransactionsOrder, COABalancesSliceOrder, EntityOrder, Section, Section
736
736
  export { ClassesViewSelectorReportV2 };
737
737
  export { BalancesTimeseries, TrendTimeseries, BalanceKind };
738
738
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, MonthClosePerformanceTrend, MonthEndCloseCheck, getMonthEndCloseChecksViewByTenantId, MonthEndCloseChecksView, MonthEndCloseCheckFrequency, MonthCloseCheckMetrics, MonthCloseCheckProgressJson, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, MonthEndAuditSummary, };
739
- export { ExpenseAutomationViewSelector, ExpenseAutomationStepDetails, ExpenseAutomationViewType, ExpenseAutomationMissingReceiptsViewSelector, BulkUploadSelectorData, ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView, ExpenseAutomationMissingReceiptsViewUIState, ExpenseAutomationMissingReceiptsViewState, ExpenseAutomationViewState, ExpenseAutomationTransactionsTab, ExpenseAutomationMissingReceiptsSortKey, BATCH_FILE_STATUSES, BatchDetails, BatchFile, BatchFileStatus, BatchListItem, isUnmatchedTabFileStatus, BatchStatus, BatchStatusValue, BatchSummary, BulkUploadPhase, BulkUploadResultsTab, BulkUploadSortKey, BulkUploadState, CandidateRef, CompletedSubTab, CompletedTransactionsSelectorData, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, TransactionGroup, toTransactionGroup, MatchCandidate, MatchSource, MissingReceiptsTab, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, ResolvedBatchFile, ResolvedBatchDetails, ResolvedCandidate, ExpenseAutomationJEScheduleSortKey, ExpenseAutomationJESchedulesViewUIState, ExpenseAutomationActualMatchingViewSelector, ActualMatchingGroupedAccrual, ActualMatchingJournalEntryIds, ActualMatchingKpiSummary, ActualMatchingMatchModalView, ActualMatchingMatchView, ActualMatchingRow, ActualMatchingRowKind, ExpenseAutomationActualMatchingSortKey, ExpenseAutomationActualMatchingStatusFilter, ExpenseAutomationActualMatchingViewUIState, ActualMatchingTransactionSearchResult, MatchAndReverseAccrualsParams, MatchAndReverseResult, MatchAndReverseResultStatus, ALL_ACTUAL_MATCHING_IGNORE_REASONS, ActualMatchingIgnoreReasonType, IgnoreActualMatchingSuggestionParams, UndoReversalAccrualsParams, UndoReversalResult, UndoReversalResultStatus, actualMatchingTransactionLineKey, JEKpiSummary, ALL_JE_PAGE_TABS, JEPageTab, MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, toExpenseAutomationJEScheduleSortKey, toExpenseAutomationActualMatchingSortKey, toExpenseAutomationActualMatchingStatusFilter, toActualMatchingIgnoreReasonType, toJEPageTab, toMatchAndReverseResultStatus, toUndoReversalResultStatus, toggleJECreatedGroupCollapsed, toggleJEFailedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJEScheduleTypeFilter, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, toExpenseAutomationViewTypeStrict, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionGroup, fetchExpenseAutomationMissingReceipts, 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, FluxAnalysisOperatingExpenseView, FluxAnalysisSectionType, getExpenseAutomationFluxAnalysisView, FluxAnalysisSortKey, FluxAnalysisActionType, FluxBalancesByMonth, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, getLastTransferEntryReplacement, ReconReconcileSortKey, ReconciliationReconcileTabLocalData, FluxAnalysisReviewStatus, updateFluxAnalysisViewUIState, FluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, SaveExpenseAutomationReconciliationActionType, ExcludeAccountFromReconciliationPayload, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, ExpenseAutomationReconciliationViewSelector, getExpenseAutomationReconciliationView, getLedgerAccountIdsWithStatementOverrideWarning, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, AccountReconciliationBySection, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, UploadStatementDocumentAIResponse, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, AccountReconciliationByAccount, AccountReconciliationEntity, getAccountReconByAccountIdAndSelectedPeriod, ExpenseAutomationReconciliationViewTab, toReconciliationTabsType, isAccountReconReport, ReconReviewSortKey, AccountReconSectionID, ReconciliationReviewTabLocalData, TransactionsToReview, RecommendedActionCodeType, ReconciliationStatusCodeType, BalanceDataStatusCodeType, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, updateStatementProcessingFailed, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, BankStatusCodeType, ReconciliationAccountSourceType, toReconciliationAccountSource, StatementStatusCodeType, AccountReconciliationLocalData, CombinedStatementAccount, StatementAccountScope, StatementDataStatusCodeType, deleteAccountStatement, deleteCombinedStatement, uploadAccountStatement, parseCombinedStatement, parseStatement, parseStatementSuccess, parseStatementFailure, reparseStatement, reparseStatementSuccess, reparseStatementFailure, resetReparseStatementStatus, updateParsedStatementData, updateNodeCollapseState, UploadStatementDocumentAIPayload, updateStatementUploadChosen, submitCombinedStatementUpdate, submitStatementUpdate, clearStatementDateConflict, confirmStatementMapping, StatementDateConflict, updateStatementUpdateLocalData, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, setStatementProcessingDismissedToBackground, updateStatementProcessingBackgroundCompletedSteps, ParsedStatementData, StatementUpdateLocalData, StatementMeta, StatementTransaction, StatementTransactionForUpdate, StatementTransactionsUpdate, };
739
+ export { ExpenseAutomationViewSelector, ExpenseAutomationStepDetails, ExpenseAutomationViewType, ExpenseAutomationMissingReceiptsViewSelector, BulkUploadSelectorData, ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView, ExpenseAutomationMissingReceiptsViewUIState, ExpenseAutomationMissingReceiptsViewState, ExpenseAutomationViewState, ExpenseAutomationTransactionsTab, ExpenseAutomationMissingReceiptsSortKey, BATCH_FILE_STATUSES, BatchDetails, BatchFile, BatchFileStatus, BatchListItem, isUnmatchedTabFileStatus, BatchStatus, BatchStatusValue, BatchSummary, BulkUploadPhase, BulkUploadResultsTab, BulkUploadSortKey, BulkUploadState, CandidateRef, CompletedSubTab, CompletedTransactionsSelectorData, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, TransactionGroup, toTransactionGroup, MatchCandidate, MatchSource, MissingReceiptsTab, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, ResolvedBatchFile, ResolvedBatchDetails, ResolvedCandidate, ExpenseAutomationJEScheduleSortKey, ExpenseAutomationJESchedulesViewUIState, ExpenseAutomationActualMatchingViewSelector, ActualMatchingGroupedAccrual, ActualMatchingKpiSummary, ActualMatchingMatchModalView, ActualMatchingMatchView, ActualMatchingRow, ActualMatchingRowKind, ExpenseAutomationActualMatchingSortKey, ExpenseAutomationActualMatchingStatusFilter, ExpenseAutomationActualMatchingViewUIState, ActualMatchingTransactionSearchResult, MatchAndReverseAccrualsParams, MatchAndReverseResult, MatchAndReverseResultStatus, ALL_ACTUAL_MATCHING_IGNORE_REASONS, ActualMatchingIgnoreReasonType, IgnoreActualMatchingSuggestionParams, UndoReversalAccrualsParams, UndoReversalResult, UndoReversalResultStatus, actualMatchingTransactionLineKey, JEKpiSummary, ALL_JE_PAGE_TABS, JEPageTab, MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, toExpenseAutomationJEScheduleSortKey, toExpenseAutomationActualMatchingSortKey, toExpenseAutomationActualMatchingStatusFilter, toActualMatchingIgnoreReasonType, toJEPageTab, toMatchAndReverseResultStatus, toUndoReversalResultStatus, toggleJECreatedGroupCollapsed, toggleJEFailedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJEScheduleTypeFilter, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, toExpenseAutomationViewTypeStrict, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionGroup, fetchExpenseAutomationMissingReceipts, 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, FluxAnalysisOperatingExpenseView, FluxAnalysisSectionType, getExpenseAutomationFluxAnalysisView, FluxAnalysisSortKey, FluxAnalysisActionType, FluxBalancesByMonth, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, getLastTransferEntryReplacement, ReconReconcileSortKey, ReconciliationReconcileTabLocalData, FluxAnalysisReviewStatus, updateFluxAnalysisViewUIState, FluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, SaveExpenseAutomationReconciliationActionType, ExcludeAccountFromReconciliationPayload, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, ExpenseAutomationReconciliationViewSelector, getExpenseAutomationReconciliationView, getLedgerAccountIdsWithStatementOverrideWarning, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, AccountReconciliationBySection, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, UploadStatementDocumentAIResponse, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, AccountReconciliationByAccount, AccountReconciliationEntity, getAccountReconByAccountIdAndSelectedPeriod, ExpenseAutomationReconciliationViewTab, toReconciliationTabsType, isAccountReconReport, ReconReviewSortKey, AccountReconSectionID, ReconciliationReviewTabLocalData, TransactionsToReview, RecommendedActionCodeType, ReconciliationStatusCodeType, BalanceDataStatusCodeType, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, updateStatementProcessingFailed, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, BankStatusCodeType, ReconciliationAccountSourceType, toReconciliationAccountSource, StatementStatusCodeType, AccountReconciliationLocalData, CombinedStatementAccount, StatementAccountScope, StatementDataStatusCodeType, deleteAccountStatement, deleteCombinedStatement, uploadAccountStatement, parseCombinedStatement, parseStatement, parseStatementSuccess, parseStatementFailure, reparseStatement, reparseStatementSuccess, reparseStatementFailure, resetReparseStatementStatus, updateParsedStatementData, updateNodeCollapseState, UploadStatementDocumentAIPayload, updateStatementUploadChosen, submitCombinedStatementUpdate, submitStatementUpdate, clearStatementDateConflict, confirmStatementMapping, StatementDateConflict, updateStatementUpdateLocalData, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, setStatementProcessingDismissedToBackground, updateStatementProcessingBackgroundCompletedSteps, ParsedStatementData, StatementUpdateLocalData, StatementMeta, StatementTransaction, StatementTransactionForUpdate, StatementTransactionsUpdate, };
740
740
  export { JEScheduleLocalData };
741
741
  export { ExpenseAutomationJESchedulesViewSelector, JEAccountSettingsView, ExpenseAutomationJEOneTimeAccrualDetailView, JEScheduleRow, JEScheduledTransactionWithFailedEntries, NewJeDetailLocalData, NewJeScheduleState, NewOneTimeAccrualLocalData, NewAccrualAccountsView, NewScheduleLocalData, NewScheduleLocalDataFixedAssets, NewScheduleSearchTransactionsView, NewScheduleView, SearchTransactionsState, computeNewScheduleJeDetails, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchOneTimeAccrual, getJeNewAccrualAccountsView, ignoreOneTimeAccrual, promoteOneTimeAccrual, revertJeSchedule, revertOneTimeAccrual, getJeNewScheduleSearchTransactionsView, getJeNewScheduleView, };
742
742
  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, TransactionsSortKey, toTransactionsSortKey, TransactionsTab, TransactionCategorizationLineItemData, TransactionReviewLocalData, SupportedTransactionCategorization, ExpenseAutomationTransactionsViewState, ExpenseAutomationTransactionsViewUIState, ExpenseAutomationTransactionViewSelector, TransactionReviewLocalDataSelectorView, };
@@ -5,14 +5,13 @@ import { JEOneTimeAccrual } from '../../../entity/jeSchedules/jeSchedulesSelecto
5
5
  import { ZeniDate } from '../../../zeniDayJS';
6
6
  import { ActualMatchingTransactionSearchResult, ActualMatchingViewUIState, MatchAndReverseResult } from '../types/actualMatchingViewState';
7
7
  export type ActualMatchingRowKind = 'auto_reversed' | 'pending_review' | 'manually_reversed';
8
- export type ActualMatchingJournalEntryIds = Pick<JEOneTimeAccrual, 'reversalTransactionId' | 'reversalTransactionIntegrationId' | 'transactionId' | 'transactionIntegrationId'>;
9
8
  export type ActualMatchingGroupedAccrual = {
10
9
  accrualId: ID;
11
10
  estimatedAmount?: Amount;
12
11
  jeDebitAccountName?: string;
13
12
  memo?: string;
14
13
  serviceMonth?: string;
15
- } & ActualMatchingJournalEntryIds;
14
+ };
16
15
  export interface ActualMatchingRow extends JEOneTimeAccrual {
17
16
  accruedAmount: Amount;
18
17
  actualAmount: Amount;
@@ -20,8 +20,8 @@ exports.getCloseMatchAfterUndoMatchId = getCloseMatchAfterUndoMatchId;
20
20
  exports.getCloseMatchAfterIgnoreMatchId = getCloseMatchAfterIgnoreMatchId;
21
21
  exports.getActualMatchingMatchModalConfirmStatus = getActualMatchingMatchModalConfirmStatus;
22
22
  exports.getExpenseAutomationActualMatchingView = getExpenseAutomationActualMatchingView;
23
- const toolkit_1 = require("@reduxjs/toolkit");
24
23
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
24
+ const toolkit_1 = require("@reduxjs/toolkit");
25
25
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
26
26
  const actualMatchingSelector_1 = require("../../../entity/actualMatching/actualMatchingSelector");
27
27
  const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
@@ -116,11 +116,7 @@ function collectGroupedMembers(members) {
116
116
  estimatedAmount: member.estimatedAmount,
117
117
  jeDebitAccountName: member.jeDebitAccountName,
118
118
  memo: member.memo,
119
- reversalTransactionId: member.reversalTransactionId,
120
- reversalTransactionIntegrationId: member.reversalTransactionIntegrationId,
121
119
  serviceMonth: member.serviceMonth,
122
- transactionId: member.transactionId,
123
- transactionIntegrationId: member.transactionIntegrationId,
124
120
  }));
125
121
  }
126
122
  function collectLeftoverMembers(leftovers) {
@@ -338,22 +334,18 @@ function toActualMatchingMatchView(match) {
338
334
  : match.leftovers.map(toMatchModalAccrual),
339
335
  };
340
336
  }
337
+ const EMPTY_ACTUAL_MATCHING_ROWS = [];
341
338
  const matchViewSelectorById = new Map();
342
339
  function getExpenseAutomationActualMatchingMatchView(state, matchId) {
343
340
  let selector = matchViewSelectorById.get(matchId);
344
341
  if (selector == null) {
345
342
  selector = (0, toolkit_1.createSelector)([
346
- (root) => root.expenseAutomationActualMatchingViewState
347
- .detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
343
+ (root) => root.expenseAutomationActualMatchingViewState.detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
348
344
  (root) => root.expenseAutomationActualMatchingViewState.ignoreStatusByMatchId[matchId] ?? NOT_STARTED,
349
- (root) => root.expenseAutomationActualMatchingViewState
350
- .lastMatchResultsByMatchId?.[matchId],
351
- (root) => root.expenseAutomationActualMatchingViewState
352
- .lastUndoResultsByMatchId?.[matchId],
353
- (root) => root.expenseAutomationActualMatchingViewState
354
- .detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
355
- (root) => root.expenseAutomationActualMatchingViewState
356
- .undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
345
+ (root) => root.expenseAutomationActualMatchingViewState.lastMatchResultsByMatchId?.[matchId],
346
+ (root) => root.expenseAutomationActualMatchingViewState.lastUndoResultsByMatchId?.[matchId],
347
+ (root) => root.expenseAutomationActualMatchingViewState.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
348
+ (root) => root.expenseAutomationActualMatchingViewState.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
357
349
  (root) => (0, actualMatchingSelector_1.getActualMatchingMatchById)(root.actualMatchingState, matchId),
358
350
  ], (detailFetchState, ignoreStatus, lastMatchResults, lastUndoResults, refreshStatus, undoReversalStatus, match) => ({
359
351
  detailFetchState,
@@ -383,8 +375,7 @@ function getActualMatchingMatchModalConfirmStatus(state, matchId) {
383
375
  if (matchId != null && matchId !== '') {
384
376
  return (state.expenseAutomationActualMatchingViewState.confirmStatusByMatchId[matchId] ?? NOT_STARTED);
385
377
  }
386
- return state.expenseAutomationActualMatchingViewState.matchModal
387
- .confirmStatus;
378
+ return state.expenseAutomationActualMatchingViewState.matchModal.confirmStatus;
388
379
  }
389
380
  function getExpenseAutomationActualMatchingView(state) {
390
381
  const { expenseAutomationActualMatchingViewState } = state;
@@ -398,8 +389,14 @@ function getExpenseAutomationActualMatchingView(state) {
398
389
  .filter((match) => match.members.length > 0)
399
390
  .map(toActualMatchingRow);
400
391
  const rows = allRows.filter((row) => matchesSearch(row, uiState.searchString));
401
- const reversed = sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState);
402
- const pendingReview = sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState);
392
+ const includePendingReview = uiState.statusFilter !== 'reversed';
393
+ const includeReversed = uiState.statusFilter !== 'pending_review';
394
+ const reversed = includeReversed
395
+ ? sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState)
396
+ : EMPTY_ACTUAL_MATCHING_ROWS;
397
+ const pendingReview = includePendingReview
398
+ ? sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState)
399
+ : EMPTY_ACTUAL_MATCHING_ROWS;
403
400
  const kpiSummary = buildActualMatchingKpiSummary(allRows, getTenantDisplayCurrency(state)?.currencyCode);
404
401
  const searchedAccruals = matchModal.accrualSearch.results
405
402
  .map((key) => (0, jeSchedulesSelector_1.getJEOneTimeAccrualByKey)(key, state.jeSchedulesState))
@@ -21,8 +21,9 @@ export interface ActualMatchingViewUIState {
21
21
  sortKey: ActualMatchingSortKey;
22
22
  sortOrder: SortOrder;
23
23
  /**
24
- * Unused by the list: Pending review and Reversed always render as separate
25
- * tables. Kept so persisted UI state and older clients still hydrate.
24
+ * List-only filter. `all` shows both groups; `pending_review` / `reversed`
25
+ * empty the other group (`reversed` includes auto and manual). KPI summary
26
+ * stays on the unfiltered period.
26
27
  */
27
28
  statusFilter: ActualMatchingStatusFilter;
28
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.69-beta0MM",
3
+ "version": "5.2.69",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",