@zeniai/client-epic-state 4.14.14 → 4.14.16

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 (86) hide show
  1. package/lib/commonStateTypes/reimbursementTypeCode.d.ts +2 -0
  2. package/lib/commonStateTypes/reimbursementTypeCode.js +5 -0
  3. package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +1 -0
  4. package/lib/entity/billPay/billTransaction/billTransactionPayload.js +3 -0
  5. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +6 -3
  6. package/lib/entity/billPay/billTransaction/billTransactionState.js +18 -1
  7. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  8. package/lib/entity/snackbar/snackbarTypes.js +4 -0
  9. package/lib/entity/tenant/epic/signInUserEpic.d.ts +1 -0
  10. package/lib/entity/tenant/epic/signInUserEpic.js +15 -9
  11. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  12. package/lib/entity/tenant/tenantReducer.js +5 -4
  13. package/lib/entity/tenant/tenantState.d.ts +2 -0
  14. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  15. package/lib/index.d.ts +14 -13
  16. package/lib/index.js +26 -15
  17. package/lib/view/bankAccountView/bankAccountViewReducer.d.ts +2 -2
  18. package/lib/view/billPayCard/fetchBillPayCardEpic.js +1 -0
  19. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  20. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  21. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  22. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  23. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +7 -4
  24. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +2 -1
  25. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
  26. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +2 -1
  27. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -1
  28. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -1
  29. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +3 -3
  30. package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscatgorizedEpic.js +76 -27
  31. package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +1 -2
  32. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +3 -2
  33. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +1 -3
  34. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -12
  35. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +13 -12
  36. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -2
  37. package/lib/view/expenseAutomationView/helpers/helpers.d.ts +3 -0
  38. package/lib/view/expenseAutomationView/helpers/helpers.js +4 -1
  39. package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +1 -2
  40. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -10
  41. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +6 -2
  42. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -3
  43. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +102 -65
  44. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -2
  45. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -11
  46. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +4 -1
  47. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  48. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  49. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  50. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  51. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  52. package/lib/view/recommendation/fetchEntityRecommendationsByTransactionIdEpic.js +1 -1
  53. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  54. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +9 -2
  55. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +35 -8
  56. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  57. package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +3 -2
  58. package/lib/view/spendManagement/billPay/billList/billListSelector.js +55 -18
  59. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  60. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  61. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +7 -2
  62. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.js +18 -6
  63. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +6 -0
  64. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +9 -4
  65. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +18 -4
  66. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +2 -1
  67. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +2 -0
  68. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +8 -4
  69. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +26 -5
  70. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -2
  71. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +36 -3
  72. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +6 -1
  73. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +6 -7
  74. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +16 -5
  75. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +27 -13
  76. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +7 -3
  77. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +48 -28
  78. package/lib/view/spendManagement/billPay/magicLinkView/magicLinkViewReducer.d.ts +2 -2
  79. package/lib/view/spendManagement/helpers.d.ts +2 -0
  80. package/lib/view/spendManagement/helpers.js +9 -1
  81. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.d.ts +6 -1
  82. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.js +12 -2
  83. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  84. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  85. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.d.ts +1 -1
  86. package/package.json +1 -1
@@ -10,48 +10,83 @@ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer")
10
10
  const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
11
11
  const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
12
12
  const monthEndCloseChecksViewReducer_1 = require("../../../monthEndCloseChecksView/monthEndCloseChecksViewReducer");
13
- const TRANSACTION_COUNT_VARIABLE_NAME = '_transactions_count_';
13
+ const helpers_1 = require("../../helpers/helpers");
14
14
  const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transactionsViewReducer_1.markTransactionAsNotMiscategorized.match), (0, operators_1.mergeMap)((action) => {
15
15
  const { expenseAutomationViewState, expenseAutomationTransactionsViewState, } = state$.value;
16
16
  const transactionsInReview = action.payload.transactionsInReview;
17
+ const transactionsSuccess = transactionsInReview.transactions_update_success;
18
+ const transactionsFailed = transactionsInReview.transactions_update_failed;
17
19
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state$.value);
18
20
  const selectedPeriod = expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
19
21
  const { selectedTab } = action.payload;
20
- const { uiState } = expenseAutomationTransactionsViewState[selectedTab];
21
- if (transactionsInReview.length > 0) {
22
+ const { uiState } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTab];
23
+ const transactionsIdsFailed = transactionsFailed.map((transaction) => transaction.transaction_id);
24
+ const actions = [];
25
+ if (transactionsFailed.length > 0 && transactionsSuccess.length === 0) {
26
+ actions.push((0, snackbarReducer_1.openSnackbar)({
27
+ messageSection: transactionsFailed.length > 1
28
+ ? 'transactions_reviewed'
29
+ : 'transaction_reviewed',
30
+ messageText: 'failed',
31
+ type: 'error',
32
+ variables: [
33
+ {
34
+ variableName: helpers_1.TRANSACTION_COUNT_VARIABLE_NAME,
35
+ variableValue: transactionsIdsFailed.length.toString(),
36
+ },
37
+ ],
38
+ }));
39
+ }
40
+ if (transactionsSuccess.length > 0) {
22
41
  return zeniAPI
23
- .putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/mark-as-reviewed`, { transactions_reviewed: transactionsInReview })
42
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/mark-as-reviewed`, { transactions_reviewed: transactionsSuccess })
24
43
  .pipe((0, operators_1.mergeMap)((response) => {
25
44
  if ((0, responsePayload_1.isSuccessStatus)(response)) {
26
- const transactionIds = transactionsInReview.map((transaction) => transaction.transaction_id);
45
+ const transactionIdsSuccess = transactionsSuccess.map((transaction) => transaction.transaction_id);
27
46
  const totalCountByPeriod = uiState.totalCount[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)];
28
- const updatedTotalCount = transactionIds.length === 0
47
+ const updatedTotalCount = transactionIdsSuccess.length === 0
29
48
  ? totalCountByPeriod
30
- : totalCountByPeriod - transactionIds.length;
31
- const actions = [];
32
- actions.push((0, transactionsViewReducer_1.updateStatusForTransactionNotMiscategorizedUpdate)(action.payload.selectedTab, transactionIds, selectedPeriod, 'Completed'), (0, transactionReducer_1.removeTransactionCategorization)({
33
- transactionIds: transactionIds,
49
+ : totalCountByPeriod - transactionIdsSuccess.length;
50
+ actions.push((0, transactionsViewReducer_1.updateStatusForTransactionNotMiscategorizedUpdate)(action.payload.selectedTab, transactionIdsSuccess, selectedPeriod, 'Completed'), (0, transactionReducer_1.removeTransactionCategorization)({
51
+ transactionIds: transactionIdsSuccess,
34
52
  }), (0, transactionsViewReducer_1.updateTotalCountForTransactionCategorization)({
35
53
  selectedPeriod,
36
54
  selectedTab,
37
55
  totalCount: updatedTotalCount,
38
- }), (0, snackbarReducer_1.openSnackbar)({
39
- messageSection: 'transactions_reviewed',
40
- messageText: 'success',
41
- type: 'success',
42
- variables: [
43
- {
44
- variableName: TRANSACTION_COUNT_VARIABLE_NAME,
45
- variableValue: transactionIds.length.toString(),
46
- },
47
- {
48
- variableName: '_transaction_',
49
- variableValue: transactionIds.length === 1
50
- ? 'Transaction'
51
- : 'Transactions',
52
- },
53
- ],
54
56
  }));
57
+ if (transactionIdsSuccess.length > 0 &&
58
+ transactionsIdsFailed.length > 0) {
59
+ actions.push((0, snackbarReducer_1.openSnackbar)({
60
+ messageSection: getTransactionReviewMessageSection(transactionIdsSuccess.length, transactionsIdsFailed.length),
61
+ messageText: 'notification',
62
+ type: 'info',
63
+ variables: [
64
+ {
65
+ variableName: helpers_1.TRANSACTION_COUNT_VARIABLE_NAME,
66
+ variableValue: transactionIdsSuccess.length.toString(),
67
+ },
68
+ {
69
+ variableName: helpers_1.TRANSACTION_FAILED_COUNT_VARIABLE_NAME,
70
+ variableValue: transactionsIdsFailed.length.toString(),
71
+ },
72
+ ],
73
+ }));
74
+ }
75
+ else {
76
+ actions.push((0, snackbarReducer_1.openSnackbar)({
77
+ messageSection: transactionIdsSuccess.length > 1
78
+ ? 'transactions_reviewed'
79
+ : 'transaction_reviewed',
80
+ messageText: 'success',
81
+ type: 'success',
82
+ variables: [
83
+ {
84
+ variableName: helpers_1.TRANSACTION_COUNT_VARIABLE_NAME,
85
+ variableValue: transactionIdsSuccess.length.toString(),
86
+ },
87
+ ],
88
+ }));
89
+ }
55
90
  if (currentTenant != null) {
56
91
  actions.push((0, monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks)({
57
92
  tenantId: currentTenant.tenantId,
@@ -67,7 +102,21 @@ const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI) => ac
67
102
  }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, transactionsViewReducer_1.updateStatusForTransactionNotMiscategorizedUpdate)(action.payload.selectedTab, [], selectedPeriod, 'Error', (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Transaction mark miscategorized as correct REST API call errored out ${JSON.stringify(error)}`)))));
68
103
  }
69
104
  else {
70
- return (0, rxjs_1.from)([]);
105
+ return (0, rxjs_1.from)(actions);
71
106
  }
72
107
  }));
73
108
  exports.markTransactionAsNotMiscategorizedEpic = markTransactionAsNotMiscategorizedEpic;
109
+ const getTransactionReviewMessageSection = (successCount, failedCount) => {
110
+ if (successCount > 1 && failedCount > 1) {
111
+ return 'transactions_reviewed';
112
+ }
113
+ else if (successCount > 1 && failedCount === 1) {
114
+ return 'transactions_reviewed_failed';
115
+ }
116
+ else if (successCount === 1 && failedCount > 1) {
117
+ return 'transaction_reviewed_failed';
118
+ }
119
+ else {
120
+ return 'transaction_reviewed';
121
+ }
122
+ };
@@ -18,8 +18,7 @@ const saveTransactionCategorizationEpic = (actions$, state$) => actions$.pipe((0
18
18
  const transactionSaveUpdates = [];
19
19
  const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
20
20
  transactions.forEach((transaction) => {
21
- const detail = (0, get_1.default)(expenseAutomationTransactionsViewState[selectedTab]
22
- .transactionReviewLocalDataById, transaction.id, undefined);
21
+ const detail = (0, get_1.default)(expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTab].transactionReviewLocalDataById, transaction.id, undefined);
23
22
  const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(state$.value.accountState, state$.value.accountListState, 'accountList');
24
23
  const localData = detail === null || detail === void 0 ? void 0 : detail.transactionReviewLocalData;
25
24
  if (localData != null) {
@@ -28,7 +28,7 @@ const updateTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actio
28
28
  .putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions/categorize`, { transactions: payloadArray })
29
29
  .pipe((0, operators_1.mergeMap)((response) => {
30
30
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
31
- const transactionsInReview = response.data.transactions_update_success;
31
+ const transactionsInReview = response.data;
32
32
  const actions = [];
33
33
  actions.push((0, transactionsViewReducer_1.markTransactionAsNotMiscategorized)(selectedTab, transactionsInReview), (0, transactionsViewReducer_1.updateTransactionCategorizationSaveStatus)(selectedTab, 'Completed', (0, responsePayload_1.createZeniAPIStatus)('Completed', 'Transaction categorization updated successfully')));
34
34
  return (0, rxjs_1.from)(actions);
@@ -42,7 +42,8 @@ exports.updateTransactionCategorizationEpic = updateTransactionCategorizationEpi
42
42
  function prepareTransactionPayload(selectedTab, transactionState, vendorState, transactionsViewState, transactionId, saveUpdates) {
43
43
  var _a;
44
44
  const detail = (0, transactionSelector_1.getSupportedTransactionById)(transactionState, transactionId);
45
- const tranDetail = (0, get_1.default)(transactionsViewState[selectedTab].transactionReviewLocalDataById, transactionId, undefined);
45
+ const tranDetail = (0, get_1.default)(transactionsViewState.transactionCategorizationView[selectedTab]
46
+ .transactionReviewLocalDataById, transactionId, undefined);
46
47
  const tranVendorUpdates = (_a = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionReviewLocalData) === null || _a === void 0 ? void 0 : _a.vendorUpdates;
47
48
  let vendorUpdates = undefined;
48
49
  if ((tranVendorUpdates === null || tranVendorUpdates === void 0 ? void 0 : tranVendorUpdates.qboId) != null) {
@@ -12,8 +12,6 @@ export declare const fetchAllExpenseAutomationTabs: import("@reduxjs/toolkit").A
12
12
  newSelectedView: "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights";
13
13
  }, string, never, never>, clearExpenseAutomationView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, initializeSelectedPeriodForTenants: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
14
14
  selectedPeriodByTenantId: Record<ID, MonthYearPeriod>;
15
- }, string>, refreshExpenseAutomationCurrentTab: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
16
- newSelectedTab: "review" | "autoCategorized";
17
- }, string, never, never>;
15
+ }, string>, refreshExpenseAutomationCurrentTab: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
18
16
  declare const _default: import("@reduxjs/toolkit").Reducer<ExpenseAutomationViewState, import("@reduxjs/toolkit").AnyAction>;
19
17
  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.updateCurrentSelectedTransactionCategorizationTab = exports.refreshExpenseAutomationCurrentTab = exports.initializeSelectedPeriodForTenants = exports.clearExpenseAutomationView = exports.updateCurrentSelectedView = exports.updateCurrentSelectedPeriod = exports.fetchAllExpenseAutomationTabs = exports.initialState = void 0;
4
+ exports.refreshExpenseAutomationCurrentTab = exports.initializeSelectedPeriodForTenants = exports.clearExpenseAutomationView = exports.updateCurrentSelectedView = exports.updateCurrentSelectedPeriod = exports.fetchAllExpenseAutomationTabs = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  exports.initialState = {
7
7
  saveStatus: { fetchState: 'Not-Started', error: undefined },
@@ -13,7 +13,6 @@ exports.initialState = {
13
13
  hasValidState() {
14
14
  return this.fetchState == 'Completed';
15
15
  },
16
- selectedTransactionCategorizationTab: 'review',
17
16
  };
18
17
  const expenseAutomationView = (0, toolkit_1.createSlice)({
19
18
  name: 'expenseAutomationView',
@@ -63,19 +62,10 @@ const expenseAutomationView = (0, toolkit_1.createSlice)({
63
62
  return { payload: { newSelectedPeriod, tenantId } };
64
63
  },
65
64
  },
66
- updateCurrentSelectedTransactionCategorizationTab: {
67
- reducer(draft, action) {
68
- draft.selectedTransactionCategorizationTab =
69
- action.payload.newSelectedTab;
70
- },
71
- prepare(newSelectedTab) {
72
- return { payload: { newSelectedTab } };
73
- },
74
- },
75
65
  clearExpenseAutomationView(draft) {
76
66
  Object.assign(draft, exports.initialState);
77
67
  },
78
68
  },
79
69
  });
80
- _a = expenseAutomationView.actions, exports.fetchAllExpenseAutomationTabs = _a.fetchAllExpenseAutomationTabs, exports.updateCurrentSelectedPeriod = _a.updateCurrentSelectedPeriod, exports.updateCurrentSelectedView = _a.updateCurrentSelectedView, exports.clearExpenseAutomationView = _a.clearExpenseAutomationView, exports.initializeSelectedPeriodForTenants = _a.initializeSelectedPeriodForTenants, exports.refreshExpenseAutomationCurrentTab = _a.refreshExpenseAutomationCurrentTab, exports.updateCurrentSelectedTransactionCategorizationTab = _a.updateCurrentSelectedTransactionCategorizationTab;
70
+ _a = expenseAutomationView.actions, exports.fetchAllExpenseAutomationTabs = _a.fetchAllExpenseAutomationTabs, exports.updateCurrentSelectedPeriod = _a.updateCurrentSelectedPeriod, exports.updateCurrentSelectedView = _a.updateCurrentSelectedView, exports.clearExpenseAutomationView = _a.clearExpenseAutomationView, exports.initializeSelectedPeriodForTenants = _a.initializeSelectedPeriodForTenants, exports.refreshExpenseAutomationCurrentTab = _a.refreshExpenseAutomationCurrentTab;
81
71
  exports.default = expenseAutomationView.reducer;
@@ -24,10 +24,11 @@ const isPreviousStepDisabled = (selectedTransactionCategorizationTab, allSteps,
24
24
  };
25
25
  function getExpenseAutomationView(state) {
26
26
  var _a, _b, _c;
27
- const { expenseAutomationViewState, tenantState, expenseAutomationMissingReceiptsViewState, expenseAutomationJESchedulesViewState, monthEndCloseChecksState, companyState, } = state;
27
+ const { expenseAutomationViewState, tenantState, expenseAutomationMissingReceiptsViewState, expenseAutomationJESchedulesViewState, expenseAutomationTransactionsViewState, monthEndCloseChecksState, companyState, } = state;
28
28
  const { loggedInUser, currentTenantId } = tenantState;
29
29
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
30
- const { currentSelectedView, selectedPeriodByTenantId, selectedTransactionCategorizationTab, } = expenseAutomationViewState;
30
+ const { currentSelectedView, selectedPeriodByTenantId } = expenseAutomationViewState;
31
+ const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
31
32
  const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
32
33
  let currentSelectedViewFetchState = {
33
34
  fetchState: 'Not-Started',
@@ -41,7 +42,7 @@ function getExpenseAutomationView(state) {
41
42
  const missingReceipts = (0, missingReceiptsSelector_1.getExpenseAutomationMissingReceiptsView)(state);
42
43
  const fluxAnalysis = (0, fluxAnalysisViewSelector_1.getExpenseAutomationFluxAnalysisView)(state);
43
44
  const monthEndInsights = (0, companyMonthEndReportViewSelector_1.getCompanyMonthEndReportSelectorView)(state, currentTenant.companyId, loggedInUser);
44
- const expenseAutomationTransactionsViewState = (0, transactionCategorizationSelector_1.getExpenseAutomationTransactionView)(state, selectedTransactionCategorizationTab);
45
+ const expenseAutomationTransactionsView = (0, transactionCategorizationSelector_1.getExpenseAutomationTransactionView)(state);
45
46
  const jeSchedules = (0, jeSchedulesViewSelector_1.getExpenseAutomationJESchedulesView)(state);
46
47
  switch (currentSelectedView) {
47
48
  case 'flux_analysis':
@@ -67,11 +68,11 @@ function getExpenseAutomationView(state) {
67
68
  break;
68
69
  case 'transaction_categorization':
69
70
  currentSelectedViewFetchState = {
70
- fetchState: expenseAutomationTransactionsViewState.fetchState,
71
- error: expenseAutomationTransactionsViewState.error,
71
+ fetchState: expenseAutomationTransactionsView.fetchState,
72
+ error: expenseAutomationTransactionsView.error,
72
73
  };
73
74
  currentSelectedViewBackgroundRefreshFetchState =
74
- expenseAutomationTransactionsViewState.refreshStatus;
75
+ expenseAutomationTransactionsView.refreshStatus;
75
76
  break;
76
77
  case 'month_end_insights':
77
78
  currentSelectedViewFetchState = {
@@ -88,7 +89,7 @@ function getExpenseAutomationView(state) {
88
89
  expenseAutomationMissingReceiptsViewState,
89
90
  expenseAutomationJESchedulesViewState,
90
91
  monthEndCloseChecksView,
91
- expenseAutomationTransactionsViewState,
92
+ expenseAutomationTransactionsView,
92
93
  ];
93
94
  let allSteps = [];
94
95
  let auditSummary = undefined;
@@ -108,7 +109,7 @@ function getExpenseAutomationView(state) {
108
109
  allSteps.forEach((stepDetail, index, allStepsOriginal) => {
109
110
  switch (stepDetail.step) {
110
111
  case 'transaction_categorization':
111
- allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: expenseAutomationTransactionsViewState.completionStatus });
112
+ allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: expenseAutomationTransactionsView.completionStatus });
112
113
  return;
113
114
  case 'je_schedules':
114
115
  allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: jeSchedules.completionStatus });
@@ -135,15 +136,15 @@ function getExpenseAutomationView(state) {
135
136
  }
136
137
  const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)(fetchStateVariables); // Add more states
137
138
  const reducedSaveStatus = (0, reduceFetchState_1.reduceAllFetchState)([
138
- expenseAutomationTransactionsViewState.saveStatus,
139
- expenseAutomationTransactionsViewState.markAsNotMiscategorizedStatus,
139
+ expenseAutomationTransactionsView.saveStatus,
140
+ expenseAutomationTransactionsView.markAsNotMiscategorizedStatus,
140
141
  ]);
141
142
  const reducedUpdateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
142
- expenseAutomationTransactionsViewState.saveStatus, // TODO - Anjali add more states
143
+ expenseAutomationTransactionsView.saveStatus, // TODO - Anjali add more states
143
144
  ]);
144
145
  return {
145
146
  jeSchedules,
146
- transactionView: expenseAutomationTransactionsViewState,
147
+ transactionView: expenseAutomationTransactionsView,
147
148
  missingReceipts,
148
149
  currentSelectedViewFetchState,
149
150
  currentSelectedViewBackgroundRefreshFetchState,
@@ -1,6 +1,5 @@
1
1
  import { FetchedState, FetchStateAndError, ID } from '../../commonStateTypes/common';
2
2
  import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
3
- import { TransactionsTab } from './types/transactionsViewState';
4
3
  export declare const EXPENSE_AUTOMATION_VIEW_TYPES: readonly ["transaction_categorization", "je_schedules", "account_recon", "missing_receipts", "flux_analysis", "month_end_insights"];
5
4
  export declare const toExpenseAutomationViewType: (v: string) => "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights";
6
5
  export declare type ExpenseAutomationViewType = ReturnType<typeof toExpenseAutomationViewType>;
@@ -9,5 +8,4 @@ export interface ExpenseAutomationViewState extends FetchedState {
9
8
  updateStatus: FetchStateAndError;
10
9
  currentSelectedView: ExpenseAutomationViewType;
11
10
  selectedPeriodByTenantId: Record<ID, MonthYearPeriod>;
12
- selectedTransactionCategorizationTab: TransactionsTab;
13
11
  }
@@ -1,6 +1,9 @@
1
1
  import { FluxAnalysisActionQueryType, FluxAnalysisQuerySortKey, MonthBalancePayload } from '../payload/fluxAnalysisPayload';
2
2
  import { FluxAnalysisActionType, FluxAnalysisReviewStatus, FluxAnalysisSortKey, FluxBalancesByMonth } from '../types/fluxAnalysisViewState';
3
3
  import { CurrencyPayload } from '../../../commonPayloadTypes/v2/viewAndReportPayloadv2';
4
+ export declare const TRANSACTION_VARIABLE_NAME = "_transaction_";
5
+ export declare const TRANSACTION_COUNT_VARIABLE_NAME = "_transactions_count_";
6
+ export declare const TRANSACTION_FAILED_COUNT_VARIABLE_NAME = "_transactions_failed_count_";
4
7
  export declare const toBalancesByMonthFromPayload: (month1: MonthBalancePayload, month2: MonthBalancePayload, currency: CurrencyPayload) => FluxBalancesByMonth;
5
8
  export declare const toVendorFluxAnalysisSortKeyPayload: (sortKey: FluxAnalysisSortKey) => FluxAnalysisQuerySortKey;
6
9
  export declare const toVendorFluxAnalysisReviewActionPayload: (actionType: FluxAnalysisActionType) => FluxAnalysisActionQueryType;
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toVendorFluxAnalysisStatusFromPayload = exports.toVendorFluxAnalysisReviewActionPayload = exports.toVendorFluxAnalysisSortKeyPayload = exports.toBalancesByMonthFromPayload = void 0;
3
+ exports.toVendorFluxAnalysisStatusFromPayload = exports.toVendorFluxAnalysisReviewActionPayload = exports.toVendorFluxAnalysisSortKeyPayload = exports.toBalancesByMonthFromPayload = exports.TRANSACTION_FAILED_COUNT_VARIABLE_NAME = exports.TRANSACTION_COUNT_VARIABLE_NAME = exports.TRANSACTION_VARIABLE_NAME = void 0;
4
4
  const zeniDayJS_1 = require("../../../zeniDayJS");
5
+ exports.TRANSACTION_VARIABLE_NAME = '_transaction_';
6
+ exports.TRANSACTION_COUNT_VARIABLE_NAME = '_transactions_count_';
7
+ exports.TRANSACTION_FAILED_COUNT_VARIABLE_NAME = '_transactions_failed_count_';
5
8
  const toBalancesByMonthFromPayload = (month1, month2, currency) => {
6
9
  var _a, _b, _c, _d;
7
10
  return {
@@ -36,7 +36,7 @@ export interface UpdateTransactionCategorization {
36
36
  transaction_id: string;
37
37
  line_ids: string[];
38
38
  }
39
- interface UpdateTransactionCategorizationResponsePayload {
39
+ export interface UpdateTransactionCategorizationResponsePayload {
40
40
  transactions_update_failed: UpdateTransactionCategorization[];
41
41
  transactions_update_success: UpdateTransactionCategorization[];
42
42
  }
@@ -45,4 +45,3 @@ export interface MarkAsReviewTransactionCategorizationPayload {
45
45
  transactions_reviewed: UpdateTransactionCategorization[];
46
46
  }
47
47
  export declare type MarkAsReviewTransactionCategorizationPayloadResponse = ZeniAPIResponse<MarkAsReviewTransactionCategorizationPayload>;
48
- export {};
@@ -5,36 +5,38 @@ import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedule
5
5
  import { ZeniAPIStatus } from '../../../responsePayload';
6
6
  import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
7
7
  export declare const initialState: JESchedulesViewState;
8
- export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
8
+ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
9
9
  period: TimePeriod;
10
10
  refreshViewInBackground: any;
11
11
  }, string, never, never>, fetchJeSchedulesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
12
  selectedPeriod: MonthYearPeriod;
13
13
  status: ZeniAPIStatus;
14
- }, string>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
14
+ }, string>, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
15
+ period: TimePeriod;
16
+ refreshViewInBackground: any;
17
+ }, string, never, never>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
18
  jeSchedules: JEScheduledTransactionPayload[];
16
19
  failedJeSchedules: JEScheduledTransactionPayload[];
17
20
  selectedPeriod: MonthYearPeriod;
18
21
  refreshViewInBackground: boolean;
19
- }, string>, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
20
- period: TimePeriod;
21
- refreshViewInBackground: any;
22
- }, string, never, never>, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
22
+ }, string>, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
23
23
  jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
24
24
  scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
25
25
  }, string, never, never>, ignoreRecommendedJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
26
26
  jeScheduleTransactionKey: JEScheduleTransactionKey;
27
27
  status: ZeniAPIStatus;
28
- }, string>, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
28
+ }, string>, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
29
29
  jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
30
30
  }, string, never, never>, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
31
31
  jeScheduleTransactionKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
32
- }, string, never, never>, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
33
- jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
34
- selectedPeriod: MonthYearPeriod;
35
32
  }, string, never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
36
33
  failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
37
34
  selectedPeriod: MonthYearPeriod;
35
+ }, string, never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
36
+ scheduledJournalEntryID: ID;
37
+ }, string>, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
38
+ jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
39
+ selectedPeriod: MonthYearPeriod;
38
40
  }, string, never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
39
41
  scheduledJournalEntryID: ID;
40
42
  jeScheduleTransactionKey: JEScheduleTransactionKey;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeFailedJeScheduleTransactionKey = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.ignoreRecommendedJeScheduleSuccess = exports.clearJeScheduleLocalData = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.clearExpenseAutomationJESchedulesView = exports.initialState = void 0;
4
+ exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.clearJeScheduleLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
7
7
  const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
@@ -252,10 +252,14 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
252
252
  const prevLocalDataById = draft.jeScheduleLocalDataById[scheduledJournalEntryID];
253
253
  draft.jeScheduleLocalDataById = Object.assign(Object.assign({}, prevData), { [scheduledJournalEntryID]: Object.assign(Object.assign({}, prevLocalDataById), localData) });
254
254
  },
255
+ removeJeScheduleLocalDataById(draft, action) {
256
+ const { scheduledJournalEntryID } = action.payload;
257
+ delete draft.jeScheduleLocalDataById[scheduledJournalEntryID];
258
+ },
255
259
  clearExpenseAutomationJESchedulesView(draft) {
256
260
  Object.assign(draft, exports.initialState);
257
261
  },
258
262
  },
259
263
  });
260
- _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys;
264
+ _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys;
261
265
  exports.default = expenseAutomationJESchedulesView.reducer;
@@ -9,7 +9,7 @@ import { ClassBase } from '../../../entity/class/classState';
9
9
  import { Entity } from '../../../entity/genericEntity/entity';
10
10
  import { SupportedTransaction } from '../../../entity/transaction/transactionState';
11
11
  import { VendorBase } from '../../../entity/vendor/vendorState';
12
- import { UpdateTransactionCategorization } from '../payload/transactionCategorizationPayload';
12
+ import { UpdateTransactionCategorizationResponsePayload } from '../payload/transactionCategorizationPayload';
13
13
  import { RecommendationByLineId, TransactionID } from '../../../entity/transaction/stateTypes/transaction';
14
14
  export declare const initialTransactionTabViewState: TransactionsTabViewState;
15
15
  export declare const initialState: TransactionsViewState;
@@ -53,13 +53,15 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
53
53
  selectedTab: "review" | "autoCategorized";
54
54
  transactionIds: string[];
55
55
  transactionSaveUpdates: TransactionSaveUpdates[];
56
+ }, string, never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
57
+ newSelectedTab: "review" | "autoCategorized";
56
58
  }, string, never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
57
59
  selectedTab: "review" | "autoCategorized";
58
60
  fetchState: FetchState;
59
61
  error: ZeniAPIStatus<Record<string, unknown>> | undefined;
60
- }, string, never, never>, markTransactionAsNotMiscategorized: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionsInReview: UpdateTransactionCategorization[]], {
62
+ }, string, never, never>, markTransactionAsNotMiscategorized: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionsInReview: UpdateTransactionCategorizationResponsePayload], {
61
63
  selectedTab: "review" | "autoCategorized";
62
- transactionsInReview: UpdateTransactionCategorization[];
64
+ transactionsInReview: UpdateTransactionCategorizationResponsePayload;
63
65
  }, string, never, never>, updateStatusForTransactionNotMiscategorizedUpdate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], selectedPeriod: MonthYearPeriod, fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
64
66
  selectedPeriod: MonthYearPeriod;
65
67
  transactionIds: string[];