mario-education 2.3.0 → 2.3.4

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.
@@ -150,9 +150,6 @@ var StudentSelector = function StudentSelector(_ref) {
150
150
  id: student.id
151
151
  };
152
152
  });
153
- console.log("teacher assignment");
154
- console.log(options);
155
- console.log(value);
156
153
  return React.createElement(CustomSelector, {
157
154
  options: options,
158
155
  inputValue: searchString,
@@ -5175,7 +5172,6 @@ var LearningSupportCategoryList = function LearningSupportCategoryList() {
5175
5172
 
5176
5173
  var style = {
5177
5174
  padding: "4px 8px",
5178
- marginRight: 16,
5179
5175
  marginBottom: 0,
5180
5176
  borderRadius: "2px",
5181
5177
  color: "#fff",
@@ -5189,12 +5185,13 @@ var UploadCSVButton = function UploadCSVButton(_ref) {
5189
5185
  isDisabled = _ref.isDisabled,
5190
5186
  text = _ref.text,
5191
5187
  backgroundColor = _ref.backgroundColor,
5192
- _onClick = _ref.onClick;
5188
+ _onClick = _ref.onClick,
5189
+ isClassReflection = _ref.isClassReflection;
5193
5190
  return React.createElement(Label, {
5194
5191
  htmlFor: htmlFor,
5195
5192
  role: "button",
5196
5193
  tabIndex: 0,
5197
- className: "d-flex align-items-center justfy-content-center " + (!isDisabled ? "cursor-pointer hover-opacity" : ""),
5194
+ className: "d-flex align-items-center justfy-content-center \n " + (isClassReflection ? "w-25" : "") + "\n " + (!isDisabled ? "cursor-pointer hover-opacity" : ""),
5198
5195
  style: _extends({}, style, {
5199
5196
  backgroundColor: backgroundColor,
5200
5197
  opacity: !isDisabled ? 1 : 0.5
@@ -5209,8 +5206,12 @@ var UploadCSVButton = function UploadCSVButton(_ref) {
5209
5206
  };
5210
5207
 
5211
5208
  var CSV_FILE_URL = BASE_URL + "/api/ImportCsv/csv";
5212
- var importCSV = function importCSV(formData, subFolder) {
5213
- return apiUpload.post(CSV_FILE_URL + "/" + subFolder, formData);
5209
+ var CSV_FILE_TEACHER = BASE_URL + "/api/Teacher";
5210
+ var importStudentCSV = function importStudentCSV(formData) {
5211
+ return apiUpload.post(CSV_FILE_TEACHER + "/adminImportStudent", formData);
5212
+ };
5213
+ var importClassReflectionCSV = function importClassReflectionCSV(formData) {
5214
+ return apiUpload.post(CSV_FILE_URL + "/importClassReflection", formData);
5214
5215
  };
5215
5216
 
5216
5217
  var CSVType;
@@ -5225,28 +5226,18 @@ var CSVType;
5225
5226
  })(CSVType || (CSVType = {}));
5226
5227
 
5227
5228
  var buttons = [{
5228
- text: "Import subjects",
5229
- backgroundColor: "#1dd1a1",
5230
- type: CSVType.Subjects
5231
- }, {
5232
- text: "Import grades",
5233
- backgroundColor: "#54a0ff",
5234
- type: CSVType.Grades
5235
- }, {
5236
- text: "Import attendances",
5237
- backgroundColor: "#feca57",
5238
- type: CSVType.Attendances
5239
- }, {
5240
- text: "Import class reflections",
5241
- backgroundColor: "#e74c3c",
5242
- type: CSVType.ClassReflection
5243
- }, {
5244
- text: "Import others",
5245
- backgroundColor: "#8395a7",
5246
- type: CSVType.Others
5229
+ text: "Import students",
5230
+ backgroundColor: "#0abde3",
5231
+ type: CSVType.Students
5247
5232
  }];
5248
5233
  var title = "CSV Import";
5249
5234
  var id = "csvupload";
5235
+ var initClassReflect = {
5236
+ teacherName: '',
5237
+ teacherEmail: '',
5238
+ studentIds: [],
5239
+ file: ''
5240
+ };
5250
5241
 
5251
5242
  var useCSVImport = function useCSVImport() {
5252
5243
  var dispatch = useDispatch();
@@ -5258,58 +5249,157 @@ var useCSVImport = function useCSVImport() {
5258
5249
  type = _useState[0],
5259
5250
  setType = _useState[1];
5260
5251
 
5252
+ var _useState2 = useState(),
5253
+ dataFile = _useState2[0],
5254
+ setDataFile = _useState2[1];
5255
+
5256
+ var _useState3 = useState([]),
5257
+ arrStudent = _useState3[0],
5258
+ setArrStudent = _useState3[1];
5259
+
5260
+ var _useState4 = useState(initClassReflect),
5261
+ initImportReflection = _useState4[0],
5262
+ setInitImportReflection = _useState4[1];
5263
+
5261
5264
  useEffect(function () {
5262
5265
  document.title = title;
5263
5266
  }, []);
5264
5267
  var upload = useCallback(function (file) {
5265
5268
  try {
5266
- var _temp3 = function _temp3() {
5269
+ var _temp7 = function _temp7() {
5267
5270
  dispatch(setLoading(false));
5268
- var input = document.getElementById(id);
5271
+ var input = document.getElementById('import-student');
5272
+ var importClass = document.getElementById('import-classReflection');
5269
5273
  input && (input.value = "");
5274
+ importClass && (importClass.value = "");
5270
5275
  };
5271
5276
 
5272
5277
  if (!type || !file) return Promise.resolve();
5273
5278
  dispatch(setLoading(true));
5274
5279
 
5275
- var _temp4 = _catch(function () {
5280
+ var _temp8 = _catch(function () {
5281
+ function _temp4() {
5282
+ function _temp2() {
5283
+ dispatch(setAlert({
5284
+ type: "success",
5285
+ message: "Import CSV successfully"
5286
+ }));
5287
+ }
5288
+
5289
+ var _temp = function () {
5290
+ if (type == CSVType.ClassReflection) {
5291
+ return Promise.resolve(importClassReflectionCSV(formData)).then(function () {});
5292
+ }
5293
+ }();
5294
+
5295
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
5296
+ }
5297
+
5276
5298
  var formData = new FormData();
5277
5299
  formData.append("file", file, file.name);
5278
- return Promise.resolve(importCSV(formData, type.toString())).then(function () {
5300
+
5301
+ var _temp3 = function () {
5302
+ if (type == CSVType.Students) {
5303
+ return Promise.resolve(importStudentCSV(formData)).then(function () {});
5304
+ }
5305
+ }();
5306
+
5307
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
5308
+ }, function (err) {
5309
+ var _err$response, _err$response$data;
5310
+
5311
+ dispatch(setAlert({
5312
+ type: "danger",
5313
+ message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
5314
+ }));
5315
+ });
5316
+
5317
+ return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
5318
+ } catch (e) {
5319
+ return Promise.reject(e);
5320
+ }
5321
+ }, [type]);
5322
+
5323
+ var onConfirm = function onConfirm(values) {
5324
+ try {
5325
+ var _temp11 = function _temp11() {
5326
+ dispatch(setLoading(false));
5327
+ var input = document.getElementById(id);
5328
+ input && (input.value = "");
5329
+ };
5330
+
5331
+ if (!dataFile || !dataFile) return Promise.resolve();
5332
+ dispatch(setLoading(true));
5333
+
5334
+ var _temp12 = _catch(function () {
5335
+ var formData = new FormData();
5336
+ formData.append("file", dataFile, dataFile.name);
5337
+ formData.append("teacherName", values.teacherName);
5338
+ formData.append("teacherEmail", values.teacherEmail);
5339
+ values.studentIds.forEach(function (item) {
5340
+ formData.append("studentIds", item);
5341
+ });
5342
+ return Promise.resolve(importClassReflectionCSV(formData)).then(function () {
5279
5343
  dispatch(setAlert({
5280
5344
  type: "success",
5281
5345
  message: "Import CSV successfully"
5282
5346
  }));
5347
+ setInitImportReflection(initClassReflect);
5283
5348
  });
5284
5349
  }, function (err) {
5285
- var _err$response, _err$response$data;
5350
+ var _err$response2, _err$response2$data;
5286
5351
 
5287
5352
  dispatch(setAlert({
5288
5353
  type: "danger",
5289
- message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
5354
+ message: ((_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : _err$response2$data.title) || err.message
5290
5355
  }));
5291
5356
  });
5292
5357
 
5293
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
5358
+ return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12));
5294
5359
  } catch (e) {
5295
5360
  return Promise.reject(e);
5296
5361
  }
5297
- }, [type]);
5362
+ };
5363
+
5298
5364
  return {
5299
5365
  isLoading: isLoading,
5300
5366
  buttons: buttons,
5301
5367
  id: id,
5302
5368
  setType: setType,
5303
- upload: upload
5369
+ upload: upload,
5370
+ initImportReflection: initImportReflection,
5371
+ setInitImportReflection: setInitImportReflection,
5372
+ onConfirm: onConfirm,
5373
+ CSVType: CSVType,
5374
+ dataFile: dataFile,
5375
+ setDataFile: setDataFile,
5376
+ setArrStudent: setArrStudent,
5377
+ arrStudent: arrStudent
5304
5378
  };
5305
5379
  };
5306
5380
 
5381
+ var _yup$string, _yup$string2, _yup$string3;
5382
+ var schema$4 = object({
5383
+ teacherName: (_yup$string = string()) === null || _yup$string === void 0 ? void 0 : _yup$string.trim().required(),
5384
+ teacherEmail: (_yup$string2 = string()) === null || _yup$string2 === void 0 ? void 0 : _yup$string2.trim().email('Invalid email').required(),
5385
+ studentIds: array().required().test("test students", "Please choose student", function () {
5386
+ return !!this.parent.studentIds && !!this.parent.studentIds.length;
5387
+ }),
5388
+ file: (_yup$string3 = string()) === null || _yup$string3 === void 0 ? void 0 : _yup$string3.trim().required()
5389
+ });
5390
+
5307
5391
  var CSVImport = function CSVImport() {
5308
5392
  var _useCSVImport = useCSVImport(),
5393
+ initImportReflection = _useCSVImport.initImportReflection,
5394
+ onConfirm = _useCSVImport.onConfirm,
5309
5395
  isLoading = _useCSVImport.isLoading,
5310
- buttons = _useCSVImport.buttons,
5311
- id = _useCSVImport.id,
5312
5396
  setType = _useCSVImport.setType,
5397
+ id = _useCSVImport.id,
5398
+ CSVType = _useCSVImport.CSVType,
5399
+ dataFile = _useCSVImport.dataFile,
5400
+ setDataFile = _useCSVImport.setDataFile,
5401
+ setArrStudent = _useCSVImport.setArrStudent,
5402
+ buttons = _useCSVImport.buttons,
5313
5403
  upload = _useCSVImport.upload;
5314
5404
 
5315
5405
  return React.createElement("div", {
@@ -5317,28 +5407,99 @@ var CSVImport = function CSVImport() {
5317
5407
  }, React.createElement(Input, {
5318
5408
  className: "d-none",
5319
5409
  type: "file",
5320
- id: id,
5410
+ id: "import-student",
5411
+ onChange: function onChange(e) {
5412
+ return upload(e.target.files[0]);
5413
+ },
5414
+ accept: "text/csv"
5415
+ }), React.createElement(Input, {
5416
+ className: "d-none",
5417
+ type: "file",
5418
+ id: "import-classReflection",
5321
5419
  onChange: function onChange(e) {
5322
5420
  return upload(e.target.files[0]);
5323
5421
  },
5324
5422
  accept: "text/csv"
5325
5423
  }), React.createElement("div", {
5326
- className: "d-flex align-items-center"
5327
- }, buttons.map(function (button) {
5328
- return React.createElement(UploadCSVButton, {
5329
- key: button.text,
5330
- htmlFor: id,
5331
- text: button.text,
5424
+ className: "class-reflection"
5425
+ }, React.createElement(Formik, {
5426
+ initialValues: initImportReflection,
5427
+ enableReinitialize: true,
5428
+ validationSchema: schema$4,
5429
+ onSubmit: function onSubmit(values, actions) {
5430
+ onConfirm(values);
5431
+ setDataFile('');
5432
+ setArrStudent([]);
5433
+ actions.resetForm();
5434
+ }
5435
+ }, function (formProps) {
5436
+ var touched = formProps.touched,
5437
+ errors = formProps.errors;
5438
+ return React.createElement(Row, {
5439
+ className: "mb-2"
5440
+ }, React.createElement(Input, {
5441
+ className: "d-none",
5442
+ type: "file",
5443
+ id: id,
5444
+ onChange: function onChange(e) {
5445
+ setDataFile(e.target.files[0]);
5446
+ formProps.setFieldValue('file', 'imported');
5447
+ var input = document.getElementById(id);
5448
+ input && (input.value = "");
5449
+ },
5450
+ accept: "text/csv"
5451
+ }), React.createElement(Col, {
5452
+ md: 6,
5453
+ className: "mb-2"
5454
+ }, React.createElement(Row, null, React.createElement(Col, {
5455
+ md: 12,
5456
+ className: "mb-2"
5457
+ }, React.createElement(RequiredLabel, {
5458
+ text: "Import Class Reflection"
5459
+ }), React.createElement(UploadCSVButton, {
5460
+ key: "Import class reflections",
5461
+ htmlFor: "import-classReflection",
5462
+ text: "Import Class Reflection",
5332
5463
  isDisabled: isLoading,
5333
- backgroundColor: button.backgroundColor,
5464
+ backgroundColor: "#e74c3c",
5334
5465
  onClick: function onClick() {
5335
- return setType(button.type);
5466
+ setType(CSVType.ClassReflection);
5336
5467
  }
5337
- });
5468
+ }), !!dataFile && React.createElement("p", {
5469
+ style: {
5470
+ color: '#007bff',
5471
+ fontStyle: 'italic',
5472
+ marginTop: '5px'
5473
+ }
5474
+ }, dataFile.name)), !dataFile && React.createElement(Col, {
5475
+ md: 12,
5476
+ className: "mb-2"
5477
+ }, touched.file && errors.file && React.createElement(ErrorHandler, {
5478
+ text: errors.file
5479
+ })))), React.createElement(Col, {
5480
+ md: 6,
5481
+ className: "mb-2"
5482
+ }, React.createElement(Row, null, React.createElement(Col, {
5483
+ md: 12,
5484
+ className: "mb-2"
5485
+ }, React.createElement(RequiredLabel, {
5486
+ text: "Import student"
5487
+ }), buttons.map(function (button) {
5488
+ return React.createElement(UploadCSVButton, {
5489
+ key: button.text,
5490
+ htmlFor: 'import-student',
5491
+ text: button.text,
5492
+ isDisabled: isLoading,
5493
+ backgroundColor: button.backgroundColor,
5494
+ onClick: function onClick() {
5495
+ return setType(button.type);
5496
+ }
5497
+ });
5498
+ })))));
5338
5499
  })));
5339
5500
  };
5340
5501
 
5341
- var schema$4 = object({
5502
+ var schema$5 = object({
5342
5503
  name: string().required("Name is required"),
5343
5504
  startTime: string().required("Start time is required"),
5344
5505
  endTime: string().required("End time is required")
@@ -5357,7 +5518,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
5357
5518
  return React.createElement(Formik, {
5358
5519
  initialValues: semesterDetail,
5359
5520
  enableReinitialize: true,
5360
- validationSchema: schema$4,
5521
+ validationSchema: schema$5,
5361
5522
  onSubmit: function onSubmit(values, actions) {
5362
5523
  onConfirm(values);
5363
5524
  actions.resetForm();
@@ -5468,7 +5629,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
5468
5629
 
5469
5630
  var SemesterDetailModal$1 = forwardRef(SemesterDetailModal);
5470
5631
 
5471
- var schema$5 = object({
5632
+ var schema$6 = object({
5472
5633
  value: number().required("Breaking month is required")
5473
5634
  });
5474
5635
  var options = [{
@@ -5521,7 +5682,7 @@ var BreakingMonthModal = function BreakingMonthModal(props, ref) {
5521
5682
  return React.createElement(Formik, {
5522
5683
  initialValues: breakingMonthDetail,
5523
5684
  enableReinitialize: true,
5524
- validationSchema: schema$5,
5685
+ validationSchema: schema$6,
5525
5686
  onSubmit: function onSubmit(values, actions) {
5526
5687
  onConfirm(values);
5527
5688
  actions.resetForm();
@@ -6099,7 +6260,7 @@ var SemesterList = function SemesterList() {
6099
6260
  }, "Change breaking month"))))));
6100
6261
  };
6101
6262
 
6102
- var schema$6 = object({
6263
+ var schema$7 = object({
6103
6264
  label: string().required("Label is required"),
6104
6265
  value: number().required("Value is required")
6105
6266
  });
@@ -6117,7 +6278,7 @@ var BandScoreDetailModal = function BandScoreDetailModal(props, ref) {
6117
6278
  return React.createElement(Formik, {
6118
6279
  initialValues: bandScoreDetail,
6119
6280
  enableReinitialize: true,
6120
- validationSchema: schema$6,
6281
+ validationSchema: schema$7,
6121
6282
  onSubmit: function onSubmit(values, actions) {
6122
6283
  onConfirm(values);
6123
6284
  actions.resetForm();
@@ -6786,7 +6947,7 @@ var CurrentLicense = function CurrentLicense() {
6786
6947
  }))));
6787
6948
  };
6788
6949
 
6789
- var schema$7 = object({
6950
+ var schema$8 = object({
6790
6951
  name: string().required("Name is required"),
6791
6952
  startTime: string().required("Start time is required"),
6792
6953
  endTime: string().required("End time is required")
@@ -6805,7 +6966,7 @@ var SchoolBlankDayDetailModal = function SchoolBlankDayDetailModal(props, ref) {
6805
6966
  return React.createElement(Formik, {
6806
6967
  initialValues: schoolBlankDayDetail,
6807
6968
  enableReinitialize: true,
6808
- validationSchema: schema$7,
6969
+ validationSchema: schema$8,
6809
6970
  onSubmit: function onSubmit(values, actions) {
6810
6971
  onConfirm(values);
6811
6972
  actions.resetForm();
@@ -8335,7 +8496,7 @@ var QuestionSplitPaneSelector = function QuestionSplitPaneSelector(props) {
8335
8496
  }, " ", "v", " ")) : "");
8336
8497
  };
8337
8498
 
8338
- var schema$8 = object({
8499
+ var schema$9 = object({
8339
8500
  name: string().required("Name is required")
8340
8501
  });
8341
8502
 
@@ -8361,7 +8522,7 @@ var ReflectionDetailModal = function ReflectionDetailModal(props, ref) {
8361
8522
  return React.createElement(Formik, {
8362
8523
  initialValues: reflectionformDetail,
8363
8524
  enableReinitialize: true,
8364
- validationSchema: schema$8,
8525
+ validationSchema: schema$9,
8365
8526
  onSubmit: function onSubmit(values, actions) {
8366
8527
  values.questionIds = arrId;
8367
8528
  onConfirm(values);
@@ -9742,7 +9903,7 @@ var AdditionalComponent = function AdditionalComponent(_ref) {
9742
9903
  return null;
9743
9904
  };
9744
9905
 
9745
- var schema$9 = object({
9906
+ var schema$a = object({
9746
9907
  text: string().required("Question text is required"),
9747
9908
  type: string().required("Question type is required"),
9748
9909
  categoryId: number().test("test category id", "Category is required", function (value) {
@@ -9995,7 +10156,7 @@ var QuestionDetail = function QuestionDetail() {
9995
10156
  return React.createElement(Formik, {
9996
10157
  initialValues: questionDetail,
9997
10158
  enableReinitialize: true,
9998
- validationSchema: schema$9,
10159
+ validationSchema: schema$a,
9999
10160
  onSubmit: function onSubmit(values) {
10000
10161
  if (values.type == QUESTION_TYPES.EMOTIONAL && !!values.answers) {
10001
10162
  for (var index in values.answers) {
@@ -10261,7 +10422,7 @@ var QuestionSplitPaneSelector$1 = function QuestionSplitPaneSelector(props) {
10261
10422
  }, " ", "v", " ")) : "");
10262
10423
  };
10263
10424
 
10264
- var schema$a = object({
10425
+ var schema$b = object({
10265
10426
  name: string().required("Name is required")
10266
10427
  });
10267
10428
 
@@ -10287,7 +10448,7 @@ var AssessmentDetailModal = function AssessmentDetailModal(props, ref) {
10287
10448
  return React.createElement(Formik, {
10288
10449
  initialValues: assessmentDetail,
10289
10450
  enableReinitialize: true,
10290
- validationSchema: schema$a,
10451
+ validationSchema: schema$b,
10291
10452
  onSubmit: function onSubmit(values, actions) {
10292
10453
  values.questionIds = arrId;
10293
10454
  onConfirm(values);
@@ -11229,7 +11390,7 @@ var FeedbackList = function FeedbackList() {
11229
11390
  }))));
11230
11391
  };
11231
11392
 
11232
- var schema$b = object({
11393
+ var schema$c = object({
11233
11394
  name: string().required("Name is required")
11234
11395
  });
11235
11396
 
@@ -11249,7 +11410,7 @@ var TutorialScreenDetailModal = function TutorialScreenDetailModal(props, ref) {
11249
11410
  typeRole: typeRole
11250
11411
  }),
11251
11412
  enableReinitialize: true,
11252
- validationSchema: schema$b,
11413
+ validationSchema: schema$c,
11253
11414
  onSubmit: function onSubmit(values, actions) {
11254
11415
  onConfirm(values);
11255
11416
  actions.resetForm();
@@ -11729,7 +11890,7 @@ var TutorialScreenContainer = function TutorialScreenContainer() {
11729
11890
  });
11730
11891
  };
11731
11892
 
11732
- var schema$c = object({
11893
+ var schema$d = object({
11733
11894
  name: string().required("Name is required")
11734
11895
  });
11735
11896
 
@@ -11746,7 +11907,7 @@ var QuestionCateModal = function QuestionCateModal(props, ref) {
11746
11907
  return React.createElement(Formik, {
11747
11908
  initialValues: questionCateDetail,
11748
11909
  enableReinitialize: true,
11749
- validationSchema: schema$c,
11910
+ validationSchema: schema$d,
11750
11911
  onSubmit: function onSubmit(values, actions) {
11751
11912
  onConfirm(values);
11752
11913
  actions.resetForm();
@@ -12333,7 +12494,7 @@ var SemesterSelector = function SemesterSelector(_ref) {
12333
12494
  }));
12334
12495
  };
12335
12496
 
12336
- var schema$d = object({
12497
+ var schema$e = object({
12337
12498
  beginDate: string().required("Begin date is required"),
12338
12499
  endDate: string().required("End date is required"),
12339
12500
  timeSemester: string().required("Time Semester is required"),
@@ -12369,7 +12530,7 @@ var AssignmentDetailModal = function AssignmentDetailModal(props, ref) {
12369
12530
  return React.createElement(Formik, {
12370
12531
  initialValues: assignmentDetail,
12371
12532
  enableReinitialize: true,
12372
- validationSchema: schema$d,
12533
+ validationSchema: schema$e,
12373
12534
  onSubmit: function onSubmit(values, actions) {
12374
12535
  onConfirm(values);
12375
12536
  actions.resetForm();
@@ -14057,7 +14218,7 @@ var SkillSelector$1 = function SkillSelector(_ref) {
14057
14218
  });
14058
14219
  };
14059
14220
 
14060
- var schema$e = object({
14221
+ var schema$f = object({
14061
14222
  name: string().required("Name is required"),
14062
14223
  isConference: boolean().required("Is conference is required"),
14063
14224
  conferenceRubricId: number().nullable().test("Test conference rubric id", "Conference rubric is required", function () {
@@ -14445,7 +14606,7 @@ var SessionTemplateDetail = function SessionTemplateDetail() {
14445
14606
  return React.createElement(Formik, {
14446
14607
  initialValues: sessionTemplateDetail,
14447
14608
  enableReinitialize: true,
14448
- validationSchema: schema$e,
14609
+ validationSchema: schema$f,
14449
14610
  onSubmit: function onSubmit(values) {
14450
14611
  confirmData(values);
14451
14612
  setEdited(false);
@@ -14998,7 +15159,7 @@ var useSessionTemplateGeneralClassDetail = function useSessionTemplateGeneralCla
14998
15159
  };
14999
15160
 
15000
15161
  var LINK_TO_DEFAULT_QUESTION_GENERAL_CLASS = "/admin/question/default-question-general-list";
15001
- var schema$f = object({
15162
+ var schema$g = object({
15002
15163
  name: string().trim().required("Name is required"),
15003
15164
  subjectId: number().required("Subject is required").test("Test subject", "Subject is required", function (value) {
15004
15165
  return value > 0;
@@ -15082,7 +15243,7 @@ var SessionTemplateGeneralClassDetail = function SessionTemplateGeneralClassDeta
15082
15243
  return React.createElement(Formik, {
15083
15244
  initialValues: sessionTemplateGeneralClassDetail,
15084
15245
  enableReinitialize: true,
15085
- validationSchema: schema$f,
15246
+ validationSchema: schema$g,
15086
15247
  onSubmit: function onSubmit(values) {
15087
15248
  confirmData(values);
15088
15249
  setEdited(false);
@@ -15289,7 +15450,7 @@ var SessionTemplateGeneralClassDetail = function SessionTemplateGeneralClassDeta
15289
15450
  });
15290
15451
  };
15291
15452
 
15292
- var schema$g = object({
15453
+ var schema$h = object({
15293
15454
  learningSupportCategoryId: number().test("testLearningSupportCategoryId", "Invalid category", function (number) {
15294
15455
  return !!number && number >= 1;
15295
15456
  }),
@@ -15319,7 +15480,7 @@ var CustomAlertDetailModal = function CustomAlertDetailModal(props, ref) {
15319
15480
  return React.createElement(Formik, {
15320
15481
  initialValues: customAlertDetail,
15321
15482
  enableReinitialize: true,
15322
- validationSchema: schema$g,
15483
+ validationSchema: schema$h,
15323
15484
  onSubmit: function onSubmit(values, actions) {
15324
15485
  onConfirm(values);
15325
15486
  actions.resetForm();
@@ -15893,7 +16054,7 @@ var CustomAlertList = function CustomAlertList() {
15893
16054
 
15894
16055
  var certificate = {"certificate-item":"_3DVMZ","add-breakpoint":"_3zOGW","box-item":"_3DQwX"};
15895
16056
 
15896
- var schema$h = object({
16057
+ var schema$i = object({
15897
16058
  name: string().required("Name is required"),
15898
16059
  certificateItems: array().test("Text label required", "Text is required", function (value) {
15899
16060
  return value === null || value === void 0 ? void 0 : value.every(function (item) {
@@ -15918,7 +16079,7 @@ var CertificateDetailModal = function CertificateDetailModal(props, ref) {
15918
16079
  return React.createElement(Formik, {
15919
16080
  initialValues: certificateDetail,
15920
16081
  enableReinitialize: true,
15921
- validationSchema: schema$h,
16082
+ validationSchema: schema$i,
15922
16083
  onSubmit: function onSubmit(values, actions) {
15923
16084
  var _values$certificateIt;
15924
16085