@zeniai/client-epic-state 4.13.1 → 4.13.3
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/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099DownloadEpic.js
CHANGED
|
@@ -5,6 +5,7 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const vendorFiling1099ListReducer_1 = require("./vendorFiling1099ListReducer");
|
|
8
|
+
const vendorFiling1099ListReducer_2 = require("./vendorFiling1099ListReducer");
|
|
8
9
|
const fetchVendorsFiling1099DownloadEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorFiling1099ListReducer_1.fetchVendorsFiling1099Download.match), (0, operators_1.switchMap)((action) => {
|
|
9
10
|
const type1099Download = action.payload.type1099;
|
|
10
11
|
const queryParams = {
|
|
@@ -26,20 +27,7 @@ const fetchVendorsFiling1099DownloadEpic = (actions$, _state$, zeniAPI) => actio
|
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
28
29
|
return (0, rxjs_1.of)((0, vendorFiling1099ListReducer_1.updateVendorFiling1099DownloadData)({
|
|
29
|
-
response:
|
|
30
|
-
nec: {
|
|
31
|
-
data: [],
|
|
32
|
-
customHeaders: [],
|
|
33
|
-
},
|
|
34
|
-
misc: {
|
|
35
|
-
data: [],
|
|
36
|
-
customHeaders: [],
|
|
37
|
-
},
|
|
38
|
-
int: {
|
|
39
|
-
data: [],
|
|
40
|
-
customHeaders: [],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
30
|
+
response: vendorFiling1099ListReducer_2.initialState.vendorFiling1099DownloadData,
|
|
43
31
|
downloadState: {
|
|
44
32
|
fetchState: 'Error',
|
|
45
33
|
},
|
|
@@ -47,20 +35,7 @@ const fetchVendorsFiling1099DownloadEpic = (actions$, _state$, zeniAPI) => actio
|
|
|
47
35
|
}
|
|
48
36
|
}), (0, operators_1.catchError)((err) => {
|
|
49
37
|
return (0, rxjs_1.of)((0, vendorFiling1099ListReducer_1.updateVendorFiling1099DownloadData)({
|
|
50
|
-
response:
|
|
51
|
-
nec: {
|
|
52
|
-
data: [],
|
|
53
|
-
customHeaders: [],
|
|
54
|
-
},
|
|
55
|
-
misc: {
|
|
56
|
-
data: [],
|
|
57
|
-
customHeaders: [],
|
|
58
|
-
},
|
|
59
|
-
int: {
|
|
60
|
-
data: [],
|
|
61
|
-
customHeaders: [],
|
|
62
|
-
},
|
|
63
|
-
},
|
|
38
|
+
response: vendorFiling1099ListReducer_2.initialState.vendorFiling1099DownloadData,
|
|
64
39
|
downloadState: {
|
|
65
40
|
fetchState: 'Error',
|
|
66
41
|
error: {
|
|
@@ -121,11 +121,15 @@ const vendorFiling1099UploadDetails = (0, toolkit_1.createSlice)({
|
|
|
121
121
|
error: undefined,
|
|
122
122
|
};
|
|
123
123
|
},
|
|
124
|
+
/*
|
|
125
|
+
@param signal is used to abort the request if needed.
|
|
126
|
+
We have to pass it as a parameter to the reducer-action function from the component (web-app-ui/cockpit-ui/web-c)
|
|
127
|
+
*/
|
|
124
128
|
prepare(vendorId, signal) {
|
|
125
129
|
return {
|
|
126
130
|
payload: {
|
|
127
131
|
vendorId,
|
|
128
|
-
signal
|
|
132
|
+
signal,
|
|
129
133
|
},
|
|
130
134
|
};
|
|
131
135
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.3",
|
|
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
|
"types": "lib/index.d.ts",
|