@zeniai/client-epic-state 5.2.7-betaRD1 → 5.2.8

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 (151) hide show
  1. package/lib/entity/invoicing/invoicingCommonPayload.d.ts +22 -0
  2. package/lib/entity/invoicing/invoicingCommonPayload.js +51 -10
  3. package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +0 -1
  4. package/lib/entity/jeSchedules/jeScheduleHelper.js +0 -7
  5. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -66
  6. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -135
  7. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -4
  8. package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -30
  9. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -11
  10. package/lib/entity/jeSchedules/jeSchedulesSelector.js +3 -38
  11. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -79
  12. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -24
  13. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -88
  14. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  15. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  16. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
  17. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  18. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
  19. package/lib/epic.d.ts +1 -9
  20. package/lib/epic.js +0 -16
  21. package/lib/esm/entity/invoicing/invoicingCommonPayload.js +51 -10
  22. package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +0 -6
  23. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -135
  24. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +2 -30
  25. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -36
  26. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -78
  27. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
  28. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  29. package/lib/esm/epic.js +0 -16
  30. package/lib/esm/index.js +8 -14
  31. package/lib/esm/view/accountList/accountListReducer.js +0 -1
  32. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
  33. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +5 -41
  34. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
  35. package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -55
  36. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -306
  37. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +22 -294
  38. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -5
  39. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +2 -1
  40. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +2 -0
  41. package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingAccountingPickersEpic.js +10 -5
  42. package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +27 -3
  43. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +7 -3
  44. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  45. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
  46. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
  47. package/lib/index.d.ts +12 -17
  48. package/lib/index.js +47 -91
  49. package/lib/view/accountList/accountListReducer.js +0 -1
  50. package/lib/view/accountList/accountListState.d.ts +1 -1
  51. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
  52. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -3
  53. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -39
  54. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
  55. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  56. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +3 -72
  57. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +1 -58
  58. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -91
  59. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -308
  60. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
  61. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
  62. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +7 -36
  63. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -34
  64. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +21 -302
  65. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
  66. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -82
  67. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
  68. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  69. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +5 -0
  70. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +1 -0
  71. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +1 -0
  72. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +2 -0
  73. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingAccountingPickersEpic.js +10 -5
  74. package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +9 -1
  75. package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +30 -4
  76. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +11 -4
  77. package/lib/view/invoicing/settingsView/settingsViewSelector.js +7 -3
  78. package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  79. package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
  80. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +2 -4
  81. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
  82. package/package.json +1 -1
  83. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.d.ts +0 -0
  84. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
  85. package/lib/entity/invoicing/coupon/couponConstants.d.ts +0 -11
  86. package/lib/entity/invoicing/coupon/couponConstants.js +0 -29
  87. package/lib/esm/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
  88. package/lib/esm/entity/invoicing/coupon/couponConstants.js +0 -26
  89. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -45
  90. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -81
  91. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
  92. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -110
  93. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -79
  94. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -139
  95. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -106
  96. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -22
  97. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
  98. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -1
  99. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -106
  100. package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +0 -25
  101. package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +0 -15
  102. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -18
  103. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -18
  104. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -18
  105. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -16
  106. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -1
  107. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -60
  108. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -12
  109. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -1
  110. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +0 -20
  111. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -49
  112. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +0 -8
  113. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -85
  114. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
  115. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -29
  116. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -45
  117. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -114
  118. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
  119. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -83
  120. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +0 -12
  121. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -146
  122. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +0 -64
  123. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -110
  124. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
  125. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -26
  126. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
  127. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
  128. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -42
  129. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -2
  130. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -21
  131. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -112
  132. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.d.ts +0 -6
  133. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +0 -29
  134. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.d.ts +0 -6
  135. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +0 -19
  136. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +0 -8
  137. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -22
  138. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +0 -8
  139. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -22
  140. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts +0 -8
  141. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -22
  142. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +0 -13
  143. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -20
  144. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +0 -11
  145. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -2
  146. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +0 -7
  147. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -64
  148. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +0 -12
  149. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -15
  150. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +0 -9
  151. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -2
@@ -1,22 +1,14 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.saveNewScheduleSuccess = exports.saveNewScheduleFailure = exports.saveNewSchedule = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.resetNewScheduleLocalData = exports.removeJeScheduleTransactionKey = exports.removeJeAccruedScheduleKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeNewSchedule = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchOneTimeAccrualSuccess = exports.fetchOneTimeAccrualFailure = exports.fetchOneTimeAccrual = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.revertOneTimeAccrual = exports.revertJeScheduleSuccess = exports.revertJeScheduleFailure = exports.revertJeSchedule = exports.promoteOneTimeAccrual = exports.oneTimeAccrualActionSuccess = exports.oneTimeAccrualActionFailure = exports.ignoreOneTimeAccrual = exports.createOneTimeAccrualSuccess = exports.createOneTimeAccrualFailure = exports.createOneTimeAccrual = exports.clearSearchTransactionsForNewSchedule = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.searchTransactionsInitialState = exports.newScheduleInitialState = exports.getBaseNewScheduleLocalData = exports.accountSettingsInitialState = void 0;
5
- exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateNewScheduleLocalData = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateJEScheduleTypeFilter = exports.updateJESchedulesUIState = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.toggleJEPendingGroupCollapsed = exports.toggleJECreatedGroupCollapsed = exports.searchTransactionsForNewScheduleSuccess = exports.searchTransactionsForNewScheduleFailure = exports.searchTransactionsForNewSchedule = void 0;
4
+ exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateJESchedulesUIState = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.accountSettingsInitialState = void 0;
6
5
  const toolkit_1 = require("@reduxjs/toolkit");
7
6
  const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
8
7
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
9
8
  const accountPayload_1 = require("../../../entity/account/accountPayload");
10
- const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
11
9
  const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
12
10
  const rootActions_1 = require("../../../rootActions");
13
11
  const accountTypeRecommendationPayload_1 = require("../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload");
14
- const jeSchedulesViewState_1 = require("../types/jeSchedulesViewState");
15
- function removeKeyFromEveryTabSlot(keysByPeriodAndTab, keyToRemove) {
16
- for (const periodTabKey of Object.keys(keysByPeriodAndTab)) {
17
- keysByPeriodAndTab[periodTabKey] = keysByPeriodAndTab[periodTabKey].filter((jeScheduleKey) => jeScheduleKey !== keyToRemove);
18
- }
19
- }
20
12
  exports.accountSettingsInitialState = {
21
13
  localData: {
22
14
  selectedPrepaidExpensesAccountIds: [],
@@ -48,38 +40,16 @@ exports.accountSettingsInitialState = {
48
40
  accruedExpensesNestedAccountListHierarchy: [],
49
41
  accruedExpensesRecommendations: [],
50
42
  };
51
- const getBaseNewScheduleLocalData = (scheduleType) => ({
52
- scheduleType,
53
- jeScheduleDetails: [],
54
- });
55
- exports.getBaseNewScheduleLocalData = getBaseNewScheduleLocalData;
56
- exports.newScheduleInitialState = {
57
- fixed_assets: (0, exports.getBaseNewScheduleLocalData)('fixed_assets'),
58
- prepaid_expenses: (0, exports.getBaseNewScheduleLocalData)('prepaid_expenses'),
59
- };
60
- exports.searchTransactionsInitialState = {
61
- searchResults: [],
62
- fetchState: 'Not-Started',
63
- error: undefined,
64
- };
65
43
  exports.initialState = {
66
- jeScheduleTransactionKeysByPeriodAndTab: {},
67
- jeScheduleAccruedKeysByPeriodAndTab: {},
68
- jeScheduleOneTimeAccrualKeysByPeriodAndTab: {},
69
- failedJeScheduleTransactionKeysByPeriodAndTab: {},
44
+ jeScheduleTransactionKeysByPeriod: {},
45
+ failedJeScheduleTransactionKeysByPeriod: {},
70
46
  postStatusById: {},
71
47
  ignoreStatusById: {},
72
- revertStatusById: {},
73
48
  jeScheduleLocalDataById: {},
74
- oneTimeAccrualActionStatusById: {},
75
- oneTimeAccrualFetchStatusById: {},
76
49
  uiState: {
77
- createdGroupCollapsed: false,
78
- pendingGroupCollapsed: false,
79
- scrollPosition: { scrollTop: 0, scrollLeft: undefined },
80
50
  searchString: '',
81
- selectedJETypeFilter: null,
82
- selectedPageTab: 'schedules',
51
+ scrollPosition: { scrollTop: 0, scrollLeft: undefined },
52
+ selectedMainTab: 'pending_review',
83
53
  sortKey: 'transactionDate',
84
54
  sortOrder: 'descending',
85
55
  totalCount: 0,
@@ -90,14 +60,6 @@ exports.initialState = {
90
60
  error: undefined,
91
61
  },
92
62
  accountSettings: exports.accountSettingsInitialState,
93
- newSchedule: {
94
- createOneTimeAccrualStatus: { fetchState: 'Not-Started', error: undefined },
95
- newScheduleState: exports.newScheduleInitialState,
96
- saveStatus: { fetchState: 'Not-Started', error: undefined },
97
- searchTransactions: exports.searchTransactionsInitialState,
98
- fetchState: 'Not-Started',
99
- error: undefined,
100
- },
101
63
  fetchState: 'Not-Started',
102
64
  error: undefined,
103
65
  hasValidState() {
@@ -142,12 +104,9 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
142
104
  },
143
105
  },
144
106
  fetchJeSchedulesSuccess(draft, action) {
145
- const { jeSchedules, selectedPeriod, selectedPageTab, failedJeSchedules, accruedJeSchedules, oneTimeAccruals, refreshViewInBackground, } = action.payload;
146
- const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
107
+ const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
147
108
  const jeScheduleTransactionKeys = jeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
148
109
  const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
149
- const jeScheduleAccruedKeys = accruedJeSchedules.map((schedule) => (0, jeSchedulesPayload_1.getJEScheduleKey)(schedule));
150
- const jeScheduleOneTimeAccrualKeys = oneTimeAccruals.map((accrual) => (0, jeScheduleHelper_1.generateJEOneTimeAccrualKey)(accrual._id));
151
110
  if (refreshViewInBackground === true &&
152
111
  draft.refreshStatus.fetchState === 'In-Progress') {
153
112
  draft.refreshStatus = { fetchState: 'Completed', error: undefined };
@@ -156,28 +115,19 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
156
115
  draft.fetchState = 'Completed';
157
116
  draft.error = undefined;
158
117
  }
159
- draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
160
- jeScheduleTransactionKeys;
161
- draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] =
162
- jeScheduleAccruedKeys;
163
- draft.jeScheduleOneTimeAccrualKeysByPeriodAndTab[periodTabKey] =
164
- jeScheduleOneTimeAccrualKeys;
165
- draft.failedJeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
166
- failedJeScheduleTransactionKeys;
118
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleTransactionKeys;
119
+ draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = failedJeScheduleTransactionKeys;
167
120
  },
168
121
  fetchJeSchedulesFailure(draft, action) {
169
- const { status, selectedPeriod, selectedPageTab } = action.payload;
170
- const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
122
+ const { status, selectedPeriod } = action.payload;
171
123
  if (draft.refreshStatus.fetchState === 'In-Progress') {
172
124
  draft.refreshStatus = { fetchState: 'Error', error: status };
173
125
  }
174
126
  else {
175
127
  draft.fetchState = 'Error';
176
128
  draft.error = status;
177
- draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] = [];
178
- draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] = [];
179
- draft.jeScheduleOneTimeAccrualKeysByPeriodAndTab[periodTabKey] = [];
180
129
  }
130
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
181
131
  },
182
132
  retryJeSchedule(draft, action) {
183
133
  const { scheduledJournalEntryID } = action.payload;
@@ -213,13 +163,11 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
213
163
  };
214
164
  },
215
165
  ignoreRecommendedJeSchedule: {
216
- prepare(jeScheduleTransactionKey, scheduleType, reason, note) {
166
+ prepare(jeScheduleTransactionKey, scheduleType) {
217
167
  return {
218
168
  payload: {
219
169
  jeScheduleTransactionKey,
220
170
  scheduleType,
221
- reason,
222
- note,
223
171
  },
224
172
  };
225
173
  },
@@ -235,41 +183,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
235
183
  };
236
184
  },
237
185
  },
238
- revertJeSchedule: {
239
- // jeScheduleTransactionKey is a JEScheduleKey for an accrued schedule, which has no base
240
- // transaction to derive a transaction key from. It is only ever used as an opaque row
241
- // identifier here -- for the row's spinner and for dropping the row from the list -- so one
242
- // action serves both shapes rather than two near-identical ones.
243
- prepare(jeScheduleId, jeScheduleTransactionKey, scheduleType, reason, note) {
244
- return {
245
- payload: {
246
- jeScheduleId,
247
- jeScheduleTransactionKey,
248
- scheduleType,
249
- reason,
250
- note,
251
- },
252
- };
253
- },
254
- reducer(draft, action) {
255
- draft.revertStatusById[action.payload.jeScheduleTransactionKey] = {
256
- fetchState: 'In-Progress',
257
- error: undefined,
258
- };
259
- },
260
- },
261
- revertJeScheduleSuccess(draft, action) {
262
- draft.revertStatusById[action.payload.jeScheduleTransactionKey] = {
263
- fetchState: 'Completed',
264
- error: undefined,
265
- };
266
- },
267
- revertJeScheduleFailure(draft, action) {
268
- draft.revertStatusById[action.payload.jeScheduleTransactionKey] = {
269
- fetchState: 'Error',
270
- error: action.payload.status,
271
- };
272
- },
273
186
  ignoreRecommendedJeScheduleSuccess: {
274
187
  reducer(draft, action) {
275
188
  const { jeScheduleTransactionKey } = action.payload;
@@ -302,18 +215,17 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
302
215
  };
303
216
  },
304
217
  updateJeScheduleTransactionKeys: {
305
- prepare(jeScheduleKeys, selectedPeriod, selectedPageTab) {
218
+ prepare(jeScheduleKeys, selectedPeriod) {
306
219
  return {
307
220
  payload: {
308
221
  jeScheduleKeys: jeScheduleKeys,
309
222
  selectedPeriod: selectedPeriod,
310
- selectedPageTab: selectedPageTab,
311
223
  },
312
224
  };
313
225
  },
314
226
  reducer(draft, action) {
315
- const { selectedPeriod, selectedPageTab, jeScheduleKeys } = action.payload;
316
- draft.jeScheduleTransactionKeysByPeriodAndTab[(0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod))] = jeScheduleKeys;
227
+ const { selectedPeriod, jeScheduleKeys } = action.payload;
228
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleKeys;
317
229
  },
318
230
  },
319
231
  removeJeScheduleTransactionKey: {
@@ -326,20 +238,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
326
238
  };
327
239
  },
328
240
  reducer(draft, action) {
329
- const { jeScheduleKey } = action.payload;
330
- // Dropped from every tab's slot, not just the visible one: once a schedule is ignored or
331
- // resolved it must not reappear when the user switches tabs and hits a cached list.
332
- removeKeyFromEveryTabSlot(draft.jeScheduleTransactionKeysByPeriodAndTab, jeScheduleKey);
333
- },
334
- },
335
- removeJeAccruedScheduleKey: {
336
- prepare(jeAccruedScheduleKey) {
337
- return { payload: { jeAccruedScheduleKey } };
338
- },
339
- reducer(draft, action) {
340
- // Accrued keys live in their own per-tab map, so removeJeScheduleTransactionKey cannot drop
341
- // them -- a reverted accrued schedule stayed on the list until the next fetch.
342
- removeKeyFromEveryTabSlot(draft.jeScheduleAccruedKeysByPeriodAndTab, action.payload.jeAccruedScheduleKey);
241
+ const { selectedPeriod, jeScheduleKey } = action.payload;
242
+ const prevData = [
243
+ ...(draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] ?? []),
244
+ ];
245
+ const filteredKeys = prevData.filter((jeKey) => jeKey !== jeScheduleKey);
246
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = filteredKeys;
343
247
  },
344
248
  },
345
249
  removeFailedJeScheduleTransactionKey: {
@@ -352,8 +256,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
352
256
  };
353
257
  },
354
258
  reducer(draft, action) {
355
- const { failedJeScheduleKey } = action.payload;
356
- removeKeyFromEveryTabSlot(draft.failedJeScheduleTransactionKeysByPeriodAndTab, failedJeScheduleKey);
259
+ const { selectedPeriod, failedJeScheduleKey } = action.payload;
260
+ const prevData = [
261
+ ...(draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] ?? []),
262
+ ];
263
+ const filteredKeys = prevData.filter((jeKey) => jeKey !== failedJeScheduleKey);
264
+ draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = filteredKeys;
357
265
  },
358
266
  },
359
267
  initializeJeScheduleLocalData: {
@@ -465,182 +373,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
465
373
  clearJeAccountSettingsLocalData(draft) {
466
374
  draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
467
375
  },
468
- initializeNewSchedule: {
469
- prepare({ scheduleType, shouldResetEnteredData = true, }) {
470
- return { payload: { scheduleType, shouldResetEnteredData } };
471
- },
472
- reducer() {
473
- // Purely an epic-trigger action — the epic fans out the account/class
474
- // list fetches, and clears entered data only when asked to.
475
- },
476
- },
477
- resetNewScheduleLocalData: {
478
- prepare({ scheduleType, }) {
479
- return { payload: { scheduleType } };
480
- },
481
- reducer(draft, action) {
482
- const { scheduleType } = action.payload;
483
- draft.newSchedule.newScheduleState[scheduleType] =
484
- (0, exports.getBaseNewScheduleLocalData)(scheduleType);
485
- },
486
- },
487
- updateNewScheduleLocalData(draft, action) {
488
- const { scheduleType, localData } = action.payload;
489
- draft.newSchedule.newScheduleState[scheduleType] = {
490
- ...draft.newSchedule.newScheduleState[scheduleType],
491
- ...localData,
492
- };
493
- },
494
- searchTransactionsForNewSchedule: {
495
- prepare({ query, scheduleType, }) {
496
- return { payload: { query, scheduleType } };
497
- },
498
- reducer(draft, action) {
499
- const trimmed = action.payload.query.trim();
500
- // Cleared or too-short query: no API (see epic) — reset immediately.
501
- if (trimmed.length < jeSchedulesViewState_1.MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
502
- draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
503
- return;
504
- }
505
- draft.newSchedule.searchTransactions = {
506
- ...draft.newSchedule.searchTransactions,
507
- searchString: action.payload.query,
508
- fetchState: 'In-Progress',
509
- };
510
- },
511
- },
512
- searchTransactionsForNewScheduleSuccess(draft, action) {
513
- draft.newSchedule.searchTransactions = {
514
- ...draft.newSchedule.searchTransactions,
515
- searchResults: action.payload.searchResults,
516
- fetchState: 'Completed',
517
- error: undefined,
518
- };
519
- },
520
- searchTransactionsForNewScheduleFailure(draft, action) {
521
- draft.newSchedule.searchTransactions = {
522
- ...draft.newSchedule.searchTransactions,
523
- fetchState: 'Error',
524
- error: action.payload.status,
525
- };
526
- },
527
- clearSearchTransactionsForNewSchedule(draft) {
528
- draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
529
- },
530
- saveNewSchedule: {
531
- prepare({ scheduleType, }) {
532
- return { payload: { scheduleType } };
533
- },
534
- reducer(draft) {
535
- draft.newSchedule.saveStatus = {
536
- fetchState: 'In-Progress',
537
- error: undefined,
538
- };
539
- },
540
- },
541
- saveNewScheduleSuccess(draft) {
542
- draft.newSchedule.saveStatus = {
543
- fetchState: 'Completed',
544
- error: undefined,
545
- };
546
- },
547
- saveNewScheduleFailure(draft, action) {
548
- draft.newSchedule.saveStatus = {
549
- fetchState: 'Error',
550
- error: action.payload.status,
551
- };
552
- },
553
- createOneTimeAccrual: {
554
- prepare(localData) {
555
- return { payload: { localData } };
556
- },
557
- reducer(draft) {
558
- draft.newSchedule.createOneTimeAccrualStatus = {
559
- fetchState: 'In-Progress',
560
- error: undefined,
561
- };
562
- },
563
- },
564
- createOneTimeAccrualSuccess(draft) {
565
- draft.newSchedule.createOneTimeAccrualStatus = {
566
- fetchState: 'Completed',
567
- error: undefined,
568
- };
569
- },
570
- createOneTimeAccrualFailure(draft, action) {
571
- draft.newSchedule.createOneTimeAccrualStatus = {
572
- fetchState: 'Error',
573
- error: action.payload.status,
574
- };
575
- },
576
- promoteOneTimeAccrual: {
577
- prepare(accrualId, amount) {
578
- return { payload: { accrualId, amount } };
579
- },
580
- reducer(draft, action) {
581
- draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
582
- fetchState: 'In-Progress',
583
- error: undefined,
584
- };
585
- },
586
- },
587
- revertOneTimeAccrual: {
588
- prepare(accrualId, reason, note) {
589
- return { payload: { accrualId, reason, note } };
590
- },
591
- reducer(draft, action) {
592
- draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
593
- fetchState: 'In-Progress',
594
- error: undefined,
595
- };
596
- },
597
- },
598
- ignoreOneTimeAccrual: {
599
- prepare(accrualId, reason, note) {
600
- return { payload: { accrualId, reason, note } };
601
- },
602
- reducer(draft, action) {
603
- draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
604
- fetchState: 'In-Progress',
605
- error: undefined,
606
- };
607
- },
608
- },
609
- fetchOneTimeAccrual: {
610
- prepare(accrualId) {
611
- return { payload: { accrualId } };
612
- },
613
- reducer(draft, action) {
614
- draft.oneTimeAccrualFetchStatusById[action.payload.accrualId] = {
615
- fetchState: 'In-Progress',
616
- error: undefined,
617
- };
618
- },
619
- },
620
- fetchOneTimeAccrualSuccess(draft, action) {
621
- draft.oneTimeAccrualFetchStatusById[action.payload.accrualId] = {
622
- fetchState: 'Completed',
623
- error: undefined,
624
- };
625
- },
626
- fetchOneTimeAccrualFailure(draft, action) {
627
- draft.oneTimeAccrualFetchStatusById[action.payload.accrualId] = {
628
- fetchState: 'Error',
629
- error: action.payload.status,
630
- };
631
- },
632
- oneTimeAccrualActionSuccess(draft, action) {
633
- draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
634
- fetchState: 'Completed',
635
- error: undefined,
636
- };
637
- },
638
- oneTimeAccrualActionFailure(draft, action) {
639
- draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
640
- fetchState: 'Error',
641
- error: action.payload.status,
642
- };
643
- },
644
376
  updateJESchedulesUIState(draft, action) {
645
377
  if (action.payload.sortKey != null) {
646
378
  draft.uiState.sortKey = action.payload.sortKey;
@@ -654,21 +386,10 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
654
386
  if (action.payload.scrollPosition != null) {
655
387
  draft.uiState.scrollPosition = action.payload.scrollPosition;
656
388
  }
657
- if (action.payload.selectedPageTab != null) {
658
- draft.uiState.selectedPageTab = action.payload.selectedPageTab;
389
+ if (action.payload.selectedMainTab != null) {
390
+ draft.uiState.selectedMainTab = action.payload.selectedMainTab;
659
391
  }
660
392
  },
661
- updateJEScheduleTypeFilter(draft, action) {
662
- draft.uiState.selectedJETypeFilter = action.payload;
663
- },
664
- toggleJEPendingGroupCollapsed(draft) {
665
- draft.uiState.pendingGroupCollapsed =
666
- !draft.uiState.pendingGroupCollapsed;
667
- },
668
- toggleJECreatedGroupCollapsed(draft) {
669
- draft.uiState.createdGroupCollapsed =
670
- !draft.uiState.createdGroupCollapsed;
671
- },
672
393
  clearExpenseAutomationJESchedulesView(draft) {
673
394
  Object.assign(draft, exports.initialState);
674
395
  },
@@ -679,7 +400,7 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
679
400
  });
680
401
  },
681
402
  });
682
- _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.clearSearchTransactionsForNewSchedule = _a.clearSearchTransactionsForNewSchedule, exports.createOneTimeAccrual = _a.createOneTimeAccrual, exports.createOneTimeAccrualFailure = _a.createOneTimeAccrualFailure, exports.createOneTimeAccrualSuccess = _a.createOneTimeAccrualSuccess, exports.ignoreOneTimeAccrual = _a.ignoreOneTimeAccrual, exports.oneTimeAccrualActionFailure = _a.oneTimeAccrualActionFailure, exports.oneTimeAccrualActionSuccess = _a.oneTimeAccrualActionSuccess, exports.promoteOneTimeAccrual = _a.promoteOneTimeAccrual, exports.revertJeSchedule = _a.revertJeSchedule, exports.revertJeScheduleFailure = _a.revertJeScheduleFailure, exports.revertJeScheduleSuccess = _a.revertJeScheduleSuccess, exports.revertOneTimeAccrual = _a.revertOneTimeAccrual, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchOneTimeAccrual = _a.fetchOneTimeAccrual, exports.fetchOneTimeAccrualFailure = _a.fetchOneTimeAccrualFailure, exports.fetchOneTimeAccrualSuccess = _a.fetchOneTimeAccrualSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.initializeNewSchedule = _a.initializeNewSchedule, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeAccruedScheduleKey = _a.removeJeAccruedScheduleKey, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.resetNewScheduleLocalData = _a.resetNewScheduleLocalData, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.saveNewSchedule = _a.saveNewSchedule, exports.saveNewScheduleFailure = _a.saveNewScheduleFailure, exports.saveNewScheduleSuccess = _a.saveNewScheduleSuccess, exports.searchTransactionsForNewSchedule = _a.searchTransactionsForNewSchedule, exports.searchTransactionsForNewScheduleFailure = _a.searchTransactionsForNewScheduleFailure, exports.searchTransactionsForNewScheduleSuccess = _a.searchTransactionsForNewScheduleSuccess, exports.toggleJECreatedGroupCollapsed = _a.toggleJECreatedGroupCollapsed, exports.toggleJEPendingGroupCollapsed = _a.toggleJEPendingGroupCollapsed, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJESchedulesUIState = _a.updateJESchedulesUIState, exports.updateJEScheduleTypeFilter = _a.updateJEScheduleTypeFilter, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateNewScheduleLocalData = _a.updateNewScheduleLocalData, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
403
+ _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, 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.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJESchedulesUIState = _a.updateJESchedulesUIState, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
683
404
  exports.default = expenseAutomationJESchedulesView.reducer;
684
405
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
685
406
  const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
@@ -97,7 +97,7 @@ export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCrea
97
97
  transactionId: ID;
98
98
  }, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatchSuccess">, confirmBulkUploadMatchFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
99
99
  error: ZeniAPIStatus;
100
- }, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatchFailure">, setBulkUploadResultsTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"completed" | "unmatched", "expenseAutomationMissingReceiptsView/setBulkUploadResultsTab">, setBulkUploadCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"manual" | "all" | "ai_accountant", "expenseAutomationMissingReceiptsView/setBulkUploadCompletedSubTab">, setBulkUploadSortConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
100
+ }, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatchFailure">, setBulkUploadResultsTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"completed" | "unmatched", "expenseAutomationMissingReceiptsView/setBulkUploadResultsTab">, setBulkUploadCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"all" | "ai_accountant" | "manual", "expenseAutomationMissingReceiptsView/setBulkUploadCompletedSubTab">, setBulkUploadSortConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
101
101
  sortKey: BulkUploadSortKey | undefined;
102
102
  sortOrder: SortOrder | undefined;
103
103
  }, "expenseAutomationMissingReceiptsView/setBulkUploadSortConfig">, clearBulkUpload: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearBulkUpload">, searchTransactionsForManualMatch: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: string, pageToken?: string | null | undefined], {
@@ -68,8 +68,8 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
68
68
  cotTrackingByTransactionId: COTTransactionTrackingByTransactionId;
69
69
  }, "expenseAutomationTransactionsView/updateTransactionCategorization", never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
70
70
  newSelectedTab: "review" | "autoCategorized";
71
- }, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSubTab: "manual" | "all" | "ai_accountant"], {
72
- newSubTab: "manual" | "all" | "ai_accountant";
71
+ }, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSubTab: "all" | "ai_accountant" | "manual"], {
72
+ newSubTab: "all" | "ai_accountant" | "manual";
73
73
  }, "expenseAutomationTransactionsView/updateTransactionCategorizationCompletedSubTab", never, never>, updateTransactionGroup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newGroup: "income" | "expense" | "all"], {
74
74
  newGroup: "income" | "expense" | "all";
75
75
  }, "expenseAutomationTransactionsView/updateTransactionGroup", never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
@@ -4,31 +4,12 @@ import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonSta
4
4
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
5
5
  import { AccountBase } from '../../../entity/account/accountState';
6
6
  import { ClassBase } from '../../../entity/class/classState';
7
- import { JEScheduleKey, JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
7
+ import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
8
+ import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
9
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
9
10
  import { JEAccountSettingsView } from '../selectorTypes/jeAccountSettingsViewSelectorTypes';
10
11
  import { JEScheduledTransactionWithFailedEntries } from '../selectors/jeScheduledTransactionWithFailedEntries';
11
- import { NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
12
- import { JEScheduleRow } from '../selectors/jeSchedulesViewSelector';
13
- import { JEPageTab, JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
14
- export interface JEKpiSummary {
15
- aiAccountant: {
16
- amount: number;
17
- count: number;
18
- };
19
- manual: {
20
- amount: number;
21
- count: number;
22
- };
23
- needsReview: {
24
- amount: number;
25
- count: number;
26
- };
27
- total: {
28
- amount: number;
29
- count: number;
30
- };
31
- }
12
+ import { JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
32
13
  export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
33
14
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
34
15
  accountSettingsView: JEAccountSettingsView;
@@ -37,26 +18,16 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
37
18
  allDepreciationAccountList: AccountBase[];
38
19
  allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
39
20
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
21
+ completedSchedules: JEScheduledTransaction[];
40
22
  completionStatus: CompletionStatusType;
41
- createdSchedules: JEScheduleRow[];
42
- createdTotal: number;
43
- hasLoadedForSelectedTab: boolean;
23
+ draftSchedules: JEScheduledTransaction[];
44
24
  ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
45
25
  jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
46
- jeScheduleTypeCounts: {
47
- active: Record<ScheduleTypes, number>;
48
- ongoing: Record<ScheduleTypes, number>;
49
- };
50
- kpiSummary: JEKpiSummary;
51
- newScheduleView: NewScheduleView | undefined;
52
- oneTimeAccrualActionStatusById: Record<ID, FetchStateAndError>;
53
- pendingReviewSchedules: JEScheduleRow[];
54
- pendingReviewTotal: number;
26
+ ongoingSchedules: JEScheduledTransaction[];
27
+ pendingReviewSchedules: (JEScheduledTransaction | JEScheduledTransactionWithFailedEntries)[];
55
28
  postStatusById: Record<ID, FetchStateAndError>;
56
29
  refreshStatus: FetchStateAndError;
57
30
  resolveSchedules: JEScheduledTransactionWithFailedEntries[];
58
- revertStatusById: Record<JEScheduleKey | JEScheduleTransactionKey, FetchStateAndError>;
59
- scheduleCountsByTab: Partial<Record<JEPageTab, number>>;
60
31
  uiState: JESchedulesViewUIState;
61
32
  uncategorizedAccounts: UncategorizedAccounts;
62
33
  }
@@ -1,37 +1,3 @@
1
- import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
- import { JEAccruedSchedule, JEOneTimeAccrual, JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
3
- import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
1
  import { RootState } from '../../../rootStateTypes';
5
2
  import { ExpenseAutomationJESchedulesViewSelector } from '../selectorTypes/jeSchedulesSelectorTypes';
6
- import { JEScheduledTransactionWithFailedEntries } from './jeScheduledTransactionWithFailedEntries';
7
- /**
8
- * `posting_blocked` is written by the posting Cron when a JE fails to post. It is an internal
9
- * failure state with no human action attached, so it is dropped here rather than hidden at render
10
- * time — filtering in the view would leave the group counts and KPI totals counting rows nobody
11
- * can see. The expense-automation endpoint applies no status filter on the close-period path, so
12
- * these rows do arrive.
13
- */
14
- export declare function isRenderableOneTimeAccrual(accrual: JEOneTimeAccrual): boolean;
15
- export declare function getJEScheduleRowType(schedule: JEScheduleRow): ScheduleTypes | undefined;
16
- export declare function isPendingReviewRow(schedule: JEScheduleRow): boolean;
17
- export declare function isExistingTabRow(schedule: JEScheduleRow): boolean;
18
- export declare const isAiAccountantSchedule: (schedule: JEScheduleRow) => boolean;
19
- export declare function isAccruedScheduleRow(schedule: JEScheduleRow): schedule is JEAccruedSchedule;
20
- export declare function isOneTimeAccrualRow(schedule: JEScheduleRow): schedule is JEOneTimeAccrual;
21
3
  export declare function getExpenseAutomationJESchedulesView(state: RootState): ExpenseAutomationJESchedulesViewSelector;
22
- export type JEScheduleRow = JEAccruedSchedule | JEOneTimeAccrual | JEScheduledTransaction | JEScheduledTransactionWithFailedEntries;
23
- export type JEScheduleRowWithoutOneTimeAccrual = Exclude<JEScheduleRow, JEOneTimeAccrual>;
24
- export interface ExpenseAutomationJEOneTimeAccrualDetailView {
25
- actionFetchState: FetchStateAndError;
26
- detailFetchState: FetchStateAndError;
27
- accrual?: JEOneTimeAccrual;
28
- }
29
- /**
30
- * One accrual plus the status of its promote / ignore request, for the detail screen.
31
- *
32
- * `accrual` is undefined on a cold load — a refresh or a shared link, where the list has never run
33
- * — so the screen dispatches `fetchOneTimeAccrual` and waits on `detailFetchState`. The two states
34
- * are separate on purpose: `actionFetchState` drives the row spinner and the post-revert navigation,
35
- * and a page load must not look like an action that just finished.
36
- */
37
- export declare function getExpenseAutomationJEOneTimeAccrualDetailView(state: RootState, accrualId: ID): ExpenseAutomationJEOneTimeAccrualDetailView;