@selfcommunity/react-ui 0.10.2-courses.155 → 0.10.2-courses.157
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.
|
@@ -258,7 +258,8 @@ function CourseForm(inProps) {
|
|
|
258
258
|
(!field.name ||
|
|
259
259
|
Object.keys(error).length !== 0 ||
|
|
260
260
|
field.name.length > Course_1.COURSE_TITLE_MAX_LENGTH ||
|
|
261
|
-
field.description.length > Course_1.COURSE_DESCRIPTION_MAX_LENGTH
|
|
261
|
+
field.description.length > Course_1.COURSE_DESCRIPTION_MAX_LENGTH ||
|
|
262
|
+
(!!field.privacy && (!field.description || course.num_sections === 0 || course.num_lessons === 0))), variant: "contained", onClick: _step === Course_1.SCCourseFormStepType.GENERAL
|
|
262
263
|
? () => handleChangeStep(Course_1.SCCourseFormStepType.CUSTOMIZATION)
|
|
263
264
|
: field.privacy !== types_1.SCCoursePrivacyType.DRAFT && course.privacy === types_1.SCCoursePrivacyType.DRAFT
|
|
264
265
|
? () => setOpenDialog(true)
|
|
@@ -15,8 +15,8 @@ function Status(props) {
|
|
|
15
15
|
const intl = (0, react_intl_1.useIntl)();
|
|
16
16
|
return ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: intl.formatMessage({ id: 'ui.editCourse.tab.lessons.status', defaultMessage: 'ui.editCourse.tab.lessons.status' }, {
|
|
17
17
|
status: intl.formatMessage({
|
|
18
|
-
id: `ui.course.privacy.${course.privacy ===
|
|
19
|
-
defaultMessage: `ui.course.privacy.${course.privacy ===
|
|
18
|
+
id: `ui.course.privacy.${course.privacy === types_1.SCCoursePrivacyType.DRAFT ? 'draft' : course.privacy}`,
|
|
19
|
+
defaultMessage: `ui.course.privacy.${course.privacy === types_1.SCCoursePrivacyType.DRAFT ? 'draft' : course.privacy}`
|
|
20
20
|
}),
|
|
21
21
|
b: (chunks) => ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "b", fontWeight: "bold" }, { children: chunks })))
|
|
22
22
|
}) })), className: classes.status }));
|
|
@@ -256,7 +256,8 @@ export default function CourseForm(inProps) {
|
|
|
256
256
|
(!field.name ||
|
|
257
257
|
Object.keys(error).length !== 0 ||
|
|
258
258
|
field.name.length > COURSE_TITLE_MAX_LENGTH ||
|
|
259
|
-
field.description.length > COURSE_DESCRIPTION_MAX_LENGTH
|
|
259
|
+
field.description.length > COURSE_DESCRIPTION_MAX_LENGTH ||
|
|
260
|
+
(!!field.privacy && (!field.description || course.num_sections === 0 || course.num_lessons === 0))), variant: "contained", onClick: _step === SCCourseFormStepType.GENERAL
|
|
260
261
|
? () => handleChangeStep(SCCourseFormStepType.CUSTOMIZATION)
|
|
261
262
|
: field.privacy !== SCCoursePrivacyType.DRAFT && course.privacy === SCCoursePrivacyType.DRAFT
|
|
262
263
|
? () => setOpenDialog(true)
|
|
@@ -13,8 +13,8 @@ export default function Status(props) {
|
|
|
13
13
|
const intl = useIntl();
|
|
14
14
|
return (_jsx(Chip, { label: _jsx(Typography, Object.assign({ variant: "body1" }, { children: intl.formatMessage({ id: 'ui.editCourse.tab.lessons.status', defaultMessage: 'ui.editCourse.tab.lessons.status' }, {
|
|
15
15
|
status: intl.formatMessage({
|
|
16
|
-
id: `ui.course.privacy.${course.privacy ===
|
|
17
|
-
defaultMessage: `ui.course.privacy.${course.privacy ===
|
|
16
|
+
id: `ui.course.privacy.${course.privacy === SCCoursePrivacyType.DRAFT ? 'draft' : course.privacy}`,
|
|
17
|
+
defaultMessage: `ui.course.privacy.${course.privacy === SCCoursePrivacyType.DRAFT ? 'draft' : course.privacy}`
|
|
18
18
|
}),
|
|
19
19
|
b: (chunks) => (_jsx(Typography, Object.assign({ component: "b", fontWeight: "bold" }, { children: chunks })))
|
|
20
20
|
}) })), className: classes.status }));
|