@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.
- package/lib/cjs/components/EventForm/EventForm.js +2 -1
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +7 -5
- package/lib/esm/components/EventForm/EventForm.js +2 -1
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +7 -5
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
|
@@ -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
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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
|
*/
|