mario-education 2.4.152-level → 2.4.153-level

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/dist/index.js CHANGED
@@ -96,6 +96,35 @@ function _isSettledPact(thenable) {
96
96
  return thenable instanceof _Pact && thenable.s & 1;
97
97
  }
98
98
 
99
+ // Asynchronously iterate through an object that has a length property, passing the index as the first argument to the callback (even as the length property changes)
100
+ function _forTo(array, body, check) {
101
+ var i = -1, pact, reject;
102
+ function _cycle(result) {
103
+ try {
104
+ while (++i < array.length && (!check || !check())) {
105
+ result = body(i);
106
+ if (result && result.then) {
107
+ if (_isSettledPact(result)) {
108
+ result = result.v;
109
+ } else {
110
+ result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
111
+ return;
112
+ }
113
+ }
114
+ }
115
+ if (pact) {
116
+ _settle(pact, 1, result);
117
+ } else {
118
+ pact = result;
119
+ }
120
+ } catch (e) {
121
+ _settle(pact || (pact = new _Pact()), 2, e);
122
+ }
123
+ }
124
+ _cycle();
125
+ return pact;
126
+ }
127
+
99
128
  const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
100
129
 
101
130
  const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
@@ -5715,7 +5744,7 @@ var useCSVImport = function useCSVImport() {
5715
5744
 
5716
5745
  var upload = React.useCallback(function (file) {
5717
5746
  try {
5718
- var _temp12 = function _temp12() {
5747
+ var _temp11 = function _temp11() {
5719
5748
  dispatch(marioCore.setLoading(false));
5720
5749
  var inputId = document.getElementById(id);
5721
5750
  var input = document.getElementById('import-student');
@@ -5728,8 +5757,8 @@ var useCSVImport = function useCSVImport() {
5728
5757
  if (!type || !file) return Promise.resolve();
5729
5758
  dispatch(marioCore.setLoading(true));
5730
5759
 
5731
- var _temp13 = _catch(function () {
5732
- function _temp9() {
5760
+ var _temp12 = _catch(function () {
5761
+ function _temp8() {
5733
5762
  dispatch(marioCore.setAlert({
5734
5763
  type: "success",
5735
5764
  message: "Import CSV successfully"
@@ -5739,31 +5768,29 @@ var useCSVImport = function useCSVImport() {
5739
5768
  var formData = new FormData();
5740
5769
  formData.append("file", file, file.name);
5741
5770
 
5742
- var _temp8 = function () {
5743
- if (isCheckDomainIBS) {
5744
- var _temp14 = function _temp14() {
5745
- var _temp5 = function () {
5746
- if (type == CSVType.ClassReflection) {
5747
- return Promise.resolve(importClassReflectionCSV(formData)).then(function () {});
5748
- }
5749
- }();
5750
-
5751
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
5752
- };
5771
+ var _temp7 = function () {
5772
+ if (type == CSVType.Students) {
5773
+ return Promise.resolve(importStudentCSV(formData)).then(function () {});
5774
+ } else {
5775
+ var _temp13 = function () {
5776
+ if (isCheckDomainIBS) {
5777
+ var _temp14 = function () {
5778
+ if (type == CSVType.ClassReflection) {
5779
+ return Promise.resolve(importClassReflectionCSV(formData)).then(function () {});
5780
+ }
5781
+ }();
5753
5782
 
5754
- var _temp15 = function () {
5755
- if (type == CSVType.Students) {
5756
- return Promise.resolve(importStudentCSV(formData)).then(function () {});
5783
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
5784
+ } else {
5785
+ return Promise.resolve(importCSV(formData, type.toString())).then(function () {});
5757
5786
  }
5758
5787
  }();
5759
5788
 
5760
- return _temp15 && _temp15.then ? _temp15.then(_temp14) : _temp14(_temp15);
5761
- } else {
5762
- return Promise.resolve(importCSV(formData, type.toString())).then(function () {});
5789
+ if (_temp13 && _temp13.then) return _temp13.then(function () {});
5763
5790
  }
5764
5791
  }();
5765
5792
 
5766
- return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
5793
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
5767
5794
  }, function (err) {
5768
5795
  var _err$response, _err$response$data;
5769
5796
 
@@ -5773,7 +5800,7 @@ var useCSVImport = function useCSVImport() {
5773
5800
  }));
5774
5801
  });
5775
5802
 
5776
- return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(_temp12) : _temp12(_temp13));
5803
+ return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12));
5777
5804
  } catch (e) {
5778
5805
  return Promise.reject(e);
5779
5806
  }
@@ -5781,7 +5808,7 @@ var useCSVImport = function useCSVImport() {
5781
5808
 
5782
5809
  var uploadByTeacherId = function uploadByTeacherId(file) {
5783
5810
  try {
5784
- var _temp18 = function _temp18() {
5811
+ var _temp17 = function _temp17() {
5785
5812
  dispatch(marioCore.setLoading(false));
5786
5813
  var input = document.getElementById('teacherSelector');
5787
5814
  input && (input.value = "");
@@ -5798,7 +5825,7 @@ var useCSVImport = function useCSVImport() {
5798
5825
  if (!type || !file) return Promise.resolve();
5799
5826
  dispatch(marioCore.setLoading(true));
5800
5827
 
5801
- var _temp19 = _catch(function () {
5828
+ var _temp18 = _catch(function () {
5802
5829
  var formData = new FormData();
5803
5830
  formData.append("file", file, file.name);
5804
5831
  return Promise.resolve(importStudentByTeacher(defaultTeacher, formData)).then(function () {
@@ -5816,7 +5843,7 @@ var useCSVImport = function useCSVImport() {
5816
5843
  }));
5817
5844
  });
5818
5845
 
5819
- return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp18) : _temp18(_temp19));
5846
+ return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(_temp17) : _temp17(_temp18));
5820
5847
  } catch (e) {
5821
5848
  return Promise.reject(e);
5822
5849
  }
@@ -5824,7 +5851,7 @@ var useCSVImport = function useCSVImport() {
5824
5851
 
5825
5852
  var onConfirm = function onConfirm(values) {
5826
5853
  try {
5827
- var _temp22 = function _temp22() {
5854
+ var _temp21 = function _temp21() {
5828
5855
  dispatch(marioCore.setLoading(false));
5829
5856
  var input = document.getElementById(id);
5830
5857
  input && (input.value = "");
@@ -5833,7 +5860,7 @@ var useCSVImport = function useCSVImport() {
5833
5860
  if (!dataFile || !dataFile) return Promise.resolve();
5834
5861
  dispatch(marioCore.setLoading(true));
5835
5862
 
5836
- var _temp23 = _catch(function () {
5863
+ var _temp22 = _catch(function () {
5837
5864
  var formData = new FormData();
5838
5865
  formData.append("file", dataFile, dataFile.name);
5839
5866
  formData.append("teacherName", values.teacherName);
@@ -5857,7 +5884,7 @@ var useCSVImport = function useCSVImport() {
5857
5884
  }));
5858
5885
  });
5859
5886
 
5860
- return Promise.resolve(_temp23 && _temp23.then ? _temp23.then(_temp22) : _temp22(_temp23));
5887
+ return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(_temp21) : _temp21(_temp22));
5861
5888
  } catch (e) {
5862
5889
  return Promise.reject(e);
5863
5890
  }
@@ -5945,11 +5972,6 @@ var CSVImport = function CSVImport() {
5945
5972
  buttons = _useCSVImport.buttons,
5946
5973
  upload = _useCSVImport.upload,
5947
5974
  isCheckDomainIBS = _useCSVImport.isCheckDomainIBS,
5948
- onChangeTeacher = _useCSVImport.onChangeTeacher,
5949
- setDataFileImportStudent = _useCSVImport.setDataFileImportStudent,
5950
- defaultTeacher = _useCSVImport.defaultTeacher,
5951
- fileName = _useCSVImport.fileName,
5952
- onStudentSubmit = _useCSVImport.onStudentSubmit,
5953
5975
  downloadTemplateStudentISB = _useCSVImport.downloadTemplateStudentISB;
5954
5976
 
5955
5977
  var _useTranslation = marioCore.useTranslation(),
@@ -6066,40 +6088,43 @@ var CSVImport = function CSVImport() {
6066
6088
  });
6067
6089
  })))));
6068
6090
  }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
6069
- md: 3,
6070
- className: "mb-3"
6071
- }, React__default.createElement(TeacherSelector, {
6072
- defaultValue: defaultTeacher,
6073
- onChange: onChangeTeacher
6074
- }), React__default.createElement("div", {
6075
- className: "mt-3"
6076
- }, fileName ? React__default.createElement("span", {
6077
- className: "font-italic mb-1 font-lg"
6078
- }, fileName) : null, React__default.createElement(reactstrap.Input, {
6091
+ md: 12,
6092
+ className: "mb-2 text-left"
6093
+ }, React__default.createElement(reactstrap.Button, {
6094
+ role: "button",
6095
+ color: "primary",
6096
+ onClick: function onClick() {
6097
+ return downloadTemplateStudentISB();
6098
+ }
6099
+ }, React__default.createElement("p", {
6100
+ className: "d-flex align-items-center mb-0"
6101
+ }, t("download_template"), " ", React__default.createElement(ai.AiOutlineDownload, {
6102
+ size: 20,
6103
+ className: "ml-2"
6104
+ })))), React__default.createElement(reactstrap.Col, {
6105
+ md: 6,
6106
+ className: "mb-2"
6107
+ }, React__default.createElement(reactstrap.Input, {
6108
+ id: "import-student",
6079
6109
  className: "d-none",
6080
6110
  type: "file",
6081
- id: "teacherSelector",
6082
6111
  onChange: function onChange(e) {
6083
- return setDataFileImportStudent(e.target.files[0]);
6112
+ return upload(e.target.files[0]);
6084
6113
  },
6085
6114
  accept: "text/csv"
6115
+ }), React__default.createElement(marioCore.RequiredLabel, {
6116
+ text: "Import student"
6086
6117
  }), React__default.createElement(UploadCSVButton, {
6087
- key: "Import student",
6088
- htmlFor: "teacherSelector",
6089
- text: "Select CSV",
6118
+ key: "import-students",
6119
+ htmlFor: 'import-student',
6120
+ text: "Import students",
6090
6121
  isDisabled: isLoading,
6091
- backgroundColor: "#e74c3c",
6122
+ backgroundColor: "#0abde3",
6092
6123
  onClick: function onClick() {
6093
- return setType(CSVType.Students);
6124
+ setType(CSVType.Students);
6094
6125
  }
6095
- })), React__default.createElement(reactstrap.Button, {
6096
- color: "success",
6097
- onClick: onStudentSubmit,
6098
- className: "w-100 mt-3"
6099
- }, "Import")), React__default.createElement(reactstrap.Col, {
6100
- md: 3
6101
- }), React__default.createElement(reactstrap.Col, {
6102
- md: 3,
6126
+ })), React__default.createElement(reactstrap.Col, {
6127
+ md: 6,
6103
6128
  className: "mb-3"
6104
6129
  }, React__default.createElement(reactstrap.Input, {
6105
6130
  className: "d-none",
@@ -6110,7 +6135,9 @@ var CSVImport = function CSVImport() {
6110
6135
  },
6111
6136
  accept: "text/csv"
6112
6137
  }), buttons.map(function (button) {
6113
- return React__default.createElement(UploadCSVButton, {
6138
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(marioCore.RequiredLabel, {
6139
+ text: button.text
6140
+ }), React__default.createElement(UploadCSVButton, {
6114
6141
  key: button.text,
6115
6142
  htmlFor: id,
6116
6143
  text: button.text,
@@ -6119,7 +6146,7 @@ var CSVImport = function CSVImport() {
6119
6146
  onClick: function onClick() {
6120
6147
  return setType(button.type);
6121
6148
  }
6122
- });
6149
+ }));
6123
6150
  })))));
6124
6151
  };
6125
6152
 
@@ -11127,7 +11154,7 @@ var INITIAL_CHOSEN_USER$1 = {
11127
11154
  studentName: ""
11128
11155
  };
11129
11156
 
11130
- var TITLE$h = "Assign secondary teacher list";
11157
+ var TITLE$h = "Assign support teacher list";
11131
11158
 
11132
11159
  var useAssignSecondaryTeacher = function useAssignSecondaryTeacher() {
11133
11160
  var modal = React.useRef();
@@ -11260,7 +11287,7 @@ var useAssignSecondaryTeacher = function useAssignSecondaryTeacher() {
11260
11287
  if (!secondaryTeacherChangeId) {
11261
11288
  dispatch(marioCore.setAlert({
11262
11289
  type: "danger",
11263
- message: "Secondary Teacher have not been selected!"
11290
+ message: "Support Teacher have not been selected!"
11264
11291
  }));
11265
11292
  return Promise.resolve();
11266
11293
  }
@@ -11268,7 +11295,7 @@ var useAssignSecondaryTeacher = function useAssignSecondaryTeacher() {
11268
11295
  dispatch(marioCore.setModal({
11269
11296
  isOpen: true,
11270
11297
  type: "warning",
11271
- message: "Do you want to assign this Secondary Teacher to student " + chosenUser.studentName + "?",
11298
+ message: "Do you want to assign this Support Teacher to student " + chosenUser.studentName + "?",
11272
11299
  onConfirm: function () {
11273
11300
  try {
11274
11301
  var _temp9 = function _temp9() {
@@ -11281,7 +11308,7 @@ var useAssignSecondaryTeacher = function useAssignSecondaryTeacher() {
11281
11308
  return Promise.resolve(assignSecondaryTeacherOfStudent(chosenUser.id, chosenUser.teacherId, secondaryTeacherChangeId)).then(function () {
11282
11309
  dispatch(marioCore.setAlert({
11283
11310
  type: "success",
11284
- message: "Assign Secondary Teacher successfully"
11311
+ message: "Assign Support Teacher successfully"
11285
11312
  }));
11286
11313
  openModal();
11287
11314
  resetData();
@@ -11368,13 +11395,13 @@ var AssignSecondaryTeacherModal = function AssignSecondaryTeacherModal(_ref, ref
11368
11395
  }, t("student_email")), React__default.createElement("p", null, chosenUser.emailStudent), !!chosenUser && React__default.createElement(marioCore.CustomSelector, {
11369
11396
  options: options,
11370
11397
  value: valueDefault,
11371
- placeholder: t("select_secondary_teacher"),
11398
+ placeholder: t("select_support_teacher"),
11372
11399
  onChange: function onChange(e) {
11373
11400
  return setSecondaryTeacherChangeId((e === null || e === void 0 ? void 0 : e.value) || 0);
11374
11401
  },
11375
11402
  isClearable: true
11376
11403
  }), !!isChecked && !secondaryTeacherChangeId && React__default.createElement(marioCore.ErrorHandler, {
11377
- text: "Secondary Teacher is required"
11404
+ text: "Support Teacher is required"
11378
11405
  }))));
11379
11406
  };
11380
11407
 
@@ -11449,7 +11476,7 @@ var AssignSecondaryTeacherList = function AssignSecondaryTeacherList() {
11449
11476
  onClick: function onClick() {
11450
11477
  return choiceUser(record);
11451
11478
  }
11452
- }, t("assign_secondary_teacher"))));
11479
+ }, t("assign_support_teacher"))));
11453
11480
  })))) : React__default.createElement(marioCore.EmptyDataAlert, {
11454
11481
  label: "user"
11455
11482
  })), React__default.createElement(reactstrap.Col, {
@@ -11469,7 +11496,7 @@ var AssignSecondaryTeacherList = function AssignSecondaryTeacherList() {
11469
11496
  }
11470
11497
  }))), React__default.createElement(AssignSecondaryTeacherModal$1, {
11471
11498
  ref: modal,
11472
- header: t("assign_secondary_teacher"),
11499
+ header: t("assign_support_teacher"),
11473
11500
  chosenUser: chosenUser,
11474
11501
  onAssign: handleAssign,
11475
11502
  options: options,
@@ -11905,12 +11932,12 @@ var SwitchSecondaryTeacherModal = function SwitchSecondaryTeacherModal(_ref, ref
11905
11932
  className: "font-weight-bold"
11906
11933
  }, t("student_email")), React__default.createElement("p", null, userChoiced.emailStudent), React__default.createElement("p", {
11907
11934
  className: "font-weight-bold"
11908
- }, t("current_secondary_teacher_name")), React__default.createElement("p", null, userChoiced.secondaryTeacherName), React__default.createElement("p", {
11935
+ }, t("current_support_teacher_name")), React__default.createElement("p", null, userChoiced.secondaryTeacherName), React__default.createElement("p", {
11909
11936
  className: "font-weight-bold"
11910
- }, t("current_secondary_teacher_email")), React__default.createElement("p", null, userChoiced.emailSecondaryTeacher), !!userChoiced && React__default.createElement(marioCore.CustomSelector, {
11937
+ }, t("current_support_teacher_email")), React__default.createElement("p", null, userChoiced.emailSecondaryTeacher), !!userChoiced && React__default.createElement(marioCore.CustomSelector, {
11911
11938
  options: options,
11912
11939
  value: valueDefault,
11913
- placeholder: t("select_secondary_teacher_change"),
11940
+ placeholder: t("select_support_teacher_change"),
11914
11941
  onChange: function onChange(e) {
11915
11942
  return setSecondaryTeacherChangeId(e.value);
11916
11943
  }
@@ -11928,7 +11955,7 @@ var INITIAL_USER_CHOICE$3 = {
11928
11955
  assistantName: ""
11929
11956
  };
11930
11957
 
11931
- var TITLE$j = "Switch counselor list";
11958
+ var TITLE$j = "Switch support list";
11932
11959
 
11933
11960
  var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
11934
11961
  var modal = React.useRef();
@@ -12043,7 +12070,7 @@ var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
12043
12070
  dispatch(marioCore.setModal({
12044
12071
  isOpen: true,
12045
12072
  type: "warning",
12046
- message: "Do you want to change secondary teacher?",
12073
+ message: "Do you want to change support teacher?",
12047
12074
  onConfirm: function () {
12048
12075
  try {
12049
12076
  var _temp9 = function _temp9() {
@@ -12056,7 +12083,7 @@ var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
12056
12083
  return Promise.resolve(changeSecondaryTeacherOfStudent(studentId, secondaryTeacherId)).then(function () {
12057
12084
  dispatch(marioCore.setAlert({
12058
12085
  type: "success",
12059
- message: "Change secondary teacher successfully"
12086
+ message: "Change support teacher successfully"
12060
12087
  }));
12061
12088
  openModal();
12062
12089
  resetData();
@@ -12091,7 +12118,7 @@ var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
12091
12118
  dispatch(marioCore.setModal({
12092
12119
  isOpen: true,
12093
12120
  type: "warning",
12094
- message: "Do you want to remove this Secondary teacher?",
12121
+ message: "Do you want to remove this support teacher?",
12095
12122
  onConfirm: function () {
12096
12123
  try {
12097
12124
  var _temp12 = _catch(function () {
@@ -12099,7 +12126,7 @@ var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
12099
12126
  getStudentSecondaryTeacherData();
12100
12127
  dispatch(marioCore.setAlert({
12101
12128
  type: "success",
12102
- message: "Remove secondary teacher successfully"
12129
+ message: "Remove support teacher successfully"
12103
12130
  }));
12104
12131
  });
12105
12132
  }, function (err) {
@@ -12153,20 +12180,20 @@ var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
12153
12180
  var header$a = "list_students";
12154
12181
 
12155
12182
  var SwitchSecondaryTeacherList = function SwitchSecondaryTeacherList() {
12156
- var _useSwitchCounselor = useSwitchSecondaryTeacher(),
12157
- userList = _useSwitchCounselor.userList,
12158
- totalItems = _useSwitchCounselor.totalItems,
12159
- filters = _useSwitchCounselor.filters,
12160
- changeFilters = _useSwitchCounselor.changeFilters,
12161
- modal = _useSwitchCounselor.modal,
12162
- userChoiced = _useSwitchCounselor.userChoiced,
12163
- options = _useSwitchCounselor.options,
12164
- setSecondaryTeacherChangeId = _useSwitchCounselor.setSecondaryTeacherChangeId,
12165
- secondaryTeacherChangeId = _useSwitchCounselor.secondaryTeacherChangeId,
12166
- removeData = _useSwitchCounselor.removeData,
12167
- resetData = _useSwitchCounselor.resetData,
12168
- choiceUser = _useSwitchCounselor.choiceUser,
12169
- onDeleteSecondaryTeacher = _useSwitchCounselor.onDeleteSecondaryTeacher;
12183
+ var _uuseSwitchSecondaryT = useSwitchSecondaryTeacher(),
12184
+ userList = _uuseSwitchSecondaryT.userList,
12185
+ totalItems = _uuseSwitchSecondaryT.totalItems,
12186
+ filters = _uuseSwitchSecondaryT.filters,
12187
+ changeFilters = _uuseSwitchSecondaryT.changeFilters,
12188
+ modal = _uuseSwitchSecondaryT.modal,
12189
+ userChoiced = _uuseSwitchSecondaryT.userChoiced,
12190
+ options = _uuseSwitchSecondaryT.options,
12191
+ setSecondaryTeacherChangeId = _uuseSwitchSecondaryT.setSecondaryTeacherChangeId,
12192
+ secondaryTeacherChangeId = _uuseSwitchSecondaryT.secondaryTeacherChangeId,
12193
+ removeData = _uuseSwitchSecondaryT.removeData,
12194
+ resetData = _uuseSwitchSecondaryT.resetData,
12195
+ choiceUser = _uuseSwitchSecondaryT.choiceUser,
12196
+ onDeleteSecondaryTeacher = _uuseSwitchSecondaryT.onDeleteSecondaryTeacher;
12170
12197
 
12171
12198
  var _useTranslation = marioCore.useTranslation(),
12172
12199
  t = _useTranslation.t;
@@ -12206,11 +12233,11 @@ var SwitchSecondaryTeacherList = function SwitchSecondaryTeacherList() {
12206
12233
  className: "align-top"
12207
12234
  }, t("student_email")), React__default.createElement("th", {
12208
12235
  className: "align-top"
12209
- }, t("current_secondary_teacher_name")), React__default.createElement("th", {
12236
+ }, t("current_support_teacher_name")), React__default.createElement("th", {
12210
12237
  className: "align-top"
12211
- }, t("current_secondary_teacher_email")), React__default.createElement("th", {
12238
+ }, t("current_support_teacher_email")), React__default.createElement("th", {
12212
12239
  className: "align-top"
12213
- }, t("remove_secondary_teacher")))), React__default.createElement("tbody", null, !!userList && userList.length > 0 && userList.map(function (record) {
12240
+ }, t("remove_support_teacher")))), React__default.createElement("tbody", null, !!userList && userList.length > 0 && userList.map(function (record) {
12214
12241
  return React__default.createElement("tr", {
12215
12242
  key: record.id
12216
12243
  }, React__default.createElement("td", {
@@ -12252,7 +12279,7 @@ var SwitchSecondaryTeacherList = function SwitchSecondaryTeacherList() {
12252
12279
  }
12253
12280
  }))), React__default.createElement(SwitchSecondaryTeacherModal$1, {
12254
12281
  ref: modal,
12255
- header: t("switch_counselor"),
12282
+ header: t("switch_support_teacher"),
12256
12283
  userChoiced: userChoiced,
12257
12284
  removeData: removeData,
12258
12285
  options: options,
@@ -12332,11 +12359,11 @@ var tabs = [{
12332
12359
  component: SwitchCounselorList
12333
12360
  }, {
12334
12361
  path: "/admin/set-up/assign-secondary-teacher",
12335
- title: "Assign secondary teacher",
12362
+ title: "Assign support teacher",
12336
12363
  component: AssignSecondaryTeacherList
12337
12364
  }, {
12338
12365
  path: "/admin/set-up/switch-secondary-teacher",
12339
- title: "Switch secondary teacher",
12366
+ title: "Switch support teacher",
12340
12367
  component: SwitchSecondaryTeacherList
12341
12368
  }, {
12342
12369
  path: "/admin/set-up/welcome-email-re-send",
@@ -28570,7 +28597,7 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
28570
28597
  var average = function average(arr) {
28571
28598
  return arr.reduce(function (a, b) {
28572
28599
  return a + b;
28573
- }, 0) / arr.length;
28600
+ }, 0) / arr.length || 0;
28574
28601
  };
28575
28602
  var getConvertMinuteToHour = function getConvertMinuteToHour(timeSecond) {
28576
28603
  var hTime = "";
@@ -31033,23 +31060,23 @@ var DashboardToPDF = function DashboardToPDF(props) {
31033
31060
 
31034
31061
  var generatePDF = function generatePDF() {
31035
31062
  try {
31036
- var _temp27 = function _temp27() {
31063
+ var _temp30 = function _temp30() {
31037
31064
  dispatch(marioCore.setLoading(false));
31038
31065
  };
31039
31066
 
31040
31067
  dispatch(marioCore.setLoading(true));
31041
31068
 
31042
- var _temp28 = _catch(function () {
31043
- function _temp24() {
31044
- function _temp22() {
31045
- function _temp20() {
31046
- function _temp18() {
31047
- function _temp16() {
31048
- function _temp14() {
31069
+ var _temp31 = _catch(function () {
31070
+ function _temp27() {
31071
+ function _temp25() {
31072
+ function _temp23() {
31073
+ function _temp21() {
31074
+ function _temp19() {
31075
+ function _temp17() {
31049
31076
  doc.save("DashBoard.pdf");
31050
31077
  }
31051
31078
 
31052
- var _temp13 = function () {
31079
+ var _temp16 = function () {
31053
31080
  if (selectedToPDF.includes(topLearningStrategyName)) {
31054
31081
  var chart = document.getElementById("learning_strategy");
31055
31082
  return Promise.resolve(html2canvas(chart)).then(function (canvas) {
@@ -31061,10 +31088,10 @@ var DashboardToPDF = function DashboardToPDF(props) {
31061
31088
  }
31062
31089
  }();
31063
31090
 
31064
- return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
31091
+ return _temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16);
31065
31092
  }
31066
31093
 
31067
- var _temp15 = function () {
31094
+ var _temp18 = function () {
31068
31095
  if (selectedToPDF.includes(learningProcessName)) {
31069
31096
  return Promise.resolve(createImageHeader()).then(function () {
31070
31097
  doc.setFontSize(14);
@@ -31073,20 +31100,82 @@ var DashboardToPDF = function DashboardToPDF(props) {
31073
31100
  line += 20;
31074
31101
  var chart = document.getElementById("learning_progress");
31075
31102
  return Promise.resolve(html2canvas(chart)).then(function (canvas) {
31103
+ function _temp15() {
31104
+ left = 20;
31105
+ doc.addImage(canvas.toDataURL("image/png"), 10, line + 70, 420, heightChart);
31106
+ doc.setFontSize(8);
31107
+ doc.addPage();
31108
+ line = 80;
31109
+ left = 20;
31110
+ }
31111
+
31112
+ var lineOptionPrecess = line;
31076
31113
  doc.setFontSize(8);
31077
- left = 20;
31078
- doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, 420, heightChart);
31079
- doc.setFontSize(8);
31080
- line += heightChart;
31114
+ var questions = seriesConference.map(function (r) {
31115
+ return r.name;
31116
+ });
31117
+
31118
+ var _temp14 = _forTo(monthsConference, function (index) {
31119
+ var _line = line;
31120
+ doc.setFontSize(12);
31121
+ doc.setFont("Helvetica", "normal", "bold");
31122
+ doc.text(monthsConference[index], left, _line);
31123
+ doc.setFontSize(8);
31124
+
31125
+ for (var indexResult = 0; indexResult < (seriesConference === null || seriesConference === void 0 ? void 0 : seriesConference.length); indexResult++) {
31126
+ var avg = seriesConference[indexResult].data[index];
31127
+
31128
+ if (avg != 0) {
31129
+ var questionText = questions[indexResult];
31130
+
31131
+ if (questionText != "") {
31132
+ doc.setDrawColor(0);
31133
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[indexResult]);
31134
+ doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31135
+ doc.setFont("Helvetica", "normal", "bold");
31136
+ doc.text(questionText + ":", left + 8, _line + 10);
31137
+ doc.setFont("Helvetica", "normal", "normal");
31138
+ doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31139
+ }
31140
+
31141
+ _line += 10;
31142
+
31143
+ if (_line > lineOptionPrecess) {
31144
+ lineOptionPrecess = _line;
31145
+ }
31146
+ }
31147
+ }
31148
+
31149
+ left += 100;
31150
+
31151
+ if (left + 105 > WIDTH_PAPER) {
31152
+ left = 20;
31153
+ line = lineOptionPrecess + 25;
31154
+ }
31155
+
31156
+ var _temp13 = function () {
31157
+ if (line + 150 > HEIGHT_PAPER) {
31158
+ doc.addPage();
31159
+ return Promise.resolve(createImageHeader()).then(function () {
31160
+ line = 80;
31161
+ left = 20;
31162
+ });
31163
+ }
31164
+ }();
31165
+
31166
+ if (_temp13 && _temp13.then) return _temp13.then(function () {});
31167
+ });
31168
+
31169
+ return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
31081
31170
  });
31082
31171
  });
31083
31172
  }
31084
31173
  }();
31085
31174
 
31086
- return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
31175
+ return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
31087
31176
  }
31088
31177
 
31089
- var _temp17 = function () {
31178
+ var _temp20 = function () {
31090
31179
  if (selectedToPDF.includes(successIndicatorsName)) {
31091
31180
  return Promise.resolve(createImageHeader()).then(function () {
31092
31181
  doc.setFontSize(14);
@@ -31173,15 +31262,15 @@ var DashboardToPDF = function DashboardToPDF(props) {
31173
31262
  }
31174
31263
  }();
31175
31264
 
31176
- return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
31265
+ return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
31177
31266
  }
31178
31267
 
31179
- var _temp19 = function () {
31268
+ var _temp22 = function () {
31180
31269
  if (selectedToPDF.includes(preparednessChartName)) {
31181
31270
  return Promise.resolve(createImageHeader()).then(function () {
31182
31271
  doc.setFontSize(14);
31183
31272
  doc.setFont("Helvetica", "normal", "bold");
31184
- doc.text(t(preparednessChartName), left, line);
31273
+ doc.text("Readiness To Learn", left, line);
31185
31274
  line += 20;
31186
31275
  var chart = document.getElementById("preparedness");
31187
31276
  return Promise.resolve(html2canvas(chart)).then(function (canvas) {
@@ -31263,10 +31352,10 @@ var DashboardToPDF = function DashboardToPDF(props) {
31263
31352
  }
31264
31353
  }();
31265
31354
 
31266
- return _temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19);
31355
+ return _temp22 && _temp22.then ? _temp22.then(_temp23) : _temp23(_temp22);
31267
31356
  }
31268
31357
 
31269
- var _temp21 = function () {
31358
+ var _temp24 = function () {
31270
31359
  if (selectedToPDF.includes(averageStudentStressName)) {
31271
31360
  return Promise.resolve(createImageHeader()).then(function () {
31272
31361
  doc.setFontSize(14);
@@ -31352,7 +31441,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
31352
31441
  }
31353
31442
  }();
31354
31443
 
31355
- return _temp21 && _temp21.then ? _temp21.then(_temp22) : _temp22(_temp21);
31444
+ return _temp24 && _temp24.then ? _temp24.then(_temp25) : _temp25(_temp24);
31356
31445
  }
31357
31446
 
31358
31447
  var doc = new jsPDF({
@@ -31385,7 +31474,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
31385
31474
  var line = 85;
31386
31475
  var left = 20;
31387
31476
 
31388
- var _temp23 = function () {
31477
+ var _temp26 = function () {
31389
31478
  if (selectedToPDF.includes(averageStudentSafetyName)) {
31390
31479
  return Promise.resolve(createImageHeader()).then(function () {
31391
31480
  doc.setFontSize(14);
@@ -31473,7 +31562,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
31473
31562
  }
31474
31563
  }();
31475
31564
 
31476
- return _temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23);
31565
+ return _temp26 && _temp26.then ? _temp26.then(_temp27) : _temp27(_temp26);
31477
31566
  }, function (err) {
31478
31567
  console.log(err);
31479
31568
  dispatch(marioCore.setAlert({
@@ -31482,7 +31571,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
31482
31571
  }));
31483
31572
  });
31484
31573
 
31485
- return Promise.resolve(_temp28 && _temp28.then ? _temp28.then(_temp27) : _temp27(_temp28));
31574
+ return Promise.resolve(_temp31 && _temp31.then ? _temp31.then(_temp30) : _temp30(_temp31));
31486
31575
  } catch (e) {
31487
31576
  return Promise.reject(e);
31488
31577
  }
@@ -31549,7 +31638,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
31549
31638
  months: monthsOneToOne,
31550
31639
  dayOfWeek: dayOfWeekOneToOne,
31551
31640
  timeOfDay: timeOfDay,
31552
- colors: ["#73C8E5", "#F9F871", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"]
31641
+ colors: ["#73C8E5", "#FFB04F", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"]
31553
31642
  })), React__default.createElement("div", {
31554
31643
  id: "learning_progress",
31555
31644
  style: {
@@ -31558,7 +31647,6 @@ var DashboardToPDF = function DashboardToPDF(props) {
31558
31647
  }
31559
31648
  }, React__default.createElement(GenerateChartData, {
31560
31649
  colors: ["#73C8E5", "#F9F871", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"],
31561
- name: "Learning Process",
31562
31650
  typeChart: TYPECHART.AREA,
31563
31651
  activeColumn: activeColumnConference,
31564
31652
  series: seriesConference,
@@ -32155,7 +32243,7 @@ var Dashboard = function Dashboard() {
32155
32243
  md: chartIsOpened[0] ? 7 : 12
32156
32244
  }, React__default.createElement(GenerateChartData, {
32157
32245
  colors: ["#169490", "#316CD9", "#FFB04F"],
32158
- name: t(preparednessChartName),
32246
+ name: "Readiness To Learn",
32159
32247
  typeChart: TYPECHART.AREA,
32160
32248
  onActiveColumn: handleActiveColumnOneToOne,
32161
32249
  activeColumn: activeColumnPreparedness,
@@ -32188,7 +32276,7 @@ var Dashboard = function Dashboard() {
32188
32276
  months: monthsOneToOne,
32189
32277
  dayOfWeek: dayOfWeekOneToOne,
32190
32278
  timeOfDay: filter.optionDate,
32191
- colors: ["#73C8E5", "#F9F871", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"]
32279
+ colors: ["#73C8E5", "#FFB04F", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"]
32192
32280
  }))), React__default.createElement(BubbleChartCustom$1, {
32193
32281
  data: readinessToLearning
32194
32282
  }), React__default.createElement("div", {