mario-education 2.1.8 → 2.2.3

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.
@@ -4,6 +4,7 @@ declare enum CSVType {
4
4
  Subjects = "subjects",
5
5
  Grades = "grades",
6
6
  Attendances = "attendances",
7
+ ClassReflection = "classReflection",
7
8
  Others = "others"
8
9
  }
9
10
  interface CSVImportButton {
@@ -22,6 +22,7 @@ declare type QuestionDetail = {
22
22
  answers: Answer[];
23
23
  isSurvey: boolean;
24
24
  subQuestions: string[];
25
+ isBeforeSession: boolean;
25
26
  };
26
27
  declare const useQuestionDetail: (id?: number | undefined) => {
27
28
  questionDetail: QuestionDetail;
package/dist/index.js CHANGED
@@ -5223,14 +5223,11 @@ var CSVType;
5223
5223
  CSVType["Subjects"] = "subjects";
5224
5224
  CSVType["Grades"] = "grades";
5225
5225
  CSVType["Attendances"] = "attendances";
5226
+ CSVType["ClassReflection"] = "classReflection";
5226
5227
  CSVType["Others"] = "others";
5227
5228
  })(CSVType || (CSVType = {}));
5228
5229
 
5229
5230
  var buttons = [{
5230
- text: "Import students",
5231
- backgroundColor: "#0abde3",
5232
- type: CSVType.Students
5233
- }, {
5234
5231
  text: "Import subjects",
5235
5232
  backgroundColor: "#1dd1a1",
5236
5233
  type: CSVType.Subjects
@@ -5242,6 +5239,10 @@ var buttons = [{
5242
5239
  text: "Import attendances",
5243
5240
  backgroundColor: "#feca57",
5244
5241
  type: CSVType.Attendances
5242
+ }, {
5243
+ text: "Import class reflections",
5244
+ backgroundColor: "#e74c3c",
5245
+ type: CSVType.ClassReflection
5245
5246
  }, {
5246
5247
  text: "Import others",
5247
5248
  backgroundColor: "#8395a7",
@@ -5328,6 +5329,7 @@ var CSVImport = function CSVImport() {
5328
5329
  className: "d-flex align-items-center"
5329
5330
  }, buttons.map(function (button) {
5330
5331
  return React__default.createElement(UploadCSVButton, {
5332
+ key: button.text,
5331
5333
  htmlFor: id,
5332
5334
  text: button.text,
5333
5335
  isDisabled: isLoading,
@@ -9850,7 +9852,8 @@ var initValue$e = {
9850
9852
  answers: [],
9851
9853
  isSurvey: true,
9852
9854
  subQuestions: [],
9853
- isMandatory: false
9855
+ isMandatory: false,
9856
+ isBeforeSession: false
9854
9857
  };
9855
9858
  var TITLE$e = "Question detail";
9856
9859
 
@@ -9975,6 +9978,7 @@ var useQuestionDetail = function useQuestionDetail(id) {
9975
9978
 
9976
9979
  var CREATE_QUESTION_HEADER = "Create question";
9977
9980
  var EDIT_QUESTION_HEADER = "Edit question";
9981
+ var EMOTIONALS_LENGTH = marioCore.EMOTIONS.length;
9978
9982
 
9979
9983
  var QuestionDetail = function QuestionDetail() {
9980
9984
  var _useParams = reactRouterDom.useParams(),
@@ -10022,7 +10026,7 @@ var QuestionDetail = function QuestionDetail() {
10022
10026
  }
10023
10027
 
10024
10028
  if (marioCore.QUESTION_TYPES.EMOTIONAL == e.value && values.type !== marioCore.QUESTION_TYPES.EMOTIONAL) {
10025
- var defaultAnswerList = new Array(10).fill("").map(function (_item, index) {
10029
+ var defaultAnswerList = new Array(EMOTIONALS_LENGTH).fill("").map(function (_item, index) {
10026
10030
  return {
10027
10031
  text: "",
10028
10032
  id: marioCore.generateRandomString(),
@@ -10143,11 +10147,11 @@ var QuestionDetail = function QuestionDetail() {
10143
10147
  md: 12
10144
10148
  }, React__default.createElement(reactstrap.CustomInput, {
10145
10149
  type: "checkbox",
10146
- id: "question-default-mandatory-checkbox",
10147
- label: "Mandatory",
10148
- checked: values.isMandatory,
10150
+ id: "question-default-before-session-checkbox",
10151
+ label: "Before session",
10152
+ checked: values.isBeforeSession,
10149
10153
  onChange: function onChange() {
10150
- setFieldValue("isMandatory", !values.isMandatory);
10154
+ setFieldValue("isBeforeSession", !values.isBeforeSession);
10151
10155
  setEditedTrue();
10152
10156
  }
10153
10157
  })))))))), React__default.createElement(AdditionalComponent, {
@@ -13028,7 +13032,6 @@ var AssignmentList = function AssignmentList() {
13028
13032
  filters = _useAssignmentList.filters,
13029
13033
  changeFilters = _useAssignmentList.changeFilters,
13030
13034
  getData = _useAssignmentList.getData,
13031
- removeData = _useAssignmentList.removeData,
13032
13035
  listSemester = _useAssignmentList.listSemester,
13033
13036
  isRoleAdmin = _useAssignmentList.isRoleAdmin;
13034
13037
 
@@ -13057,10 +13060,6 @@ var AssignmentList = function AssignmentList() {
13057
13060
  setEditedFalse();
13058
13061
  };
13059
13062
 
13060
- var onRemove = function onRemove(id) {
13061
- removeData(id);
13062
- };
13063
-
13064
13063
  var onRemoveStudentFromAssignment = function onRemoveStudentFromAssignment(assignmentStudentId) {
13065
13064
  onRemoveStudent(assignmentStudentId, getData);
13066
13065
  };
@@ -13137,10 +13136,6 @@ var AssignmentList = function AssignmentList() {
13137
13136
  onClick: function onClick() {
13138
13137
  return openModal(record.id);
13139
13138
  }
13140
- }), React__default.createElement(marioCore.DeleteButtonIcon, {
13141
- onClick: function onClick() {
13142
- return onRemove(record.id);
13143
- }
13144
13139
  })));
13145
13140
  }))) : React__default.createElement(marioCore.EmptyDataAlert, {
13146
13141
  label: "assignment"