mario-education 2.4.28-beta → 2.4.29-beta

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.
@@ -5,6 +5,7 @@ interface Props {
5
5
  isTeacherQuestion?: boolean;
6
6
  onChangeMandatory: Function;
7
7
  extraQuestionMandatory?: object[];
8
+ isHiddenMandatory?: boolean;
8
9
  }
9
10
  declare const QuestionList: FC<Props>;
10
11
  export default QuestionList;
package/dist/index.js CHANGED
@@ -1288,7 +1288,8 @@ var QuestionList = function QuestionList(_ref) {
1288
1288
  onRemove = _ref.onRemove,
1289
1289
  isTeacherQuestion = _ref.isTeacherQuestion,
1290
1290
  onChangeMandatory = _ref.onChangeMandatory,
1291
- extraQuestionMandatory = _ref.extraQuestionMandatory;
1291
+ extraQuestionMandatory = _ref.extraQuestionMandatory,
1292
+ isHiddenMandatory = _ref.isHiddenMandatory;
1292
1293
  return React__default.createElement("div", {
1293
1294
  className: "overflow-y-auto " + styles["question-list-session-template"] + " mt-2"
1294
1295
  }, !!questions && !!questions.length ? React__default.createElement(reactstrap.Table, {
@@ -1300,7 +1301,7 @@ var QuestionList = function QuestionList(_ref) {
1300
1301
  }, React__default.createElement("tbody", null, questions.map(function (question) {
1301
1302
  return React__default.createElement("tr", {
1302
1303
  key: question.id
1303
- }, React__default.createElement("td", null, marioCore.getTextFromHTML(question.text)), React__default.createElement("td", null, question.isDefaultQuestion ? question.isMandatory ? React__default.createElement("i", null, "Mandatory") : "" : React__default.createElement(reactstrap.CustomInput, {
1304
+ }, React__default.createElement("td", null, marioCore.getTextFromHTML(question.text)), !isHiddenMandatory ? React__default.createElement("td", null, question.isDefaultQuestion ? question.isMandatory ? React__default.createElement("i", null, "Mandatory") : "" : React__default.createElement(reactstrap.CustomInput, {
1304
1305
  id: "mandatory-" + (isTeacherQuestion ? "teacher" : "student") + "-" + question.text,
1305
1306
  type: "checkbox",
1306
1307
  label: "Mandatory",
@@ -1308,7 +1309,7 @@ var QuestionList = function QuestionList(_ref) {
1308
1309
  onChange: function onChange() {
1309
1310
  return onChangeMandatory(question.id, isTeacherQuestion);
1310
1311
  }
1311
- })), !question.isDefaultQuestion && React__default.createElement("td", {
1312
+ })) : null, !question.isDefaultQuestion && React__default.createElement("td", {
1312
1313
  className: "text-center " + styles["delete-column-question-list-sesstion-template"]
1313
1314
  }, React__default.createElement(marioCore.DeleteButtonIcon, {
1314
1315
  onClick: function onClick() {
@@ -14449,6 +14450,7 @@ var QuestionCateModal$2 = function QuestionCateModal(props, ref) {
14449
14450
  }, React__default.createElement(reactstrap.Col, {
14450
14451
  md: 12
14451
14452
  }, React__default.createElement(QuestionList, {
14453
+ isHiddenMandatory: true,
14452
14454
  questions: listQuestions,
14453
14455
  onRemove: removeQuestion,
14454
14456
  onChangeMandatory: function onChangeMandatory() {}