@zeniai/client-epic-state 5.0.72 → 5.0.73

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.
Files changed (129) hide show
  1. package/lib/commonStateTypes/cacheOverrideFetchReducer.d.ts +17 -0
  2. package/lib/commonStateTypes/cacheOverrideFetchReducer.js +20 -0
  3. package/lib/commonStateTypes/pusherActions.d.ts +11 -0
  4. package/lib/commonStateTypes/pusherActions.js +6 -0
  5. package/lib/coreEpics.js +1 -1
  6. package/lib/entity/account/accountSelector.d.ts +1 -1
  7. package/lib/entity/account/accountState.d.ts +1 -1
  8. package/lib/entity/account/subAccountSelector.d.ts +1 -1
  9. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +1 -3
  10. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +1 -2
  11. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +1 -1
  12. package/lib/entity/chargeCard/chargeCardReducer.d.ts +19 -2
  13. package/lib/entity/chargeCard/chargeCardReducer.js +35 -2
  14. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +14 -1
  15. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +36 -2
  16. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +2 -0
  17. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +2 -0
  18. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +2 -0
  19. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +1 -1
  20. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
  21. package/lib/entity/tenant/SessionManager.js +6 -3
  22. package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
  23. package/lib/entity/tenant/clearAllEpic.js +2 -2
  24. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +6 -2
  25. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +6 -2
  26. package/lib/entity/tenant/tenantReducer.js +6 -1
  27. package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +3 -1
  28. package/lib/epic.d.ts +9 -9
  29. package/lib/epic.js +10 -10
  30. package/lib/esm/commonStateTypes/cacheOverrideFetchReducer.js +16 -0
  31. package/lib/esm/commonStateTypes/pusherActions.js +3 -0
  32. package/lib/esm/coreEpics.js +1 -1
  33. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +1 -3
  34. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +1 -2
  35. package/lib/esm/entity/chargeCard/chargeCardReducer.js +34 -1
  36. package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +35 -1
  37. package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +2 -0
  38. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
  39. package/lib/esm/entity/tenant/SessionManager.js +4 -1
  40. package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
  41. package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +6 -2
  42. package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +6 -2
  43. package/lib/esm/entity/tenant/tenantReducer.js +6 -1
  44. package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +3 -1
  45. package/lib/esm/epic.js +10 -10
  46. package/lib/esm/index.js +17 -13
  47. package/lib/esm/reducer.js +2 -2
  48. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +2 -5
  49. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +2 -5
  50. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +4 -1
  51. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
  52. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -1
  53. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
  54. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
  55. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +8 -6
  56. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -1
  57. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +11 -1
  58. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
  59. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +127 -1
  60. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -1
  61. package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +17 -0
  62. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
  63. package/lib/esm/view/financeStatement/financeStatementSelector.js +1 -1
  64. package/lib/esm/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -2
  65. package/lib/esm/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -2
  66. package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +55 -18
  67. package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +16 -2
  68. package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +5 -4
  69. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +26 -9
  70. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +9 -6
  71. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +3 -2
  72. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
  73. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +7 -3
  74. package/lib/esm/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +1 -1
  75. package/lib/esm/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +1 -1
  76. package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +1 -1
  77. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +7 -1
  78. package/lib/index.d.ts +19 -15
  79. package/lib/index.js +72 -58
  80. package/lib/reducer.d.ts +2 -2
  81. package/lib/reducer.js +2 -2
  82. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +2 -2
  83. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +1 -1
  84. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +2 -5
  85. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +2 -5
  86. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +4 -1
  87. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -1
  88. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
  89. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
  90. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
  91. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +8 -6
  92. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -1
  93. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
  94. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +10 -0
  95. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  96. package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +21 -0
  97. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -1
  98. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
  99. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +9 -3
  100. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +128 -2
  101. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
  102. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +14 -0
  103. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -1
  104. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +10 -0
  105. package/lib/view/expenseAutomationView/types/completedSubTab.js +21 -0
  106. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -2
  107. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -4
  108. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +41 -2
  109. package/lib/view/financeStatement/financeStatementSelector.js +1 -1
  110. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +1 -1
  111. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.d.ts +3 -1
  112. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -2
  113. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.d.ts +3 -1
  114. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -2
  115. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +55 -18
  116. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +16 -2
  117. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +5 -4
  118. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +18 -3
  119. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +27 -10
  120. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +9 -6
  121. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +3 -1
  122. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +3 -2
  123. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
  124. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.d.ts +3 -1
  125. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +7 -3
  126. package/lib/view/transactionDetail/transactionDetailSelector.js +7 -1
  127. package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +1 -1
  128. package/package.json +9 -4
  129. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
package/lib/esm/index.js CHANGED
@@ -15,6 +15,7 @@ import { getActualPeriodOfFY, getActualPeriodOfFYQtr, } from './commonStateTypes
15
15
  import { getFYMonths } from './commonStateTypes/fiscalYearHelpers/getFYMonths';
16
16
  import { getFYQuarterAndYear, getLastMonthOfFYQuarter, getLastMonthOfFYYear, } from './commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear';
17
17
  import { getStartOfAndEndOfTimeframeForFY } from './commonStateTypes/fiscalYearHelpers/getStartOfAndEndOfTimeframeFY';
18
+ import { addChargeCardTransactionFromPusher, addDeclinedChargeCardTransactionFromPusher, } from './commonStateTypes/pusherActions';
18
19
  import { isAllFetchCompleted, isAnyFetchInProgress, reduceAllFetchState, reduceAnyCompletedFetchState, reduceAnyFetchState, reduceFetchState, reduceFetchStateParallelTimeframes, } from './commonStateTypes/reduceFetchState';
19
20
  import { toReimbursementTypeCode } from './commonStateTypes/reimbursementTypeCode';
20
21
  import { stringToUnion, stringToUnionStrict, } from './commonStateTypes/stringToUnion';
@@ -34,9 +35,11 @@ import { toAttributeOrRoleTypeStrict, toAttributeTypeStrict, toRoleTypeStrict, }
34
35
  import { toOutsideZeniPaymentModeType, } from './entity/billPay/billTransaction/billTransactionState';
35
36
  import { toRecurringBillFrequency, toRecurringBillFrequencyStrict, } from './entity/billPay/recurringBills/recurringBillsState';
36
37
  import { toCardAddressType, toCardType, toCreditLimitFrequencyCodeType, toShippingAddressType, } from './entity/chargeCard/chargeCard';
38
+ import { updateChargeCardSpendingFromPusher, updateChargeCardStatusFromPusher, } from './entity/chargeCard/chargeCardReducer';
37
39
  import { getChargeCardById } from './entity/chargeCard/chargeCardSelector';
38
40
  import { attachmentFilePathToAttachment, } from './entity/chargeCardTransaction/chargeCardTransactionPayload';
39
41
  import { updateChargeCardTransactionAttachments } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
42
+ import { updateChargeCardTransactionFromPusher, updateChargeCardTransactionReceiptFromPusher, updateChargeCardTransactionStatusFromPusher, } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
40
43
  import { getControllersName, getFirstControllerEmail, getFirstControllerId, } from './entity/company/companyHelper';
41
44
  import { getCompanyByCompanyId, getCompanyInfoForAllCockpitCompaniesInState, getControllersForCompany, } from './entity/company/companySelector';
42
45
  import { ALL_ACCOUNTING_CONNECTION_CREATION_MODES, isCompanyEligibleForTreasury, } from './entity/company/companyStateTypes';
@@ -59,7 +62,7 @@ import { closeSnackbar, openSnackbar } from './entity/snackbar/snackbarReducer';
59
62
  import { getSnackbar } from './entity/snackbar/snackbarSelector';
60
63
  import { ALL_WEEK_DAYS, toDayOfWeek, toPriorityCodeType, toTaskStatusCodeType, } from './entity/task/taskState';
61
64
  import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
62
- import { clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA, } from './entity/tenant/tenantReducer';
65
+ import { clearAll, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA, } from './entity/tenant/tenantReducer';
63
66
  import { getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView, } from './entity/tenant/tenantSelector';
64
67
  import { pushToastNotification } from './entity/toastNotification/toastNotificationReducer';
65
68
  import { getLastNotificationTime, getNotifications, } from './entity/toastNotification/toastNotificationSelector';
@@ -123,8 +126,6 @@ import { fetchCashPosition, updateCashPositionCOABalancesRange, updateCashPositi
123
126
  import { getCashPosition, getCashPositionForHighlightedRange, getCashPositionForSelectedRange, getCashPositionUIState, } from './view/cashPosition/cashPositionSelector';
124
127
  import { fetchClassList } from './view/classList/classListReducer';
125
128
  import { getClassList, } from './view/classList/classListSelector';
126
- import { fetchProjectList } from './view/projectList/projectListReducer';
127
- import { getProjectList, } from './view/projectList/projectListSelector';
128
129
  import { SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toRecurringFrequency, } from './view/common/recurringViewHelper';
129
130
  import { ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, isZeniClearingAccountReport, } from './view/common/zeniClearingAccountHelper';
130
131
  import { clearTransactionVendorSaveStatus, resetTransactionVendorLocalData, saveTransactionVendor, saveTransactionVendorSuccessOrFailure, updateTransactionVendorLocalData, } from './view/commonVendorView/transactionVendorView/transactionVendorViewReducer';
@@ -167,15 +168,18 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
167
168
  import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
168
169
  import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, 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';
169
170
  import { deleteAccountStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, 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, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
170
- import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
171
+ import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
171
172
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
172
173
  import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
173
174
  import { getExpenseAutomationTransactionView } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
175
+ import { DEFAULT_COMPLETED_SUB_TAB, toCompletedSubTab, } from './view/expenseAutomationView/types/completedSubTab';
174
176
  import { toJEScheduleMainTab as toExpenseAutomationJEScheduleMainTab, toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
175
- import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
177
+ import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
176
178
  import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
177
179
  import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
178
180
  import { toTransactionsTabKey as toExpenseAutomationTransactionsTabKey, toTransactionsSortKey, } from './view/expenseAutomationView/types/transactionsViewState';
181
+ import { clearFeatureNotificationView, fetchRegisteredInterests, notifyMeForFeature, } from './view/featureNotificationView/featureNotificationViewReducer';
182
+ import { getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, } from './view/featureNotificationView/featureNotificationViewSelector';
179
183
  import downloadFile from './view/fileView/fileDownloadHelpers';
180
184
  import uploadFile from './view/fileView/fileUploadHelpers';
181
185
  import { clearFileViewList, deleteFile, deleteFileFailure, deleteFileList, deleteFileListFailure, deleteFileListSuccess, deleteFileSuccess, fetchFile, fetchFileList, fetchFileListFailure, fetchFileListSuccess, updateFileName, updateFileNameFailure, updateFileNameSuccess, updateFilesMetadata, } from './view/fileView/fileViewReducer';
@@ -202,8 +206,6 @@ import { getNetBurnOrIncomeStoryCardReport } from './view/netBurnOrIncomeStoryCa
202
206
  import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationView, updateNotificationViewAllNotificationsStatus, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewNotificationStatus, updateNotificationViewSubTab, updateNotificationViewTabState, updateNotificationViewUIState, } from './view/notificationView/notificationViewReducer';
203
207
  import { getExternalNotificationsForSelectedSubTab, getNotificationView, getNotificationsForSelectedSubTab, } from './view/notificationView/notificationViewSelector';
204
208
  import { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, } from './view/notificationView/notificationViewState';
205
- import { clearFeatureNotificationView, fetchRegisteredInterests, notifyMeForFeature, } from './view/featureNotificationView/featureNotificationViewReducer';
206
- import { getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, } from './view/featureNotificationView/featureNotificationViewSelector';
207
209
  import { clearOnboardingCustomerViewUpdateData, fetchCompanyOnboardingView, fetchOnboardingCompletedCompanies, fetchQBOConnectionPool, getOnboardingEmailGroup, initializeOnboardingCustomerViewUpdateData, resetNewOnboardedCustomerId, retryBankAccountConnectionForOnboarding, saveOnboardingCustomerCompletedStatus, saveOnboardingCustomerDataInLocalStore, saveOnboardingCustomerNotes, saveOnboardingCustomerViewUpdateData, saveOnboardingCustomerViewUpdates, sendOnboardingCustomerViewInvite, updateCustomerCreationStatus, updateOnboardingCustomerDataInLocalStore, updateOnboardingCustomerListUIState, updateQBOConnectionPoolExternalConnection, updateStatusAfterOnboardingCompleted, } from './view/onboardingView/cockpitView/onboardingCockpitViewReducer';
208
210
  import { getNewOnboardingCustomerView, getOnboardingCockpitView, } from './view/onboardingView/cockpitView/onboardingCockpitViewSelector';
209
211
  import { toProductType, toProductTypeStrict, } from './view/onboardingView/cockpitView/types/onboardingCockpitViewTypes';
@@ -224,13 +226,15 @@ import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossN
224
226
  import { getPandLReportFetchState, getProfitAndLossReport, } from './view/profitAndLoss/profitAndLossSelector';
225
227
  import { getEmptyHorizontalSectionBalancesSlice } from './view/profitAndLossClassesView/horizontalSectionEmptyBalancesSlice';
226
228
  import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
227
- import { aggregateHorizontalDescendantBalances } from './view/profitAndLossClassesView/profitAndLossHorizontalEnrichment';
228
229
  import { HORIZONTAL_CLASS_TOTAL_BALANCE_ID, isHorizontalAccountReportData, } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
229
230
  import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateClassViewLayout, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
230
231
  import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
231
232
  import { isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
233
+ import { aggregateHorizontalDescendantBalances } from './view/profitAndLossClassesView/profitAndLossHorizontalEnrichment';
232
234
  import { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProfitAndLossProjectViewUIState, updateProjectViewAccountViewMode, updateProjectsToFilterOut, } from './view/profitAndLossProjectView/profitAndLossProjectViewReducer';
233
235
  import { getProfitAndLossProjectView } from './view/profitAndLossProjectView/profitAndLossProjectViewSelector';
236
+ import { fetchProjectList } from './view/projectList/projectListReducer';
237
+ import { getProjectList, } from './view/projectList/projectListSelector';
234
238
  import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName, } from './view/recommendation/recommendationReducer';
235
239
  import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState, } from './view/referralView/referralReducer';
236
240
  import { getInviteFormView, getReferralListView, getRewardsPlanCard, } from './view/referralView/referralSelector';
@@ -295,7 +299,7 @@ import { fetchChargeCardConfig } from './view/spendManagement/chargeCards/charge
295
299
  import { closeChargeCard, completeCVVActivationWait, completeDebitCardSetPinWait, fetchChargeCardDetail, fetchChargeCardDetailPage, fetchChargeCardTransactionAttachments, fetchChargeCardTransactionList, fetchChargeCardTransactionStatistics, fetchChargeCardsRecurringExpenses, fetchDepositAccountLimit, lockChargeCard, startCVVActivationWait, startDebitCardSetPinWait, unlockChargeCard, updateChargeCardDetail, updateChargeCardName, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, updateChargeCardTransactionIsViewReceiptClicked, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionUploadReceiptsFetchStatus, updateDebitCardPinAttempt, updatePhysicalChargeCardAttempt, } from './view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer';
296
300
  import { getChargeCardCVVActivateView, getChargeCardControlDetailView, getChargeCardDetailView, getChargeCardRecurringExpensesView, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getDepositAccountLimitFetchStateByDepositAccountId, } from './view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector';
297
301
  import { toChargeCardSortKeyType, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardList';
298
- import { closeChargeCards, fetchChargeCardList, fetchChargeCardListPage, fetchCreditAccount, fetchCreditAccountRepayment, fetchDebitCardSummary, lockChargeCards, resendCardInvite, revokeCardInvite, revokeChargeCardsInvite, unlockChargeCards, updateBulkActionCardIds, updateSearchText as updateChargeCardListSearchText, updateChargeCardListUIState, updateChargeCardsSpendLimit, updateRowActionCardId, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer';
302
+ import { closeChargeCards, fetchChargeCardList, fetchChargeCardListPage, fetchCreditAccount, fetchCreditAccountRepayment, fetchDebitCardSummary, lockChargeCards, resendCardInvite, revokeCardInvite, revokeChargeCardsInvite, unlockChargeCards, updateBulkActionCardIds, updateSearchText as updateChargeCardListSearchText, updateChargeCardListUIState, updateChargeCardsSpendLimit, updateCreditAccountBalanceFromPusher, updateRowActionCardId, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer';
299
303
  import { anyCardOnHold, getChargeCardBulkActionView, getChargeCardListView, getChargeCardRecurringExpensesByCardIds, getChargeCardRowActionView, getCreditAccountDetails, getDebitCardList, getDebitCardSummary, getDepositAccountListWithDebitCardIssued, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
300
304
  import { PAYMENT_HISTORY_FILTER_CATEGORIES, } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory';
301
305
  import { getChargeCardPaymentHistoryDownloadReport, } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector';
@@ -384,9 +388,9 @@ import { getThirdPartyIdFromTransactionId, } from './view/transactionDetail/tran
384
388
  import { getTransactionListByAccount, getTransactionListUIStateByAccountKey, } from './view/transactionList/transactionListByAccountSelector';
385
389
  import { getTransactionListUIStateByCategoryType, getTransactionsListByCategoryType, } from './view/transactionList/transactionListByCategoryTypeSelector';
386
390
  import { getTransactionListByClass, getTransactionListUIStateByClassKey, } from './view/transactionList/transactionListByClassSelector';
387
- import { getTransactionListByProject, getTransactionListUIStateByProjectKey, } from './view/transactionList/transactionListByProjectSelector';
388
391
  import { getTransactionListByEntity, getTransactionListByEntityForSinglePeriod, } from './view/transactionList/transactionListByEntitySelector';
389
- import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchProjectTransactionList, parallelFetchEntityTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByProject, updateTransactionListByProjectUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListUIStateByCategoryType, } from './view/transactionList/transactionListReducer';
392
+ import { getTransactionListByProject, getTransactionListUIStateByProjectKey, } from './view/transactionList/transactionListByProjectSelector';
393
+ import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchEntityTransactionList, parallelFetchProjectTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListByProject, updateTransactionListByProjectUIState, updateTransactionListUIStateByCategoryType, } from './view/transactionList/transactionListReducer';
390
394
  import { clearTrendData, fetchExpenseTrend, fetchIncomeTrend, } from './view/trend/trendReducer';
391
395
  import { getCurrentFiscalQuarterDateRange, getTrendForEntity, } from './view/trend/trendSelector';
392
396
  import { clearTrendWithTransactions, fetchTransactionsForEntity, fetchTrendForEntity, updateSelectedTimeperiod, } from './view/trendWithTransactions/trendWithTransactionsReducer';
@@ -441,7 +445,7 @@ export { stringToUnion, stringToUnionStrict };
441
445
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
442
446
  export {
443
447
  // Bulk Upload Types
444
- BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleMainTab, toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts,
448
+ BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleMainTab, toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, fetchExpenseAutomationMissingReceipts,
445
449
  // Bulk Upload Actions
446
450
  bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, 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, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateNodeCollapseState, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
447
451
  export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
@@ -596,7 +600,7 @@ export { fetchUserRoleConfig, getUserRoleConfig };
596
600
  export { getCompanyHealthMetricConfig, fetchCompanyHealthMetricConfig, };
597
601
  export { updateCompaniesHealth, updateCompanyHealth, };
598
602
  export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
599
- export { updateChargeCardTransactionAttachments, attachmentFilePathToAttachment, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, getChargeCardRepaymentDetail, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, getCreditAccountDetails, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, toChargeCardSortKeyType, getCashbackDetail, getZeniDateFromPeriod, toCreditLimitFrequencyCodeType, getDepositAccountListWithDebitCardIssued, getIssueChargeCardView, getChargeCardSetupViewDetails, fetchChargeCardStatementList, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, getDepositAccountLimitForChargeCardByDepositAccountId, toCardAddressType, toShippingAddressType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
603
+ export { updateChargeCardTransactionAttachments, updateChargeCardStatusFromPusher, updateChargeCardSpendingFromPusher, updateChargeCardTransactionStatusFromPusher, updateChargeCardTransactionFromPusher, updateChargeCardTransactionReceiptFromPusher, updateCreditAccountBalanceFromPusher, addChargeCardTransactionFromPusher, addDeclinedChargeCardTransactionFromPusher, attachmentFilePathToAttachment, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, getChargeCardRepaymentDetail, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, getCreditAccountDetails, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, toChargeCardSortKeyType, getCashbackDetail, getZeniDateFromPeriod, toCreditLimitFrequencyCodeType, getDepositAccountListWithDebitCardIssued, getIssueChargeCardView, getChargeCardSetupViewDetails, fetchChargeCardStatementList, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, getDepositAccountLimitForChargeCardByDepositAccountId, toCardAddressType, toShippingAddressType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
600
604
  export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
601
605
  export { fetchApAging, getApAgingReport, updateApAgingUIState, };
602
606
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
@@ -4,7 +4,6 @@ import accountGroup, { initialState as initialAccountGroupState, } from './entit
4
4
  import accountRecon, { initialState as initialAccountReconState, } from './entity/accountRecon/accountReconReducer';
5
5
  import address, { initialState as initialAddressState, } from './entity/address/addressReducer';
6
6
  import aiAccountantCustomer, { initialAiAccountantCustomerState, } from './entity/aiAccountantCustomer/aiAccountantCustomerReducer';
7
- import creditAgentEntity, { initialCreditAgentEntityState, } from './entity/creditAgent/creditAgentReducer';
8
7
  import aiCfo, { initialAiCfoState } from './entity/aiCfo/aiCfoReducer';
9
8
  import approvalRule, { initialState as initialApprovalRuleState, } from './entity/approvalRule/approvalRuleReducer';
10
9
  import bankAccount, { initialState as initialBankAccountState, } from './entity/bankAccount/bankAccountReducer';
@@ -20,6 +19,7 @@ import company, { initialState as initialCompanyState, } from './entity/company/
20
19
  import companyHealthMetric, { initialState as initialCompanyHealthMetricState, } from './entity/companyHealthMetric/companyHealthMetricReducer';
21
20
  import connectedAccount, { initialState as initialConnectedAccountState, } from './entity/connectedAccount/connectedAccountReducer';
22
21
  import countryList, { initialState as initialCountryListState, } from './entity/countryList/countryListReducer';
22
+ import creditAgentEntity, { initialCreditAgentEntityState, } from './entity/creditAgent/creditAgentReducer';
23
23
  import currency, { initialState as initialCurrencyState, } from './entity/currency/currencyReducer';
24
24
  import customer, { initialState as initialCustomerState, } from './entity/customer/customerReducer';
25
25
  import customerIncome, { initialState as initialCustomerIncomeState, } from './entity/customerIncome/customerIncomeTrendReducer';
@@ -107,9 +107,9 @@ import expenseAutomationJESchedulesView, { initialState as initialExpenseAutomat
107
107
  import expenseAutomationMissingReceiptsView, { initialState as initialExpenseAutomationMissingReceiptsViewState, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
108
108
  import expenseAutomationReconciliationView, { initialState as initialExpenseAutomationReconciliationViewState, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
109
109
  import expenseAutomationTransactionsView, { initialState as initialExpenseAutomationTransactionsViewState, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
110
+ import featureNotificationView, { initialState as initialFeatureNotificationViewState, } from './view/featureNotificationView/featureNotificationViewReducer';
110
111
  import fileView from './view/fileView/fileViewReducer';
111
112
  import { initialFileViewState, } from './view/fileView/fileViewState';
112
- import featureNotificationView, { initialState as initialFeatureNotificationViewState, } from './view/featureNotificationView/featureNotificationViewReducer';
113
113
  import financeStatement, { initialFinanceStatementState, } from './view/financeStatement/financeStatementReducer';
114
114
  import forecastList, { initialState as initialForecastListState, } from './view/forecastList/forecastListReducer';
115
115
  import globalMerchantAutoComplete, { initialState as initialGlobalMerchantAutoCompleteState, } from './view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewReducer';
@@ -7,9 +7,7 @@ import { fetchAiAccountantCustomers, updateAiAccountantCustomers, updateAiAccoun
7
7
  export const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$.pipe(filter(fetchAiAccountantCustomers.match), switchMap(() => {
8
8
  const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
9
9
  const url = `${base}/ai-accountant/customers`;
10
- return zeniAPI
11
- .getJSON(url)
12
- .pipe(mergeMap((response) => {
10
+ return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
13
11
  if (isSuccessResponse(response)) {
14
12
  const customers = response.data?.customers ?? [];
15
13
  const users = response.data?.users ?? [];
@@ -22,6 +20,5 @@ export const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$
22
20
  else {
23
21
  return of(updateAiAccountantCustomersFailure(response.status));
24
22
  }
25
- }), catchError((error) => of(updateAiAccountantCustomersFailure(createZeniAPIStatus('Unexpected error', 'AI Accountant customers fetch failed: ' +
26
- JSON.stringify(error))))));
23
+ }), catchError((error) => of(updateAiAccountantCustomersFailure(createZeniAPIStatus('Unexpected error', 'AI Accountant customers fetch failed: ' + JSON.stringify(error))))));
27
24
  }));
@@ -20,9 +20,7 @@ export const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$
20
20
  }
21
21
  const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
22
22
  const url = `${base}/ai-accountant/jobs?${params.toString()}`;
23
- return zeniAPI
24
- .getJSON(url)
25
- .pipe(mergeMap((response) => {
23
+ return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
26
24
  if (isSuccessResponse(response)) {
27
25
  const jobs = response.data?.jobs ?? [];
28
26
  const users = response.data?.users ?? [];
@@ -41,7 +39,6 @@ export const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$
41
39
  }
42
40
  }), catchError((error) => of(updateAiAccountantJobsFailure({
43
41
  tenantId,
44
- error: createZeniAPIStatus('Unexpected error', 'AI Accountant jobs fetch failed: ' +
45
- JSON.stringify(error)),
42
+ error: createZeniAPIStatus('Unexpected error', 'AI Accountant jobs fetch failed: ' + JSON.stringify(error)),
46
43
  }))));
47
44
  }));
@@ -51,7 +51,10 @@ export const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions
51
51
  messageText: 'failed',
52
52
  type: 'error',
53
53
  variables: [
54
- { variableName: '__reason__', variableValue: 'Unexpected error' },
54
+ {
55
+ variableName: '__reason__',
56
+ variableValue: 'Unexpected error',
57
+ },
55
58
  ],
56
59
  }),
57
60
  ])));
@@ -4,7 +4,7 @@ import { getTagsByIds } from '../../entity/tag/tagSelector';
4
4
  import { getTaskById } from '../../entity/task/taskSelector';
5
5
  import { getUserByUserId, getUsersByUserIds, } from '../../entity/user/userSelector';
6
6
  export const getCompanyTaskManagerView = createSelector((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
7
- const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
7
+ const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState, } = companyTaskManagerViewState;
8
8
  const tasksList = [];
9
9
  taskIds.forEach((taskId) => {
10
10
  const task = getTaskById(taskState, taskId);
@@ -1,6 +1,6 @@
1
1
  import { of } from 'rxjs';
2
2
  import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
- import { isSuccessResponse, } from '../../../responsePayload';
3
+ import { isSuccessResponse } from '../../../responsePayload';
4
4
  import { fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, } from '../companyTaskManagerViewReducer';
5
5
  export const fetchTaskManagerMetricsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchTaskManagerMetrics.match), switchMap(() => {
6
6
  const query = JSON.stringify({ is_filter_by_logged_in_user: true });
@@ -3,10 +3,10 @@ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
3
  import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
4
4
  import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
5
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
6
- import { toBatchListItem, } from '../../payload/missingReceiptsPayload';
7
- import { fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, } from '../../reducers/missingReceiptsViewReducer';
8
6
  import { BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS } from '../../helpers/bulkUploadTiming';
9
7
  import { rollingCalendarDateRangeInclusive } from '../../helpers/rollingCalendarDateRangeInclusive';
8
+ import { toBatchListItem, } from '../../payload/missingReceiptsPayload';
9
+ import { fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, } from '../../reducers/missingReceiptsViewReducer';
10
10
  export const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBulkUploadBatches.match), switchMap((action) => {
11
11
  const { cacheOverride } = action.payload;
12
12
  const state = state$.value;
@@ -5,6 +5,7 @@ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
5
  import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
6
6
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
7
  import { fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, getCompletedTransactionsCacheKey, } from '../../reducers/missingReceiptsViewReducer';
8
+ import { DEFAULT_COMPLETED_SUB_TAB } from '../../types/completedSubTab';
8
9
  export const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchCompletedTransactions.match), switchMap((action) => {
9
10
  const state = state$.value;
10
11
  const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
@@ -39,7 +40,7 @@ export const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => act
39
40
  if (sortOrder != null) {
40
41
  queryPayload.sort_order = sortOrder === 'ascending' ? 'asc' : 'desc';
41
42
  }
42
- if (completedSubTab !== 'all') {
43
+ if (completedSubTab !== DEFAULT_COMPLETED_SUB_TAB) {
43
44
  queryPayload.match_type = completedSubTab;
44
45
  }
45
46
  const encodedQuery = encodeURIComponent(JSON.stringify(queryPayload));
@@ -1,12 +1,12 @@
1
1
  import { EMPTY, concat, from, of } from 'rxjs';
2
2
  import { catchError, concatMap, filter, mergeMap, take } from 'rxjs/operators';
3
+ import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
4
+ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
3
5
  import { isSuccessResponse } from '../../../../responsePayload';
4
- import { isBatchDetailsStatusPendingOrProcessing, toBatchListItem, } from '../../payload/missingReceiptsPayload';
5
- import { fetchBulkUploadBatchesSuccess, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, } from '../../reducers/missingReceiptsViewReducer';
6
6
  import { BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS } from '../../helpers/bulkUploadTiming';
7
7
  import { rollingCalendarDateRangeInclusive } from '../../helpers/rollingCalendarDateRangeInclusive';
8
- import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
9
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
8
+ import { isBatchDetailsStatusPendingOrProcessing, toBatchListItem, } from '../../payload/missingReceiptsPayload';
9
+ import { fetchBulkUploadBatchesSuccess, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, } from '../../reducers/missingReceiptsViewReducer';
10
10
  /**
11
11
  * On missing-receipts entry / period switch, hydrate the automatching banner for the logged-in
12
12
  * user without relying on UI-driven list fetches (the Missing tab does not fetch the batch list
@@ -49,10 +49,12 @@ export const restoreBulkUploadAutomatchingOnMountEpic = (actions$, state$, zeniA
49
49
  bulkUpload.batchListFetchState.fetchState === 'Completed';
50
50
  const listSource = alreadyCached
51
51
  ? of(null)
52
- : zeniAPI.getJSON(listUrl).pipe(catchError(() => of(null)));
52
+ : zeniAPI
53
+ .getJSON(listUrl)
54
+ .pipe(catchError(() => of(null)));
53
55
  return listSource.pipe(mergeMap((listResponse) => {
54
56
  const batchList = alreadyCached
55
- ? bulkUpload.batchListByPeriod[periodId] ?? []
57
+ ? (bulkUpload.batchListByPeriod[periodId] ?? [])
56
58
  : listResponse != null &&
57
59
  isSuccessResponse(listResponse) &&
58
60
  listResponse.data != null
@@ -2,10 +2,11 @@ import { EMPTY, from, merge, of } from 'rxjs';
2
2
  import { catchError, debounceTime, filter, mergeMap, switchMap, } from 'rxjs/operators';
3
3
  import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
4
4
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
+ import { rollingCalendarDateRangeInclusive } from '../../helpers/rollingCalendarDateRangeInclusive';
5
6
  import { supportedTransactionPayloadToManualSearchResult } from '../../payload/missingReceiptsPayload';
6
7
  import { searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, } from '../../reducers/missingReceiptsViewReducer';
8
+ import { DEFAULT_COMPLETED_SUB_TAB } from '../../types/completedSubTab';
7
9
  import { toTransactionsSortKey } from '../../types/transactionsViewState';
8
- import { rollingCalendarDateRangeInclusive } from '../../helpers/rollingCalendarDateRangeInclusive';
9
10
  /**
10
11
  * `auto_categorized` for manual transaction search (Unmatched).
11
12
  * Backend contract TBD — align with `fetchTransactionCategorizationEpic` (`selectedTab === 'autoCategorized'`)
@@ -46,6 +47,11 @@ export const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI)
46
47
  page_token: pageToken ?? null,
47
48
  page_size: manualSearch.pageSize,
48
49
  search_text: query,
50
+ // Manual search ignores the Completed sub-tab axis — always span the
51
+ // default sentinel so the receipt-matching UX returns results
52
+ // regardless of where the transaction would otherwise be bucketed on
53
+ // the Completed tab.
54
+ sub_tab: DEFAULT_COMPLETED_SUB_TAB,
49
55
  };
50
56
  return zeniAPI
51
57
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -5,7 +5,8 @@ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
5
  import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
6
6
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
7
  import { getLineItemsByTransactionsIdsFromResponse } from '../../helpers/transactionCategorizationLocalDataHelper';
8
- import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState, } from '../../reducers/transactionsViewReducer';
8
+ import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateParentTotalCountForTab, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState, } from '../../reducers/transactionsViewReducer';
9
+ import { DEFAULT_COMPLETED_SUB_TAB } from '../../types/completedSubTab';
9
10
  import { TRANSACTIONS_TABS, toTransactionsSortKey, } from '../../types/transactionsViewState';
10
11
  export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTransactionCategorization.match), switchMap((action) => {
11
12
  const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationTransactionsViewState, } = state$.value;
@@ -23,6 +24,9 @@ export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) =>
23
24
  page_token: pageToken,
24
25
  page_size: 25,
25
26
  search_text: uiState.searchString,
27
+ sub_tab: selectedTab === 'autoCategorized'
28
+ ? expenseAutomationTransactionsViewState.selectedTransactionCategorizationCompletedSubTab
29
+ : DEFAULT_COMPLETED_SUB_TAB,
26
30
  };
27
31
  return zeniAPI
28
32
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -45,6 +49,12 @@ export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) =>
45
49
  selectedTab,
46
50
  totalCount: response.data.total_count,
47
51
  }));
52
+ updateActions.push(updateParentTotalCountForTab({
53
+ selectedPeriod,
54
+ selectedTab,
55
+ parentTotalCount: response.data.parent_tab_total_count ??
56
+ response.data.total_count,
57
+ }));
48
58
  updateActions.push(resetOtherTabsFetchState({
49
59
  refreshViewInBackground,
50
60
  tabs: TRANSACTIONS_TABS.filter((tab) => selectedTab !== tab),
@@ -1,5 +1,6 @@
1
1
  import { createAction, createSlice } from '@reduxjs/toolkit';
2
2
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
3
+ import { DEFAULT_COMPLETED_SUB_TAB, } from '../types/completedSubTab';
3
4
  import { MIN_MANUAL_TRANSACTION_SEARCH_LENGTH, } from '../types/missingReceiptsViewState';
4
5
  export const getCompletedTransactionsCacheKey = (periodId, sortKey, sortOrder, subTab) => {
5
6
  const sortKeyPart = sortKey ?? 'none';
@@ -12,7 +13,7 @@ export const initialBulkUploadState = {
12
13
  batchListByPeriod: {},
13
14
  batchListFetchState: { fetchState: 'Not-Started', error: undefined },
14
15
  batchStatusById: {},
15
- completedSubTab: 'all',
16
+ completedSubTab: DEFAULT_COMPLETED_SUB_TAB,
16
17
  completedTransactionsByPeriod: {},
17
18
  confirmMatchStatus: { fetchState: 'Not-Started', error: undefined },
18
19
  currentBatchId: undefined,
@@ -4,6 +4,7 @@ import uniq from 'lodash/uniq';
4
4
  import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
5
5
  import { isVendorTransaction } from '../../../entity/transaction/stateTypes/vendorTransaction';
6
6
  import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, filterAutoTabLineItems, mergeTabSpecificLineItems, removeTransactionFromTabView, setEntityRecommendationForLineIdInLocalData, toSetAllLineItemsToCategoryClass, toTransactionDetailLocalData, } from '../helpers/transactionCategorizationLocalDataHelper';
7
+ import { DEFAULT_COMPLETED_SUB_TAB, } from '../types/completedSubTab';
7
8
  export const initialTransactionTabViewState = {
8
9
  saveStatus: {
9
10
  fetchState: 'Not-Started',
@@ -41,12 +42,74 @@ export const initialTransactionTabViewState = {
41
42
  selectedTransactionLineId: undefined,
42
43
  };
43
44
  export const initialState = {
45
+ autoCategorizedSubTabCache: {},
46
+ parentTotalCountByTab: {
47
+ review: {},
48
+ autoCategorized: {},
49
+ },
44
50
  selectedTransactionCategorizationTab: 'review',
51
+ selectedTransactionCategorizationCompletedSubTab: DEFAULT_COMPLETED_SUB_TAB,
45
52
  transactionCategorizationView: {
46
53
  review: { ...initialTransactionTabViewState },
47
54
  autoCategorized: { ...initialTransactionTabViewState },
48
55
  },
49
56
  };
57
+ /**
58
+ * Capture the autoCategorized tab's current paginated dataset for a sub-tab.
59
+ * The mid-flight `'In-Progress'` state is normalised to `'Completed'` because
60
+ * the in-flight request is cancelled by `switchMap` in the fetch epic when the
61
+ * sub-tab changes — restoring `'In-Progress'` later would leave the UI stuck
62
+ * showing a phantom loading state with no fetch actually running. Length-zero
63
+ * datasets degrade to `'Not-Started'` so the next visit triggers a fresh
64
+ * fetch from page 1 instead of short-circuiting on stale empty caches.
65
+ *
66
+ * Snapshot scope (deliberately narrow):
67
+ * - Captured: `pageToken`, `totalCount`, `transactionIdsBySelectedPeriod`,
68
+ * `fetchState`, `error`, `scrollPosition`. The first five are the keys the
69
+ * fetch epic's cache check reads to decide whether to short-circuit a
70
+ * sub-tab revisit; `scrollPosition` is captured per sub-tab so revisiting
71
+ * restores the user's last offset and switching to a never-visited sub-tab
72
+ * starts at the top instead of inheriting the outgoing sub-tab's offset
73
+ * (which would land the user at a meaningless row index against a
74
+ * completely different list).
75
+ * - Intentionally NOT captured (left in place on `autoCat` and inherited by
76
+ * the incoming sub-tab):
77
+ * - `uiState.searchString`, `uiState.sortKey`, `uiState.sortOrder`,
78
+ * `uiState.nodeCollapseState`, `uiState.limit` — search and sort are
79
+ * user-applied preferences that persist across sub-tabs by design (a
80
+ * search query stays active when the user toggles between Manual / AI
81
+ * Accountant).
82
+ * - `selectedCheckBoxTransactionIds` — selection state is intentionally
83
+ * cleared at the action source (the fetch epic / save flow), not
84
+ * by the snapshot path. Carrying selection across sub-tabs is safe
85
+ * because every sub-tab change goes through a fetch round-trip that
86
+ * reconciles selection against the new row IDs.
87
+ * - `transactionReviewLocalDataById`, `transactionIdsWithUnsavedData`,
88
+ * `uploadReceiptStatusById`, `saveStatus`, `refreshStatus`,
89
+ * `markAsNotMiscategorizedStatus` — these are per-row / per-flight
90
+ * caches that are write-through global state, not sub-tab-scoped.
91
+ *
92
+ * If the contract changes (e.g. selection should reset on every sub-tab
93
+ * switch), update both this comment and the snapshot return shape together.
94
+ */
95
+ function snapshotAutoCategorizedTab(autoCat) {
96
+ const transactionIdsBySelectedPeriod = {
97
+ ...autoCat.transactionIdsBySelectedPeriod,
98
+ };
99
+ const hasAnyLoadedRows = Object.values(transactionIdsBySelectedPeriod).some((ids) => ids.length > 0);
100
+ let normalisedFetchState = autoCat.fetchState;
101
+ if (normalisedFetchState === 'In-Progress') {
102
+ normalisedFetchState = hasAnyLoadedRows ? 'Completed' : 'Not-Started';
103
+ }
104
+ return {
105
+ error: autoCat.error,
106
+ fetchState: normalisedFetchState,
107
+ pageToken: autoCat.uiState.pageToken,
108
+ scrollPosition: autoCat.uiState.scrollPosition,
109
+ totalCount: { ...autoCat.uiState.totalCount },
110
+ transactionIdsBySelectedPeriod,
111
+ };
112
+ }
50
113
  const expenseAutomationTransactionsView = createSlice({
51
114
  name: 'expenseAutomationTransactionsView',
52
115
  initialState,
@@ -260,6 +323,55 @@ const expenseAutomationTransactionsView = createSlice({
260
323
  return { payload: { newSelectedTab } };
261
324
  },
262
325
  },
326
+ updateTransactionCategorizationCompletedSubTab: {
327
+ reducer(draft, action) {
328
+ const { newSubTab } = action.payload;
329
+ const previousSubTab = draft.selectedTransactionCategorizationCompletedSubTab;
330
+ if (previousSubTab === newSubTab) {
331
+ return;
332
+ }
333
+ const autoCat = draft.transactionCategorizationView.autoCategorized;
334
+ // Snapshot the outgoing sub-tab so a future revisit can short-circuit
335
+ // the fetch epic (mirrors the parent-tab "don't refetch what's
336
+ // already cached" behaviour). Period-scoped data is preserved as-is
337
+ // because the snapshot itself is keyed only by sub-tab; the active
338
+ // tab's per-period maps remain the source of truth while live.
339
+ draft.autoCategorizedSubTabCache[previousSubTab] =
340
+ snapshotAutoCategorizedTab(autoCat);
341
+ const cached = draft.autoCategorizedSubTabCache[newSubTab];
342
+ if (cached != null) {
343
+ autoCat.uiState.pageToken = cached.pageToken;
344
+ autoCat.uiState.totalCount = { ...cached.totalCount };
345
+ autoCat.uiState.scrollPosition = cached.scrollPosition;
346
+ autoCat.transactionIdsBySelectedPeriod = {
347
+ ...cached.transactionIdsBySelectedPeriod,
348
+ };
349
+ autoCat.fetchState = cached.fetchState;
350
+ autoCat.error = cached.error;
351
+ }
352
+ else {
353
+ // Sub-tab has never been visited — clear the active slot so the
354
+ // view-epic's `fetchState === 'Not-Started' || transactionIds.length
355
+ // === 0` cache check falls through and triggers a fresh page-1
356
+ // fetch for the new dataset. `scrollPosition` is reset to the top
357
+ // so the incoming list isn't anchored to the outgoing sub-tab's
358
+ // offset (different rows → previous offset is meaningless).
359
+ autoCat.uiState.pageToken = null;
360
+ autoCat.uiState.totalCount = {};
361
+ autoCat.uiState.scrollPosition = {
362
+ scrollTop: 0,
363
+ scrollLeft: undefined,
364
+ };
365
+ autoCat.transactionIdsBySelectedPeriod = {};
366
+ autoCat.fetchState = 'Not-Started';
367
+ autoCat.error = undefined;
368
+ }
369
+ draft.selectedTransactionCategorizationCompletedSubTab = newSubTab;
370
+ },
371
+ prepare(newSubTab) {
372
+ return { payload: { newSubTab } };
373
+ },
374
+ },
263
375
  updateTransactionCategorization: {
264
376
  reducer(draft, action) {
265
377
  const selectedTab = action.payload.selectedTab;
@@ -697,6 +809,10 @@ const expenseAutomationTransactionsView = createSlice({
697
809
  const { selectedTab, selectedPeriod, totalCount } = action.payload;
698
810
  draft.transactionCategorizationView[selectedTab].uiState.totalCount[toMonthYearPeriodId(selectedPeriod)] = totalCount;
699
811
  },
812
+ updateParentTotalCountForTab(draft, action) {
813
+ const { selectedTab, selectedPeriod, parentTotalCount } = action.payload;
814
+ draft.parentTotalCountByTab[selectedTab][toMonthYearPeriodId(selectedPeriod)] = parentTotalCount;
815
+ },
700
816
  updateSelectedCheckboxTransactionIds(draft, action) {
701
817
  const selectedTab = action.payload.selectedTab;
702
818
  const transactionIds = action.payload.transactionIds;
@@ -707,6 +823,16 @@ const expenseAutomationTransactionsView = createSlice({
707
823
  draft.transactionCategorizationView[selectedTab] = {
708
824
  ...initialTransactionTabViewState,
709
825
  };
826
+ draft.parentTotalCountByTab[selectedTab] = {};
827
+ // The per-sub-tab snapshot cache lives at the slice root and is
828
+ // exclusively populated by the autoCategorized tab's sub-tab switching
829
+ // (see updateTransactionCategorizationCompletedSubTab). When that tab
830
+ // is reset, leaving stale snapshots behind would short-circuit the
831
+ // next sub-tab visit with phantom row IDs / page tokens that no longer
832
+ // correspond to anything in state — drop them in lockstep.
833
+ if (selectedTab === 'autoCategorized') {
834
+ draft.autoCategorizedSubTabCache = {};
835
+ }
710
836
  },
711
837
  clearExpenseAutomationTransactionsView(draft) {
712
838
  Object.assign(draft, initialState);
@@ -803,5 +929,5 @@ const expenseAutomationTransactionsView = createSlice({
803
929
  },
804
930
  },
805
931
  });
806
- export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } = expenseAutomationTransactionsView.actions;
932
+ export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, updateParentTotalCountForTab, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } = expenseAutomationTransactionsView.actions;
807
933
  export default expenseAutomationTransactionsView.reducer;