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 CHANGED
@@ -90,6 +90,10 @@ const Toast = {
90
90
  selectors: selectors$3,
91
91
  };
92
92
 
93
+ const isAbortError = (error) => {
94
+ return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
95
+ };
96
+
93
97
  const initialState$m = {
94
98
  animationConfiguration: null,
95
99
  isActiveForCurrentUser: false,
@@ -122,14 +126,16 @@ const animationsListSlice = toolkit.createSlice({
122
126
  });
123
127
  },
124
128
  });
125
- const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
129
+ const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch, signal }) => __awaiter(void 0, void 0, void 0, function* () {
126
130
  try {
127
- const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
128
- const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
131
+ const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation({ signal })).result;
132
+ const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive({ signal })).result;
129
133
  return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
130
134
  }
131
- catch (_) {
132
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
135
+ catch (err) {
136
+ if (!isAbortError(err)) {
137
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
138
+ }
133
139
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
134
140
  }
135
141
  }));
@@ -333,6 +339,7 @@ const fetchBookableAsset = toolkit.createAsyncThunk('BookableAsset/fetchBookable
333
339
  type: 'bookableAsset',
334
340
  format: 'raw-list',
335
341
  limit: 50,
342
+ public: true,
336
343
  };
337
344
  return yield extra.jApi.article.list(filterSpec);
338
345
  }));
@@ -401,7 +408,11 @@ const initialState$j = {
401
408
  form: initForm,
402
409
  };
403
410
  const fetchReservation = toolkit.createAsyncThunk('Reservation/fetchReservation', (viewMode, { extra }) => __awaiter(void 0, void 0, void 0, function* () {
404
- const filterSpec = { format: 'raw-list', limit: 50, viewMode };
411
+ const filterSpec = {
412
+ format: 'raw-list',
413
+ limit: 50,
414
+ viewMode: viewMode === 'history' ? 'history' : undefined,
415
+ };
405
416
  return yield extra.jApi.assetReservation.getList(filterSpec);
406
417
  }));
407
418
  const ReservationSlice = toolkit.createSlice({