@zeniai/client-epic-state 5.1.88-betaRD8 → 5.1.88-betaRD9
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/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js
CHANGED
|
@@ -16,12 +16,20 @@ export const ignoreRecommendedJeScheduleEpic = (actions$, state$, zeniAPI) => ac
|
|
|
16
16
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
17
17
|
const actions = [];
|
|
18
18
|
const jeScheduleTransactionState = getJEScheduledTransactionByJEScheduleTransactionKey(jeScheduleTransactionKey, state);
|
|
19
|
-
|
|
20
|
-
//
|
|
19
|
+
const ignorePayload = prepareIgnoreSchedulePayload(scheduleType, jeScheduleTransactionState, state);
|
|
20
|
+
// The gateway reads reason/note from je_schedules[0].feedback and nowhere else, and rejects
|
|
21
|
+
// anything but those two keys inside it — `action` is stamped server-side.
|
|
21
22
|
const payload = {
|
|
22
|
-
...
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
...ignorePayload,
|
|
24
|
+
je_schedules: ignorePayload.je_schedules.map((schedule, index) => index === 0
|
|
25
|
+
? {
|
|
26
|
+
...schedule,
|
|
27
|
+
feedback: {
|
|
28
|
+
reason,
|
|
29
|
+
...(note != null && note !== '' ? { note } : {}),
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
: schedule),
|
|
25
33
|
};
|
|
26
34
|
const queryParam = {
|
|
27
35
|
je_schedule_type: scheduleType,
|
|
@@ -19,12 +19,20 @@ const ignoreRecommendedJeScheduleEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
19
19
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
20
20
|
const actions = [];
|
|
21
21
|
const jeScheduleTransactionState = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleTransactionKey, state);
|
|
22
|
-
|
|
23
|
-
//
|
|
22
|
+
const ignorePayload = (0, jeSchedulesPayload_1.prepareIgnoreSchedulePayload)(scheduleType, jeScheduleTransactionState, state);
|
|
23
|
+
// The gateway reads reason/note from je_schedules[0].feedback and nowhere else, and rejects
|
|
24
|
+
// anything but those two keys inside it — `action` is stamped server-side.
|
|
24
25
|
const payload = {
|
|
25
|
-
...
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
...ignorePayload,
|
|
27
|
+
je_schedules: ignorePayload.je_schedules.map((schedule, index) => index === 0
|
|
28
|
+
? {
|
|
29
|
+
...schedule,
|
|
30
|
+
feedback: {
|
|
31
|
+
reason,
|
|
32
|
+
...(note != null && note !== '' ? { note } : {}),
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
: schedule),
|
|
28
36
|
};
|
|
29
37
|
const queryParam = {
|
|
30
38
|
je_schedule_type: scheduleType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.88-
|
|
3
|
+
"version": "5.1.88-betaRD9",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|