@zeniai/client-epic-state 5.2.14-betaRD0 → 5.2.14
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.
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +0 -1
- package/lib/entity/jeSchedules/jeScheduleHelper.js +0 -7
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -78
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +4 -183
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -4
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -30
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -11
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +3 -38
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -123
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -24
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -96
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
- package/lib/epic.d.ts +1 -9
- package/lib/epic.js +0 -16
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +0 -6
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +5 -183
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +2 -30
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -36
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -86
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
- package/lib/esm/epic.js +0 -16
- package/lib/esm/index.js +8 -14
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -9
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +5 -41
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -55
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -319
- package/lib/esm/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +22 -327
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -5
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
- package/lib/index.d.ts +12 -17
- package/lib/index.js +47 -91
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -39
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +3 -86
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +1 -58
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -93
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -321
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts +0 -1
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +7 -41
- package/lib/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +0 -1
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -34
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +21 -335
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -83
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -45
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -104
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -138
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -79
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -180
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -111
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -28
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -106
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +0 -21
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -49
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -108
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -29
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -142
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -83
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +0 -13
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -187
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +0 -65
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -115
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -32
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -42
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -21
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -112
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
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: [],
|
|
@@ -30,7 +22,6 @@ exports.accountSettingsInitialState = {
|
|
|
30
22
|
error: undefined,
|
|
31
23
|
fetchState: 'Not-Started',
|
|
32
24
|
},
|
|
33
|
-
hasLoadedAccountSettings: false,
|
|
34
25
|
recommendationFetchState: {
|
|
35
26
|
error: undefined,
|
|
36
27
|
fetchState: 'Not-Started',
|
|
@@ -49,38 +40,16 @@ exports.accountSettingsInitialState = {
|
|
|
49
40
|
accruedExpensesNestedAccountListHierarchy: [],
|
|
50
41
|
accruedExpensesRecommendations: [],
|
|
51
42
|
};
|
|
52
|
-
const getBaseNewScheduleLocalData = (scheduleType) => ({
|
|
53
|
-
scheduleType,
|
|
54
|
-
jeScheduleDetails: [],
|
|
55
|
-
});
|
|
56
|
-
exports.getBaseNewScheduleLocalData = getBaseNewScheduleLocalData;
|
|
57
|
-
exports.newScheduleInitialState = {
|
|
58
|
-
fixed_assets: (0, exports.getBaseNewScheduleLocalData)('fixed_assets'),
|
|
59
|
-
prepaid_expenses: (0, exports.getBaseNewScheduleLocalData)('prepaid_expenses'),
|
|
60
|
-
};
|
|
61
|
-
exports.searchTransactionsInitialState = {
|
|
62
|
-
searchResults: [],
|
|
63
|
-
fetchState: 'Not-Started',
|
|
64
|
-
error: undefined,
|
|
65
|
-
};
|
|
66
43
|
exports.initialState = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
jeScheduleOneTimeAccrualKeysByPeriodAndTab: {},
|
|
70
|
-
failedJeScheduleTransactionKeysByPeriodAndTab: {},
|
|
44
|
+
jeScheduleTransactionKeysByPeriod: {},
|
|
45
|
+
failedJeScheduleTransactionKeysByPeriod: {},
|
|
71
46
|
postStatusById: {},
|
|
72
47
|
ignoreStatusById: {},
|
|
73
|
-
revertStatusById: {},
|
|
74
48
|
jeScheduleLocalDataById: {},
|
|
75
|
-
oneTimeAccrualActionStatusById: {},
|
|
76
|
-
oneTimeAccrualFetchStatusById: {},
|
|
77
49
|
uiState: {
|
|
78
|
-
createdGroupCollapsed: false,
|
|
79
|
-
pendingGroupCollapsed: false,
|
|
80
|
-
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
81
50
|
searchString: '',
|
|
82
|
-
|
|
83
|
-
|
|
51
|
+
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
52
|
+
selectedMainTab: 'pending_review',
|
|
84
53
|
sortKey: 'transactionDate',
|
|
85
54
|
sortOrder: 'descending',
|
|
86
55
|
totalCount: 0,
|
|
@@ -91,14 +60,6 @@ exports.initialState = {
|
|
|
91
60
|
error: undefined,
|
|
92
61
|
},
|
|
93
62
|
accountSettings: exports.accountSettingsInitialState,
|
|
94
|
-
newSchedule: {
|
|
95
|
-
createOneTimeAccrualStatus: { fetchState: 'Not-Started', error: undefined },
|
|
96
|
-
newScheduleState: exports.newScheduleInitialState,
|
|
97
|
-
saveStatus: { fetchState: 'Not-Started', error: undefined },
|
|
98
|
-
searchTransactions: exports.searchTransactionsInitialState,
|
|
99
|
-
fetchState: 'Not-Started',
|
|
100
|
-
error: undefined,
|
|
101
|
-
},
|
|
102
63
|
fetchState: 'Not-Started',
|
|
103
64
|
error: undefined,
|
|
104
65
|
hasValidState() {
|
|
@@ -143,12 +104,9 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
143
104
|
},
|
|
144
105
|
},
|
|
145
106
|
fetchJeSchedulesSuccess(draft, action) {
|
|
146
|
-
const { jeSchedules, selectedPeriod,
|
|
147
|
-
const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
|
|
107
|
+
const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
|
|
148
108
|
const jeScheduleTransactionKeys = jeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
|
|
149
109
|
const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
|
|
150
|
-
const jeScheduleAccruedKeys = accruedJeSchedules.map((schedule) => (0, jeSchedulesPayload_1.getJEScheduleKey)(schedule));
|
|
151
|
-
const jeScheduleOneTimeAccrualKeys = oneTimeAccruals.map((accrual) => (0, jeScheduleHelper_1.generateJEOneTimeAccrualKey)(accrual._id));
|
|
152
110
|
if (refreshViewInBackground === true &&
|
|
153
111
|
draft.refreshStatus.fetchState === 'In-Progress') {
|
|
154
112
|
draft.refreshStatus = { fetchState: 'Completed', error: undefined };
|
|
@@ -157,31 +115,19 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
157
115
|
draft.fetchState = 'Completed';
|
|
158
116
|
draft.error = undefined;
|
|
159
117
|
}
|
|
160
|
-
draft.
|
|
161
|
-
|
|
162
|
-
draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] =
|
|
163
|
-
jeScheduleAccruedKeys;
|
|
164
|
-
draft.jeScheduleOneTimeAccrualKeysByPeriodAndTab[periodTabKey] =
|
|
165
|
-
jeScheduleOneTimeAccrualKeys;
|
|
166
|
-
draft.failedJeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
|
|
167
|
-
failedJeScheduleTransactionKeys;
|
|
118
|
+
draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleTransactionKeys;
|
|
119
|
+
draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = failedJeScheduleTransactionKeys;
|
|
168
120
|
},
|
|
169
121
|
fetchJeSchedulesFailure(draft, action) {
|
|
170
|
-
const { status, selectedPeriod
|
|
171
|
-
const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
|
|
122
|
+
const { status, selectedPeriod } = action.payload;
|
|
172
123
|
if (draft.refreshStatus.fetchState === 'In-Progress') {
|
|
173
124
|
draft.refreshStatus = { fetchState: 'Error', error: status };
|
|
174
125
|
}
|
|
175
126
|
else {
|
|
176
127
|
draft.fetchState = 'Error';
|
|
177
128
|
draft.error = status;
|
|
178
|
-
draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] = [];
|
|
179
|
-
draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] = [];
|
|
180
|
-
draft.jeScheduleOneTimeAccrualKeysByPeriodAndTab[periodTabKey] = [];
|
|
181
|
-
// Cleared with the rest: leaving it behind kept the previous fetch's resolve rows on an
|
|
182
|
-
// otherwise empty errored tab, which reads as "these are all the schedules there are".
|
|
183
|
-
draft.failedJeScheduleTransactionKeysByPeriodAndTab[periodTabKey] = [];
|
|
184
129
|
}
|
|
130
|
+
draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
|
|
185
131
|
},
|
|
186
132
|
retryJeSchedule(draft, action) {
|
|
187
133
|
const { scheduledJournalEntryID } = action.payload;
|
|
@@ -217,13 +163,11 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
217
163
|
};
|
|
218
164
|
},
|
|
219
165
|
ignoreRecommendedJeSchedule: {
|
|
220
|
-
prepare(jeScheduleTransactionKey, scheduleType
|
|
166
|
+
prepare(jeScheduleTransactionKey, scheduleType) {
|
|
221
167
|
return {
|
|
222
168
|
payload: {
|
|
223
169
|
jeScheduleTransactionKey,
|
|
224
170
|
scheduleType,
|
|
225
|
-
reason,
|
|
226
|
-
note,
|
|
227
171
|
},
|
|
228
172
|
};
|
|
229
173
|
},
|
|
@@ -239,41 +183,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
239
183
|
};
|
|
240
184
|
},
|
|
241
185
|
},
|
|
242
|
-
revertJeSchedule: {
|
|
243
|
-
// jeScheduleTransactionKey is a JEScheduleKey for an accrued schedule, which has no base
|
|
244
|
-
// transaction to derive a transaction key from. It is only ever used as an opaque row
|
|
245
|
-
// identifier here -- for the row's spinner and for dropping the row from the list -- so one
|
|
246
|
-
// action serves both shapes rather than two near-identical ones.
|
|
247
|
-
prepare(jeScheduleId, jeScheduleTransactionKey, scheduleType, reason, note) {
|
|
248
|
-
return {
|
|
249
|
-
payload: {
|
|
250
|
-
jeScheduleId,
|
|
251
|
-
jeScheduleTransactionKey,
|
|
252
|
-
scheduleType,
|
|
253
|
-
reason,
|
|
254
|
-
note,
|
|
255
|
-
},
|
|
256
|
-
};
|
|
257
|
-
},
|
|
258
|
-
reducer(draft, action) {
|
|
259
|
-
draft.revertStatusById[action.payload.jeScheduleTransactionKey] = {
|
|
260
|
-
fetchState: 'In-Progress',
|
|
261
|
-
error: undefined,
|
|
262
|
-
};
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
revertJeScheduleSuccess(draft, action) {
|
|
266
|
-
draft.revertStatusById[action.payload.jeScheduleTransactionKey] = {
|
|
267
|
-
fetchState: 'Completed',
|
|
268
|
-
error: undefined,
|
|
269
|
-
};
|
|
270
|
-
},
|
|
271
|
-
revertJeScheduleFailure(draft, action) {
|
|
272
|
-
draft.revertStatusById[action.payload.jeScheduleTransactionKey] = {
|
|
273
|
-
fetchState: 'Error',
|
|
274
|
-
error: action.payload.status,
|
|
275
|
-
};
|
|
276
|
-
},
|
|
277
186
|
ignoreRecommendedJeScheduleSuccess: {
|
|
278
187
|
reducer(draft, action) {
|
|
279
188
|
const { jeScheduleTransactionKey } = action.payload;
|
|
@@ -306,18 +215,17 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
306
215
|
};
|
|
307
216
|
},
|
|
308
217
|
updateJeScheduleTransactionKeys: {
|
|
309
|
-
prepare(jeScheduleKeys, selectedPeriod
|
|
218
|
+
prepare(jeScheduleKeys, selectedPeriod) {
|
|
310
219
|
return {
|
|
311
220
|
payload: {
|
|
312
221
|
jeScheduleKeys: jeScheduleKeys,
|
|
313
222
|
selectedPeriod: selectedPeriod,
|
|
314
|
-
selectedPageTab: selectedPageTab,
|
|
315
223
|
},
|
|
316
224
|
};
|
|
317
225
|
},
|
|
318
226
|
reducer(draft, action) {
|
|
319
|
-
const { selectedPeriod,
|
|
320
|
-
draft.
|
|
227
|
+
const { selectedPeriod, jeScheduleKeys } = action.payload;
|
|
228
|
+
draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleKeys;
|
|
321
229
|
},
|
|
322
230
|
},
|
|
323
231
|
removeJeScheduleTransactionKey: {
|
|
@@ -330,20 +238,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
330
238
|
};
|
|
331
239
|
},
|
|
332
240
|
reducer(draft, action) {
|
|
333
|
-
const { jeScheduleKey } = action.payload;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
removeJeAccruedScheduleKey: {
|
|
340
|
-
prepare(jeAccruedScheduleKey) {
|
|
341
|
-
return { payload: { jeAccruedScheduleKey } };
|
|
342
|
-
},
|
|
343
|
-
reducer(draft, action) {
|
|
344
|
-
// Accrued keys live in their own per-tab map, so removeJeScheduleTransactionKey cannot drop
|
|
345
|
-
// them -- a reverted accrued schedule stayed on the list until the next fetch.
|
|
346
|
-
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;
|
|
347
247
|
},
|
|
348
248
|
},
|
|
349
249
|
removeFailedJeScheduleTransactionKey: {
|
|
@@ -356,8 +256,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
356
256
|
};
|
|
357
257
|
},
|
|
358
258
|
reducer(draft, action) {
|
|
359
|
-
const { failedJeScheduleKey } = action.payload;
|
|
360
|
-
|
|
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;
|
|
361
265
|
},
|
|
362
266
|
},
|
|
363
267
|
initializeJeScheduleLocalData: {
|
|
@@ -436,9 +340,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
436
340
|
error: status,
|
|
437
341
|
fetchState: 'Error',
|
|
438
342
|
};
|
|
439
|
-
// Set on failure too: a tenant whose account list errors must still reach the page rather
|
|
440
|
-
// than sit under a skeleton forever.
|
|
441
|
-
draft.accountSettings.hasLoadedAccountSettings = true;
|
|
442
343
|
},
|
|
443
344
|
updateAccountSettingsListForAccountTypes(draft, action) {
|
|
444
345
|
doUpdateAccountSettingsListForAccountTypes(draft.accountSettings, action.payload.accountPayload);
|
|
@@ -472,187 +373,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
472
373
|
clearJeAccountSettingsLocalData(draft) {
|
|
473
374
|
draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
|
|
474
375
|
},
|
|
475
|
-
initializeNewSchedule: {
|
|
476
|
-
prepare({ scheduleType, shouldResetEnteredData = true, }) {
|
|
477
|
-
return { payload: { scheduleType, shouldResetEnteredData } };
|
|
478
|
-
},
|
|
479
|
-
reducer() {
|
|
480
|
-
// Purely an epic-trigger action — the epic fans out the account/class
|
|
481
|
-
// list fetches, and clears entered data only when asked to.
|
|
482
|
-
},
|
|
483
|
-
},
|
|
484
|
-
resetNewScheduleLocalData: {
|
|
485
|
-
prepare({ scheduleType, }) {
|
|
486
|
-
return { payload: { scheduleType } };
|
|
487
|
-
},
|
|
488
|
-
reducer(draft, action) {
|
|
489
|
-
const { scheduleType } = action.payload;
|
|
490
|
-
draft.newSchedule.newScheduleState[scheduleType] =
|
|
491
|
-
(0, exports.getBaseNewScheduleLocalData)(scheduleType);
|
|
492
|
-
},
|
|
493
|
-
},
|
|
494
|
-
updateNewScheduleLocalData(draft, action) {
|
|
495
|
-
const { scheduleType, localData } = action.payload;
|
|
496
|
-
draft.newSchedule.newScheduleState[scheduleType] = {
|
|
497
|
-
...draft.newSchedule.newScheduleState[scheduleType],
|
|
498
|
-
...localData,
|
|
499
|
-
};
|
|
500
|
-
},
|
|
501
|
-
searchTransactionsForNewSchedule: {
|
|
502
|
-
prepare({ query, scheduleType, }) {
|
|
503
|
-
return { payload: { query, scheduleType } };
|
|
504
|
-
},
|
|
505
|
-
reducer(draft, action) {
|
|
506
|
-
const trimmed = action.payload.query.trim();
|
|
507
|
-
// Cleared or too-short query: no API (see epic) — reset immediately.
|
|
508
|
-
if (trimmed.length < jeSchedulesViewState_1.MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
|
|
509
|
-
draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
draft.newSchedule.searchTransactions = {
|
|
513
|
-
...draft.newSchedule.searchTransactions,
|
|
514
|
-
searchString: action.payload.query,
|
|
515
|
-
fetchState: 'In-Progress',
|
|
516
|
-
};
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
searchTransactionsForNewScheduleSuccess(draft, action) {
|
|
520
|
-
draft.newSchedule.searchTransactions = {
|
|
521
|
-
...draft.newSchedule.searchTransactions,
|
|
522
|
-
searchResults: action.payload.searchResults,
|
|
523
|
-
fetchState: 'Completed',
|
|
524
|
-
error: undefined,
|
|
525
|
-
};
|
|
526
|
-
},
|
|
527
|
-
searchTransactionsForNewScheduleFailure(draft, action) {
|
|
528
|
-
draft.newSchedule.searchTransactions = {
|
|
529
|
-
...draft.newSchedule.searchTransactions,
|
|
530
|
-
fetchState: 'Error',
|
|
531
|
-
error: action.payload.status,
|
|
532
|
-
};
|
|
533
|
-
},
|
|
534
|
-
clearSearchTransactionsForNewSchedule(draft) {
|
|
535
|
-
draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
|
|
536
|
-
},
|
|
537
|
-
saveNewSchedule: {
|
|
538
|
-
prepare({ scheduleType, }) {
|
|
539
|
-
return { payload: { scheduleType } };
|
|
540
|
-
},
|
|
541
|
-
reducer(draft) {
|
|
542
|
-
draft.newSchedule.saveStatus = {
|
|
543
|
-
fetchState: 'In-Progress',
|
|
544
|
-
error: undefined,
|
|
545
|
-
};
|
|
546
|
-
},
|
|
547
|
-
},
|
|
548
|
-
saveNewScheduleSuccess(draft) {
|
|
549
|
-
draft.newSchedule.saveStatus = {
|
|
550
|
-
fetchState: 'Completed',
|
|
551
|
-
error: undefined,
|
|
552
|
-
};
|
|
553
|
-
},
|
|
554
|
-
saveNewScheduleFailure(draft, action) {
|
|
555
|
-
draft.newSchedule.saveStatus = {
|
|
556
|
-
fetchState: 'Error',
|
|
557
|
-
error: action.payload.status,
|
|
558
|
-
};
|
|
559
|
-
},
|
|
560
|
-
createOneTimeAccrual: {
|
|
561
|
-
prepare(localData) {
|
|
562
|
-
return { payload: { localData } };
|
|
563
|
-
},
|
|
564
|
-
reducer(draft) {
|
|
565
|
-
draft.newSchedule.createOneTimeAccrualStatus = {
|
|
566
|
-
fetchState: 'In-Progress',
|
|
567
|
-
error: undefined,
|
|
568
|
-
};
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
createOneTimeAccrualSuccess(draft) {
|
|
572
|
-
draft.newSchedule.createOneTimeAccrualStatus = {
|
|
573
|
-
fetchState: 'Completed',
|
|
574
|
-
error: undefined,
|
|
575
|
-
};
|
|
576
|
-
},
|
|
577
|
-
createOneTimeAccrualFailure(draft, action) {
|
|
578
|
-
draft.newSchedule.createOneTimeAccrualStatus = {
|
|
579
|
-
fetchState: 'Error',
|
|
580
|
-
error: action.payload.status,
|
|
581
|
-
};
|
|
582
|
-
},
|
|
583
|
-
/**
|
|
584
|
-
* Promote applies the body and posts in one step, so it carries whatever the user edited on the
|
|
585
|
-
* detail page. `edits` is absent when nothing was changed -- the epic then falls back to the
|
|
586
|
-
* stored accrual, which is what the list's inline Post does.
|
|
587
|
-
*/
|
|
588
|
-
promoteOneTimeAccrual: {
|
|
589
|
-
prepare(accrualId, amount, edits) {
|
|
590
|
-
return { payload: { accrualId, amount, edits } };
|
|
591
|
-
},
|
|
592
|
-
reducer(draft, action) {
|
|
593
|
-
draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
|
|
594
|
-
fetchState: 'In-Progress',
|
|
595
|
-
error: undefined,
|
|
596
|
-
};
|
|
597
|
-
},
|
|
598
|
-
},
|
|
599
|
-
revertOneTimeAccrual: {
|
|
600
|
-
prepare(accrualId, reason, note) {
|
|
601
|
-
return { payload: { accrualId, reason, note } };
|
|
602
|
-
},
|
|
603
|
-
reducer(draft, action) {
|
|
604
|
-
draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
|
|
605
|
-
fetchState: 'In-Progress',
|
|
606
|
-
error: undefined,
|
|
607
|
-
};
|
|
608
|
-
},
|
|
609
|
-
},
|
|
610
|
-
ignoreOneTimeAccrual: {
|
|
611
|
-
prepare(accrualId, reason, note) {
|
|
612
|
-
return { payload: { accrualId, reason, note } };
|
|
613
|
-
},
|
|
614
|
-
reducer(draft, action) {
|
|
615
|
-
draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
|
|
616
|
-
fetchState: 'In-Progress',
|
|
617
|
-
error: undefined,
|
|
618
|
-
};
|
|
619
|
-
},
|
|
620
|
-
},
|
|
621
|
-
fetchOneTimeAccrual: {
|
|
622
|
-
prepare(accrualId) {
|
|
623
|
-
return { payload: { accrualId } };
|
|
624
|
-
},
|
|
625
|
-
reducer(draft, action) {
|
|
626
|
-
draft.oneTimeAccrualFetchStatusById[action.payload.accrualId] = {
|
|
627
|
-
fetchState: 'In-Progress',
|
|
628
|
-
error: undefined,
|
|
629
|
-
};
|
|
630
|
-
},
|
|
631
|
-
},
|
|
632
|
-
fetchOneTimeAccrualSuccess(draft, action) {
|
|
633
|
-
draft.oneTimeAccrualFetchStatusById[action.payload.accrualId] = {
|
|
634
|
-
fetchState: 'Completed',
|
|
635
|
-
error: undefined,
|
|
636
|
-
};
|
|
637
|
-
},
|
|
638
|
-
fetchOneTimeAccrualFailure(draft, action) {
|
|
639
|
-
draft.oneTimeAccrualFetchStatusById[action.payload.accrualId] = {
|
|
640
|
-
fetchState: 'Error',
|
|
641
|
-
error: action.payload.status,
|
|
642
|
-
};
|
|
643
|
-
},
|
|
644
|
-
oneTimeAccrualActionSuccess(draft, action) {
|
|
645
|
-
draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
|
|
646
|
-
fetchState: 'Completed',
|
|
647
|
-
error: undefined,
|
|
648
|
-
};
|
|
649
|
-
},
|
|
650
|
-
oneTimeAccrualActionFailure(draft, action) {
|
|
651
|
-
draft.oneTimeAccrualActionStatusById[action.payload.accrualId] = {
|
|
652
|
-
fetchState: 'Error',
|
|
653
|
-
error: action.payload.status,
|
|
654
|
-
};
|
|
655
|
-
},
|
|
656
376
|
updateJESchedulesUIState(draft, action) {
|
|
657
377
|
if (action.payload.sortKey != null) {
|
|
658
378
|
draft.uiState.sortKey = action.payload.sortKey;
|
|
@@ -666,21 +386,10 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
666
386
|
if (action.payload.scrollPosition != null) {
|
|
667
387
|
draft.uiState.scrollPosition = action.payload.scrollPosition;
|
|
668
388
|
}
|
|
669
|
-
if (action.payload.
|
|
670
|
-
draft.uiState.
|
|
389
|
+
if (action.payload.selectedMainTab != null) {
|
|
390
|
+
draft.uiState.selectedMainTab = action.payload.selectedMainTab;
|
|
671
391
|
}
|
|
672
392
|
},
|
|
673
|
-
updateJEScheduleTypeFilter(draft, action) {
|
|
674
|
-
draft.uiState.selectedJETypeFilter = action.payload;
|
|
675
|
-
},
|
|
676
|
-
toggleJEPendingGroupCollapsed(draft) {
|
|
677
|
-
draft.uiState.pendingGroupCollapsed =
|
|
678
|
-
!draft.uiState.pendingGroupCollapsed;
|
|
679
|
-
},
|
|
680
|
-
toggleJECreatedGroupCollapsed(draft) {
|
|
681
|
-
draft.uiState.createdGroupCollapsed =
|
|
682
|
-
!draft.uiState.createdGroupCollapsed;
|
|
683
|
-
},
|
|
684
393
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
685
394
|
Object.assign(draft, exports.initialState);
|
|
686
395
|
},
|
|
@@ -691,7 +400,7 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
691
400
|
});
|
|
692
401
|
},
|
|
693
402
|
});
|
|
694
|
-
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.
|
|
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;
|
|
695
404
|
exports.default = expenseAutomationJESchedulesView.reducer;
|
|
696
405
|
const doUpdateRecommendationForAccountSettings = (draft, payload) => {
|
|
697
406
|
const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
|
|
@@ -759,5 +468,4 @@ const doUpdateAccountSettingsListForAccountTypes = (draft, accountPayloadList) =
|
|
|
759
468
|
error: undefined,
|
|
760
469
|
fetchState: 'Completed',
|
|
761
470
|
};
|
|
762
|
-
draft.hasLoadedAccountSettings = true;
|
|
763
471
|
};
|
|
@@ -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<"
|
|
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: "
|
|
72
|
-
newSubTab: "
|
|
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], {
|
package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export interface JEAccountSettingsView extends SelectorView {
|
|
|
12
12
|
fixedAssetsAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
13
13
|
fixedAssetsAccountList: AccountBase[];
|
|
14
14
|
fixedAssetsRecommendations: Recommendation[];
|
|
15
|
-
hasLoaded: boolean;
|
|
16
15
|
prepaidExpensesAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
17
16
|
prepaidExpensesAccountList: AccountBase[];
|
|
18
17
|
prepaidExpensesRecommendations: Recommendation[];
|
|
@@ -1,39 +1,15 @@
|
|
|
1
|
-
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
3
2
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
4
3
|
import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
5
4
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
6
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
6
|
import { ClassBase } from '../../../entity/class/classState';
|
|
8
|
-
import {
|
|
7
|
+
import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
8
|
+
import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
9
9
|
import { UncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
10
10
|
import { JEAccountSettingsView } from '../selectorTypes/jeAccountSettingsViewSelectorTypes';
|
|
11
11
|
import { JEScheduledTransactionWithFailedEntries } from '../selectors/jeScheduledTransactionWithFailedEntries';
|
|
12
|
-
import {
|
|
13
|
-
import { JEScheduleRow } from '../selectors/jeSchedulesViewSelector';
|
|
14
|
-
import { JEPageTab, JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
|
|
15
|
-
/**
|
|
16
|
-
* Amount rather than a bare number: the KPI strip formats these for display, and a number carries
|
|
17
|
-
* no currency, which is what made the tiles print a hardcoded dollar sign.
|
|
18
|
-
*/
|
|
19
|
-
export interface JEKpiSummary {
|
|
20
|
-
aiAccountant: {
|
|
21
|
-
amount: Amount;
|
|
22
|
-
count: number;
|
|
23
|
-
};
|
|
24
|
-
manual: {
|
|
25
|
-
amount: Amount;
|
|
26
|
-
count: number;
|
|
27
|
-
};
|
|
28
|
-
needsReview: {
|
|
29
|
-
amount: Amount;
|
|
30
|
-
count: number;
|
|
31
|
-
};
|
|
32
|
-
total: {
|
|
33
|
-
amount: Amount;
|
|
34
|
-
count: number;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
12
|
+
import { JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
|
|
37
13
|
export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
|
|
38
14
|
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
39
15
|
accountSettingsView: JEAccountSettingsView;
|
|
@@ -42,26 +18,16 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
|
|
|
42
18
|
allDepreciationAccountList: AccountBase[];
|
|
43
19
|
allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
44
20
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
21
|
+
completedSchedules: JEScheduledTransaction[];
|
|
45
22
|
completionStatus: CompletionStatusType;
|
|
46
|
-
|
|
47
|
-
createdTotal: number;
|
|
48
|
-
hasLoadedForSelectedTab: boolean;
|
|
23
|
+
draftSchedules: JEScheduledTransaction[];
|
|
49
24
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
50
25
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
ongoing: Record<ScheduleTypes, number>;
|
|
54
|
-
};
|
|
55
|
-
kpiSummary: JEKpiSummary;
|
|
56
|
-
newScheduleView: NewScheduleView | undefined;
|
|
57
|
-
oneTimeAccrualActionStatusById: Record<ID, FetchStateAndError>;
|
|
58
|
-
pendingReviewSchedules: JEScheduleRow[];
|
|
59
|
-
pendingReviewTotal: number;
|
|
26
|
+
ongoingSchedules: JEScheduledTransaction[];
|
|
27
|
+
pendingReviewSchedules: (JEScheduledTransaction | JEScheduledTransactionWithFailedEntries)[];
|
|
60
28
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
61
29
|
refreshStatus: FetchStateAndError;
|
|
62
30
|
resolveSchedules: JEScheduledTransactionWithFailedEntries[];
|
|
63
|
-
revertStatusById: Record<JEScheduleKey | JEScheduleTransactionKey, FetchStateAndError>;
|
|
64
|
-
scheduleCountsByTab: Partial<Record<JEPageTab, number>>;
|
|
65
31
|
uiState: JESchedulesViewUIState;
|
|
66
32
|
uncategorizedAccounts: UncategorizedAccounts;
|
|
67
33
|
}
|
|
@@ -25,7 +25,6 @@ exports.getJEAccountSettingsView = (0, toolkit_1.createSelector)((state) => stat
|
|
|
25
25
|
fixedAssetsAccountHierarchy: jeAccountMappingState.fixedAssetsNestedAccountListHierarchy,
|
|
26
26
|
accruedExpensesAccountHierarchy: jeAccountMappingState.accruedExpensesNestedAccountListHierarchy,
|
|
27
27
|
fetchState: fetchState.fetchState,
|
|
28
|
-
hasLoaded: jeAccountMappingState.hasLoadedAccountSettings,
|
|
29
28
|
saveState,
|
|
30
29
|
};
|
|
31
30
|
});
|