jamespot-front-business 1.1.71 → 1.1.73
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/dist/cjs.js +17 -6
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +17 -6
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -82,6 +82,10 @@ const Toast = {
|
|
|
82
82
|
selectors: selectors$3,
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
const isAbortError = (error) => {
|
|
86
|
+
return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
|
|
87
|
+
};
|
|
88
|
+
|
|
85
89
|
const initialState$m = {
|
|
86
90
|
animationConfiguration: null,
|
|
87
91
|
isActiveForCurrentUser: false,
|
|
@@ -114,14 +118,16 @@ const animationsListSlice = createSlice({
|
|
|
114
118
|
});
|
|
115
119
|
},
|
|
116
120
|
});
|
|
117
|
-
const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
+
const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch, signal }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
118
122
|
try {
|
|
119
|
-
const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
|
|
120
|
-
const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
|
|
123
|
+
const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation({ signal })).result;
|
|
124
|
+
const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive({ signal })).result;
|
|
121
125
|
return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
|
|
122
126
|
}
|
|
123
|
-
catch (
|
|
124
|
-
|
|
127
|
+
catch (err) {
|
|
128
|
+
if (!isAbortError(err)) {
|
|
129
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
130
|
+
}
|
|
125
131
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
126
132
|
}
|
|
127
133
|
}));
|
|
@@ -325,6 +331,7 @@ const fetchBookableAsset = createAsyncThunk('BookableAsset/fetchBookableAsset',
|
|
|
325
331
|
type: 'bookableAsset',
|
|
326
332
|
format: 'raw-list',
|
|
327
333
|
limit: 50,
|
|
334
|
+
public: true,
|
|
328
335
|
};
|
|
329
336
|
return yield extra.jApi.article.list(filterSpec);
|
|
330
337
|
}));
|
|
@@ -393,7 +400,11 @@ const initialState$j = {
|
|
|
393
400
|
form: initForm,
|
|
394
401
|
};
|
|
395
402
|
const fetchReservation = createAsyncThunk('Reservation/fetchReservation', (viewMode, { extra }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
396
|
-
const filterSpec = {
|
|
403
|
+
const filterSpec = {
|
|
404
|
+
format: 'raw-list',
|
|
405
|
+
limit: 50,
|
|
406
|
+
viewMode: viewMode === 'history' ? 'history' : undefined,
|
|
407
|
+
};
|
|
397
408
|
return yield extra.jApi.assetReservation.getList(filterSpec);
|
|
398
409
|
}));
|
|
399
410
|
const ReservationSlice = createSlice({
|