@zeniai/client-epic-state 5.2.53-beta0ND → 5.2.54-betaRD1
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/jeSchedulesReducer.d.ts +4 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +79 -5
- package/lib/entity/notificationRegistry/notificationRegistryReducer.d.ts +1 -2
- package/lib/entity/notificationRegistry/notificationRegistryReducer.js +9 -20
- package/lib/entity/notificationRegistry/notificationRegistrySelector.d.ts +1 -2
- package/lib/entity/notificationRegistry/notificationRegistrySelector.js +1 -7
- package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +0 -5
- package/lib/entity/notificationRegistry/notificationRegistryState.js +1 -7
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +1 -3
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +78 -4
- package/lib/esm/entity/notificationRegistry/notificationRegistryReducer.js +9 -20
- package/lib/esm/entity/notificationRegistry/notificationRegistrySelector.js +0 -5
- package/lib/esm/entity/notificationRegistry/notificationRegistryState.js +0 -5
- package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +1 -3
- package/lib/esm/epic.js +2 -0
- package/lib/esm/index.js +7 -7
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +2 -4
- package/lib/esm/view/aiCfoView/epics/fetchRoutineRunsEpic.js +1 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +39 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +14 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +10 -13
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +38 -17
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +17 -1
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +74 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +49 -14
- package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +7 -20
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +17 -43
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +4 -24
- package/lib/esm/view/settingsView/epic/fetchNotificationSettingsEpic.js +2 -12
- package/lib/index.d.ts +7 -7
- package/lib/index.js +50 -56
- package/lib/tsconfig.mocks.tsbuildinfo +1 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -1
- package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.js +1 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.d.ts +20 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +43 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +8 -11
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +38 -17
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +17 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +18 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +10 -3
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +76 -3
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +49 -14
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +16 -0
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +6 -19
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +5 -8
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +17 -43
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.d.ts +0 -4
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +5 -30
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +3 -4
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +2 -12
- package/lib/view/settingsView/settingsViewPayload.d.ts +0 -2
- package/package.json +1 -1
|
@@ -22,7 +22,10 @@ export declare const updateJESchedules: import("@reduxjs/toolkit").ActionCreator
|
|
|
22
22
|
jeScheduleTransactionKey: `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
|
|
23
23
|
}, "jeSchedules/deleteJESchedulesDetails", never, never>, deleteAccruedJESchedulesDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[JEScheduleKey: `${string}_${string}`], {
|
|
24
24
|
JEScheduleKey: `${string}_${string}`;
|
|
25
|
-
}, "jeSchedules/deleteAccruedJESchedulesDetails", never, never>, clearAllAccruedJESchedules: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllAccruedJESchedules">, clearAllJEScheduleTransactions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllJEScheduleTransactions">,
|
|
25
|
+
}, "jeSchedules/deleteAccruedJESchedulesDetails", never, never>, clearAllAccruedJESchedules: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllAccruedJESchedules">, clearAllJEScheduleTransactions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllJEScheduleTransactions">, removeScheduledJournalEntryFromJESchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, scheduledJournalEntryID: string], {
|
|
26
|
+
jeScheduleTransactionKey: `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
|
|
27
|
+
scheduledJournalEntryID: string;
|
|
28
|
+
}, "jeSchedules/removeScheduledJournalEntryFromJESchedule", never, never>, updateJEOneTimeAccruals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeOneTimeAccrualsPayload: JEOneTimeAccrualPayload[]], {
|
|
26
29
|
jeOneTimeAccrualsPayload: JEOneTimeAccrualPayload[];
|
|
27
30
|
}, "jeSchedules/updateJEOneTimeAccruals", never, never>;
|
|
28
31
|
declare const _default: import("redux").Reducer<JESchedulesState>;
|
|
@@ -4,9 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.updateJEOneTimeAccruals = exports.clearAllJEScheduleTransactions = exports.clearAllAccruedJESchedules = exports.deleteAccruedJESchedulesDetails = exports.deleteJESchedulesDetails = exports.updateAccruedJESchedulesDetails = exports.updateJESchedulesDetails = exports.updateAccruedJEScheduledTransaction = exports.updateJEScheduledTransaction = exports.updateAccruedJESchedules = exports.updateJESchedules = exports.initialState = void 0;
|
|
7
|
+
exports.updateJEOneTimeAccruals = exports.removeScheduledJournalEntryFromJESchedule = exports.clearAllJEScheduleTransactions = exports.clearAllAccruedJESchedules = exports.deleteAccruedJESchedulesDetails = exports.deleteJESchedulesDetails = exports.updateAccruedJESchedulesDetails = exports.updateJESchedulesDetails = exports.updateAccruedJEScheduledTransaction = exports.updateJEScheduledTransaction = exports.updateAccruedJESchedules = exports.updateJESchedules = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
10
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
10
11
|
const rootActions_1 = require("../../rootActions");
|
|
11
12
|
const jeScheduleHelper_1 = require("./jeScheduleHelper");
|
|
12
13
|
const jeSchedulesPayload_1 = require("./jeSchedulesPayload");
|
|
@@ -137,6 +138,27 @@ const jeSchedules = (0, toolkit_1.createSlice)({
|
|
|
137
138
|
});
|
|
138
139
|
},
|
|
139
140
|
},
|
|
141
|
+
/**
|
|
142
|
+
* Drops one journal entry from a schedule, leaving the schedule and its other entries.
|
|
143
|
+
*
|
|
144
|
+
* A schedule that failed to post in several months is one schedule key and several rows on the
|
|
145
|
+
* Failed Postings list. Resolving one of them must retire only that row -- removing the whole
|
|
146
|
+
* schedule key took the still-failing months off the list with it, where nothing would surface
|
|
147
|
+
* them again.
|
|
148
|
+
*/
|
|
149
|
+
removeScheduledJournalEntryFromJESchedule: {
|
|
150
|
+
prepare(jeScheduleTransactionKey, scheduledJournalEntryID) {
|
|
151
|
+
return { payload: { jeScheduleTransactionKey, scheduledJournalEntryID } };
|
|
152
|
+
},
|
|
153
|
+
reducer(draft, action) {
|
|
154
|
+
const { jeScheduleTransactionKey, scheduledJournalEntryID } = action.payload;
|
|
155
|
+
const schedule = draft.schedulesByTransactionKey[jeScheduleTransactionKey];
|
|
156
|
+
if (schedule == null) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
schedule.scheduledJournalEntry = schedule.scheduledJournalEntry.filter((journalEntry) => journalEntry.scheduledJournalEntryID !== scheduledJournalEntryID);
|
|
160
|
+
},
|
|
161
|
+
},
|
|
140
162
|
clearAllJEScheduleTransactions(draft) {
|
|
141
163
|
draft.schedulesByTransactionKey = {};
|
|
142
164
|
},
|
|
@@ -152,7 +174,7 @@ const jeSchedules = (0, toolkit_1.createSlice)({
|
|
|
152
174
|
});
|
|
153
175
|
},
|
|
154
176
|
});
|
|
155
|
-
_a = jeSchedules.actions, exports.updateJESchedules = _a.updateJESchedules, exports.updateAccruedJESchedules = _a.updateAccruedJESchedules, exports.updateJEScheduledTransaction = _a.updateJEScheduledTransaction, exports.updateAccruedJEScheduledTransaction = _a.updateAccruedJEScheduledTransaction, exports.updateJESchedulesDetails = _a.updateJESchedulesDetails, exports.updateAccruedJESchedulesDetails = _a.updateAccruedJESchedulesDetails, exports.deleteJESchedulesDetails = _a.deleteJESchedulesDetails, exports.deleteAccruedJESchedulesDetails = _a.deleteAccruedJESchedulesDetails, exports.clearAllAccruedJESchedules = _a.clearAllAccruedJESchedules, exports.clearAllJEScheduleTransactions = _a.clearAllJEScheduleTransactions, exports.updateJEOneTimeAccruals = _a.updateJEOneTimeAccruals;
|
|
177
|
+
_a = jeSchedules.actions, exports.updateJESchedules = _a.updateJESchedules, exports.updateAccruedJESchedules = _a.updateAccruedJESchedules, exports.updateJEScheduledTransaction = _a.updateJEScheduledTransaction, exports.updateAccruedJEScheduledTransaction = _a.updateAccruedJEScheduledTransaction, exports.updateJESchedulesDetails = _a.updateJESchedulesDetails, exports.updateAccruedJESchedulesDetails = _a.updateAccruedJESchedulesDetails, exports.deleteJESchedulesDetails = _a.deleteJESchedulesDetails, exports.deleteAccruedJESchedulesDetails = _a.deleteAccruedJESchedulesDetails, exports.clearAllAccruedJESchedules = _a.clearAllAccruedJESchedules, exports.clearAllJEScheduleTransactions = _a.clearAllJEScheduleTransactions, exports.removeScheduledJournalEntryFromJESchedule = _a.removeScheduledJournalEntryFromJESchedule, exports.updateJEOneTimeAccruals = _a.updateJEOneTimeAccruals;
|
|
156
178
|
exports.default = jeSchedules.reducer;
|
|
157
179
|
/**
|
|
158
180
|
* Helper functions
|
|
@@ -161,7 +183,13 @@ function doUpdateJEScheduledTransaction(draft, id, payload, updateType) {
|
|
|
161
183
|
const jeTransaction = (0, jeSchedulesPayload_1.toJEScheduledTransaction)(payload);
|
|
162
184
|
const existingTransaction = draft[id];
|
|
163
185
|
if (existingTransaction != null && updateType === 'merge') {
|
|
164
|
-
|
|
186
|
+
// scheduledJournalEntry is held back from the merge. The list payload never carries journal
|
|
187
|
+
// entries -- toJEScheduledTransaction always sets [] -- and [] is not nullish, so the
|
|
188
|
+
// customizer below would treat it as a value and wipe whatever updateJESchedulesDetails had
|
|
189
|
+
// already written. Only the details action may write this field. It is still set on the
|
|
190
|
+
// insert path below, so it is always present.
|
|
191
|
+
const mergeable = (0, omit_1.default)(jeTransaction, ['scheduledJournalEntry']);
|
|
192
|
+
(0, assignWith_1.default)(draft[id], mergeable, (objValue, srcValue) => srcValue ?? objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
165
193
|
}
|
|
166
194
|
else {
|
|
167
195
|
draft[id] = jeTransaction;
|
|
@@ -180,6 +208,32 @@ function doUpdateJEAccruedScheduledTransaction(draft, id, payload, updateType) {
|
|
|
180
208
|
/**
|
|
181
209
|
* Helper functions
|
|
182
210
|
*/
|
|
211
|
+
/**
|
|
212
|
+
* Upserts `incomingEntries` into `existingEntries`, matched on scheduledJournalEntryID.
|
|
213
|
+
*
|
|
214
|
+
* A details payload carries only the entries its caller asked for, never a statement about the
|
|
215
|
+
* complete set: the detail fetch sends every month of a schedule, fetchFailedJePostingsEpic sends
|
|
216
|
+
* only the currently-failing ones. Replacing the array wholesale therefore let a tenant-wide
|
|
217
|
+
* failures refresh shrink a schedule whose Quick View had already loaded all of its months, and
|
|
218
|
+
* the posted ones silently vanished from the store until the detail call ran again.
|
|
219
|
+
*
|
|
220
|
+
* Each writer owns only the entries it actually sent. Callers that do hold the authoritative list
|
|
221
|
+
* pass updateType 'replace' and skip this path entirely.
|
|
222
|
+
*/
|
|
223
|
+
function mergeScheduledJournalEntries(existingEntries, incomingEntries) {
|
|
224
|
+
const incomingEntryByID = new Map(incomingEntries.map((incomingEntry) => [
|
|
225
|
+
incomingEntry.scheduledJournalEntryID,
|
|
226
|
+
incomingEntry,
|
|
227
|
+
]));
|
|
228
|
+
const existingEntryIDs = new Set(existingEntries.map((existingEntry) => existingEntry.scheduledJournalEntryID));
|
|
229
|
+
// Existing order is preserved so a re-fetch cannot reshuffle rows under the user; entries the
|
|
230
|
+
// store has not seen before are appended.
|
|
231
|
+
return [
|
|
232
|
+
...existingEntries.map((existingEntry) => incomingEntryByID.get(existingEntry.scheduledJournalEntryID) ??
|
|
233
|
+
existingEntry),
|
|
234
|
+
...incomingEntries.filter((incomingEntry) => !existingEntryIDs.has(incomingEntry.scheduledJournalEntryID)),
|
|
235
|
+
];
|
|
236
|
+
}
|
|
183
237
|
function doUpdateAccruedScheduledDetailTransaction(draft, id, jeSchedulePayload, scheduleJournalEntries, updateType) {
|
|
184
238
|
const jeTransaction = (0, jeSchedulesPayload_1.toJEAccruedScheduledTransaction)(jeSchedulePayload);
|
|
185
239
|
const { currencyCode, currencySymbol } = jeTransaction;
|
|
@@ -190,7 +244,17 @@ function doUpdateAccruedScheduledDetailTransaction(draft, id, jeSchedulePayload,
|
|
|
190
244
|
}
|
|
191
245
|
const existingTransaction = draft[id];
|
|
192
246
|
if (existingTransaction != null && updateType === 'merge') {
|
|
193
|
-
|
|
247
|
+
// An empty array here means "this payload carried no entries for this schedule", not "this
|
|
248
|
+
// schedule has none" -- and [] is not nullish, so the customizer below would treat it as a
|
|
249
|
+
// value and clear entries another call already wrote. Only overwrite when there is something
|
|
250
|
+
// to write.
|
|
251
|
+
const mergeable = scheduledJournalEntries.length > 0
|
|
252
|
+
? {
|
|
253
|
+
...jeTransaction,
|
|
254
|
+
scheduledJournalEntry: mergeScheduledJournalEntries(existingTransaction.scheduledJournalEntry, scheduledJournalEntries),
|
|
255
|
+
}
|
|
256
|
+
: (0, omit_1.default)(jeTransaction, ['scheduledJournalEntry']);
|
|
257
|
+
(0, assignWith_1.default)(draft[id], mergeable, (objValue, srcValue) => srcValue ?? objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
194
258
|
}
|
|
195
259
|
else {
|
|
196
260
|
draft[id] = {
|
|
@@ -210,7 +274,17 @@ function doUpdateScheduledDetailTransaction(draft, id, jeSchedulePayload, schedu
|
|
|
210
274
|
}
|
|
211
275
|
const existingTransaction = draft[id];
|
|
212
276
|
if (existingTransaction != null && updateType === 'merge') {
|
|
213
|
-
|
|
277
|
+
// An empty array here means "this payload carried no entries for this schedule", not "this
|
|
278
|
+
// schedule has none" -- and [] is not nullish, so the customizer below would treat it as a
|
|
279
|
+
// value and clear entries another call already wrote. Only overwrite when there is something
|
|
280
|
+
// to write.
|
|
281
|
+
const mergeable = scheduledJournalEntries.length > 0
|
|
282
|
+
? {
|
|
283
|
+
...jeTransaction,
|
|
284
|
+
scheduledJournalEntry: mergeScheduledJournalEntries(existingTransaction.scheduledJournalEntry, scheduledJournalEntries),
|
|
285
|
+
}
|
|
286
|
+
: (0, omit_1.default)(jeTransaction, ['scheduledJournalEntry']);
|
|
287
|
+
(0, assignWith_1.default)(draft[id], mergeable, (objValue, srcValue) => srcValue ?? objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
214
288
|
}
|
|
215
289
|
else {
|
|
216
290
|
draft[id] = {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { NotificationRegistryPayload } from './notificationRegistryPayload';
|
|
2
|
-
import {
|
|
2
|
+
import { NotificationRegistryState } from './notificationRegistryState';
|
|
3
3
|
export declare const initialState: NotificationRegistryState;
|
|
4
4
|
export interface UpdateNotificationRegistryPayload {
|
|
5
5
|
registry: NotificationRegistryPayload | undefined;
|
|
6
6
|
registryEpochAtDispatch: number;
|
|
7
|
-
registriesByDomain?: Partial<Record<NotificationDomain, NotificationRegistryPayload | undefined>>;
|
|
8
7
|
}
|
|
9
8
|
export declare const updateNotificationRegistry: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateNotificationRegistryPayload, "notificationRegistry/updateNotificationRegistry">;
|
|
10
9
|
declare const _default: import("redux").Reducer<NotificationRegistryState>;
|
|
@@ -4,7 +4,6 @@ exports.updateNotificationRegistry = exports.initialState = void 0;
|
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const rootActions_1 = require("../../rootActions");
|
|
6
6
|
const notificationRegistryPayload_1 = require("./notificationRegistryPayload");
|
|
7
|
-
const notificationRegistryState_1 = require("./notificationRegistryState");
|
|
8
7
|
exports.initialState = { registryEpoch: 0 };
|
|
9
8
|
const notificationRegistry = (0, toolkit_1.createSlice)({
|
|
10
9
|
name: 'notificationRegistry',
|
|
@@ -23,24 +22,16 @@ const notificationRegistry = (0, toolkit_1.createSlice)({
|
|
|
23
22
|
// `task_checklist_registry` CLEARS so tenant B doesn't inherit A's
|
|
24
23
|
// Task Checklist section. Guarded by the epoch check above so a stale
|
|
25
24
|
// absent-response can't wipe a fresh registry.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const snapshots = registriesByDomain ?? { task_checklist: action.payload.registry };
|
|
30
|
-
draft.registryByDomain = {};
|
|
31
|
-
for (const domain of notificationRegistryState_1.NOTIFICATION_DOMAINS) {
|
|
32
|
-
const payload = snapshots[domain];
|
|
33
|
-
// Full-replace per domain, and an absent snapshot CLEARS that domain so
|
|
34
|
-
// tenant B never inherits A's section. The gates are independent
|
|
35
|
-
// server-side, so one domain clearing must not touch the other.
|
|
36
|
-
if (payload != null) {
|
|
37
|
-
draft.registryByDomain[domain] =
|
|
38
|
-
(0, notificationRegistryPayload_1.mapNotificationRegistryPayloadToRegistry)(payload);
|
|
39
|
-
}
|
|
25
|
+
if (action.payload.registry == null) {
|
|
26
|
+
draft.registry = undefined;
|
|
27
|
+
return;
|
|
40
28
|
}
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
// Full-replace contract: the registry payload is atomic — every fetch
|
|
30
|
+
// returns the complete group/event tree. If the backend ever ships a
|
|
31
|
+
// partial registry response, this write MUST switch to a merge (mirror
|
|
32
|
+
// the preferences slice's `mergePreferences`). Do not assume the
|
|
33
|
+
// current payload is partial without also updating this reducer.
|
|
34
|
+
draft.registry = (0, notificationRegistryPayload_1.mapNotificationRegistryPayloadToRegistry)(action.payload.registry);
|
|
44
35
|
},
|
|
45
36
|
},
|
|
46
37
|
extraReducers: (builder) => {
|
|
@@ -53,8 +44,6 @@ const notificationRegistry = (0, toolkit_1.createSlice)({
|
|
|
53
44
|
// — Cursor Bugbot 67d6918e. Returning `initialState` verbatim would
|
|
54
45
|
// rewind the counter and let a stale in-flight GET restore A's
|
|
55
46
|
// registry over B's.
|
|
56
|
-
// Drops `registry` and `registryByDomain` together: a tenant switch must
|
|
57
|
-
// not leave one domain's section behind.
|
|
58
47
|
return { registryEpoch: draft.registryEpoch + 1 };
|
|
59
48
|
});
|
|
60
49
|
},
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NotificationRegistry, NotificationRegistryState } from './notificationRegistryState';
|
|
2
2
|
export declare const getNotificationRegistry: (slice: NotificationRegistryState) => NotificationRegistry | undefined;
|
|
3
|
-
export declare const getNotificationRegistryForDomain: (slice: NotificationRegistryState, domain: NotificationDomain) => NotificationRegistry | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNotificationRegistry = void 0;
|
|
4
4
|
// Current behavior: a null / undefined registry means the whole notification
|
|
5
5
|
// section is hidden by consumers. This conflates two distinct states —
|
|
6
6
|
// "user has no saved preferences yet" vs "the Task Checklist feature gate is
|
|
@@ -8,9 +8,3 @@ exports.getNotificationRegistryForDomain = exports.getNotificationRegistry = voi
|
|
|
8
8
|
// them (e.g. an explicit `gate_off` signal from the server) is a follow-up.
|
|
9
9
|
const getNotificationRegistry = (slice) => slice.registry;
|
|
10
10
|
exports.getNotificationRegistry = getNotificationRegistry;
|
|
11
|
-
// `undefined` conflates gate-off with no-preferences-yet; consumers hide the
|
|
12
|
-
// section either way. Falls back to `registry` for task_checklist so state built
|
|
13
|
-
// in the pre-domain shape (consumer mocks, older callers) still resolves.
|
|
14
|
-
const getNotificationRegistryForDomain = (slice, domain) => slice.registryByDomain?.[domain] ??
|
|
15
|
-
(domain === 'task_checklist' ? slice.registry : undefined);
|
|
16
|
-
exports.getNotificationRegistryForDomain = getNotificationRegistryForDomain;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export declare const NOTIFICATION_DOMAINS: readonly ["task_checklist", "commenting"];
|
|
2
|
-
export type NotificationDomain = (typeof NOTIFICATION_DOMAINS)[number];
|
|
3
|
-
export declare const DEFAULT_NOTIFICATION_DOMAIN: NotificationDomain;
|
|
4
|
-
export declare const toNotificationDomain: (raw: string) => NotificationDomain;
|
|
5
1
|
export declare const NOTIFICATION_CHANNELS: readonly ["email", "slack", "in_app"];
|
|
6
2
|
export type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];
|
|
7
3
|
export declare const toNotificationChannel: (raw: string) => NotificationChannel;
|
|
@@ -34,5 +30,4 @@ export interface NotificationRegistry {
|
|
|
34
30
|
export interface NotificationRegistryState {
|
|
35
31
|
registryEpoch: number;
|
|
36
32
|
registry?: NotificationRegistry;
|
|
37
|
-
registryByDomain?: Partial<Record<NotificationDomain, NotificationRegistry>>;
|
|
38
33
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toNotificationFrequency = exports.NOTIFICATION_FREQUENCIES = exports.toNotificationChannel = exports.NOTIFICATION_CHANNELS =
|
|
3
|
+
exports.toNotificationFrequency = exports.NOTIFICATION_FREQUENCIES = exports.toNotificationChannel = exports.NOTIFICATION_CHANNELS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
-
// Wire vocabulary owned by the notifications service, not by this slice.
|
|
6
|
-
exports.NOTIFICATION_DOMAINS = ['task_checklist', 'commenting'];
|
|
7
|
-
// Callers that predate the domain split mean Task Checklist.
|
|
8
|
-
exports.DEFAULT_NOTIFICATION_DOMAIN = 'task_checklist';
|
|
9
|
-
const toNotificationDomain = (raw) => (0, stringToUnion_1.stringToUnion)(raw, exports.NOTIFICATION_DOMAINS);
|
|
10
|
-
exports.toNotificationDomain = toNotificationDomain;
|
|
11
5
|
exports.NOTIFICATION_CHANNELS = ['email', 'slack', 'in_app'];
|
|
12
6
|
const toNotificationChannel = (raw) => (0, stringToUnion_1.stringToUnion)(raw, exports.NOTIFICATION_CHANNELS);
|
|
13
7
|
exports.toNotificationChannel = toNotificationChannel;
|
|
@@ -35,9 +35,7 @@ const sectionProjectView = (0, toolkit_1.createSlice)({
|
|
|
35
35
|
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
36
36
|
const projectPayload = sectionPayload.projects[projectId];
|
|
37
37
|
// A calculated section is grouped by project with no accounts under it.
|
|
38
|
-
const projectAccounts = 'accounts' in projectPayload
|
|
39
|
-
? projectPayload.accounts
|
|
40
|
-
: undefined;
|
|
38
|
+
const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
|
|
41
39
|
const nestedAccountIds = projectAccounts != null
|
|
42
40
|
? (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(Object.keys(projectAccounts), accountsMetadata)
|
|
43
41
|
: [];
|
package/lib/epic.d.ts
CHANGED
|
@@ -191,6 +191,7 @@ import { ActionType as MatchAndReverseAccrualsActionType } from './view/expenseA
|
|
|
191
191
|
import { ActionType as SearchMatchAccrualsActionType } from './view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchAccrualsEpic';
|
|
192
192
|
import { ActionType as SearchMatchTransactionsActionType } from './view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchTransactionsEpic';
|
|
193
193
|
import { ActionType as UndoReversalAccrualsActionType } from './view/expenseAutomationView/epics/jeSchedule/actualMatching/undoReversalAccrualsEpic';
|
|
194
|
+
import { ActionType as FetchExpenseAutomationFailedJePostingsActionType } from './view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic';
|
|
194
195
|
import { ActionType as FetchExpenseAutomationJESchedulePageActionType } from './view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic';
|
|
195
196
|
import { ActionType as FetchExpenseAutomationJEScheduleActionType } from './view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic';
|
|
196
197
|
import { ActionType as FetchOneTimeAccrualActionType } from './view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic';
|
|
@@ -699,5 +700,5 @@ import { ActionType as FetchDepositAccStatementListActionType } from './view/zen
|
|
|
699
700
|
import { ActionType as FetchZeniAccStatePageActionType } from './view/zeniAccStatementList/fetchZeniAccStatementPageEpic';
|
|
700
701
|
import { ActionType as ApproveOAuthConsentActionType } from './view/zeniOAuthView/epics/approveOAuthConsentEpic';
|
|
701
702
|
/** Root action type is union of all the epic action type */
|
|
702
|
-
export type RootActionType = AcceptBillPayTermsActionType | AcceptBillPayUpdatedTermsActionType | AcceptChargeCardTermsActionType | AcceptEmployeeRemiTermsActionType | AcceptMasterTOSEpicActionType | AcceptRemiTermsActionType | AcceptTreasuryTermsActionType | AcceptZeniAccountTermsActionType | AcknowledgeOnboardingAiActivationViewedActionType | AcknowledgeOnboardingAiFinanceTeamActionType | AddCardPaymentSourceActionType | ApplyExtractedPolicyToDraftActionType | ApproveOAuthConsentActionType | ApproveOrRejectBillActionType | ApproveOrRejectBillsBulkActionActionType | ApproveOrRejectRemiActionType | ApproveOrRejectRemisBulkActionActionType | ApproveVendorGlobalReviewActionType | ArchiveCardPolicyActionType | ArchiveTaskActionType | BackgroundRefetchReviewTabActionType | BalanceSheetActionType | BalanceSheetClassesViewActionType | BalanceSheetForTimeframeActionType | BalanceSheetForTimeframeClassesViewActionType | BalanceSheetForTimeframeProjectViewActionType | BalanceSheetProjectViewActionType | BulkUpdateTasksListActionType | BulkUploadMatchResultToastActionType | BulkUploadReceiptsActionType | CancelAiAccountantOnboardingActionType | CancelAndDeleteBillActionType | CancelAndDeleteRemiActionType | CancelOrDeleteBillsBulkActionActionType | CancelOrDeleteRemisBulkActionActionType | CancelScheduleAccruedJournalEntryActionType | CardBalanceActionType | CashBalanceActionType | CashFlowActionType | CashFlowClassesViewActionType | CashFlowForTimeframeActionType | CashFlowForTimeframeClassesViewActionType | CashFlowForTimeframeProjectViewActionType | CashFlowProjectViewActionType | CashInCashOutActionType | CashPositionActionType | ChangeZeniPersonRolesActionType | CheckDepositActionType | CloseChargeCardActionType | CloseChargeCardsActionType | CombinedStatementActionType | CompanyManagementSavePendingUpdatesActionType | CompanyManagementSaveUpdatesActionType | ConfirmBulkUploadMatchActionType | ConfirmCardSetupIntentActionType | ConfirmStatementMappingActionType | CreateAddressActionType | CreateAutoTransferRuleActionType | CreateBankAccountActionType | CreateCardPolicyTemplateActionType | CreateCardSetupIntentActionType | CreateCheckingAccountActionType | CreateCompanyAddressActionType | CreateCompanyOfficersActionType | CreateCompanyUserAddressActionType | CreateGlobalMerchantActionType | CreateInternationalBankAccountActionType | CreateInvoiceActionType | CreateNewSchedulesAccruedActionType | CreateNewSchedulesActionType | CreateNewTaskGroupActionType | CreateOneTimeAccrualActionType | CreatePaymentInstrumentActionType | CreateSessionActionType | CreateSessionAndSubmitActionType | CreateSubTaskActionType | CreateTagActionType | CreateTaskFromTaskGroupTemplateActionType | CreateTransferEntryActionType | CreateUserBankAccountActionType | CurrencyConversionActionType | DeleteAccountStatementActionType | DeleteAutoTransferRuleActionType | DeleteBankAccountActionType | DeleteBillActionType | DeleteBillPayApprovalRuleActionType | DeleteCannedResponseActionType | DeleteChatSessionActionType | DeleteCombinedStatementActionType | DeleteFileActionType | DeleteFileListActionType | DeleteInternationalBankAccountActionType | DeletePaymentInstrumentActionType | DeletePersonActionType | DeleteRemiActionType | DeleteRemiApprovalRuleActionType | DeleteScheduleAccruedDetailActionType | DeleteScheduleDetailActionType | DeleteTagActionType | DeleteTaskActionType | DeleteTaskGroupActionType | DeleteTransactionAttachmentActionType | DeleteUserBankAccountActionType | DepositAccountTransactionListActionType | DisableAccountingProjectsActionType | DismissCapitalizationOnboardingActionType | DoMagicLinkSignInActionType | DownloadAccountingProviderAttachmentActionType | DragNDropTasksActionType | EditInvoicingCatalogItemDetailViewActionType | EditInvoicingCouponDetailViewActionType | EditInvoicingCustomerDetailViewActionType | EditInvoicingSubscriptionDetailViewActionType | EnableAccountingProjectsActionType | EnableChargeCardAutoPayActionType | EnableSetupActionType | EstablishOnboardingPlaidConnectionActionType | EstablishPlaidConnectionActionType | ExcludeAccountFromReconciliationActionType | ExpressInterestChargeCardActionType | ExpressPayActionType | ExtractPolicyDocumentActionType | FetchAccountHistoryActionType | FetchAccountListActionType | FetchAccountListForAccountTypesActionType | FetchAccountSettingsListForAccountTypesActionType | FetchAccruedScheduleListActionType | FetchActiveTenantActionType | FetchAddressActionType | FetchAggregatedReportActionType | FetchAiAccountantCustomersActionType | FetchAiAccountantJobsActionType | FetchAiAgentsActivationStatusActionType | FetchAllCockpitViewsActionType | FetchAllExpenseAutomationTabsActionType | FetchAllPeopleRequiredActionType | FetchAllTagsActionType | FetchAllTaskGroupsActionType | FetchAllTenantsActionType | FetchApAgingActionType | FetchApAgingDetailActionType | FetchArAgingActionType | FetchArAgingDetailActionType | FetchAuditReportGroupViewActionType | FetchAuditRuleGroupViewActionType | FetchAutoTransferReviewDetailActionType | FetchAutoTransferRuleHistoryActionType | FetchAutoTransferRulesActionType | FetchBankAccountsListActionType | FetchBankConnectionsViewActionType | FetchBankCountryNameByIbanActionType | FetchBankNameByRoutingActionType | FetchBankNameBySwiftActionType | FetchBillAndInitializeLocalStoreActionType | FetchBillDetailActionType | FetchBillingAccountsListActionType | FetchBillListActionType | FetchBillListPerTabActionType | FetchBillPayApproversDetailsActionType | FetchBillPayApproversListActionType | FetchBillPayCardActionType | FetchBillPayConfigActionType | FetchBillPaySetupApproverViewActionType | FetchBillPaySetupViewActionType | FetchBulkUploadBatchDetailsActionType | FetchBulkUploadBatchesActionType | FetchCannedResponsesActionType | FetchCardPolicyDetailActionType | FetchCardPolicyListActionType | FetchCardPolicyMccCategoriesActionType | FetchCardPolicyVendorOptionsActionType | FetchCardProfilesActionType | FetchCashbackDetailActionType | FetchChargeCardConfigActionType | FetchChargeCardDetailActionType | FetchChargeCardDetailPageActionType | FetchChargeCardListActionType | FetchChargeCardListPageActionType | FetchChargeCardPaymentHistoryActionType | FetchChargeCardPaymentPageActionType | FetchChargeCardRepaymentDetailActionType | FetchChargeCardSetupViewActionType | FetchChargeCardsRecurringExpensesActionType | FetchChargeCardStatementListActionType | FetchChargeCardTransactionAttachmentsActionType | FetchChargeCardTransactionListActionType | FetchChargeCardTransactionStatisticsActionType | FetchChatHistoryActionType | FetchChatSessionsForUserActionType | FetchClassListActionType | FetchCockpitContextActionType | FetchCollaborationAuthTokenActionType | FetchCompanyBillingAddressActionType | FetchCompanyConfigActionType | FetchCompanyHealthMetricConfigViewEpicActionType | FetchCompanyHealthMetricViewEpicActionType | FetchCompanyManagementActionType | FetchCompanyMetaDataActionType | FetchCompanyMonthEndReportHistoricDataActionType | FetchCompanyMonthEndReportHistoricDatesActionType | FetchCompanyMonthEndReportTemplatesActionType | FetchCompanyMonthEndReportViewActionType | FetchCompanyOnboardingViewActionType | FetchCompanyPassportViewActionType | FetchCompanyPortfolioActionType | FetchCompanyTaskManagerViewActionType | FetchCompletedTransactionsActionType | FetchCreateInvoiceFormPageActionType | FetchCreditAccountActionType | FetchCreditAccountRepaymentActionType | FetchCreditAgentMacroActionType | FetchCurrencyConversionValueActionType | FetchDashboardActionType | FetchDashboardLayoutActionType | FetchDebitCardSummaryActionType | FetchDepositAccountActionType | FetchDepositAccountDetailActionType | FetchDepositAccountLimitActionType | FetchDepositAccountListActionType | FetchDepositAccountListForCardsActionType | FetchDepositAccStatementListActionType | FetchDownloadSchedulesActionType | FetchDuplicateBillActionType | FetchDuplicateReimbursementEpicActionType | FetchEditBillDetailPageActionType | FetchEditRemiDetailPageActionType | FetchEligibleActionsForBillActionType | FetchEntityAutoCompleteActionType | FetchEntityHistoryActionType | FetchEntityRecommendationsByTransactionIdActionType | FetchEntityRecommendationsForLineUpdateActionType | FetchExcludedResourcesActionType | FetchExpenseAutomationActualMatchingActionType | FetchExpenseAutomationActualMatchingMatchActionType | FetchExpenseAutomationActualMatchingPageActionType | FetchExpenseAutomationFluxAnalysisActionType | FetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataActionType | FetchExpenseAutomationJEScheduleActionType | FetchExpenseAutomationJESchedulePageActionType | FetchExpenseAutomationMarkTransactionAsNotMiscategorizedActionType | FetchExpenseAutomationMissingReceiptsActionType | FetchExpenseAutomationReconciliationsViewActionType | FetchExpenseAutomationSaveTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationViewActionType | FetchExpenseAutomationUpdateTransactionCategorizationEpicActionType | FetchExpenseTrendActionType | FetchExternalConnectionsActionType | FetchFileActionType | FetchFileListActionType | FetchForecastListActionType | FetchGlobalMerchantAutoCompleteActionType | FetchGlobalMerchantRecommendationActionType | FetchIncomeTrendActionType | FetchInternationalWireDynamicFormActionType | FetchIntlVerificationFormActionType | FetchInvoiceCountsActionType | FetchInvoiceDetailActionType | FetchInvoiceKPIsActionType | FetchInvoiceListActionType | FetchInvoiceListPageActionType | FetchIssueCardPageActionType | FetchMagicLinkBankNameByRoutingActionType | FetchMagicLinkBankNameBySwiftActionType | FetchMagicLinkBillActionType | FetchMagicLinkTenantActionType | FetchManagementActionType | FetchMerchantListActionType | FetchMonthClosePerformanceTrendActionType | FetchMonthEndCloseChecksActionType | FetchMoreBatchDetailsActionType | FetchMultipleBatchDetailsActionType | FetchMyProfileActionType | FetchMyProfileViewActionType | FetchNetBurnOrIncomeStoryCardActionType | FetchNetBurnOrIncomeWithForecastActionType | FetchNotificationSettingsActionType | FetchNotificationSettingsViewActionType | FetchNotificationUnreadCountActionType | FetchNotificationViewActionType | FetchOnboardingActionType | FetchOnboardingCompletedCompaniesActionType | FetchOnboardingCustomerSetupViewActionType | FetchOnboardingCustomerViewActionType | FetchOneTimeAccrualActionType | FetchOpExWithForecastActionType | FetchOwnerListActionType | FetchParentSubsidiaryManagementActionType | FetchPaymentAccountBalanceActionType | FetchPaymentAccountListActionType | FetchPaymentSourcesActionType | FetchPortfolioActionType | FetchPortfolioAllocationActionType | FetchPreviousBillsActionType | FetchProjectListActionType | FetchQBOConnectionPoolActionType | FetchRecommendationByEntityIdActionType | FetchRecommendationByEntityNameActionType | FetchRecommendationsAndUpdateMerchantRecommendationsActionType | FetchRecommendationsAndUpdateVendorRecommendationsActionType | FetchRecommendedBillExpenseActionType | FetchReferralsActionType | FetchRegisteredInterestsActionType | FetchReimbursementCardActionType | FetchReimbursementConfigActionType | FetchRemiAndInitializeLocalStoreActionType | FetchRemiApproversDetailsActionType | FetchRemiApproversListActionType | FetchRemiDetailActionType | FetchRemiListActionType | FetchRemiListPerTabActionType | FetchRemiSetupApproverViewActionType | FetchRemiSetupViewActionType | FetchRevenueWithForecastActionType | FetchReviewCompanyActionType | FetchReviewTransferDetailActionType | FetchRewardsPlanActionType | FetchScheduleAccruedDetailsActionType | FetchScheduleAccruedDetailsPageActionType | FetchScheduleDetailsActionType | FetchScheduleDetailsPageActionType | FetchScheduleListActionType | FetchSchedulesListActionType | FetchSkillsActionType | FetchSubscriptionActionType | FetchSubscriptionAddOnsActionType | FetchSubscriptionCouponsActionType | FetchSubscriptionCreateEstimateActionType | FetchSubscriptionDetailsActionType | FetchSubscriptionListActionType | FetchSubscriptionPlansActionType | FetchSubscriptionSummaryForTenantActionType | FetchSubscriptionUpdateEstimateActionType | FetchSubTasksActionType | FetchSuggestedQuestionsActionType | FetchTaskDetailActionType | FetchTaskDetailPageActionType | FetchTaskGroupTemplatesActionType | FetchTaskHistoryActionType | FetchTaskListActionType | FetchTaskListPageActionType | FetchTaskManagerMetricsActionType | FetchTasksCardActionType | FetchTransactionActivityLogActionType | FetchTransactionDetailActionType | FetchTransactionListByAccountActionType | FetchTransactionListByClassActionType | FetchTransactionListByEntityActionType | FetchTransactionListByProjectActionType | FetchTransactionsForEntityActionType | FetchTransactionsListByCategoryTypeActionType | FetchTransferAccountsActionType | FetchTreasuryDetailActionType | FetchTreasuryFundsActionType | FetchTreasuryHistoryActionType | FetchTreasurySetupViewActionType | FetchTreasuryStatementListActionType | FetchTreasuryTaxLetterListActionType | FetchTreasuryTransactionListActionType | FetchTrendForEntityActionType | FetchUserDetailActionType | FetchUserFinancialAccountActionType | FetchUserListByTypeActionType | FetchUserRoleConfigActionType | FetchVendor1099TypeListActionType | FetchVendorActionType | FetchVendorAndUpdateBillLocalDataActionType | FetchVendorByNameAndParseInvoiceActionType | FetchVendorDetailsActionType | FetchVendorFirstReviewAttachmentsActionType | FetchVendorFirstReviewViewActionType | FetchVendorGlobalReviewViewActionType | FetchVendorsActionType | FetchVendorsFiling1099ActionType | FetchVendorsFiling1099AllActionType | FetchVendorsFiling1099DownloadActionType | FetchVendorTabViewActionType | FetchVendorTypeListActionType | FetchZeniAccountListPageActionType | FetchZeniAccountsConfigActionType | FetchZeniAccountSetupViewActionType | FetchZeniAccStatePageActionType | FetchZeniUsersActionType | GetOnboardingEmailGroupActionType | GetOnboardingPlaidLinkTokenActionType | GetPaymentAccountsActionType | GetPlaidLinkTokenActionType | IgnoreExpenseAutomationJEScheduleActionType | ImproveUsingZeniGPTActionType | IncludeAccountInReconciliationActionType | InitialiseExpenseAutomationLocalDataForSelectedAccountIdActionType | InitializeAccountMappingViewActionType | InitializeAccountSettingsViewEpicActionType | InitializeBillPaySetupApproverViewUpdateDataActionType | InitializeBillToLocalStoreActionType | InitializeCardUserOnboardingLocalDataActionType | InitializeCompanyHealthMetricViewLocalDataEpicActionType | InitializeEditPersonActionType | InitializeExpenseAutomationJeScheduleLocalDataActionType | InitializeInternationalWireLocalDataActionType | InitializeIntlVerificationFormEpicActionType | InitializeMyProfileLocalDataActionType | InitializeNewScheduleActionType | InitializeOnboardingCustomerViewUpdateDataActionType | InitializeRemiSetupApproverViewUpdateDataActionType | InitializeRemiToLocalStoreActionType | InitializeScheduleAccruedDetailLocalDataActionType | InitializeScheduleDetailLocalDataActionType | InitializeSubscriptionLocalDataActionType | InitializeTaskToLocalStoreActionType | InitializeTransactionDetailLocalDataActionType | InitializeVendorAddressActionType | InitiateChargeCardRepaymentActionType | InitiateReportsClassViewRefetchingActionType | InitiateReportsProjectViewRefetchingActionType | InsightsCardActionType | InvitePeopleActionType | InviteZeniPeopleActionType | InvoiceDetailPageActionType | InvoicingAuditViewActionType | InvoicingCatalogItemDetailFetchActionType | InvoicingCatalogItemDetailPageActionType | InvoicingCatalogItemFormDraftSeedActionType | InvoicingCatalogListViewActionType | InvoicingCatalogPlanActionActionType | InvoicingCatalogProductActionActionType | InvoicingConfigViewActionType | InvoicingCouponDetailFetchActionType | InvoicingCouponDetailPageActionType | InvoicingCouponFormDraftSeedActionType | InvoicingCouponViewActionType | InvoicingCreditNoteDetailViewActionType | InvoicingCreditNoteListViewActionType | InvoicingCustomerDetailPageActionType | InvoicingCustomerFormDraftSeedActionType | InvoicingCustomerListViewActionType | InvoicingCustomerPaymentMethodActionType | InvoicingCustomerRecordViewActionType | InvoicingDataImportViewActionType | InvoicingDiscountActionActionType | InvoicingDunningActionActionType | InvoicingDunningCaseDetailPageActionType | InvoicingDunningCaseDetailViewActionType | InvoicingDunningCaseListViewActionType | InvoicingInvoiceActionActionType | InvoicingOverviewActionType | InvoicingPaymentActionActionType | InvoicingPaymentLinkEmailPreviewActionType | InvoicingPaymentLinkEmailPreviewPageActionType | InvoicingPromotionalCreditActionActionType | InvoicingQboViewActionType | InvoicingSettingsViewActionType | InvoicingSubscriptionActionActionType | InvoicingSubscriptionDetailFetchActionType | InvoicingSubscriptionDetailPageActionType | InvoicingSubscriptionFormDraftSeedActionType | InvoicingSubscriptionFormPageActionType | InvoicingSubscriptionListViewActionType | InvoicingTransactionDetailViewActionType | InvoicingTransactionListViewActionType | IssueChargeCardActionType | LockChargeCardActionType | LockChargeCardsActionType | MarkAsCompleteScheduleDetailActionType | MarkTransactionAsNotMiscategorizedActionType | MatchAndReverseAccrualsActionType | NetBurnOrIncomeActionType | NetBurnOrIncomeClassesViewActionType | NetBurnOrIncomeForTimeframeActionType | NetBurnOrIncomeForTimeframeClassesViewActionType | NetBurnOrIncomeForTimeframeProjectViewActionType | NetBurnOrIncomeProjectViewActionType | NotifyMeForFeatureActionType | OneTimeAccrualActionsActionType | OpExActionType | OpExByVendorReportActionType | OpExByVendorReportForTimeframeActionType | OpExByVendorReportSummaryActionType | OpExClassesViewActionType | OpExForTimeframeClassesViewActionType | OpExForTimeframeProjectViewActionType | OpExForTimeframeViewActionType | OpExProjectViewActionType | ParallelFetchAccountTransactionListActionType | ParallelFetchClassTransactionListActionType | ParallelFetchEntityTransactionListActionType | ParallelFetchProjectTransactionListActionType | ParallelFetchTransactionListByCategoryTypeActionType | ParseCombinedStatementActionType | ParseInvoiceToBillActionType | ParseReceiptsToRemiActionType | ParseStatementActionType | ParseUploadedKybDocumentActionType | ParseUploadedKycDocumentActionType | PeopleActionType | PeoplePageActionType | PeopleSaveUpdatesActionType | PolicyDocumentExtractionToRecommendationBridgeActionType | PolicyRecommendationFromUploadActionType | PrefetchOtherJeSchedulesTabActionType | ProfitAndLossActionType | ProfitAndLossClassesViewActionType | ProfitAndLossForTimeframeActionType | ProfitAndLossForTimeframeClassesViewActionType | ProfitAndLossForTimeframeProjectViewActionType | ProfitAndLossProjectViewActionType | PushToastNotificationActionType | RecommendationForAccountSettingsActionType | RecommendationForAccountTypeActionType | RecordPaymentActionType | RefetchCompletedTransactionsOnBulkUploadSortActionType | RefreshBatchDetailsForBatchIdActionType | RefreshExpenseAutomationCurrentTabActionType | RefreshIntegrationsDataActionType | RefreshOpExByVendorReportActionType | RejectVendorGlobalReviewActionType | ReorderBillPayApprovalRulesActionType | ReorderRemiApprovalRulesActionType | ReparseStatementActionType | ReportsResyncActionType | ResendCardInviteActionType | ResendInviteActionType | ResendOtpActionType | ResendReferralInviteActionType | ResendVerifyDeviceOTPActionType | ResetTransactionVendorLocalDataActionType | ResetVendorDetailLocalDataActionType | RestoreAutomatchingActionType | ResumeEnableAccountingProjectsActionType | RetryBankAccountConnectionActionType | RetryBankAccountConnectionForOnboardingActionType | RetryExpenseAutomationJEScheduleActionType | RetryOrRefundBillActionType | RevenueActionType | RevenueClassesViewActionType | RevenueForTimeframeClassesViewActionType | RevenueForTimeframeProjectViewActionType | RevenueForTimeframeViewActionType | RevenueProjectViewActionType | RevertJeScheduleActionType | ReviewDraftRemisBulkActionActionTye | ReviewExpenseAutomationFluxAnalysisActionType | RevokeCardInviteActionType | RevokeChargeCardsInviteActionType | SaveAccountMappingViewActionType | SaveAccountSettingsViewEpicActionType | SaveAddressActionType | SaveBillDetailActionType | SaveBillPaySetupApproverViewUpdatesActionType | SaveCannedResponseActionType | saveCardOnboardingUserDetailsActionType | SaveCompanyBillingAddressActionType | SaveCompanyHealthMetricByIdEpicActionType | SaveCompanyMonthEndReportActionType | SaveCompanyPassportDetailsActionType | SaveCreditAgentMacroActionType | SaveExpenseAutomationReconciliationDetailActionType | SaveExternalConnectionActionType | SaveMagicLinkBankAccountActionType | SaveNewScheduleActionType | SaveNotificationPreferencesActionType | SaveNotificationSettingsEpicActionType | SaveOnboardingCustomerCompletedStatusActionType | SaveOnboardingCustomerNotesActionType | SaveOnboardingCustomerViewUpdatesActionType | SaveRealTimeApprovalActionType | SaveReasonForAuditRuleActionType | SaveReconciliationReviewActionType | SaveRemiDetailActionType | SaveRemiSetupApproverViewUpdatesActionType | SaveScheduleAccruedDetailsActionType | SaveScheduleDetailsActionType | SaveSubscriptionNotesUpdatesActionType | SaveSubscriptionUpdatesActionType | SaveTaskDetailActionType | SaveTranactionVendorActionType | SaveTransactionDetailActionType | SaveVendorActionType | SaveVendorDetailsViewActionType | SaveVendorFirstReviewViewActionType | ScheduleTenantCreditScoreCronActionType | SearchMatchAccrualsActionType | SearchMatchTransactionsActionType | SearchTransactionsForManualMatchActionType | SearchTransactionsForNewScheduleActionType | SeedAiCardCreationFormDraftActionType | SeedAiCardPolicyFormDraftActionType | SendCompanyMonthEndReportActionType | SendEmailMagicLinkToUserActionType | SendOnboardingCustomerViewInviteActionType | SendOtpActionType | SendReferralInviteActionType | SessionHeartbeatActionType | SignInActionType | SignOutActionType | SnoozeTaskActionType | StatementCloseDayActionType | StopSubmitActionType | StopSubmitQuestionActionType | SubmitDraftBillsBulkActionActionType | SubmitDraftRemisBulkActionActionType | SubmitExpressPayActionType | SubmitFeedbackActionType | SubmitIntlVerificationActionType | SubmitQuestionActionType | SubmitRecommendationFeedbackActionType | SwitchExpenseAutomationJESchedulesTabActionType | SyncInvoicingSubscriptionCouponsActionType | SyncTabsAfterAutomatchActionType | ToggleReportUIOptionForecastModeActionType | TopExActionType | TransferMoneyActionType | TreasuryTransferMoneyActionType | TriggerAiAccountantJobActionType | TriggerReviewTabRefetchActionType | UndoReversalAccrualsActionType | UnlinkPaymentAccountActionType | UnlockChargeCardActionType | UnlockChargeCardsActionType | UnsnoozeTaskActionType | UpdateAccountingClassesEnabledActionType | UpdateAccruedJESchedulesActionType | UpdateAddressActionType | UpdateAmountsInScheduleAccruedDetailActionType | UpdateAmountsInScheduleDetailActionType | UpdateAutoTransferRuleActionType | UpdateBusinessVerificationDetailsActionType | UpdateCapitalizationAccountThresholdActionType | UpdateCardPolicyActionType | UpdateCardProfileActionType | UpdateChargeCardDetailActionType | UpdateChargeCardLimitActionType | UpdateChargeCardNameActionType | UpdateChargeCardsLimitActionType | UpdateCombinedStatementInfoActionType | UpdateCompanyDetailsActionType | UpdateCompanyOfficerActionType | UpdateCompanyPassportLocalStoreDataActionType | UpdateCompanyProductServicesActionType | UpdateCompanyQboRealmIdActionType | UpdateCompanyTaskManagerViewFiltersActionType | UpdateDashboardLayoutActionType | UpdateDebitCardPinAttemptActionType | UpdateDepositAccountActionType | UpdateDynamicFormActionType | UpdateExpenseAutomationReconciliationBalanceLocalDataActionType | UpdateFileNameActionType | UpdateFilesMetadataActionType | UpdateJESchedulesActionType | UpdateMappedCashAccountActionType | UpdateMileageDetailsActionType | UpdateMyProfileActionType | UpdateNetBurnOrIncomeStoryCardSettingsActionType | UpdateNotificationViewAllNotificationsStatusActionType | UpdateNotificationViewNotificationStatusActionType | UpdateOnboardingCustomerViewActionType | UpdateOnboardingCustomerViewCompleteStatusActionType | UpdateOnboardingCustomerViewDashboardLoadedActionType | UpdateOnboardingCustomerViewLocalStoreDataActionType | UpdateOnboardingPaymentAccountLoginStatusActionType | UpdateOnboardingPaymentAccountStatusActionType | UpdatePaymentAccountActionType | UpdatePaymentAccountLoginStatusActionType | UpdatePaymentAccountStatusActionType | UpdatePhysicalChargeCardAttemptActionType | UpdatePortfolioAllocationActionType | UpdatePrimaryContactActionType | UpdatePrimaryFundingAccountActionType | UpdateQBOConnectionPoolExternalConnectionActionType | UpdateReferViewedActionType | UpdateRemiSetupViewLocalStoreDataActionType | UpdateReportUIOptionCOABalancesRangeActionType | UpdateReportUIOptionIsCompareModeActionType | UpdateReportUIOptionIsCompareModeOnActionType | UpdateReportUIOptionThisPeriodActionType | UpdateReportUIOptionTimeFrameActionType | UpdateSectionAccountsViewActionType | UpdateSectionClassesViewV2ActionType | UpdateSectionProjectViewActionType | UpdateSelectedVendorForCreateFlowActionType | UpdateSetupViewLocalStoreDataActionType | UpdateStatementInfoActionType | UpdateTaskFromListViewActionType | UpdateTaskGroupNameActionType | UpdateTransactionDetailActionType | UpdateTransactionOnUploadSuccessActionType | UpdateVendorContactActionType | UploadAccountStatementActionType | UploadMissingReceiptSuccessEpicActionType | UploadTransactionReceiptSuccessEpicActionType | ValidateBillsBulkActionActionType | VendorFiling1099UploadDetailsSaveActionType | VendorsTabFetchVendorActionType | VendorsTabFetchVendorDetailPageViewActionType | VendorsTabFetchVendorDetailsActionType | VendorsTabResetVendorDetailLocalDataActionType | VendorsTabSaveVendorActionType | VerifyDeviceWithTwoFAActionType | VerifyOtpActionType | VerifyUserActionType | WatchBulkUploadBatchStatusActionType | WiseRedirectActionType;
|
|
703
|
+
export type RootActionType = AcceptBillPayTermsActionType | AcceptBillPayUpdatedTermsActionType | AcceptChargeCardTermsActionType | AcceptEmployeeRemiTermsActionType | AcceptMasterTOSEpicActionType | AcceptRemiTermsActionType | AcceptTreasuryTermsActionType | AcceptZeniAccountTermsActionType | AcknowledgeOnboardingAiActivationViewedActionType | AcknowledgeOnboardingAiFinanceTeamActionType | AddCardPaymentSourceActionType | ApplyExtractedPolicyToDraftActionType | ApproveOAuthConsentActionType | ApproveOrRejectBillActionType | ApproveOrRejectBillsBulkActionActionType | ApproveOrRejectRemiActionType | ApproveOrRejectRemisBulkActionActionType | ApproveVendorGlobalReviewActionType | ArchiveCardPolicyActionType | ArchiveTaskActionType | BackgroundRefetchReviewTabActionType | BalanceSheetActionType | BalanceSheetClassesViewActionType | BalanceSheetForTimeframeActionType | BalanceSheetForTimeframeClassesViewActionType | BalanceSheetForTimeframeProjectViewActionType | BalanceSheetProjectViewActionType | BulkUpdateTasksListActionType | BulkUploadMatchResultToastActionType | BulkUploadReceiptsActionType | CancelAiAccountantOnboardingActionType | CancelAndDeleteBillActionType | CancelAndDeleteRemiActionType | CancelOrDeleteBillsBulkActionActionType | CancelOrDeleteRemisBulkActionActionType | CancelScheduleAccruedJournalEntryActionType | CardBalanceActionType | CashBalanceActionType | CashFlowActionType | CashFlowClassesViewActionType | CashFlowForTimeframeActionType | CashFlowForTimeframeClassesViewActionType | CashFlowForTimeframeProjectViewActionType | CashFlowProjectViewActionType | CashInCashOutActionType | CashPositionActionType | ChangeZeniPersonRolesActionType | CheckDepositActionType | CloseChargeCardActionType | CloseChargeCardsActionType | CombinedStatementActionType | CompanyManagementSavePendingUpdatesActionType | CompanyManagementSaveUpdatesActionType | ConfirmBulkUploadMatchActionType | ConfirmCardSetupIntentActionType | ConfirmStatementMappingActionType | CreateAddressActionType | CreateAutoTransferRuleActionType | CreateBankAccountActionType | CreateCardPolicyTemplateActionType | CreateCardSetupIntentActionType | CreateCheckingAccountActionType | CreateCompanyAddressActionType | CreateCompanyOfficersActionType | CreateCompanyUserAddressActionType | CreateGlobalMerchantActionType | CreateInternationalBankAccountActionType | CreateInvoiceActionType | CreateNewSchedulesAccruedActionType | CreateNewSchedulesActionType | CreateNewTaskGroupActionType | CreateOneTimeAccrualActionType | CreatePaymentInstrumentActionType | CreateSessionActionType | CreateSessionAndSubmitActionType | CreateSubTaskActionType | CreateTagActionType | CreateTaskFromTaskGroupTemplateActionType | CreateTransferEntryActionType | CreateUserBankAccountActionType | CurrencyConversionActionType | DeleteAccountStatementActionType | DeleteAutoTransferRuleActionType | DeleteBankAccountActionType | DeleteBillActionType | DeleteBillPayApprovalRuleActionType | DeleteCannedResponseActionType | DeleteChatSessionActionType | DeleteCombinedStatementActionType | DeleteFileActionType | DeleteFileListActionType | DeleteInternationalBankAccountActionType | DeletePaymentInstrumentActionType | DeletePersonActionType | DeleteRemiActionType | DeleteRemiApprovalRuleActionType | DeleteScheduleAccruedDetailActionType | DeleteScheduleDetailActionType | DeleteTagActionType | DeleteTaskActionType | DeleteTaskGroupActionType | DeleteTransactionAttachmentActionType | DeleteUserBankAccountActionType | DepositAccountTransactionListActionType | DisableAccountingProjectsActionType | DismissCapitalizationOnboardingActionType | DoMagicLinkSignInActionType | DownloadAccountingProviderAttachmentActionType | DragNDropTasksActionType | EditInvoicingCatalogItemDetailViewActionType | EditInvoicingCouponDetailViewActionType | EditInvoicingCustomerDetailViewActionType | EditInvoicingSubscriptionDetailViewActionType | EnableAccountingProjectsActionType | EnableChargeCardAutoPayActionType | EnableSetupActionType | EstablishOnboardingPlaidConnectionActionType | EstablishPlaidConnectionActionType | ExcludeAccountFromReconciliationActionType | ExpressInterestChargeCardActionType | ExpressPayActionType | ExtractPolicyDocumentActionType | FetchAccountHistoryActionType | FetchAccountListActionType | FetchAccountListForAccountTypesActionType | FetchAccountSettingsListForAccountTypesActionType | FetchAccruedScheduleListActionType | FetchActiveTenantActionType | FetchAddressActionType | FetchAggregatedReportActionType | FetchAiAccountantCustomersActionType | FetchAiAccountantJobsActionType | FetchAiAgentsActivationStatusActionType | FetchAllCockpitViewsActionType | FetchAllExpenseAutomationTabsActionType | FetchAllPeopleRequiredActionType | FetchAllTagsActionType | FetchAllTaskGroupsActionType | FetchAllTenantsActionType | FetchApAgingActionType | FetchApAgingDetailActionType | FetchArAgingActionType | FetchArAgingDetailActionType | FetchAuditReportGroupViewActionType | FetchAuditRuleGroupViewActionType | FetchAutoTransferReviewDetailActionType | FetchAutoTransferRuleHistoryActionType | FetchAutoTransferRulesActionType | FetchBankAccountsListActionType | FetchBankConnectionsViewActionType | FetchBankCountryNameByIbanActionType | FetchBankNameByRoutingActionType | FetchBankNameBySwiftActionType | FetchBillAndInitializeLocalStoreActionType | FetchBillDetailActionType | FetchBillingAccountsListActionType | FetchBillListActionType | FetchBillListPerTabActionType | FetchBillPayApproversDetailsActionType | FetchBillPayApproversListActionType | FetchBillPayCardActionType | FetchBillPayConfigActionType | FetchBillPaySetupApproverViewActionType | FetchBillPaySetupViewActionType | FetchBulkUploadBatchDetailsActionType | FetchBulkUploadBatchesActionType | FetchCannedResponsesActionType | FetchCardPolicyDetailActionType | FetchCardPolicyListActionType | FetchCardPolicyMccCategoriesActionType | FetchCardPolicyVendorOptionsActionType | FetchCardProfilesActionType | FetchCashbackDetailActionType | FetchChargeCardConfigActionType | FetchChargeCardDetailActionType | FetchChargeCardDetailPageActionType | FetchChargeCardListActionType | FetchChargeCardListPageActionType | FetchChargeCardPaymentHistoryActionType | FetchChargeCardPaymentPageActionType | FetchChargeCardRepaymentDetailActionType | FetchChargeCardSetupViewActionType | FetchChargeCardsRecurringExpensesActionType | FetchChargeCardStatementListActionType | FetchChargeCardTransactionAttachmentsActionType | FetchChargeCardTransactionListActionType | FetchChargeCardTransactionStatisticsActionType | FetchChatHistoryActionType | FetchChatSessionsForUserActionType | FetchClassListActionType | FetchCockpitContextActionType | FetchCollaborationAuthTokenActionType | FetchCompanyBillingAddressActionType | FetchCompanyConfigActionType | FetchCompanyHealthMetricConfigViewEpicActionType | FetchCompanyHealthMetricViewEpicActionType | FetchCompanyManagementActionType | FetchCompanyMetaDataActionType | FetchCompanyMonthEndReportHistoricDataActionType | FetchCompanyMonthEndReportHistoricDatesActionType | FetchCompanyMonthEndReportTemplatesActionType | FetchCompanyMonthEndReportViewActionType | FetchCompanyOnboardingViewActionType | FetchCompanyPassportViewActionType | FetchCompanyPortfolioActionType | FetchCompanyTaskManagerViewActionType | FetchCompletedTransactionsActionType | FetchCreateInvoiceFormPageActionType | FetchCreditAccountActionType | FetchCreditAccountRepaymentActionType | FetchCreditAgentMacroActionType | FetchCurrencyConversionValueActionType | FetchDashboardActionType | FetchDashboardLayoutActionType | FetchDebitCardSummaryActionType | FetchDepositAccountActionType | FetchDepositAccountDetailActionType | FetchDepositAccountLimitActionType | FetchDepositAccountListActionType | FetchDepositAccountListForCardsActionType | FetchDepositAccStatementListActionType | FetchDownloadSchedulesActionType | FetchDuplicateBillActionType | FetchDuplicateReimbursementEpicActionType | FetchEditBillDetailPageActionType | FetchEditRemiDetailPageActionType | FetchEligibleActionsForBillActionType | FetchEntityAutoCompleteActionType | FetchEntityHistoryActionType | FetchEntityRecommendationsByTransactionIdActionType | FetchEntityRecommendationsForLineUpdateActionType | FetchExcludedResourcesActionType | FetchExpenseAutomationActualMatchingActionType | FetchExpenseAutomationActualMatchingMatchActionType | FetchExpenseAutomationActualMatchingPageActionType | FetchExpenseAutomationFailedJePostingsActionType | FetchExpenseAutomationFluxAnalysisActionType | FetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataActionType | FetchExpenseAutomationJEScheduleActionType | FetchExpenseAutomationJESchedulePageActionType | FetchExpenseAutomationMarkTransactionAsNotMiscategorizedActionType | FetchExpenseAutomationMissingReceiptsActionType | FetchExpenseAutomationReconciliationsViewActionType | FetchExpenseAutomationSaveTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationViewActionType | FetchExpenseAutomationUpdateTransactionCategorizationEpicActionType | FetchExpenseTrendActionType | FetchExternalConnectionsActionType | FetchFileActionType | FetchFileListActionType | FetchForecastListActionType | FetchGlobalMerchantAutoCompleteActionType | FetchGlobalMerchantRecommendationActionType | FetchIncomeTrendActionType | FetchInternationalWireDynamicFormActionType | FetchIntlVerificationFormActionType | FetchInvoiceCountsActionType | FetchInvoiceDetailActionType | FetchInvoiceKPIsActionType | FetchInvoiceListActionType | FetchInvoiceListPageActionType | FetchIssueCardPageActionType | FetchMagicLinkBankNameByRoutingActionType | FetchMagicLinkBankNameBySwiftActionType | FetchMagicLinkBillActionType | FetchMagicLinkTenantActionType | FetchManagementActionType | FetchMerchantListActionType | FetchMonthClosePerformanceTrendActionType | FetchMonthEndCloseChecksActionType | FetchMoreBatchDetailsActionType | FetchMultipleBatchDetailsActionType | FetchMyProfileActionType | FetchMyProfileViewActionType | FetchNetBurnOrIncomeStoryCardActionType | FetchNetBurnOrIncomeWithForecastActionType | FetchNotificationSettingsActionType | FetchNotificationSettingsViewActionType | FetchNotificationUnreadCountActionType | FetchNotificationViewActionType | FetchOnboardingActionType | FetchOnboardingCompletedCompaniesActionType | FetchOnboardingCustomerSetupViewActionType | FetchOnboardingCustomerViewActionType | FetchOneTimeAccrualActionType | FetchOpExWithForecastActionType | FetchOwnerListActionType | FetchParentSubsidiaryManagementActionType | FetchPaymentAccountBalanceActionType | FetchPaymentAccountListActionType | FetchPaymentSourcesActionType | FetchPortfolioActionType | FetchPortfolioAllocationActionType | FetchPreviousBillsActionType | FetchProjectListActionType | FetchQBOConnectionPoolActionType | FetchRecommendationByEntityIdActionType | FetchRecommendationByEntityNameActionType | FetchRecommendationsAndUpdateMerchantRecommendationsActionType | FetchRecommendationsAndUpdateVendorRecommendationsActionType | FetchRecommendedBillExpenseActionType | FetchReferralsActionType | FetchRegisteredInterestsActionType | FetchReimbursementCardActionType | FetchReimbursementConfigActionType | FetchRemiAndInitializeLocalStoreActionType | FetchRemiApproversDetailsActionType | FetchRemiApproversListActionType | FetchRemiDetailActionType | FetchRemiListActionType | FetchRemiListPerTabActionType | FetchRemiSetupApproverViewActionType | FetchRemiSetupViewActionType | FetchRevenueWithForecastActionType | FetchReviewCompanyActionType | FetchReviewTransferDetailActionType | FetchRewardsPlanActionType | FetchScheduleAccruedDetailsActionType | FetchScheduleAccruedDetailsPageActionType | FetchScheduleDetailsActionType | FetchScheduleDetailsPageActionType | FetchScheduleListActionType | FetchSchedulesListActionType | FetchSkillsActionType | FetchSubscriptionActionType | FetchSubscriptionAddOnsActionType | FetchSubscriptionCouponsActionType | FetchSubscriptionCreateEstimateActionType | FetchSubscriptionDetailsActionType | FetchSubscriptionListActionType | FetchSubscriptionPlansActionType | FetchSubscriptionSummaryForTenantActionType | FetchSubscriptionUpdateEstimateActionType | FetchSubTasksActionType | FetchSuggestedQuestionsActionType | FetchTaskDetailActionType | FetchTaskDetailPageActionType | FetchTaskGroupTemplatesActionType | FetchTaskHistoryActionType | FetchTaskListActionType | FetchTaskListPageActionType | FetchTaskManagerMetricsActionType | FetchTasksCardActionType | FetchTransactionActivityLogActionType | FetchTransactionDetailActionType | FetchTransactionListByAccountActionType | FetchTransactionListByClassActionType | FetchTransactionListByEntityActionType | FetchTransactionListByProjectActionType | FetchTransactionsForEntityActionType | FetchTransactionsListByCategoryTypeActionType | FetchTransferAccountsActionType | FetchTreasuryDetailActionType | FetchTreasuryFundsActionType | FetchTreasuryHistoryActionType | FetchTreasurySetupViewActionType | FetchTreasuryStatementListActionType | FetchTreasuryTaxLetterListActionType | FetchTreasuryTransactionListActionType | FetchTrendForEntityActionType | FetchUserDetailActionType | FetchUserFinancialAccountActionType | FetchUserListByTypeActionType | FetchUserRoleConfigActionType | FetchVendor1099TypeListActionType | FetchVendorActionType | FetchVendorAndUpdateBillLocalDataActionType | FetchVendorByNameAndParseInvoiceActionType | FetchVendorDetailsActionType | FetchVendorFirstReviewAttachmentsActionType | FetchVendorFirstReviewViewActionType | FetchVendorGlobalReviewViewActionType | FetchVendorsActionType | FetchVendorsFiling1099ActionType | FetchVendorsFiling1099AllActionType | FetchVendorsFiling1099DownloadActionType | FetchVendorTabViewActionType | FetchVendorTypeListActionType | FetchZeniAccountListPageActionType | FetchZeniAccountsConfigActionType | FetchZeniAccountSetupViewActionType | FetchZeniAccStatePageActionType | FetchZeniUsersActionType | GetOnboardingEmailGroupActionType | GetOnboardingPlaidLinkTokenActionType | GetPaymentAccountsActionType | GetPlaidLinkTokenActionType | IgnoreExpenseAutomationJEScheduleActionType | ImproveUsingZeniGPTActionType | IncludeAccountInReconciliationActionType | InitialiseExpenseAutomationLocalDataForSelectedAccountIdActionType | InitializeAccountMappingViewActionType | InitializeAccountSettingsViewEpicActionType | InitializeBillPaySetupApproverViewUpdateDataActionType | InitializeBillToLocalStoreActionType | InitializeCardUserOnboardingLocalDataActionType | InitializeCompanyHealthMetricViewLocalDataEpicActionType | InitializeEditPersonActionType | InitializeExpenseAutomationJeScheduleLocalDataActionType | InitializeInternationalWireLocalDataActionType | InitializeIntlVerificationFormEpicActionType | InitializeMyProfileLocalDataActionType | InitializeNewScheduleActionType | InitializeOnboardingCustomerViewUpdateDataActionType | InitializeRemiSetupApproverViewUpdateDataActionType | InitializeRemiToLocalStoreActionType | InitializeScheduleAccruedDetailLocalDataActionType | InitializeScheduleDetailLocalDataActionType | InitializeSubscriptionLocalDataActionType | InitializeTaskToLocalStoreActionType | InitializeTransactionDetailLocalDataActionType | InitializeVendorAddressActionType | InitiateChargeCardRepaymentActionType | InitiateReportsClassViewRefetchingActionType | InitiateReportsProjectViewRefetchingActionType | InsightsCardActionType | InvitePeopleActionType | InviteZeniPeopleActionType | InvoiceDetailPageActionType | InvoicingAuditViewActionType | InvoicingCatalogItemDetailFetchActionType | InvoicingCatalogItemDetailPageActionType | InvoicingCatalogItemFormDraftSeedActionType | InvoicingCatalogListViewActionType | InvoicingCatalogPlanActionActionType | InvoicingCatalogProductActionActionType | InvoicingConfigViewActionType | InvoicingCouponDetailFetchActionType | InvoicingCouponDetailPageActionType | InvoicingCouponFormDraftSeedActionType | InvoicingCouponViewActionType | InvoicingCreditNoteDetailViewActionType | InvoicingCreditNoteListViewActionType | InvoicingCustomerDetailPageActionType | InvoicingCustomerFormDraftSeedActionType | InvoicingCustomerListViewActionType | InvoicingCustomerPaymentMethodActionType | InvoicingCustomerRecordViewActionType | InvoicingDataImportViewActionType | InvoicingDiscountActionActionType | InvoicingDunningActionActionType | InvoicingDunningCaseDetailPageActionType | InvoicingDunningCaseDetailViewActionType | InvoicingDunningCaseListViewActionType | InvoicingInvoiceActionActionType | InvoicingOverviewActionType | InvoicingPaymentActionActionType | InvoicingPaymentLinkEmailPreviewActionType | InvoicingPaymentLinkEmailPreviewPageActionType | InvoicingPromotionalCreditActionActionType | InvoicingQboViewActionType | InvoicingSettingsViewActionType | InvoicingSubscriptionActionActionType | InvoicingSubscriptionDetailFetchActionType | InvoicingSubscriptionDetailPageActionType | InvoicingSubscriptionFormDraftSeedActionType | InvoicingSubscriptionFormPageActionType | InvoicingSubscriptionListViewActionType | InvoicingTransactionDetailViewActionType | InvoicingTransactionListViewActionType | IssueChargeCardActionType | LockChargeCardActionType | LockChargeCardsActionType | MarkAsCompleteScheduleDetailActionType | MarkTransactionAsNotMiscategorizedActionType | MatchAndReverseAccrualsActionType | NetBurnOrIncomeActionType | NetBurnOrIncomeClassesViewActionType | NetBurnOrIncomeForTimeframeActionType | NetBurnOrIncomeForTimeframeClassesViewActionType | NetBurnOrIncomeForTimeframeProjectViewActionType | NetBurnOrIncomeProjectViewActionType | NotifyMeForFeatureActionType | OneTimeAccrualActionsActionType | OpExActionType | OpExByVendorReportActionType | OpExByVendorReportForTimeframeActionType | OpExByVendorReportSummaryActionType | OpExClassesViewActionType | OpExForTimeframeClassesViewActionType | OpExForTimeframeProjectViewActionType | OpExForTimeframeViewActionType | OpExProjectViewActionType | ParallelFetchAccountTransactionListActionType | ParallelFetchClassTransactionListActionType | ParallelFetchEntityTransactionListActionType | ParallelFetchProjectTransactionListActionType | ParallelFetchTransactionListByCategoryTypeActionType | ParseCombinedStatementActionType | ParseInvoiceToBillActionType | ParseReceiptsToRemiActionType | ParseStatementActionType | ParseUploadedKybDocumentActionType | ParseUploadedKycDocumentActionType | PeopleActionType | PeoplePageActionType | PeopleSaveUpdatesActionType | PolicyDocumentExtractionToRecommendationBridgeActionType | PolicyRecommendationFromUploadActionType | PrefetchOtherJeSchedulesTabActionType | ProfitAndLossActionType | ProfitAndLossClassesViewActionType | ProfitAndLossForTimeframeActionType | ProfitAndLossForTimeframeClassesViewActionType | ProfitAndLossForTimeframeProjectViewActionType | ProfitAndLossProjectViewActionType | PushToastNotificationActionType | RecommendationForAccountSettingsActionType | RecommendationForAccountTypeActionType | RecordPaymentActionType | RefetchCompletedTransactionsOnBulkUploadSortActionType | RefreshBatchDetailsForBatchIdActionType | RefreshExpenseAutomationCurrentTabActionType | RefreshIntegrationsDataActionType | RefreshOpExByVendorReportActionType | RejectVendorGlobalReviewActionType | ReorderBillPayApprovalRulesActionType | ReorderRemiApprovalRulesActionType | ReparseStatementActionType | ReportsResyncActionType | ResendCardInviteActionType | ResendInviteActionType | ResendOtpActionType | ResendReferralInviteActionType | ResendVerifyDeviceOTPActionType | ResetTransactionVendorLocalDataActionType | ResetVendorDetailLocalDataActionType | RestoreAutomatchingActionType | ResumeEnableAccountingProjectsActionType | RetryBankAccountConnectionActionType | RetryBankAccountConnectionForOnboardingActionType | RetryExpenseAutomationJEScheduleActionType | RetryOrRefundBillActionType | RevenueActionType | RevenueClassesViewActionType | RevenueForTimeframeClassesViewActionType | RevenueForTimeframeProjectViewActionType | RevenueForTimeframeViewActionType | RevenueProjectViewActionType | RevertJeScheduleActionType | ReviewDraftRemisBulkActionActionTye | ReviewExpenseAutomationFluxAnalysisActionType | RevokeCardInviteActionType | RevokeChargeCardsInviteActionType | SaveAccountMappingViewActionType | SaveAccountSettingsViewEpicActionType | SaveAddressActionType | SaveBillDetailActionType | SaveBillPaySetupApproverViewUpdatesActionType | SaveCannedResponseActionType | saveCardOnboardingUserDetailsActionType | SaveCompanyBillingAddressActionType | SaveCompanyHealthMetricByIdEpicActionType | SaveCompanyMonthEndReportActionType | SaveCompanyPassportDetailsActionType | SaveCreditAgentMacroActionType | SaveExpenseAutomationReconciliationDetailActionType | SaveExternalConnectionActionType | SaveMagicLinkBankAccountActionType | SaveNewScheduleActionType | SaveNotificationPreferencesActionType | SaveNotificationSettingsEpicActionType | SaveOnboardingCustomerCompletedStatusActionType | SaveOnboardingCustomerNotesActionType | SaveOnboardingCustomerViewUpdatesActionType | SaveRealTimeApprovalActionType | SaveReasonForAuditRuleActionType | SaveReconciliationReviewActionType | SaveRemiDetailActionType | SaveRemiSetupApproverViewUpdatesActionType | SaveScheduleAccruedDetailsActionType | SaveScheduleDetailsActionType | SaveSubscriptionNotesUpdatesActionType | SaveSubscriptionUpdatesActionType | SaveTaskDetailActionType | SaveTranactionVendorActionType | SaveTransactionDetailActionType | SaveVendorActionType | SaveVendorDetailsViewActionType | SaveVendorFirstReviewViewActionType | ScheduleTenantCreditScoreCronActionType | SearchMatchAccrualsActionType | SearchMatchTransactionsActionType | SearchTransactionsForManualMatchActionType | SearchTransactionsForNewScheduleActionType | SeedAiCardCreationFormDraftActionType | SeedAiCardPolicyFormDraftActionType | SendCompanyMonthEndReportActionType | SendEmailMagicLinkToUserActionType | SendOnboardingCustomerViewInviteActionType | SendOtpActionType | SendReferralInviteActionType | SessionHeartbeatActionType | SignInActionType | SignOutActionType | SnoozeTaskActionType | StatementCloseDayActionType | StopSubmitActionType | StopSubmitQuestionActionType | SubmitDraftBillsBulkActionActionType | SubmitDraftRemisBulkActionActionType | SubmitExpressPayActionType | SubmitFeedbackActionType | SubmitIntlVerificationActionType | SubmitQuestionActionType | SubmitRecommendationFeedbackActionType | SwitchExpenseAutomationJESchedulesTabActionType | SyncInvoicingSubscriptionCouponsActionType | SyncTabsAfterAutomatchActionType | ToggleReportUIOptionForecastModeActionType | TopExActionType | TransferMoneyActionType | TreasuryTransferMoneyActionType | TriggerAiAccountantJobActionType | TriggerReviewTabRefetchActionType | UndoReversalAccrualsActionType | UnlinkPaymentAccountActionType | UnlockChargeCardActionType | UnlockChargeCardsActionType | UnsnoozeTaskActionType | UpdateAccountingClassesEnabledActionType | UpdateAccruedJESchedulesActionType | UpdateAddressActionType | UpdateAmountsInScheduleAccruedDetailActionType | UpdateAmountsInScheduleDetailActionType | UpdateAutoTransferRuleActionType | UpdateBusinessVerificationDetailsActionType | UpdateCapitalizationAccountThresholdActionType | UpdateCardPolicyActionType | UpdateCardProfileActionType | UpdateChargeCardDetailActionType | UpdateChargeCardLimitActionType | UpdateChargeCardNameActionType | UpdateChargeCardsLimitActionType | UpdateCombinedStatementInfoActionType | UpdateCompanyDetailsActionType | UpdateCompanyOfficerActionType | UpdateCompanyPassportLocalStoreDataActionType | UpdateCompanyProductServicesActionType | UpdateCompanyQboRealmIdActionType | UpdateCompanyTaskManagerViewFiltersActionType | UpdateDashboardLayoutActionType | UpdateDebitCardPinAttemptActionType | UpdateDepositAccountActionType | UpdateDynamicFormActionType | UpdateExpenseAutomationReconciliationBalanceLocalDataActionType | UpdateFileNameActionType | UpdateFilesMetadataActionType | UpdateJESchedulesActionType | UpdateMappedCashAccountActionType | UpdateMileageDetailsActionType | UpdateMyProfileActionType | UpdateNetBurnOrIncomeStoryCardSettingsActionType | UpdateNotificationViewAllNotificationsStatusActionType | UpdateNotificationViewNotificationStatusActionType | UpdateOnboardingCustomerViewActionType | UpdateOnboardingCustomerViewCompleteStatusActionType | UpdateOnboardingCustomerViewDashboardLoadedActionType | UpdateOnboardingCustomerViewLocalStoreDataActionType | UpdateOnboardingPaymentAccountLoginStatusActionType | UpdateOnboardingPaymentAccountStatusActionType | UpdatePaymentAccountActionType | UpdatePaymentAccountLoginStatusActionType | UpdatePaymentAccountStatusActionType | UpdatePhysicalChargeCardAttemptActionType | UpdatePortfolioAllocationActionType | UpdatePrimaryContactActionType | UpdatePrimaryFundingAccountActionType | UpdateQBOConnectionPoolExternalConnectionActionType | UpdateReferViewedActionType | UpdateRemiSetupViewLocalStoreDataActionType | UpdateReportUIOptionCOABalancesRangeActionType | UpdateReportUIOptionIsCompareModeActionType | UpdateReportUIOptionIsCompareModeOnActionType | UpdateReportUIOptionThisPeriodActionType | UpdateReportUIOptionTimeFrameActionType | UpdateSectionAccountsViewActionType | UpdateSectionClassesViewV2ActionType | UpdateSectionProjectViewActionType | UpdateSelectedVendorForCreateFlowActionType | UpdateSetupViewLocalStoreDataActionType | UpdateStatementInfoActionType | UpdateTaskFromListViewActionType | UpdateTaskGroupNameActionType | UpdateTransactionDetailActionType | UpdateTransactionOnUploadSuccessActionType | UpdateVendorContactActionType | UploadAccountStatementActionType | UploadMissingReceiptSuccessEpicActionType | UploadTransactionReceiptSuccessEpicActionType | ValidateBillsBulkActionActionType | VendorFiling1099UploadDetailsSaveActionType | VendorsTabFetchVendorActionType | VendorsTabFetchVendorDetailPageViewActionType | VendorsTabFetchVendorDetailsActionType | VendorsTabResetVendorDetailLocalDataActionType | VendorsTabSaveVendorActionType | VerifyDeviceWithTwoFAActionType | VerifyOtpActionType | VerifyUserActionType | WatchBulkUploadBatchStatusActionType | WiseRedirectActionType;
|
|
703
704
|
export declare const featureRootEpic: Epic<RootActionType>;
|
package/lib/epic.js
CHANGED
|
@@ -214,6 +214,7 @@ const matchAndReverseAccrualsEpic_1 = require("./view/expenseAutomationView/epic
|
|
|
214
214
|
const searchMatchAccrualsEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchAccrualsEpic");
|
|
215
215
|
const searchMatchTransactionsEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchTransactionsEpic");
|
|
216
216
|
const undoReversalAccrualsEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/actualMatching/undoReversalAccrualsEpic");
|
|
217
|
+
const fetchFailedJePostingsEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic");
|
|
217
218
|
const fetchJeSchedulePageEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic");
|
|
218
219
|
const fetchJeSchedulesEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic");
|
|
219
220
|
const fetchOneTimeAccrualEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic");
|
|
@@ -1014,6 +1015,7 @@ const ALL_EPICS = [
|
|
|
1014
1015
|
fetchActualMatchingEpic_1.fetchActualMatchingEpic,
|
|
1015
1016
|
fetchActualMatchingMatchEpic_1.fetchActualMatchingMatchEpic,
|
|
1016
1017
|
fetchActualMatchingPageEpic_1.fetchActualMatchingPageEpic,
|
|
1018
|
+
fetchFailedJePostingsEpic_1.fetchFailedJePostingsEpic,
|
|
1017
1019
|
fetchFluxAnalysisViewEpic_1.fetchFluxAnalysisViewEpic,
|
|
1018
1020
|
initializeTransactionCategorizationLocalDataEpic_1.initializeTransactionCategorizationViewLocalDataEpic,
|
|
1019
1021
|
fetchJeSchedulesEpic_1.fetchJeSchedulesEpic,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import assignWith from 'lodash/assignWith';
|
|
3
|
+
import omit from 'lodash/omit';
|
|
3
4
|
import { clearAll } from '../../rootActions';
|
|
4
5
|
import { generateJEOneTimeAccrualKey } from './jeScheduleHelper';
|
|
5
6
|
import { getJEScheduleKey, getJEScheduleTransactionDetailKeyPayload, toJEAccruedScheduledTransaction, toJEOneTimeAccrual, toJEScheduledTransaction, toScheduledJournalEntryState, } from './jeSchedulesPayload';
|
|
@@ -130,6 +131,27 @@ const jeSchedules = createSlice({
|
|
|
130
131
|
});
|
|
131
132
|
},
|
|
132
133
|
},
|
|
134
|
+
/**
|
|
135
|
+
* Drops one journal entry from a schedule, leaving the schedule and its other entries.
|
|
136
|
+
*
|
|
137
|
+
* A schedule that failed to post in several months is one schedule key and several rows on the
|
|
138
|
+
* Failed Postings list. Resolving one of them must retire only that row -- removing the whole
|
|
139
|
+
* schedule key took the still-failing months off the list with it, where nothing would surface
|
|
140
|
+
* them again.
|
|
141
|
+
*/
|
|
142
|
+
removeScheduledJournalEntryFromJESchedule: {
|
|
143
|
+
prepare(jeScheduleTransactionKey, scheduledJournalEntryID) {
|
|
144
|
+
return { payload: { jeScheduleTransactionKey, scheduledJournalEntryID } };
|
|
145
|
+
},
|
|
146
|
+
reducer(draft, action) {
|
|
147
|
+
const { jeScheduleTransactionKey, scheduledJournalEntryID } = action.payload;
|
|
148
|
+
const schedule = draft.schedulesByTransactionKey[jeScheduleTransactionKey];
|
|
149
|
+
if (schedule == null) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
schedule.scheduledJournalEntry = schedule.scheduledJournalEntry.filter((journalEntry) => journalEntry.scheduledJournalEntryID !== scheduledJournalEntryID);
|
|
153
|
+
},
|
|
154
|
+
},
|
|
133
155
|
clearAllJEScheduleTransactions(draft) {
|
|
134
156
|
draft.schedulesByTransactionKey = {};
|
|
135
157
|
},
|
|
@@ -145,7 +167,7 @@ const jeSchedules = createSlice({
|
|
|
145
167
|
});
|
|
146
168
|
},
|
|
147
169
|
});
|
|
148
|
-
export const { updateJESchedules, updateAccruedJESchedules, updateJEScheduledTransaction, updateAccruedJEScheduledTransaction, updateJESchedulesDetails, updateAccruedJESchedulesDetails, deleteJESchedulesDetails, deleteAccruedJESchedulesDetails, clearAllAccruedJESchedules, clearAllJEScheduleTransactions, updateJEOneTimeAccruals, } = jeSchedules.actions;
|
|
170
|
+
export const { updateJESchedules, updateAccruedJESchedules, updateJEScheduledTransaction, updateAccruedJEScheduledTransaction, updateJESchedulesDetails, updateAccruedJESchedulesDetails, deleteJESchedulesDetails, deleteAccruedJESchedulesDetails, clearAllAccruedJESchedules, clearAllJEScheduleTransactions, removeScheduledJournalEntryFromJESchedule, updateJEOneTimeAccruals, } = jeSchedules.actions;
|
|
149
171
|
export default jeSchedules.reducer;
|
|
150
172
|
/**
|
|
151
173
|
* Helper functions
|
|
@@ -154,7 +176,13 @@ function doUpdateJEScheduledTransaction(draft, id, payload, updateType) {
|
|
|
154
176
|
const jeTransaction = toJEScheduledTransaction(payload);
|
|
155
177
|
const existingTransaction = draft[id];
|
|
156
178
|
if (existingTransaction != null && updateType === 'merge') {
|
|
157
|
-
|
|
179
|
+
// scheduledJournalEntry is held back from the merge. The list payload never carries journal
|
|
180
|
+
// entries -- toJEScheduledTransaction always sets [] -- and [] is not nullish, so the
|
|
181
|
+
// customizer below would treat it as a value and wipe whatever updateJESchedulesDetails had
|
|
182
|
+
// already written. Only the details action may write this field. It is still set on the
|
|
183
|
+
// insert path below, so it is always present.
|
|
184
|
+
const mergeable = omit(jeTransaction, ['scheduledJournalEntry']);
|
|
185
|
+
assignWith(draft[id], mergeable, (objValue, srcValue) => srcValue ?? objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
158
186
|
}
|
|
159
187
|
else {
|
|
160
188
|
draft[id] = jeTransaction;
|
|
@@ -173,6 +201,32 @@ function doUpdateJEAccruedScheduledTransaction(draft, id, payload, updateType) {
|
|
|
173
201
|
/**
|
|
174
202
|
* Helper functions
|
|
175
203
|
*/
|
|
204
|
+
/**
|
|
205
|
+
* Upserts `incomingEntries` into `existingEntries`, matched on scheduledJournalEntryID.
|
|
206
|
+
*
|
|
207
|
+
* A details payload carries only the entries its caller asked for, never a statement about the
|
|
208
|
+
* complete set: the detail fetch sends every month of a schedule, fetchFailedJePostingsEpic sends
|
|
209
|
+
* only the currently-failing ones. Replacing the array wholesale therefore let a tenant-wide
|
|
210
|
+
* failures refresh shrink a schedule whose Quick View had already loaded all of its months, and
|
|
211
|
+
* the posted ones silently vanished from the store until the detail call ran again.
|
|
212
|
+
*
|
|
213
|
+
* Each writer owns only the entries it actually sent. Callers that do hold the authoritative list
|
|
214
|
+
* pass updateType 'replace' and skip this path entirely.
|
|
215
|
+
*/
|
|
216
|
+
function mergeScheduledJournalEntries(existingEntries, incomingEntries) {
|
|
217
|
+
const incomingEntryByID = new Map(incomingEntries.map((incomingEntry) => [
|
|
218
|
+
incomingEntry.scheduledJournalEntryID,
|
|
219
|
+
incomingEntry,
|
|
220
|
+
]));
|
|
221
|
+
const existingEntryIDs = new Set(existingEntries.map((existingEntry) => existingEntry.scheduledJournalEntryID));
|
|
222
|
+
// Existing order is preserved so a re-fetch cannot reshuffle rows under the user; entries the
|
|
223
|
+
// store has not seen before are appended.
|
|
224
|
+
return [
|
|
225
|
+
...existingEntries.map((existingEntry) => incomingEntryByID.get(existingEntry.scheduledJournalEntryID) ??
|
|
226
|
+
existingEntry),
|
|
227
|
+
...incomingEntries.filter((incomingEntry) => !existingEntryIDs.has(incomingEntry.scheduledJournalEntryID)),
|
|
228
|
+
];
|
|
229
|
+
}
|
|
176
230
|
function doUpdateAccruedScheduledDetailTransaction(draft, id, jeSchedulePayload, scheduleJournalEntries, updateType) {
|
|
177
231
|
const jeTransaction = toJEAccruedScheduledTransaction(jeSchedulePayload);
|
|
178
232
|
const { currencyCode, currencySymbol } = jeTransaction;
|
|
@@ -183,7 +237,17 @@ function doUpdateAccruedScheduledDetailTransaction(draft, id, jeSchedulePayload,
|
|
|
183
237
|
}
|
|
184
238
|
const existingTransaction = draft[id];
|
|
185
239
|
if (existingTransaction != null && updateType === 'merge') {
|
|
186
|
-
|
|
240
|
+
// An empty array here means "this payload carried no entries for this schedule", not "this
|
|
241
|
+
// schedule has none" -- and [] is not nullish, so the customizer below would treat it as a
|
|
242
|
+
// value and clear entries another call already wrote. Only overwrite when there is something
|
|
243
|
+
// to write.
|
|
244
|
+
const mergeable = scheduledJournalEntries.length > 0
|
|
245
|
+
? {
|
|
246
|
+
...jeTransaction,
|
|
247
|
+
scheduledJournalEntry: mergeScheduledJournalEntries(existingTransaction.scheduledJournalEntry, scheduledJournalEntries),
|
|
248
|
+
}
|
|
249
|
+
: omit(jeTransaction, ['scheduledJournalEntry']);
|
|
250
|
+
assignWith(draft[id], mergeable, (objValue, srcValue) => srcValue ?? objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
187
251
|
}
|
|
188
252
|
else {
|
|
189
253
|
draft[id] = {
|
|
@@ -203,7 +267,17 @@ function doUpdateScheduledDetailTransaction(draft, id, jeSchedulePayload, schedu
|
|
|
203
267
|
}
|
|
204
268
|
const existingTransaction = draft[id];
|
|
205
269
|
if (existingTransaction != null && updateType === 'merge') {
|
|
206
|
-
|
|
270
|
+
// An empty array here means "this payload carried no entries for this schedule", not "this
|
|
271
|
+
// schedule has none" -- and [] is not nullish, so the customizer below would treat it as a
|
|
272
|
+
// value and clear entries another call already wrote. Only overwrite when there is something
|
|
273
|
+
// to write.
|
|
274
|
+
const mergeable = scheduledJournalEntries.length > 0
|
|
275
|
+
? {
|
|
276
|
+
...jeTransaction,
|
|
277
|
+
scheduledJournalEntry: mergeScheduledJournalEntries(existingTransaction.scheduledJournalEntry, scheduledJournalEntries),
|
|
278
|
+
}
|
|
279
|
+
: omit(jeTransaction, ['scheduledJournalEntry']);
|
|
280
|
+
assignWith(draft[id], mergeable, (objValue, srcValue) => srcValue ?? objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
207
281
|
}
|
|
208
282
|
else {
|
|
209
283
|
draft[id] = {
|