@zeniai/client-epic-state 5.1.21-betaRD2 → 5.1.21-betaRD4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus } from '../../responsePayload';
|
|
4
|
-
import { date } from '../../zeniDayJS';
|
|
4
|
+
import { date, dateNow } from '../../zeniDayJS';
|
|
5
5
|
import { refreshOpExByVendorReport, refreshOpExByVendorReportFailure, refreshOpExByVendorReportSuccess, } from './opExByVendorReducer';
|
|
6
6
|
export const refreshOpExByVendorReportEpic = (actions$, _state, zeniAPI) => actions$.pipe(filter(refreshOpExByVendorReport.match), switchMap(() => {
|
|
7
7
|
return zeniAPI
|
|
@@ -10,7 +10,7 @@ export const refreshOpExByVendorReportEpic = (actions$, _state, zeniAPI) => acti
|
|
|
10
10
|
if (response.status.code >= 200 && response.status.code < 300) {
|
|
11
11
|
const lastRefreshSuccessTime = response.status.last_refresh_success_time != null
|
|
12
12
|
? date(response.status.last_refresh_success_time)
|
|
13
|
-
:
|
|
13
|
+
: dateNow();
|
|
14
14
|
return of(refreshOpExByVendorReportSuccess({ lastRefreshSuccessTime }));
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
@@ -13,7 +13,7 @@ const refreshOpExByVendorReportEpic = (actions$, _state, zeniAPI) => actions$.pi
|
|
|
13
13
|
if (response.status.code >= 200 && response.status.code < 300) {
|
|
14
14
|
const lastRefreshSuccessTime = response.status.last_refresh_success_time != null
|
|
15
15
|
? (0, zeniDayJS_1.date)(response.status.last_refresh_success_time)
|
|
16
|
-
:
|
|
16
|
+
: (0, zeniDayJS_1.dateNow)();
|
|
17
17
|
return (0, rxjs_1.of)((0, opExByVendorReducer_1.refreshOpExByVendorReportSuccess)({ lastRefreshSuccessTime }));
|
|
18
18
|
}
|
|
19
19
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.21-
|
|
3
|
+
"version": "5.1.21-betaRD4",
|
|
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",
|