@selfcommunity/react-ui 0.7.50-events.100 → 0.7.50-events.101

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.
@@ -272,7 +272,8 @@ function EventForm(inProps) {
272
272
  * Renders root object
273
273
  */
274
274
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, title: event ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.title.edit", defaultMessage: "ui.eventForm.title.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.title", defaultMessage: "ui.eventForm.title" })), open: open, onClose: onClose, className: (0, classnames_1.default)(classes.root, className), actions: (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.name ||
275
- (!field.startDate && !field.startTime) ||
275
+ !field.startDate ||
276
+ !field.startTime ||
276
277
  (field.location === types_1.SCEventLocationType.ONLINE && !field.link) ||
277
278
  (field.location === types_1.SCEventLocationType.PERSON && !field.geolocation) ||
278
279
  (field.recurring !== types_1.SCEventRecurrenceType.NEVER && !field.endDate && !field.endTime) ||
@@ -179,11 +179,13 @@ const OnBoardingWidget = (inProps) => {
179
179
  setExpanded(!allStepsDone);
180
180
  }, [allStepsDone]);
181
181
  (0, react_1.useEffect)(() => {
182
- getSteps();
183
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
184
- const intervalId = setInterval(getSteps, isGenerating ? 6000 : 3 * 60 * 1000);
185
- return () => clearInterval(intervalId);
186
- }, [scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user, isGenerating]);
182
+ if (isAdmin) {
183
+ getSteps();
184
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
185
+ const intervalId = setInterval(getSteps, isGenerating ? 6000 : 3 * 60 * 1000);
186
+ return () => clearInterval(intervalId);
187
+ }
188
+ }, [scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user, isGenerating, isAdmin]);
187
189
  /**
188
190
  * Render _step content section
189
191
  */
@@ -270,7 +270,8 @@ export default function EventForm(inProps) {
270
270
  * Renders root object
271
271
  */
272
272
  return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, title: event ? (_jsx(FormattedMessage, { id: "ui.eventForm.title.edit", defaultMessage: "ui.eventForm.title.edit" })) : (_jsx(FormattedMessage, { id: "ui.eventForm.title", defaultMessage: "ui.eventForm.title" })), open: open, onClose: onClose, className: classNames(classes.root, className), actions: _jsx(LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.name ||
273
- (!field.startDate && !field.startTime) ||
273
+ !field.startDate ||
274
+ !field.startTime ||
274
275
  (field.location === SCEventLocationType.ONLINE && !field.link) ||
275
276
  (field.location === SCEventLocationType.PERSON && !field.geolocation) ||
276
277
  (field.recurring !== SCEventRecurrenceType.NEVER && !field.endDate && !field.endTime) ||
@@ -177,11 +177,13 @@ const OnBoardingWidget = (inProps) => {
177
177
  setExpanded(!allStepsDone);
178
178
  }, [allStepsDone]);
179
179
  useEffect(() => {
180
- getSteps();
181
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
182
- const intervalId = setInterval(getSteps, isGenerating ? 6000 : 3 * 60 * 1000);
183
- return () => clearInterval(intervalId);
184
- }, [scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user, isGenerating]);
180
+ if (isAdmin) {
181
+ getSteps();
182
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
183
+ const intervalId = setInterval(getSteps, isGenerating ? 6000 : 3 * 60 * 1000);
184
+ return () => clearInterval(intervalId);
185
+ }
186
+ }, [scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user, isGenerating, isAdmin]);
185
187
  /**
186
188
  * Render _step content section
187
189
  */