diff --git a/client/src/views/ContentCreator/DayEditor/components/DayDetailModal.jsx b/client/src/views/ContentCreator/DayEditor/components/DayDetailModal.jsx index d87e43a2..d0e71e4a 100644 --- a/client/src/views/ContentCreator/DayEditor/components/DayDetailModal.jsx +++ b/client/src/views/ContentCreator/DayEditor/components/DayDetailModal.jsx @@ -169,7 +169,7 @@ const DayDetailModal = ({ setDescription(e.target.value)} value={description} - required + //required placeholder="Enter description" > @@ -186,7 +186,7 @@ const DayDetailModal = ({ onChange={e => setTekS(e.target.value)} value={TekS} className="input" - required + //required placeholder="Enter tekS" > diff --git a/client/src/views/ContentCreator/LessonEditor/LessonEditor.jsx b/client/src/views/ContentCreator/LessonEditor/LessonEditor.jsx index 302b4e13..e75b8077 100644 --- a/client/src/views/ContentCreator/LessonEditor/LessonEditor.jsx +++ b/client/src/views/ContentCreator/LessonEditor/LessonEditor.jsx @@ -115,7 +115,7 @@ export default function LessonEditor({ onChange={e => setDescription(e.target.value)} value={description} rows={3} - required + //required placeholder="Enter lesson description" /> @@ -123,7 +123,7 @@ export default function LessonEditor({ setTeks(e.target.value)} value={teks} - required + //required placeholder="Enter lesson teks" /> diff --git a/server/api/learning-standard/controllers/learning-standard.js b/server/api/learning-standard/controllers/learning-standard.js index d23b4198..c4e8c2d9 100644 --- a/server/api/learning-standard/controllers/learning-standard.js +++ b/server/api/learning-standard/controllers/learning-standard.js @@ -18,7 +18,7 @@ module.exports = { // validate the request const { name, expectations, teks } = ctx.request.body; - if (!expectations || !name || !teks) + if (!name) return ctx.badRequest('A name, teks and expectations must be provided!', { id: 'Learning-standard.update.body.invalid', error: 'ValidationError', diff --git a/server/api/learning-standard/models/learning-standard.settings.json b/server/api/learning-standard/models/learning-standard.settings.json index 18455c9f..55a3203d 100644 --- a/server/api/learning-standard/models/learning-standard.settings.json +++ b/server/api/learning-standard/models/learning-standard.settings.json @@ -20,7 +20,8 @@ "required": true }, "expectations": { - "type": "text" + "type": "text", + "required": false }, "days": { "via": "learning_standard", @@ -32,7 +33,8 @@ }, "teks": { "type": "string", - "unique": false + "unique": false, + "required": false }, "link": { "type": "string" diff --git a/server/api/unit/controllers/unit.js b/server/api/unit/controllers/unit.js index 5eac817d..3c7827ca 100644 --- a/server/api/unit/controllers/unit.js +++ b/server/api/unit/controllers/unit.js @@ -35,9 +35,9 @@ module.exports = { if ( !strapi.services.validator.isPositiveInt(number) || !strapi.services.validator.isPositiveInt(gradeId) || - !teks_id || - !name || - !teks_description + // !teks_id || + !name + // !teks_description ) return ctx.badRequest( 'A grade, name, teks_description must be provided! Number and Teks_id must be positive interger! ',