@zeniai/client-epic-state 5.0.69-betaML2 → 5.0.69-betaML21

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 (44) hide show
  1. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  3. package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
  4. package/lib/entity/tenant/clearAllEpic.js +2 -0
  5. package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -20
  6. package/lib/epic.d.ts +2 -2
  7. package/lib/epic.js +2 -2
  8. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
  9. package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
  10. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -20
  11. package/lib/esm/epic.js +2 -2
  12. package/lib/esm/index.js +1 -1
  13. package/lib/esm/reducer.js +1 -1
  14. package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +17 -1
  15. package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +13 -12
  16. package/lib/esm/view/createTransferEntry/createTransferEntryState.js +4 -4
  17. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +20 -2
  18. package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +8 -8
  19. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -5
  20. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -2
  21. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +8 -8
  22. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +4 -4
  23. package/lib/index.d.ts +1 -1
  24. package/lib/index.js +8 -8
  25. package/lib/reducer.d.ts +1 -1
  26. package/lib/reducer.js +1 -1
  27. package/lib/view/createTransferEntry/createTransferEntryReducer.d.ts +1 -1
  28. package/lib/view/createTransferEntry/createTransferEntryReducer.js +18 -2
  29. package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +8 -7
  30. package/lib/view/createTransferEntry/createTransferEntrySelector.js +13 -12
  31. package/lib/view/createTransferEntry/createTransferEntryState.d.ts +1 -1
  32. package/lib/view/createTransferEntry/createTransferEntryState.js +4 -4
  33. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +20 -2
  34. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +4 -4
  35. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +8 -8
  36. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -5
  37. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  38. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -1
  39. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -2
  40. package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -1
  41. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +8 -8
  42. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -1
  43. package/lib/view/transactionDetail/transactionDetailSelector.js +3 -3
  44. package/package.json +1 -1
@@ -24,12 +24,12 @@ export const fetchTransactionCategorizationViewEpic = (actions$, state$) => acti
24
24
  accountList.fetchState === 'Not-Started') {
25
25
  updateActions.push(fetchAccountList('accountList', true));
26
26
  }
27
- const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
28
- if (transfer_eligible.fetchState === 'Not-Started') {
29
- updateActions.push(fetchAccountsForTransferFlow({ kind: 'transfer_eligible' }));
27
+ const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
28
+ if (transferEntryEligible.fetchState === 'Not-Started') {
29
+ updateActions.push(fetchAccountsForTransferFlow({ kind: 'transferEntryEligible' }));
30
30
  }
31
- if (credit_card_only.fetchState === 'Not-Started') {
32
- updateActions.push(fetchAccountsForTransferFlow({ kind: 'credit_card_only' }));
31
+ if (creditCardOnlyEligible.fetchState === 'Not-Started') {
32
+ updateActions.push(fetchAccountsForTransferFlow({ kind: 'creditCardOnlyEligible' }));
33
33
  }
34
34
  const classList = state$.value.classListState;
35
35
  if (classList.hasValidState() === false &&
@@ -107,7 +107,7 @@ export function getExpenseAutomationTransactionView(state) {
107
107
  : [];
108
108
  const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
109
109
  const completionStatus = transactionCompletionStatus ?? 'incomplete';
110
- const { transferAccountsList, creditCardAccountsForTransferList } = getResolvedTransferAccounts(state);
110
+ const { transferAccountsList, creditCardTransferAccountsList } = getResolvedTransferAccounts(state);
111
111
  return {
112
112
  version: 0,
113
113
  fetchState: fetchStatus.fetchState,
@@ -136,7 +136,7 @@ export function getExpenseAutomationTransactionView(state) {
136
136
  uploadReceiptStatusById,
137
137
  selectedTransactionId,
138
138
  selectedTransactionLineId,
139
- creditCardAccountsForTransferList,
139
+ creditCardTransferAccountsList,
140
140
  transferAccounts: transferAccountsList,
141
141
  selectedTransactionCategorizationCompletedSubTab,
142
142
  };
@@ -11,9 +11,9 @@ import { updateVendors } from '../../../entity/vendor/vendorReducer';
11
11
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
12
12
  import { fetchAccountList } from '../../accountList/accountListReducer';
13
13
  import { fetchClassList } from '../../classList/classListReducer';
14
- import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
15
14
  import { getInitializedTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper';
16
15
  import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
16
+ import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
17
17
  import { fetchOwnerList } from '../../ownerList/ownerListReducer';
18
18
  import { fetchProjectList } from '../../projectList/projectListReducer';
19
19
  import { fetchTransactionDetail, initializeTransactionDetailLocalData, removeTransactionDetail, updateTransactionDetailFetchState, } from '../transactionDetailReducer';
@@ -37,14 +37,14 @@ export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions
37
37
  transactionActions.push(fetchAccountList('accountList'));
38
38
  }
39
39
  if (isCreateTransferEntryFromExpenseEnabled === true) {
40
- const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
41
- if (transfer_eligible.fetchState !== 'In-Progress' &&
42
- transfer_eligible.fetchState !== 'Completed') {
43
- transactionActions.push(fetchAccountsForTransferFlow({ kind: 'transfer_eligible' }));
40
+ const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
41
+ if (transferEntryEligible.fetchState !== 'In-Progress' &&
42
+ transferEntryEligible.fetchState !== 'Completed') {
43
+ transactionActions.push(fetchAccountsForTransferFlow({ kind: 'transferEntryEligible' }));
44
44
  }
45
- if (credit_card_only.fetchState !== 'In-Progress' &&
46
- credit_card_only.fetchState !== 'Completed') {
47
- transactionActions.push(fetchAccountsForTransferFlow({ kind: 'credit_card_only' }));
45
+ if (creditCardOnlyEligible.fetchState !== 'In-Progress' &&
46
+ creditCardOnlyEligible.fetchState !== 'Completed') {
47
+ transactionActions.push(fetchAccountsForTransferFlow({ kind: 'creditCardOnlyEligible' }));
48
48
  }
49
49
  }
50
50
  const classList = state$.value.classListState;
@@ -1,14 +1,14 @@
1
1
  import recordGet from 'lodash/get';
2
2
  import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
3
- import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled } from '../../entity/tenant/tenantSelector';
3
+ import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../entity/tenant/tenantSelector';
4
4
  import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
5
5
  import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
6
6
  import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
7
7
  import { getVendorsByVendorIds } from '../../entity/vendor/vendorSelector';
8
8
  import { dateNow } from '../../zeniDayJS';
9
9
  import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/accountListSelector';
10
- import { getResolvedTransferAccounts } from '../createTransferEntry/createTransferEntrySelector';
11
10
  import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
11
+ import { getResolvedTransferAccounts } from '../createTransferEntry/createTransferEntrySelector';
12
12
  import { getProjectList, } from '../projectList/projectListSelector';
13
13
  import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
14
14
  export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
@@ -79,7 +79,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
79
79
  : [];
80
80
  const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
81
81
  const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
82
- const { transferAccountsList, creditCardAccountsForTransferList } = getResolvedTransferAccounts(state);
82
+ const { transferAccountsList, creditCardTransferAccountsList } = getResolvedTransferAccounts(state);
83
83
  return {
84
84
  reportId: 'transaction_detail',
85
85
  reportTitle: 'Transaction Detail',
@@ -97,7 +97,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
97
97
  classList: classList,
98
98
  isAccountingClassesEnabled,
99
99
  createTransferEntryStatus: createTransferEntryState.createTransferEntryStatus,
100
- creditCardAccountsForTransferList,
100
+ creditCardTransferAccountsList,
101
101
  transferAccounts: transferAccountsList,
102
102
  isAccountingProjectsEnabled,
103
103
  projectList,
package/lib/index.d.ts CHANGED
@@ -260,6 +260,7 @@ import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData }
260
260
  import { PortfolioUIState } from './view/companyView/types/companyPortfolioViewState';
261
261
  import { CompanyView } from './view/companyView/types/companyView';
262
262
  import { UserAndRole } from './view/companyView/types/userAndRole';
263
+ import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, fetchAccountsForTransferFlow, resetCreateTransferEntryStatus } from './view/createTransferEntry/createTransferEntryReducer';
263
264
  import { fetchDashboard, updateTreasuryVideoClosed } from './view/dashboard/dashboardReducer';
264
265
  import { DashboardReport, getDashboard } from './view/dashboard/dashboardSelector';
265
266
  import { updateDashboardLayout } from './view/dashboardLayout/dashboardLayoutReducer';
@@ -274,7 +275,6 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
274
275
  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';
275
276
  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';
276
277
  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';
277
- import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, fetchAccountsForTransferFlow, resetCreateTransferEntryStatus } from './view/createTransferEntry/createTransferEntryReducer';
278
278
  import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, removeTransactionFromAllTabs, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess } from './view/expenseAutomationView/reducers/transactionsViewReducer';
279
279
  import { ExpenseAutomationStepDetails, ExpenseAutomationViewSelector } from './view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes';
280
280
  import { ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisOperatingExpenseView, FluxAnalysisSectionType, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView } from './view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes';
package/lib/index.js CHANGED
@@ -717,6 +717,14 @@ Object.defineProperty(exports, "toPortfolioSortKeyType", { enumerable: true, get
717
717
  Object.defineProperty(exports, "toTaskManagerSortKeyType", { enumerable: true, get: function () { return cockpitTypes_1.toTaskManagerSortKeyType; } });
718
718
  const companyPassportLocalData_1 = require("./view/companyView/types/companyPassport/companyPassportLocalData");
719
719
  Object.defineProperty(exports, "toCompanyPassportLocalData", { enumerable: true, get: function () { return companyPassportLocalData_1.toCompanyPassportLocalData; } });
720
+ const createTransferEntryReducer_1 = require("./view/createTransferEntry/createTransferEntryReducer");
721
+ Object.defineProperty(exports, "clearTransferEntryRouteReplacement", { enumerable: true, get: function () { return createTransferEntryReducer_1.clearTransferEntryRouteReplacement; } });
722
+ Object.defineProperty(exports, "createTransferEntry", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntry; } });
723
+ Object.defineProperty(exports, "createTransferEntryFailure", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryFailure; } });
724
+ Object.defineProperty(exports, "createTransferEntryReplacedTransaction", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryReplacedTransaction; } });
725
+ Object.defineProperty(exports, "createTransferEntrySuccess", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntrySuccess; } });
726
+ Object.defineProperty(exports, "fetchAccountsForTransferFlow", { enumerable: true, get: function () { return createTransferEntryReducer_1.fetchAccountsForTransferFlow; } });
727
+ Object.defineProperty(exports, "resetCreateTransferEntryStatus", { enumerable: true, get: function () { return createTransferEntryReducer_1.resetCreateTransferEntryStatus; } });
720
728
  const dashboardReducer_1 = require("./view/dashboard/dashboardReducer");
721
729
  Object.defineProperty(exports, "fetchDashboard", { enumerable: true, get: function () { return dashboardReducer_1.fetchDashboard; } });
722
730
  Object.defineProperty(exports, "updateTreasuryVideoClosed", { enumerable: true, get: function () { return dashboardReducer_1.updateTreasuryVideoClosed; } });
@@ -833,14 +841,6 @@ Object.defineProperty(exports, "updateExpenseAutomationSelectedDrawerAccountId",
833
841
  Object.defineProperty(exports, "updateNodeCollapseState", { enumerable: true, get: function () { return reconciliationViewReducer_1.updateNodeCollapseState; } });
834
842
  Object.defineProperty(exports, "updateStatementUploadChosen", { enumerable: true, get: function () { return reconciliationViewReducer_1.updateStatementUploadChosen; } });
835
843
  Object.defineProperty(exports, "uploadAccountStatement", { enumerable: true, get: function () { return reconciliationViewReducer_1.uploadAccountStatement; } });
836
- const createTransferEntryReducer_1 = require("./view/createTransferEntry/createTransferEntryReducer");
837
- Object.defineProperty(exports, "clearTransferEntryRouteReplacement", { enumerable: true, get: function () { return createTransferEntryReducer_1.clearTransferEntryRouteReplacement; } });
838
- Object.defineProperty(exports, "createTransferEntry", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntry; } });
839
- Object.defineProperty(exports, "createTransferEntryFailure", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryFailure; } });
840
- Object.defineProperty(exports, "createTransferEntryReplacedTransaction", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryReplacedTransaction; } });
841
- Object.defineProperty(exports, "createTransferEntrySuccess", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntrySuccess; } });
842
- Object.defineProperty(exports, "fetchAccountsForTransferFlow", { enumerable: true, get: function () { return createTransferEntryReducer_1.fetchAccountsForTransferFlow; } });
843
- Object.defineProperty(exports, "resetCreateTransferEntryStatus", { enumerable: true, get: function () { return createTransferEntryReducer_1.resetCreateTransferEntryStatus; } });
844
844
  const transactionsViewReducer_1 = require("./view/expenseAutomationView/reducers/transactionsViewReducer");
845
845
  Object.defineProperty(exports, "backgroundRefetchReviewTab", { enumerable: true, get: function () { return transactionsViewReducer_1.backgroundRefetchReviewTab; } });
846
846
  Object.defineProperty(exports, "clearExpenseAutomationTransactionsView", { enumerable: true, get: function () { return transactionsViewReducer_1.clearExpenseAutomationTransactionsView; } });
package/lib/reducer.d.ts CHANGED
@@ -97,11 +97,11 @@ import { CompanyHealthMetricView } from './view/companyHealthMetricView/companyH
97
97
  import { CompanyMonthEndReportViewState } from './view/companyMonthEndReportView/companyMonthEndReportViewState';
98
98
  import { CompanyTaskManagerViewState } from './view/companyTaskManagerView/companyTaskManagerViewState';
99
99
  import { CompanyViewState } from './view/companyView/companyViewState';
100
+ import { CreateTransferEntryState } from './view/createTransferEntry/createTransferEntryState';
100
101
  import { CreditAgentViewState } from './view/creditAgentView/creditAgentViewState';
101
102
  import { DashboardState } from './view/dashboard/dashboardState';
102
103
  import { DashboardLayoutState } from './view/dashboardLayout/dashboardLayoutState';
103
104
  import { ExpenseAutomationViewState } from './view/expenseAutomationView/expenseAutomationViewState';
104
- import { CreateTransferEntryState } from './view/createTransferEntry/createTransferEntryState';
105
105
  import { FluxAnalysisViewState as ExpenseAutomationFluxAnalysisViewState } from './view/expenseAutomationView/types/fluxAnalysisViewState';
106
106
  import { JESchedulesViewState as ExpenseAutomationJESchedulesViewState } from './view/expenseAutomationView/types/jeSchedulesViewState';
107
107
  import { MissingReceiptsViewState as ExpenseAutomationMissingReceiptsViewState } from './view/expenseAutomationView/types/missingReceiptsViewState';
package/lib/reducer.js CHANGED
@@ -137,6 +137,7 @@ const companyHealthMetricViewReducer_1 = __importStar(require("./view/companyHea
137
137
  const companyMonthEndReportViewReducer_1 = __importStar(require("./view/companyMonthEndReportView/companyMonthEndReportViewReducer"));
138
138
  const companyTaskManagerViewReducer_1 = __importStar(require("./view/companyTaskManagerView/companyTaskManagerViewReducer"));
139
139
  const companyViewReducer_1 = __importStar(require("./view/companyView/companyViewReducer"));
140
+ const createTransferEntryReducer_1 = __importStar(require("./view/createTransferEntry/createTransferEntryReducer"));
140
141
  const creditAgentViewReducer_1 = __importStar(require("./view/creditAgentView/creditAgentViewReducer"));
141
142
  const dashboardReducer_1 = __importStar(require("./view/dashboard/dashboardReducer"));
142
143
  const dashboardLayoutReducer_1 = __importStar(require("./view/dashboardLayout/dashboardLayoutReducer"));
@@ -146,7 +147,6 @@ const jeSchedulesViewReducer_1 = __importStar(require("./view/expenseAutomationV
146
147
  const missingReceiptsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/missingReceiptsViewReducer"));
147
148
  const reconciliationViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/reconciliationViewReducer"));
148
149
  const transactionsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/transactionsViewReducer"));
149
- const createTransferEntryReducer_1 = __importStar(require("./view/createTransferEntry/createTransferEntryReducer"));
150
150
  const featureNotificationViewReducer_1 = __importStar(require("./view/featureNotificationView/featureNotificationViewReducer"));
151
151
  const fileViewReducer_1 = __importDefault(require("./view/fileView/fileViewReducer"));
152
152
  const fileViewState_1 = require("./view/fileView/fileViewState");
@@ -27,6 +27,6 @@ export declare const fetchAccountsForTransferFlow: import("@reduxjs/toolkit").Ac
27
27
  }, "createTransferEntry/createTransferEntry", never, never>, createTransferEntrySuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/createTransferEntrySuccess">, createTransferEntryFailure: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/createTransferEntryFailure">, resetCreateTransferEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/resetCreateTransferEntryStatus">, createTransferEntryReplacedTransaction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[previousTransactionId: TransactionID, newTransactionId: TransactionID], {
28
28
  newTransactionId: TransactionID;
29
29
  previousTransactionId: TransactionID;
30
- }, "createTransferEntry/createTransferEntryReplacedTransaction", never, never>, clearTransferEntryRouteReplacement: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearTransferEntryRouteReplacement">;
30
+ }, "createTransferEntry/createTransferEntryReplacedTransaction", never, never>, clearTransferEntryRouteReplacement: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearTransferEntryRouteReplacement">, clearCreateTransferEntry: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearCreateTransferEntry">;
31
31
  declare const _default: import("redux").Reducer<CreateTransferEntryState>;
32
32
  export default _default;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearTransferEntryRouteReplacement = exports.createTransferEntryReplacedTransaction = exports.resetCreateTransferEntryStatus = exports.createTransferEntryFailure = exports.createTransferEntrySuccess = exports.createTransferEntry = exports.updateAccountsForTransferFlowFailure = exports.updateAccountsForTransferFlow = exports.fetchAccountsForTransferFlow = exports.initialState = void 0;
4
+ exports.clearCreateTransferEntry = exports.clearTransferEntryRouteReplacement = exports.createTransferEntryReplacedTransaction = exports.resetCreateTransferEntryStatus = exports.createTransferEntryFailure = exports.createTransferEntrySuccess = exports.createTransferEntry = exports.updateAccountsForTransferFlowFailure = exports.updateAccountsForTransferFlow = exports.fetchAccountsForTransferFlow = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const createTransferEntryState_1 = require("./createTransferEntryState");
7
7
  exports.initialState = createTransferEntryState_1.initialCreateTransferEntryState;
@@ -25,8 +25,16 @@ const createTransferEntrySlice = (0, toolkit_1.createSlice)({
25
25
  prepare(payload) {
26
26
  return { payload };
27
27
  },
28
+ /**
29
+ * Defense-in-depth: clear any stale `lastTransferEntryReplacement` on a
30
+ * fresh dispatch so a second `createTransferEntry` never inherits the
31
+ * previous run's replacement signal (e.g. if the prior `timer(0)` cleanup
32
+ * never fired). Mirrors the host hook's `consumedReplacementRef` guard
33
+ * (see `useTransferEntryRouteReplacement` in zeni-web-app-ui).
34
+ */
28
35
  reducer(draft) {
29
36
  draft.createTransferEntryStatus = 'In-Progress';
37
+ draft.lastTransferEntryReplacement = undefined;
30
38
  },
31
39
  },
32
40
  createTransferEntrySuccess(draft) {
@@ -54,7 +62,15 @@ const createTransferEntrySlice = (0, toolkit_1.createSlice)({
54
62
  clearTransferEntryRouteReplacement(draft) {
55
63
  draft.lastTransferEntryReplacement = undefined;
56
64
  },
65
+ /**
66
+ * Full slice reset. Dispatched from `clearAllEpic` on tenant switch so
67
+ * stale per-tenant state (account-id pools, status, replacement signal)
68
+ * doesn't bleed across tenants.
69
+ */
70
+ clearCreateTransferEntry(draft) {
71
+ Object.assign(draft, exports.initialState);
72
+ },
57
73
  },
58
74
  });
59
- _a = createTransferEntrySlice.actions, exports.fetchAccountsForTransferFlow = _a.fetchAccountsForTransferFlow, exports.updateAccountsForTransferFlow = _a.updateAccountsForTransferFlow, exports.updateAccountsForTransferFlowFailure = _a.updateAccountsForTransferFlowFailure, exports.createTransferEntry = _a.createTransferEntry, exports.createTransferEntrySuccess = _a.createTransferEntrySuccess, exports.createTransferEntryFailure = _a.createTransferEntryFailure, exports.resetCreateTransferEntryStatus = _a.resetCreateTransferEntryStatus, exports.createTransferEntryReplacedTransaction = _a.createTransferEntryReplacedTransaction, exports.clearTransferEntryRouteReplacement = _a.clearTransferEntryRouteReplacement;
75
+ _a = createTransferEntrySlice.actions, exports.fetchAccountsForTransferFlow = _a.fetchAccountsForTransferFlow, exports.updateAccountsForTransferFlow = _a.updateAccountsForTransferFlow, exports.updateAccountsForTransferFlowFailure = _a.updateAccountsForTransferFlowFailure, exports.createTransferEntry = _a.createTransferEntry, exports.createTransferEntrySuccess = _a.createTransferEntrySuccess, exports.createTransferEntryFailure = _a.createTransferEntryFailure, exports.resetCreateTransferEntryStatus = _a.resetCreateTransferEntryStatus, exports.createTransferEntryReplacedTransaction = _a.createTransferEntryReplacedTransaction, exports.clearTransferEntryRouteReplacement = _a.clearTransferEntryRouteReplacement, exports.clearCreateTransferEntry = _a.clearCreateTransferEntry;
60
76
  exports.default = createTransferEntrySlice.reducer;
@@ -7,13 +7,14 @@ export declare function getLastTransferEntryReplacement(state: RootState): Trans
7
7
  * Shared resolver for the credit/debit dropdowns in the transfer drawer.
8
8
  *
9
9
  * Resolution policy (intentional):
10
- * 1. Prefer the dedicated API fetch results (`transfer_eligible` for the debit
11
- * pool, `credit_card_only` for the credit-card-payment credit pool).
10
+ * 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
11
+ * debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
12
+ * pool).
12
13
  * 2. If the dedicated fetch returns an empty list while the COA is loaded,
13
- * fall back to the COA: the full account list for `transfer_eligible`, and
14
- * COA accounts filtered to `credit_card` for `credit_card_only`. This keeps
15
- * the dropdown populated for older tenants where the dedicated endpoints
16
- * haven't been backfilled yet.
14
+ * fall back to the COA: the full account list for `transferEntryEligible`,
15
+ * and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
16
+ * This keeps the dropdown populated for older tenants where the dedicated
17
+ * endpoints haven't been backfilled yet.
17
18
  *
18
19
  * Intent — what this selector deliberately does NOT do:
19
20
  * - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
@@ -33,6 +34,6 @@ export declare function getLastTransferEntryReplacement(state: RootState): Trans
33
34
  * unrelated state change.
34
35
  */
35
36
  export declare const getResolvedTransferAccounts: (state: RootState) => {
36
- creditCardAccountsForTransferList: AccountBase[];
37
+ creditCardTransferAccountsList: AccountBase[];
37
38
  transferAccountsList: AccountBase[];
38
39
  };
@@ -16,13 +16,14 @@ function getLastTransferEntryReplacement(state) {
16
16
  * Shared resolver for the credit/debit dropdowns in the transfer drawer.
17
17
  *
18
18
  * Resolution policy (intentional):
19
- * 1. Prefer the dedicated API fetch results (`transfer_eligible` for the debit
20
- * pool, `credit_card_only` for the credit-card-payment credit pool).
19
+ * 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
20
+ * debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
21
+ * pool).
21
22
  * 2. If the dedicated fetch returns an empty list while the COA is loaded,
22
- * fall back to the COA: the full account list for `transfer_eligible`, and
23
- * COA accounts filtered to `credit_card` for `credit_card_only`. This keeps
24
- * the dropdown populated for older tenants where the dedicated endpoints
25
- * haven't been backfilled yet.
23
+ * fall back to the COA: the full account list for `transferEntryEligible`,
24
+ * and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
25
+ * This keeps the dropdown populated for older tenants where the dedicated
26
+ * endpoints haven't been backfilled yet.
26
27
  *
27
28
  * Intent — what this selector deliberately does NOT do:
28
29
  * - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
@@ -44,10 +45,10 @@ function getLastTransferEntryReplacement(state) {
44
45
  exports.getResolvedTransferAccounts = (0, toolkit_1.createSelector)([
45
46
  (state) => state.accountState,
46
47
  (state) => state.accountListState,
47
- (state) => state.createTransferEntryState.transferAccountsByType.transfer_eligible
48
- .accountIds,
49
- (state) => state.createTransferEntryState.transferAccountsByType.credit_card_only
50
- .accountIds,
48
+ (state) => state.createTransferEntryState.transferAccountsByType
49
+ .transferEntryEligible.accountIds,
50
+ (state) => state.createTransferEntryState.transferAccountsByType
51
+ .creditCardOnlyEligible.accountIds,
51
52
  ], (accountState, accountListState, transferEligibleIds, creditCardOnlyIds) => {
52
53
  const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
53
54
  const transferEligibleFromApi = transferEligibleIds
@@ -63,6 +64,6 @@ exports.getResolvedTransferAccounts = (0, toolkit_1.createSelector)([
63
64
  .map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
64
65
  .filter((account) => account != null);
65
66
  const coaFallbackCreditCards = coaFallbackAllAccounts.filter((a) => a.accountType === 'credit_card');
66
- const creditCardAccountsForTransferList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
67
- return { creditCardAccountsForTransferList, transferAccountsList };
67
+ const creditCardTransferAccountsList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
68
+ return { creditCardTransferAccountsList, transferAccountsList };
68
69
  });
@@ -1,7 +1,7 @@
1
1
  import { FetchState, ID } from '../../commonStateTypes/common';
2
2
  import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
3
3
  /** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
4
- export declare const TRANSFER_ACCOUNTS_FETCH_TYPE: readonly ["transfer_eligible", "credit_card_only"];
4
+ export declare const TRANSFER_ACCOUNTS_FETCH_TYPE: readonly ["transferEntryEligible", "creditCardOnlyEligible"];
5
5
  export type TransferAccountsFetchType = (typeof TRANSFER_ACCOUNTS_FETCH_TYPE)[number];
6
6
  export interface TransferAccountsState {
7
7
  accountIds: ID[];
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initialCreateTransferEntryState = exports.TRANSFER_ACCOUNTS_FETCH_TYPE = void 0;
4
4
  /** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
5
5
  exports.TRANSFER_ACCOUNTS_FETCH_TYPE = [
6
- 'transfer_eligible',
7
- 'credit_card_only',
6
+ 'transferEntryEligible',
7
+ 'creditCardOnlyEligible',
8
8
  ];
9
9
  const initialTransferAccountsState = {
10
10
  accountIds: [],
@@ -14,7 +14,7 @@ exports.initialCreateTransferEntryState = {
14
14
  createTransferEntryStatus: 'Not-Started',
15
15
  lastTransferEntryReplacement: undefined,
16
16
  transferAccountsByType: {
17
- transfer_eligible: initialTransferAccountsState,
18
- credit_card_only: initialTransferAccountsState,
17
+ transferEntryEligible: initialTransferAccountsState,
18
+ creditCardOnlyEligible: initialTransferAccountsState,
19
19
  },
20
20
  };
@@ -28,6 +28,20 @@ const failureSnackbar = () => (0, snackbarReducer_1.openSnackbar)({
28
28
  function buildFailureActions() {
29
29
  return [(0, createTransferEntryReducer_1.createTransferEntryFailure)(), failureSnackbar()];
30
30
  }
31
+ /**
32
+ * Defensive guard: a BE response that returns 200 with `transaction != null`
33
+ * but where the body lacks a usable id/type is unsafe to seed into the store —
34
+ * downstream code would store under a garbage key and the host hook would try
35
+ * to navigate to a broken url. Treat that case as failure so the source row
36
+ * stays visible and the user can retry.
37
+ */
38
+ function isWellFormedTransactionPayload(t) {
39
+ return (t != null &&
40
+ typeof t.transaction_id === 'string' &&
41
+ t.transaction_id !== '' &&
42
+ typeof t.transaction_type === 'string' &&
43
+ t.transaction_type !== '');
44
+ }
31
45
  function buildSuccessSideEffects(sourceTransactionId) {
32
46
  return [
33
47
  (0, createTransferEntryReducer_1.createTransferEntrySuccess)(),
@@ -107,8 +121,12 @@ const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
107
121
  if (!(0, responsePayload_1.isSuccessResponse)(response)) {
108
122
  return (0, rxjs_1.from)(buildFailureActions());
109
123
  }
110
- if (response.data?.transaction != null) {
111
- return handleSuccessWithTransactionBody(response.data.transaction, response.data.vendors, previousTransactionId, transactionId);
124
+ const transaction = response.data?.transaction;
125
+ if (transaction != null) {
126
+ if (!isWellFormedTransactionPayload(transaction)) {
127
+ return (0, rxjs_1.from)(buildFailureActions());
128
+ }
129
+ return handleSuccessWithTransactionBody(transaction, response.data?.vendors, previousTransactionId, transactionId);
112
130
  }
113
131
  return handleSuccessWithoutTransactionBody(transactionId);
114
132
  }), (0, operators_1.catchError)(() => (0, rxjs_1.from)(buildFailureActions())));
@@ -6,9 +6,9 @@ import { ZeniAPI } from '../../../zeniAPI';
6
6
  import { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure } from '../createTransferEntryReducer';
7
7
  export type ActionType = ReturnType<typeof fetchAccountsForTransferFlow> | ReturnType<typeof updateAccountsForTransferFlow> | ReturnType<typeof updateAccountsForTransferFlowFailure> | ReturnType<typeof updateAccounts>;
8
8
  /**
9
- * Pools fetched concurrently: `groupBy(kind)` keeps `transfer_eligible` and
10
- * `credit_card_only` in their own streams so a back-to-back dispatch of both
11
- * does not cancel the first. Within a single type, a fresh dispatch supersedes
12
- * any in-flight request (per-group `switchMap`).
9
+ * Pools fetched concurrently: `groupBy(kind)` keeps `transferEntryEligible`
10
+ * and `creditCardOnlyEligible` in their own streams so a back-to-back dispatch
11
+ * of both does not cancel the first. Within a single type, a fresh dispatch
12
+ * supersedes any in-flight request (per-group `switchMap`).
13
13
  */
14
14
  export declare const fetchTransferAccountsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,18 +7,18 @@ const accountReducer_1 = require("../../../entity/account/accountReducer");
7
7
  const responsePayload_1 = require("../../../responsePayload");
8
8
  const createTransferEntryReducer_1 = require("../createTransferEntryReducer");
9
9
  const REPORT_ID_BY_TYPE = {
10
- transfer_eligible: 'transfer_accounts',
11
- credit_card_only: 'credit_card_transfer_accounts',
10
+ transferEntryEligible: 'transfer_accounts',
11
+ creditCardOnlyEligible: 'credit_card_transfer_accounts',
12
12
  };
13
13
  const QUERY_BY_TYPE = {
14
- transfer_eligible: { is_only_include_transfer_accounts: true },
15
- credit_card_only: { is_include_only_credit_card_accounts: true },
14
+ transferEntryEligible: { is_only_include_transfer_accounts: true },
15
+ creditCardOnlyEligible: { is_include_only_credit_card_accounts: true },
16
16
  };
17
17
  /**
18
- * Pools fetched concurrently: `groupBy(kind)` keeps `transfer_eligible` and
19
- * `credit_card_only` in their own streams so a back-to-back dispatch of both
20
- * does not cancel the first. Within a single type, a fresh dispatch supersedes
21
- * any in-flight request (per-group `switchMap`).
18
+ * Pools fetched concurrently: `groupBy(kind)` keeps `transferEntryEligible`
19
+ * and `creditCardOnlyEligible` in their own streams so a back-to-back dispatch
20
+ * of both does not cancel the first. Within a single type, a fresh dispatch
21
+ * supersedes any in-flight request (per-group `switchMap`).
22
22
  */
23
23
  const fetchTransferAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(createTransferEntryReducer_1.fetchAccountsForTransferFlow.match), (0, operators_1.groupBy)((action) => action.payload.kind), (0, operators_1.mergeMap)((group$) => group$.pipe((0, operators_1.switchMap)((action) => {
24
24
  const { kind } = action.payload;
@@ -27,12 +27,12 @@ const fetchTransactionCategorizationViewEpic = (actions$, state$) => actions$.pi
27
27
  accountList.fetchState === 'Not-Started') {
28
28
  updateActions.push((0, accountListReducer_1.fetchAccountList)('accountList', true));
29
29
  }
30
- const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
31
- if (transfer_eligible.fetchState === 'Not-Started') {
32
- updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
30
+ const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
31
+ if (transferEntryEligible.fetchState === 'Not-Started') {
32
+ updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transferEntryEligible' }));
33
33
  }
34
- if (credit_card_only.fetchState === 'Not-Started') {
35
- updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
34
+ if (creditCardOnlyEligible.fetchState === 'Not-Started') {
35
+ updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'creditCardOnlyEligible' }));
36
36
  }
37
37
  const classList = state$.value.classListState;
38
38
  if (classList.hasValidState() === false &&
@@ -38,7 +38,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
38
38
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
39
39
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
40
40
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
41
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "convert_transaction_type" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
41
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
42
42
  messageText: "notification" | "failed" | "success";
43
43
  type: "error" | "success" | "info";
44
44
  variables: {
@@ -20,7 +20,7 @@ export interface ExpenseAutomationTransactionViewSelector extends SelectorView {
20
20
  classList: ClassBase[];
21
21
  completionStatus: CompletionStatusType;
22
22
  createTransferEntryStatus: FetchState;
23
- creditCardAccountsForTransferList: AccountBase[];
23
+ creditCardTransferAccountsList: AccountBase[];
24
24
  fetchStateByTransactionTabs: Record<TransactionsTab, FetchStateAndError>;
25
25
  isAccountingProjectsEnabled: boolean;
26
26
  markAsNotMiscategorizedStatus: FetchStateAndError;
@@ -115,7 +115,7 @@ function getExpenseAutomationTransactionView(state) {
115
115
  : [];
116
116
  const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
117
117
  const completionStatus = transactionCompletionStatus ?? 'incomplete';
118
- const { transferAccountsList, creditCardAccountsForTransferList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
118
+ const { transferAccountsList, creditCardTransferAccountsList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
119
119
  return {
120
120
  version: 0,
121
121
  fetchState: fetchStatus.fetchState,
@@ -144,7 +144,7 @@ function getExpenseAutomationTransactionView(state) {
144
144
  uploadReceiptStatusById,
145
145
  selectedTransactionId,
146
146
  selectedTransactionLineId,
147
- creditCardAccountsForTransferList,
147
+ creditCardTransferAccountsList,
148
148
  transferAccounts: transferAccountsList,
149
149
  selectedTransactionCategorizationCompletedSubTab,
150
150
  };
@@ -6,8 +6,8 @@ import { RootState } from '../../../reducer';
6
6
  import { ZeniAPI } from '../../../zeniAPI';
7
7
  import { fetchAccountList } from '../../accountList/accountListReducer';
8
8
  import { fetchClassList } from '../../classList/classListReducer';
9
- import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
10
9
  import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
10
+ import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
11
11
  import { fetchOwnerList } from '../../ownerList/ownerListReducer';
12
12
  import { fetchProjectList } from '../../projectList/projectListReducer';
13
13
  import { updateSortUiState } from '../../vendorList/vendorListReducer';
@@ -17,9 +17,9 @@ const vendorReducer_1 = require("../../../entity/vendor/vendorReducer");
17
17
  const responsePayload_1 = require("../../../responsePayload");
18
18
  const accountListReducer_1 = require("../../accountList/accountListReducer");
19
19
  const classListReducer_1 = require("../../classList/classListReducer");
20
- const createTransferEntryReducer_1 = require("../../createTransferEntry/createTransferEntryReducer");
21
20
  const transactionVendorLocalDataHelper_1 = require("../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper");
22
21
  const transactionVendorViewReducer_1 = require("../../commonVendorView/transactionVendorView/transactionVendorViewReducer");
22
+ const createTransferEntryReducer_1 = require("../../createTransferEntry/createTransferEntryReducer");
23
23
  const ownerListReducer_1 = require("../../ownerList/ownerListReducer");
24
24
  const projectListReducer_1 = require("../../projectList/projectListReducer");
25
25
  const transactionDetailReducer_1 = require("../transactionDetailReducer");
@@ -43,14 +43,14 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
43
43
  transactionActions.push((0, accountListReducer_1.fetchAccountList)('accountList'));
44
44
  }
45
45
  if (isCreateTransferEntryFromExpenseEnabled === true) {
46
- const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
47
- if (transfer_eligible.fetchState !== 'In-Progress' &&
48
- transfer_eligible.fetchState !== 'Completed') {
49
- transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
46
+ const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
47
+ if (transferEntryEligible.fetchState !== 'In-Progress' &&
48
+ transferEntryEligible.fetchState !== 'Completed') {
49
+ transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transferEntryEligible' }));
50
50
  }
51
- if (credit_card_only.fetchState !== 'In-Progress' &&
52
- credit_card_only.fetchState !== 'Completed') {
53
- transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
51
+ if (creditCardOnlyEligible.fetchState !== 'In-Progress' &&
52
+ creditCardOnlyEligible.fetchState !== 'Completed') {
53
+ transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'creditCardOnlyEligible' }));
54
54
  }
55
55
  }
56
56
  const classList = state$.value.classListState;
@@ -20,7 +20,7 @@ export interface TransactionDetailReport extends SelectorView {
20
20
  classList: ClassListSelectorView;
21
21
  createTransferEntryStatus: FetchState;
22
22
  /** Resolved credit-card pool for credit_card_payment transfer drawer. */
23
- creditCardAccountsForTransferList: AccountBase[];
23
+ creditCardTransferAccountsList: AccountBase[];
24
24
  deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
25
25
  isAccountingClassesEnabled: boolean;
26
26
  isAccountingProjectsEnabled: boolean;