@zeniai/client-epic-state 5.1.85-betaRD3 → 5.1.86

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 (154) hide show
  1. package/lib/entity/aiCfo/aiCfoState.d.ts +2 -2
  2. package/lib/entity/customerSatisfaction/customerSatisfactionReducer.d.ts +1 -1
  3. package/lib/entity/customerSatisfaction/customerSatisfactionReducer.js +2 -6
  4. package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +0 -2
  5. package/lib/entity/jeSchedules/jeScheduleHelper.js +0 -7
  6. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -34
  7. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -68
  8. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -4
  9. package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -24
  10. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -10
  11. package/lib/entity/jeSchedules/jeSchedulesSelector.js +3 -28
  12. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -41
  13. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -12
  14. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -40
  15. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  16. package/lib/entity/snackbar/snackbarTypes.js +0 -29
  17. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
  18. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  19. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
  20. package/lib/epic.d.ts +1 -5
  21. package/lib/epic.js +1 -5
  22. package/lib/esm/entity/customerSatisfaction/customerSatisfactionReducer.js +1 -4
  23. package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +0 -6
  24. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -68
  25. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +2 -24
  26. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -26
  27. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -34
  28. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -29
  29. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  30. package/lib/esm/epic.js +1 -5
  31. package/lib/esm/index.js +5 -11
  32. package/lib/esm/view/companyHealthMetricView/companyHealthMetricConfigReducer.js +1 -4
  33. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
  34. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -34
  35. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +28 -163
  36. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +22 -260
  37. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -5
  38. package/lib/esm/view/invoicing/createCreditNote/createCreditNoteEpic.js +4 -24
  39. package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +4 -24
  40. package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +10 -37
  41. package/lib/esm/view/invoicing/discountAction/discountActionEpic.js +9 -33
  42. package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +9 -35
  43. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +1 -5
  44. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +5 -32
  45. package/lib/esm/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +3 -23
  46. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +4 -24
  47. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +4 -24
  48. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +3 -20
  49. package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +17 -60
  50. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -30
  51. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +29 -4
  52. package/lib/esm/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +10 -29
  53. package/lib/esm/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +5 -28
  54. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +4 -24
  55. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +14 -22
  56. package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +7 -46
  57. package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +8 -26
  58. package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -1
  59. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +1 -4
  60. package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +9 -41
  61. package/lib/esm/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +1 -4
  62. package/lib/esm/view/vendorTabView/vendorTabViewReducer.js +1 -4
  63. package/lib/index.d.ts +13 -18
  64. package/lib/index.js +50 -76
  65. package/lib/view/companyHealthMetricView/companyHealthMetricConfigReducer.d.ts +1 -1
  66. package/lib/view/companyHealthMetricView/companyHealthMetricConfigReducer.js +2 -5
  67. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
  68. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -2
  69. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +1 -32
  70. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  71. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -8
  72. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +10 -45
  73. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +28 -164
  74. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
  75. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
  76. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +8 -34
  77. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +1 -10
  78. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +21 -266
  79. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
  80. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -59
  81. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
  82. package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.d.ts +1 -2
  83. package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.js +3 -23
  84. package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +1 -2
  85. package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +3 -23
  86. package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +8 -22
  87. package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +10 -37
  88. package/lib/view/invoicing/discountAction/discountActionEpic.d.ts +1 -2
  89. package/lib/view/invoicing/discountAction/discountActionEpic.js +8 -32
  90. package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +1 -2
  91. package/lib/view/invoicing/dunningAction/dunningActionEpic.js +8 -34
  92. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +1 -3
  93. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +1 -5
  94. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +1 -2
  95. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +4 -31
  96. package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.d.ts +1 -2
  97. package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +2 -22
  98. package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.d.ts +1 -2
  99. package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +3 -23
  100. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts +1 -2
  101. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +3 -23
  102. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.d.ts +1 -2
  103. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +2 -19
  104. package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +1 -2
  105. package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +16 -59
  106. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +0 -13
  107. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
  108. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -30
  109. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +31 -11
  110. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +29 -4
  111. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +0 -15
  112. package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.d.ts +1 -2
  113. package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +9 -28
  114. package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +4 -27
  115. package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.d.ts +1 -2
  116. package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +3 -23
  117. package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +7 -24
  118. package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +16 -23
  119. package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +1 -2
  120. package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +6 -45
  121. package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +1 -2
  122. package/lib/view/invoicing/settingsView/settingsViewEpics.js +7 -25
  123. package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +1 -10
  124. package/lib/view/invoicing/settingsView/settingsViewReducer.js +1 -1
  125. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +2 -4
  126. package/lib/view/invoicing/settingsView/settingsViewSelector.js +1 -4
  127. package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +1 -2
  128. package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +8 -40
  129. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +1 -1
  130. package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +2 -5
  131. package/lib/view/vendorTabView/vendorTabViewReducer.d.ts +1 -1
  132. package/lib/view/vendorTabView/vendorTabViewReducer.js +2 -5
  133. package/package.json +1 -1
  134. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -21
  135. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -110
  136. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -73
  137. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -22
  138. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
  139. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -1
  140. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -70
  141. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
  142. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
  143. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -45
  144. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -114
  145. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
  146. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -77
  147. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
  148. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -26
  149. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
  150. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
  151. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -25
  152. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -2
  153. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -10
  154. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -75
@@ -1,21 +1,14 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- 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 = 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.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeNewSchedule = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearSearchTransactionsForNewSchedule = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.searchTransactionsInitialState = exports.newScheduleInitialState = exports.getBaseNewScheduleLocalData = exports.accountSettingsInitialState = 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;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
7
7
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
8
8
  const accountPayload_1 = require("../../../entity/account/accountPayload");
9
- const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
10
9
  const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
11
10
  const rootActions_1 = require("../../../rootActions");
12
11
  const accountTypeRecommendationPayload_1 = require("../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload");
13
- const jeSchedulesViewState_1 = require("../types/jeSchedulesViewState");
14
- function removeKeyFromEveryTabSlot(keysByPeriodAndTab, keyToRemove) {
15
- for (const periodTabKey of Object.keys(keysByPeriodAndTab)) {
16
- keysByPeriodAndTab[periodTabKey] = keysByPeriodAndTab[periodTabKey].filter((jeScheduleKey) => jeScheduleKey !== keyToRemove);
17
- }
18
- }
19
12
  exports.accountSettingsInitialState = {
20
13
  localData: {
21
14
  selectedPrepaidExpensesAccountIds: [],
@@ -47,35 +40,16 @@ exports.accountSettingsInitialState = {
47
40
  accruedExpensesNestedAccountListHierarchy: [],
48
41
  accruedExpensesRecommendations: [],
49
42
  };
50
- const getBaseNewScheduleLocalData = (scheduleType) => ({
51
- scheduleType,
52
- jeScheduleDetails: [],
53
- });
54
- exports.getBaseNewScheduleLocalData = getBaseNewScheduleLocalData;
55
- exports.newScheduleInitialState = {
56
- fixed_assets: (0, exports.getBaseNewScheduleLocalData)('fixed_assets'),
57
- prepaid_expenses: (0, exports.getBaseNewScheduleLocalData)('prepaid_expenses'),
58
- };
59
- exports.searchTransactionsInitialState = {
60
- searchResults: [],
61
- fetchState: 'Not-Started',
62
- error: undefined,
63
- };
64
43
  exports.initialState = {
65
- jeScheduleTransactionKeysByPeriodAndTab: {},
66
- jeScheduleAccruedKeysByPeriodAndTab: {},
67
- jeScheduleOneTimeAccrualKeysByPeriodAndTab: {},
68
- failedJeScheduleTransactionKeysByPeriodAndTab: {},
44
+ jeScheduleTransactionKeysByPeriod: {},
45
+ failedJeScheduleTransactionKeysByPeriod: {},
69
46
  postStatusById: {},
70
47
  ignoreStatusById: {},
71
48
  jeScheduleLocalDataById: {},
72
49
  uiState: {
73
- createdGroupCollapsed: false,
74
- pendingGroupCollapsed: false,
75
- scrollPosition: { scrollTop: 0, scrollLeft: undefined },
76
50
  searchString: '',
77
- selectedJETypeFilter: null,
78
- selectedPageTab: 'schedules',
51
+ scrollPosition: { scrollTop: 0, scrollLeft: undefined },
52
+ selectedMainTab: 'pending_review',
79
53
  sortKey: 'transactionDate',
80
54
  sortOrder: 'descending',
81
55
  totalCount: 0,
@@ -86,13 +60,6 @@ exports.initialState = {
86
60
  error: undefined,
87
61
  },
88
62
  accountSettings: exports.accountSettingsInitialState,
89
- newSchedule: {
90
- newScheduleState: exports.newScheduleInitialState,
91
- saveStatus: { fetchState: 'Not-Started', error: undefined },
92
- searchTransactions: exports.searchTransactionsInitialState,
93
- fetchState: 'Not-Started',
94
- error: undefined,
95
- },
96
63
  fetchState: 'Not-Started',
97
64
  error: undefined,
98
65
  hasValidState() {
@@ -137,12 +104,9 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
137
104
  },
138
105
  },
139
106
  fetchJeSchedulesSuccess(draft, action) {
140
- const { jeSchedules, selectedPeriod, selectedPageTab, failedJeSchedules, accruedJeSchedules, oneTimeAccruals, refreshViewInBackground, } = action.payload;
141
- const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
107
+ const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
142
108
  const jeScheduleTransactionKeys = jeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
143
109
  const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
144
- const jeScheduleAccruedKeys = accruedJeSchedules.map((schedule) => (0, jeSchedulesPayload_1.getJEScheduleKey)(schedule));
145
- const jeScheduleOneTimeAccrualKeys = oneTimeAccruals.map((accrual) => (0, jeScheduleHelper_1.generateJEOneTimeAccrualKey)(accrual._id));
146
110
  if (refreshViewInBackground === true &&
147
111
  draft.refreshStatus.fetchState === 'In-Progress') {
148
112
  draft.refreshStatus = { fetchState: 'Completed', error: undefined };
@@ -151,28 +115,19 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
151
115
  draft.fetchState = 'Completed';
152
116
  draft.error = undefined;
153
117
  }
154
- draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
155
- jeScheduleTransactionKeys;
156
- draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] =
157
- jeScheduleAccruedKeys;
158
- draft.jeScheduleOneTimeAccrualKeysByPeriodAndTab[periodTabKey] =
159
- jeScheduleOneTimeAccrualKeys;
160
- draft.failedJeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
161
- failedJeScheduleTransactionKeys;
118
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleTransactionKeys;
119
+ draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = failedJeScheduleTransactionKeys;
162
120
  },
163
121
  fetchJeSchedulesFailure(draft, action) {
164
- const { status, selectedPeriod, selectedPageTab } = action.payload;
165
- const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
122
+ const { status, selectedPeriod } = action.payload;
166
123
  if (draft.refreshStatus.fetchState === 'In-Progress') {
167
124
  draft.refreshStatus = { fetchState: 'Error', error: status };
168
125
  }
169
126
  else {
170
127
  draft.fetchState = 'Error';
171
128
  draft.error = status;
172
- draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] = [];
173
- draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] = [];
174
- draft.jeScheduleOneTimeAccrualKeysByPeriodAndTab[periodTabKey] = [];
175
129
  }
130
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
176
131
  },
177
132
  retryJeSchedule(draft, action) {
178
133
  const { scheduledJournalEntryID } = action.payload;
@@ -260,18 +215,17 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
260
215
  };
261
216
  },
262
217
  updateJeScheduleTransactionKeys: {
263
- prepare(jeScheduleKeys, selectedPeriod, selectedPageTab) {
218
+ prepare(jeScheduleKeys, selectedPeriod) {
264
219
  return {
265
220
  payload: {
266
221
  jeScheduleKeys: jeScheduleKeys,
267
222
  selectedPeriod: selectedPeriod,
268
- selectedPageTab: selectedPageTab,
269
223
  },
270
224
  };
271
225
  },
272
226
  reducer(draft, action) {
273
- const { selectedPeriod, selectedPageTab, jeScheduleKeys } = action.payload;
274
- 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;
275
229
  },
276
230
  },
277
231
  removeJeScheduleTransactionKey: {
@@ -284,10 +238,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
284
238
  };
285
239
  },
286
240
  reducer(draft, action) {
287
- const { jeScheduleKey } = action.payload;
288
- // Dropped from every tab's slot, not just the visible one: once a schedule is ignored or
289
- // resolved it must not reappear when the user switches tabs and hits a cached list.
290
- removeKeyFromEveryTabSlot(draft.jeScheduleTransactionKeysByPeriodAndTab, jeScheduleKey);
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;
291
247
  },
292
248
  },
293
249
  removeFailedJeScheduleTransactionKey: {
@@ -300,8 +256,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
300
256
  };
301
257
  },
302
258
  reducer(draft, action) {
303
- const { failedJeScheduleKey } = action.payload;
304
- 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;
305
265
  },
306
266
  },
307
267
  initializeJeScheduleLocalData: {
@@ -413,91 +373,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
413
373
  clearJeAccountSettingsLocalData(draft) {
414
374
  draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
415
375
  },
416
- initializeNewSchedule: {
417
- prepare({ scheduleType, }) {
418
- return { payload: { scheduleType } };
419
- },
420
- reducer() {
421
- // Purely an epic-trigger action — the epic fans out the account/class
422
- // list fetches plus resetNewScheduleLocalData.
423
- },
424
- },
425
- resetNewScheduleLocalData: {
426
- prepare({ scheduleType, }) {
427
- return { payload: { scheduleType } };
428
- },
429
- reducer(draft, action) {
430
- const { scheduleType } = action.payload;
431
- draft.newSchedule.newScheduleState[scheduleType] =
432
- (0, exports.getBaseNewScheduleLocalData)(scheduleType);
433
- },
434
- },
435
- updateNewScheduleLocalData(draft, action) {
436
- const { scheduleType, localData } = action.payload;
437
- draft.newSchedule.newScheduleState[scheduleType] = {
438
- ...draft.newSchedule.newScheduleState[scheduleType],
439
- ...localData,
440
- };
441
- },
442
- searchTransactionsForNewSchedule: {
443
- prepare({ query, scheduleType, }) {
444
- return { payload: { query, scheduleType } };
445
- },
446
- reducer(draft, action) {
447
- const trimmed = action.payload.query.trim();
448
- // Cleared or too-short query: no API (see epic) — reset immediately.
449
- if (trimmed.length < jeSchedulesViewState_1.MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
450
- draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
451
- return;
452
- }
453
- draft.newSchedule.searchTransactions = {
454
- ...draft.newSchedule.searchTransactions,
455
- searchString: action.payload.query,
456
- fetchState: 'In-Progress',
457
- };
458
- },
459
- },
460
- searchTransactionsForNewScheduleSuccess(draft, action) {
461
- draft.newSchedule.searchTransactions = {
462
- ...draft.newSchedule.searchTransactions,
463
- searchResults: action.payload.searchResults,
464
- fetchState: 'Completed',
465
- error: undefined,
466
- };
467
- },
468
- searchTransactionsForNewScheduleFailure(draft, action) {
469
- draft.newSchedule.searchTransactions = {
470
- ...draft.newSchedule.searchTransactions,
471
- fetchState: 'Error',
472
- error: action.payload.status,
473
- };
474
- },
475
- clearSearchTransactionsForNewSchedule(draft) {
476
- draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
477
- },
478
- saveNewSchedule: {
479
- prepare({ scheduleType, }) {
480
- return { payload: { scheduleType } };
481
- },
482
- reducer(draft) {
483
- draft.newSchedule.saveStatus = {
484
- fetchState: 'In-Progress',
485
- error: undefined,
486
- };
487
- },
488
- },
489
- saveNewScheduleSuccess(draft) {
490
- draft.newSchedule.saveStatus = {
491
- fetchState: 'Completed',
492
- error: undefined,
493
- };
494
- },
495
- saveNewScheduleFailure(draft, action) {
496
- draft.newSchedule.saveStatus = {
497
- fetchState: 'Error',
498
- error: action.payload.status,
499
- };
500
- },
501
376
  updateJESchedulesUIState(draft, action) {
502
377
  if (action.payload.sortKey != null) {
503
378
  draft.uiState.sortKey = action.payload.sortKey;
@@ -511,21 +386,10 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
511
386
  if (action.payload.scrollPosition != null) {
512
387
  draft.uiState.scrollPosition = action.payload.scrollPosition;
513
388
  }
514
- if (action.payload.selectedPageTab != null) {
515
- draft.uiState.selectedPageTab = action.payload.selectedPageTab;
389
+ if (action.payload.selectedMainTab != null) {
390
+ draft.uiState.selectedMainTab = action.payload.selectedMainTab;
516
391
  }
517
392
  },
518
- updateJEScheduleTypeFilter(draft, action) {
519
- draft.uiState.selectedJETypeFilter = action.payload;
520
- },
521
- toggleJEPendingGroupCollapsed(draft) {
522
- draft.uiState.pendingGroupCollapsed =
523
- !draft.uiState.pendingGroupCollapsed;
524
- },
525
- toggleJECreatedGroupCollapsed(draft) {
526
- draft.uiState.createdGroupCollapsed =
527
- !draft.uiState.createdGroupCollapsed;
528
- },
529
393
  clearExpenseAutomationJESchedulesView(draft) {
530
394
  Object.assign(draft, exports.initialState);
531
395
  },
@@ -536,7 +400,7 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
536
400
  });
537
401
  },
538
402
  });
539
- _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.clearSearchTransactionsForNewSchedule = _a.clearSearchTransactionsForNewSchedule, 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.initializeNewSchedule = _a.initializeNewSchedule, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, 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;
540
404
  exports.default = expenseAutomationJESchedulesView.reducer;
541
405
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
542
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" | "manual" | "ai_accountant", "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], {
@@ -65,8 +65,8 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
65
65
  cotTrackingByTransactionId: COTTransactionTrackingByTransactionId;
66
66
  }, "expenseAutomationTransactionsView/updateTransactionCategorization", never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
67
67
  newSelectedTab: "review" | "autoCategorized";
68
- }, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSubTab: "manual" | "all" | "ai_accountant"], {
69
- newSubTab: "manual" | "all" | "ai_accountant";
68
+ }, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSubTab: "all" | "manual" | "ai_accountant"], {
69
+ newSubTab: "all" | "manual" | "ai_accountant";
70
70
  }, "expenseAutomationTransactionsView/updateTransactionCategorizationCompletedSubTab", never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
71
71
  selectedTab: "review" | "autoCategorized";
72
72
  fetchState: FetchState;
@@ -4,30 +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 { 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
- import { NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
11
- import { JEScheduleRow, JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
12
- import { JEPageTab, JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
13
- export interface JEKpiSummary {
14
- aiAccountant: {
15
- amount: number;
16
- count: number;
17
- };
18
- manual: {
19
- amount: number;
20
- count: number;
21
- };
22
- needsReview: {
23
- amount: number;
24
- count: number;
25
- };
26
- total: {
27
- amount: number;
28
- count: number;
29
- };
30
- }
11
+ import { JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
12
+ import { JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
31
13
  export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
32
14
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
33
15
  accountSettingsView: JEAccountSettingsView;
@@ -36,24 +18,16 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
36
18
  allDepreciationAccountList: AccountBase[];
37
19
  allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
38
20
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
21
+ completedSchedules: JEScheduledTransaction[];
39
22
  completionStatus: CompletionStatusType;
40
- createdSchedules: JEScheduleRow[];
41
- createdTotal: number;
42
- hasLoadedForSelectedTab: boolean;
23
+ draftSchedules: JEScheduledTransaction[];
43
24
  ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
44
25
  jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
45
- jeScheduleTypeCounts: {
46
- active: Record<ScheduleTypes, number>;
47
- ongoing: Record<ScheduleTypes, number>;
48
- };
49
- kpiSummary: JEKpiSummary;
50
- newScheduleView: NewScheduleView | undefined;
51
- pendingReviewSchedules: JEScheduleRow[];
52
- pendingReviewTotal: number;
26
+ ongoingSchedules: JEScheduledTransaction[];
27
+ pendingReviewSchedules: (JEScheduledTransaction | JEScheduledTransactionWithFailedEntries)[];
53
28
  postStatusById: Record<ID, FetchStateAndError>;
54
29
  refreshStatus: FetchStateAndError;
55
30
  resolveSchedules: JEScheduledTransactionWithFailedEntries[];
56
- scheduleCountsByTab: Partial<Record<JEPageTab, number>>;
57
31
  uiState: JESchedulesViewUIState;
58
32
  uncategorizedAccounts: UncategorizedAccounts;
59
33
  }
@@ -1,16 +1,7 @@
1
- import { JEAccruedSchedule, JEOneTimeAccrual, JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
2
- import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
1
+ import { JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
3
2
  import { RootState } from '../../../reducer';
4
3
  import { ExpenseAutomationJESchedulesViewSelector } from '../selectorTypes/jeSchedulesSelectorTypes';
5
- export declare function getJEScheduleRowType(schedule: JEScheduleRow): ScheduleTypes | undefined;
6
- export declare function isPendingReviewRow(schedule: JEScheduleRow): boolean;
7
- export declare function isExistingTabRow(schedule: JEScheduleRow): boolean;
8
- export declare const isAiAccountantSchedule: (schedule: JEScheduleRow) => boolean;
9
- export declare function isAccruedScheduleRow(schedule: JEScheduleRow): schedule is JEAccruedSchedule;
10
- export declare function isOneTimeAccrualRow(schedule: JEScheduleRow): schedule is JEOneTimeAccrual;
11
4
  export declare function getExpenseAutomationJESchedulesView(state: RootState): ExpenseAutomationJESchedulesViewSelector;
12
5
  export interface JEScheduledTransactionWithFailedEntries extends Omit<JEScheduledTransaction, 'scheduledJournalEntry'> {
13
6
  scheduledJournalEntry: ScheduledJournalEntry;
14
7
  }
15
- export type JEScheduleRow = JEAccruedSchedule | JEOneTimeAccrual | JEScheduledTransaction | JEScheduledTransactionWithFailedEntries;
16
- export type JEScheduleRowWithoutOneTimeAccrual = Exclude<JEScheduleRow, JEOneTimeAccrual>;