mario-education 2.3.0 → 2.3.1
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/MarioFramework.Education/ClientApp/src/containers/CSVImport/hooks/useCSVImport.d.ts +8 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/csvService.d.ts +1 -0
- package/dist/index.js +223 -52
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +223 -52
- package/dist/index.modern.js.map +1 -1
- package/package.json +91 -91
package/dist/MarioFramework.Education/ClientApp/src/containers/CSVImport/hooks/useCSVImport.d.ts
CHANGED
|
@@ -18,5 +18,13 @@ declare const useCSVImport: () => {
|
|
|
18
18
|
id: string;
|
|
19
19
|
setType: import("react").Dispatch<import("react").SetStateAction<CSVType | null>>;
|
|
20
20
|
upload: (file: any) => Promise<void>;
|
|
21
|
+
initImportReflection: any;
|
|
22
|
+
setInitImportReflection: import("react").Dispatch<any>;
|
|
23
|
+
onConfirm: (values: any) => Promise<void>;
|
|
24
|
+
CSVType: typeof CSVType;
|
|
25
|
+
dataFile: any;
|
|
26
|
+
setDataFile: import("react").Dispatch<any>;
|
|
27
|
+
setArrStudent: import("react").Dispatch<any>;
|
|
28
|
+
arrStudent: any;
|
|
21
29
|
};
|
|
22
30
|
export default useCSVImport;
|
package/dist/index.js
CHANGED
|
@@ -153,9 +153,6 @@ var StudentSelector = function StudentSelector(_ref) {
|
|
|
153
153
|
id: student.id
|
|
154
154
|
};
|
|
155
155
|
});
|
|
156
|
-
console.log("teacher assignment");
|
|
157
|
-
console.log(options);
|
|
158
|
-
console.log(value);
|
|
159
156
|
return React__default.createElement(marioCore.CustomSelector, {
|
|
160
157
|
options: options,
|
|
161
158
|
inputValue: searchString,
|
|
@@ -5215,6 +5212,9 @@ var CSV_FILE_URL = marioCore.BASE_URL + "/api/ImportCsv/csv";
|
|
|
5215
5212
|
var importCSV = function importCSV(formData, subFolder) {
|
|
5216
5213
|
return marioCore.apiUpload.post(CSV_FILE_URL + "/" + subFolder, formData);
|
|
5217
5214
|
};
|
|
5215
|
+
var importClassReflectionCSV = function importClassReflectionCSV(formData) {
|
|
5216
|
+
return marioCore.apiUpload.post(CSV_FILE_URL + "/importClassReflection", formData);
|
|
5217
|
+
};
|
|
5218
5218
|
|
|
5219
5219
|
var CSVType;
|
|
5220
5220
|
|
|
@@ -5250,6 +5250,12 @@ var buttons = [{
|
|
|
5250
5250
|
}];
|
|
5251
5251
|
var title = "CSV Import";
|
|
5252
5252
|
var id = "csvupload";
|
|
5253
|
+
var initClassReflect = {
|
|
5254
|
+
teacherName: '',
|
|
5255
|
+
teacherEmail: '',
|
|
5256
|
+
studentIds: [],
|
|
5257
|
+
file: ''
|
|
5258
|
+
};
|
|
5253
5259
|
|
|
5254
5260
|
var useCSVImport = function useCSVImport() {
|
|
5255
5261
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -5261,6 +5267,18 @@ var useCSVImport = function useCSVImport() {
|
|
|
5261
5267
|
type = _useState[0],
|
|
5262
5268
|
setType = _useState[1];
|
|
5263
5269
|
|
|
5270
|
+
var _useState2 = React.useState(),
|
|
5271
|
+
dataFile = _useState2[0],
|
|
5272
|
+
setDataFile = _useState2[1];
|
|
5273
|
+
|
|
5274
|
+
var _useState3 = React.useState([]),
|
|
5275
|
+
arrStudent = _useState3[0],
|
|
5276
|
+
setArrStudent = _useState3[1];
|
|
5277
|
+
|
|
5278
|
+
var _useState4 = React.useState(initClassReflect),
|
|
5279
|
+
initImportReflection = _useState4[0],
|
|
5280
|
+
setInitImportReflection = _useState4[1];
|
|
5281
|
+
|
|
5264
5282
|
React.useEffect(function () {
|
|
5265
5283
|
document.title = title;
|
|
5266
5284
|
}, []);
|
|
@@ -5298,50 +5316,203 @@ var useCSVImport = function useCSVImport() {
|
|
|
5298
5316
|
return Promise.reject(e);
|
|
5299
5317
|
}
|
|
5300
5318
|
}, [type]);
|
|
5319
|
+
|
|
5320
|
+
var onConfirm = function onConfirm(values) {
|
|
5321
|
+
try {
|
|
5322
|
+
var _temp7 = function _temp7() {
|
|
5323
|
+
dispatch(marioCore.setLoading(false));
|
|
5324
|
+
var input = document.getElementById(id);
|
|
5325
|
+
input && (input.value = "");
|
|
5326
|
+
};
|
|
5327
|
+
|
|
5328
|
+
if (!dataFile || !dataFile) return Promise.resolve();
|
|
5329
|
+
dispatch(marioCore.setLoading(true));
|
|
5330
|
+
|
|
5331
|
+
var _temp8 = _catch(function () {
|
|
5332
|
+
var formData = new FormData();
|
|
5333
|
+
formData.append("file", dataFile, dataFile.name);
|
|
5334
|
+
formData.append("teacherName", values.teacherName);
|
|
5335
|
+
formData.append("teacherEmail", values.teacherEmail);
|
|
5336
|
+
formData.append("studentIds", values.studentIds);
|
|
5337
|
+
return Promise.resolve(importClassReflectionCSV(formData)).then(function () {
|
|
5338
|
+
dispatch(marioCore.setAlert({
|
|
5339
|
+
type: "success",
|
|
5340
|
+
message: "Import CSV successfully"
|
|
5341
|
+
}));
|
|
5342
|
+
setInitImportReflection(initClassReflect);
|
|
5343
|
+
});
|
|
5344
|
+
}, function (err) {
|
|
5345
|
+
var _err$response2, _err$response2$data;
|
|
5346
|
+
|
|
5347
|
+
dispatch(marioCore.setAlert({
|
|
5348
|
+
type: "danger",
|
|
5349
|
+
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
|
|
5350
|
+
}));
|
|
5351
|
+
});
|
|
5352
|
+
|
|
5353
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
|
|
5354
|
+
} catch (e) {
|
|
5355
|
+
return Promise.reject(e);
|
|
5356
|
+
}
|
|
5357
|
+
};
|
|
5358
|
+
|
|
5301
5359
|
return {
|
|
5302
5360
|
isLoading: isLoading,
|
|
5303
5361
|
buttons: buttons,
|
|
5304
5362
|
id: id,
|
|
5305
5363
|
setType: setType,
|
|
5306
|
-
upload: upload
|
|
5364
|
+
upload: upload,
|
|
5365
|
+
initImportReflection: initImportReflection,
|
|
5366
|
+
setInitImportReflection: setInitImportReflection,
|
|
5367
|
+
onConfirm: onConfirm,
|
|
5368
|
+
CSVType: CSVType,
|
|
5369
|
+
dataFile: dataFile,
|
|
5370
|
+
setDataFile: setDataFile,
|
|
5371
|
+
setArrStudent: setArrStudent,
|
|
5372
|
+
arrStudent: arrStudent
|
|
5307
5373
|
};
|
|
5308
5374
|
};
|
|
5309
5375
|
|
|
5376
|
+
var schema$4 = yup.object({
|
|
5377
|
+
teacherName: yup.string().required(),
|
|
5378
|
+
teacherEmail: yup.string().required(),
|
|
5379
|
+
studentIds: yup.array().required().test("test students", "Please choose student", function () {
|
|
5380
|
+
return !!this.parent.studentIds && !!this.parent.studentIds.length;
|
|
5381
|
+
}),
|
|
5382
|
+
file: yup.string().required()
|
|
5383
|
+
});
|
|
5384
|
+
|
|
5310
5385
|
var CSVImport = function CSVImport() {
|
|
5311
5386
|
var _useCSVImport = useCSVImport(),
|
|
5387
|
+
initImportReflection = _useCSVImport.initImportReflection,
|
|
5388
|
+
onConfirm = _useCSVImport.onConfirm,
|
|
5312
5389
|
isLoading = _useCSVImport.isLoading,
|
|
5313
|
-
buttons = _useCSVImport.buttons,
|
|
5314
|
-
id = _useCSVImport.id,
|
|
5315
5390
|
setType = _useCSVImport.setType,
|
|
5316
|
-
|
|
5391
|
+
id = _useCSVImport.id,
|
|
5392
|
+
CSVType = _useCSVImport.CSVType,
|
|
5393
|
+
dataFile = _useCSVImport.dataFile,
|
|
5394
|
+
setDataFile = _useCSVImport.setDataFile,
|
|
5395
|
+
setArrStudent = _useCSVImport.setArrStudent,
|
|
5396
|
+
arrStudent = _useCSVImport.arrStudent;
|
|
5317
5397
|
|
|
5318
5398
|
return React__default.createElement("div", {
|
|
5319
5399
|
className: "animated fadeIn pt-3"
|
|
5320
|
-
}, React__default.createElement(
|
|
5321
|
-
className: "
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5400
|
+
}, React__default.createElement("div", {
|
|
5401
|
+
className: "class-reflection"
|
|
5402
|
+
}, React__default.createElement(formik.Formik, {
|
|
5403
|
+
initialValues: initImportReflection,
|
|
5404
|
+
enableReinitialize: true,
|
|
5405
|
+
validationSchema: schema$4,
|
|
5406
|
+
onSubmit: function onSubmit(values, actions) {
|
|
5407
|
+
onConfirm(values);
|
|
5408
|
+
setDataFile('');
|
|
5409
|
+
setArrStudent([]);
|
|
5410
|
+
actions.resetForm();
|
|
5411
|
+
}
|
|
5412
|
+
}, function (formProps) {
|
|
5413
|
+
var values = formProps.values,
|
|
5414
|
+
touched = formProps.touched,
|
|
5415
|
+
errors = formProps.errors,
|
|
5416
|
+
handleSubmit = formProps.handleSubmit,
|
|
5417
|
+
handleChange = formProps.handleChange;
|
|
5418
|
+
return React__default.createElement(reactstrap.Row, {
|
|
5419
|
+
className: "mb-2"
|
|
5420
|
+
}, React__default.createElement(reactstrap.Input, {
|
|
5421
|
+
className: "d-none",
|
|
5422
|
+
type: "file",
|
|
5423
|
+
id: id,
|
|
5424
|
+
onChange: function onChange(e) {
|
|
5425
|
+
setDataFile(e.target.files[0]);
|
|
5426
|
+
formProps.setFieldValue('file', 'imported');
|
|
5427
|
+
var input = document.getElementById(id);
|
|
5428
|
+
input && (input.value = "");
|
|
5429
|
+
},
|
|
5430
|
+
accept: "text/csv"
|
|
5431
|
+
}), React__default.createElement(reactstrap.Col, {
|
|
5432
|
+
md: 6,
|
|
5433
|
+
className: "mb-2"
|
|
5434
|
+
}, React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
5435
|
+
md: 12,
|
|
5436
|
+
className: "mb-2"
|
|
5437
|
+
}, React__default.createElement(marioCore.RequiredLabel, {
|
|
5438
|
+
text: "Class Teacher Name"
|
|
5439
|
+
}), React__default.createElement(reactstrap.Input, {
|
|
5440
|
+
name: "teacherName",
|
|
5441
|
+
value: values.teacherName,
|
|
5442
|
+
type: "text",
|
|
5443
|
+
onChange: function onChange(e) {
|
|
5444
|
+
handleChange(e);
|
|
5445
|
+
}
|
|
5446
|
+
}), touched.teacherName && errors.teacherName && React__default.createElement(marioCore.ErrorHandler, {
|
|
5447
|
+
text: errors.teacherName
|
|
5448
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
5449
|
+
md: 12,
|
|
5450
|
+
className: "mb-2"
|
|
5451
|
+
}, React__default.createElement(marioCore.RequiredLabel, {
|
|
5452
|
+
text: "Class Teacher Email"
|
|
5453
|
+
}), React__default.createElement(reactstrap.Input, {
|
|
5454
|
+
name: "teacherEmail",
|
|
5455
|
+
value: values.teacherEmail,
|
|
5456
|
+
type: "text",
|
|
5457
|
+
onChange: function onChange(e) {
|
|
5458
|
+
handleChange(e);
|
|
5459
|
+
}
|
|
5460
|
+
}), touched.teacherEmail && errors.teacherEmail && React__default.createElement(marioCore.ErrorHandler, {
|
|
5461
|
+
text: errors.teacherEmail
|
|
5462
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
5463
|
+
md: 12,
|
|
5464
|
+
className: "mb-2"
|
|
5465
|
+
}, React__default.createElement(reactstrap.Label, null, "Students"), React__default.createElement(StudentSelector, {
|
|
5466
|
+
onChange: function onChange(e) {
|
|
5467
|
+
setArrStudent(e);
|
|
5468
|
+
formProps.setFieldValue("studentIds", e.map(function (i) {
|
|
5469
|
+
return i.value;
|
|
5470
|
+
}) || []);
|
|
5471
|
+
},
|
|
5472
|
+
value: arrStudent
|
|
5473
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
5474
|
+
md: 12,
|
|
5475
|
+
className: "mb-2"
|
|
5476
|
+
}, touched.studentIds && errors.studentIds && React__default.createElement(marioCore.ErrorHandler, {
|
|
5477
|
+
text: errors.studentIds
|
|
5478
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
5479
|
+
md: 12,
|
|
5480
|
+
className: "mb-2"
|
|
5481
|
+
}, React__default.createElement(marioCore.RequiredLabel, {
|
|
5482
|
+
text: "Upload File Class Reflection"
|
|
5483
|
+
}), React__default.createElement(UploadCSVButton, {
|
|
5484
|
+
key: "Import class reflections",
|
|
5333
5485
|
htmlFor: id,
|
|
5334
|
-
text:
|
|
5486
|
+
text: "Import class reflections",
|
|
5335
5487
|
isDisabled: isLoading,
|
|
5336
|
-
backgroundColor:
|
|
5488
|
+
backgroundColor: "#e74c3c",
|
|
5337
5489
|
onClick: function onClick() {
|
|
5338
|
-
|
|
5490
|
+
setType(CSVType.ClassReflection);
|
|
5339
5491
|
}
|
|
5340
|
-
})
|
|
5492
|
+
}), !!dataFile && React__default.createElement("p", {
|
|
5493
|
+
style: {
|
|
5494
|
+
color: 'red',
|
|
5495
|
+
fontStyle: 'italic',
|
|
5496
|
+
marginTop: '5px'
|
|
5497
|
+
}
|
|
5498
|
+
}, dataFile.name)), !dataFile && React__default.createElement(reactstrap.Col, {
|
|
5499
|
+
md: 12,
|
|
5500
|
+
className: "mb-2"
|
|
5501
|
+
}, touched.file && errors.file && React__default.createElement(marioCore.ErrorHandler, {
|
|
5502
|
+
text: errors.file
|
|
5503
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
5504
|
+
md: 12
|
|
5505
|
+
}, React__default.createElement(reactstrap.Button, {
|
|
5506
|
+
color: "primary",
|
|
5507
|
+
className: "float-right",
|
|
5508
|
+
onClick: function onClick() {
|
|
5509
|
+
return handleSubmit();
|
|
5510
|
+
}
|
|
5511
|
+
}, "Import"), ' '))));
|
|
5341
5512
|
})));
|
|
5342
5513
|
};
|
|
5343
5514
|
|
|
5344
|
-
var schema$
|
|
5515
|
+
var schema$5 = yup.object({
|
|
5345
5516
|
name: yup.string().required("Name is required"),
|
|
5346
5517
|
startTime: yup.string().required("Start time is required"),
|
|
5347
5518
|
endTime: yup.string().required("End time is required")
|
|
@@ -5360,7 +5531,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
|
|
|
5360
5531
|
return React__default.createElement(formik.Formik, {
|
|
5361
5532
|
initialValues: semesterDetail,
|
|
5362
5533
|
enableReinitialize: true,
|
|
5363
|
-
validationSchema: schema$
|
|
5534
|
+
validationSchema: schema$5,
|
|
5364
5535
|
onSubmit: function onSubmit(values, actions) {
|
|
5365
5536
|
onConfirm(values);
|
|
5366
5537
|
actions.resetForm();
|
|
@@ -5471,7 +5642,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
|
|
|
5471
5642
|
|
|
5472
5643
|
var SemesterDetailModal$1 = React.forwardRef(SemesterDetailModal);
|
|
5473
5644
|
|
|
5474
|
-
var schema$
|
|
5645
|
+
var schema$6 = yup.object({
|
|
5475
5646
|
value: yup.number().required("Breaking month is required")
|
|
5476
5647
|
});
|
|
5477
5648
|
var options = [{
|
|
@@ -5524,7 +5695,7 @@ var BreakingMonthModal = function BreakingMonthModal(props, ref) {
|
|
|
5524
5695
|
return React__default.createElement(formik.Formik, {
|
|
5525
5696
|
initialValues: breakingMonthDetail,
|
|
5526
5697
|
enableReinitialize: true,
|
|
5527
|
-
validationSchema: schema$
|
|
5698
|
+
validationSchema: schema$6,
|
|
5528
5699
|
onSubmit: function onSubmit(values, actions) {
|
|
5529
5700
|
onConfirm(values);
|
|
5530
5701
|
actions.resetForm();
|
|
@@ -6102,7 +6273,7 @@ var SemesterList = function SemesterList() {
|
|
|
6102
6273
|
}, "Change breaking month"))))));
|
|
6103
6274
|
};
|
|
6104
6275
|
|
|
6105
|
-
var schema$
|
|
6276
|
+
var schema$7 = yup.object({
|
|
6106
6277
|
label: yup.string().required("Label is required"),
|
|
6107
6278
|
value: yup.number().required("Value is required")
|
|
6108
6279
|
});
|
|
@@ -6120,7 +6291,7 @@ var BandScoreDetailModal = function BandScoreDetailModal(props, ref) {
|
|
|
6120
6291
|
return React__default.createElement(formik.Formik, {
|
|
6121
6292
|
initialValues: bandScoreDetail,
|
|
6122
6293
|
enableReinitialize: true,
|
|
6123
|
-
validationSchema: schema$
|
|
6294
|
+
validationSchema: schema$7,
|
|
6124
6295
|
onSubmit: function onSubmit(values, actions) {
|
|
6125
6296
|
onConfirm(values);
|
|
6126
6297
|
actions.resetForm();
|
|
@@ -6789,7 +6960,7 @@ var CurrentLicense = function CurrentLicense() {
|
|
|
6789
6960
|
}))));
|
|
6790
6961
|
};
|
|
6791
6962
|
|
|
6792
|
-
var schema$
|
|
6963
|
+
var schema$8 = yup.object({
|
|
6793
6964
|
name: yup.string().required("Name is required"),
|
|
6794
6965
|
startTime: yup.string().required("Start time is required"),
|
|
6795
6966
|
endTime: yup.string().required("End time is required")
|
|
@@ -6808,7 +6979,7 @@ var SchoolBlankDayDetailModal = function SchoolBlankDayDetailModal(props, ref) {
|
|
|
6808
6979
|
return React__default.createElement(formik.Formik, {
|
|
6809
6980
|
initialValues: schoolBlankDayDetail,
|
|
6810
6981
|
enableReinitialize: true,
|
|
6811
|
-
validationSchema: schema$
|
|
6982
|
+
validationSchema: schema$8,
|
|
6812
6983
|
onSubmit: function onSubmit(values, actions) {
|
|
6813
6984
|
onConfirm(values);
|
|
6814
6985
|
actions.resetForm();
|
|
@@ -8338,7 +8509,7 @@ var QuestionSplitPaneSelector = function QuestionSplitPaneSelector(props) {
|
|
|
8338
8509
|
}, " ", "v", " ")) : "");
|
|
8339
8510
|
};
|
|
8340
8511
|
|
|
8341
|
-
var schema$
|
|
8512
|
+
var schema$9 = yup.object({
|
|
8342
8513
|
name: yup.string().required("Name is required")
|
|
8343
8514
|
});
|
|
8344
8515
|
|
|
@@ -8364,7 +8535,7 @@ var ReflectionDetailModal = function ReflectionDetailModal(props, ref) {
|
|
|
8364
8535
|
return React__default.createElement(formik.Formik, {
|
|
8365
8536
|
initialValues: reflectionformDetail,
|
|
8366
8537
|
enableReinitialize: true,
|
|
8367
|
-
validationSchema: schema$
|
|
8538
|
+
validationSchema: schema$9,
|
|
8368
8539
|
onSubmit: function onSubmit(values, actions) {
|
|
8369
8540
|
values.questionIds = arrId;
|
|
8370
8541
|
onConfirm(values);
|
|
@@ -9745,7 +9916,7 @@ var AdditionalComponent = function AdditionalComponent(_ref) {
|
|
|
9745
9916
|
return null;
|
|
9746
9917
|
};
|
|
9747
9918
|
|
|
9748
|
-
var schema$
|
|
9919
|
+
var schema$a = yup.object({
|
|
9749
9920
|
text: yup.string().required("Question text is required"),
|
|
9750
9921
|
type: yup.string().required("Question type is required"),
|
|
9751
9922
|
categoryId: yup.number().test("test category id", "Category is required", function (value) {
|
|
@@ -9998,7 +10169,7 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
9998
10169
|
return React__default.createElement(formik.Formik, {
|
|
9999
10170
|
initialValues: questionDetail,
|
|
10000
10171
|
enableReinitialize: true,
|
|
10001
|
-
validationSchema: schema$
|
|
10172
|
+
validationSchema: schema$a,
|
|
10002
10173
|
onSubmit: function onSubmit(values) {
|
|
10003
10174
|
if (values.type == marioCore.QUESTION_TYPES.EMOTIONAL && !!values.answers) {
|
|
10004
10175
|
for (var index in values.answers) {
|
|
@@ -10264,7 +10435,7 @@ var QuestionSplitPaneSelector$1 = function QuestionSplitPaneSelector(props) {
|
|
|
10264
10435
|
}, " ", "v", " ")) : "");
|
|
10265
10436
|
};
|
|
10266
10437
|
|
|
10267
|
-
var schema$
|
|
10438
|
+
var schema$b = yup.object({
|
|
10268
10439
|
name: yup.string().required("Name is required")
|
|
10269
10440
|
});
|
|
10270
10441
|
|
|
@@ -10290,7 +10461,7 @@ var AssessmentDetailModal = function AssessmentDetailModal(props, ref) {
|
|
|
10290
10461
|
return React__default.createElement(formik.Formik, {
|
|
10291
10462
|
initialValues: assessmentDetail,
|
|
10292
10463
|
enableReinitialize: true,
|
|
10293
|
-
validationSchema: schema$
|
|
10464
|
+
validationSchema: schema$b,
|
|
10294
10465
|
onSubmit: function onSubmit(values, actions) {
|
|
10295
10466
|
values.questionIds = arrId;
|
|
10296
10467
|
onConfirm(values);
|
|
@@ -11232,7 +11403,7 @@ var FeedbackList = function FeedbackList() {
|
|
|
11232
11403
|
}))));
|
|
11233
11404
|
};
|
|
11234
11405
|
|
|
11235
|
-
var schema$
|
|
11406
|
+
var schema$c = yup.object({
|
|
11236
11407
|
name: yup.string().required("Name is required")
|
|
11237
11408
|
});
|
|
11238
11409
|
|
|
@@ -11252,7 +11423,7 @@ var TutorialScreenDetailModal = function TutorialScreenDetailModal(props, ref) {
|
|
|
11252
11423
|
typeRole: typeRole
|
|
11253
11424
|
}),
|
|
11254
11425
|
enableReinitialize: true,
|
|
11255
|
-
validationSchema: schema$
|
|
11426
|
+
validationSchema: schema$c,
|
|
11256
11427
|
onSubmit: function onSubmit(values, actions) {
|
|
11257
11428
|
onConfirm(values);
|
|
11258
11429
|
actions.resetForm();
|
|
@@ -11732,7 +11903,7 @@ var TutorialScreenContainer = function TutorialScreenContainer() {
|
|
|
11732
11903
|
});
|
|
11733
11904
|
};
|
|
11734
11905
|
|
|
11735
|
-
var schema$
|
|
11906
|
+
var schema$d = yup.object({
|
|
11736
11907
|
name: yup.string().required("Name is required")
|
|
11737
11908
|
});
|
|
11738
11909
|
|
|
@@ -11749,7 +11920,7 @@ var QuestionCateModal = function QuestionCateModal(props, ref) {
|
|
|
11749
11920
|
return React__default.createElement(formik.Formik, {
|
|
11750
11921
|
initialValues: questionCateDetail,
|
|
11751
11922
|
enableReinitialize: true,
|
|
11752
|
-
validationSchema: schema$
|
|
11923
|
+
validationSchema: schema$d,
|
|
11753
11924
|
onSubmit: function onSubmit(values, actions) {
|
|
11754
11925
|
onConfirm(values);
|
|
11755
11926
|
actions.resetForm();
|
|
@@ -12336,7 +12507,7 @@ var SemesterSelector = function SemesterSelector(_ref) {
|
|
|
12336
12507
|
}));
|
|
12337
12508
|
};
|
|
12338
12509
|
|
|
12339
|
-
var schema$
|
|
12510
|
+
var schema$e = yup.object({
|
|
12340
12511
|
beginDate: yup.string().required("Begin date is required"),
|
|
12341
12512
|
endDate: yup.string().required("End date is required"),
|
|
12342
12513
|
timeSemester: yup.string().required("Time Semester is required"),
|
|
@@ -12372,7 +12543,7 @@ var AssignmentDetailModal = function AssignmentDetailModal(props, ref) {
|
|
|
12372
12543
|
return React__default.createElement(formik.Formik, {
|
|
12373
12544
|
initialValues: assignmentDetail,
|
|
12374
12545
|
enableReinitialize: true,
|
|
12375
|
-
validationSchema: schema$
|
|
12546
|
+
validationSchema: schema$e,
|
|
12376
12547
|
onSubmit: function onSubmit(values, actions) {
|
|
12377
12548
|
onConfirm(values);
|
|
12378
12549
|
actions.resetForm();
|
|
@@ -14060,7 +14231,7 @@ var SkillSelector$1 = function SkillSelector(_ref) {
|
|
|
14060
14231
|
});
|
|
14061
14232
|
};
|
|
14062
14233
|
|
|
14063
|
-
var schema$
|
|
14234
|
+
var schema$f = yup.object({
|
|
14064
14235
|
name: yup.string().required("Name is required"),
|
|
14065
14236
|
isConference: yup.boolean().required("Is conference is required"),
|
|
14066
14237
|
conferenceRubricId: yup.number().nullable().test("Test conference rubric id", "Conference rubric is required", function () {
|
|
@@ -14448,7 +14619,7 @@ var SessionTemplateDetail = function SessionTemplateDetail() {
|
|
|
14448
14619
|
return React__default.createElement(formik.Formik, {
|
|
14449
14620
|
initialValues: sessionTemplateDetail,
|
|
14450
14621
|
enableReinitialize: true,
|
|
14451
|
-
validationSchema: schema$
|
|
14622
|
+
validationSchema: schema$f,
|
|
14452
14623
|
onSubmit: function onSubmit(values) {
|
|
14453
14624
|
confirmData(values);
|
|
14454
14625
|
setEdited(false);
|
|
@@ -15001,7 +15172,7 @@ var useSessionTemplateGeneralClassDetail = function useSessionTemplateGeneralCla
|
|
|
15001
15172
|
};
|
|
15002
15173
|
|
|
15003
15174
|
var LINK_TO_DEFAULT_QUESTION_GENERAL_CLASS = "/admin/question/default-question-general-list";
|
|
15004
|
-
var schema$
|
|
15175
|
+
var schema$g = yup.object({
|
|
15005
15176
|
name: yup.string().trim().required("Name is required"),
|
|
15006
15177
|
subjectId: yup.number().required("Subject is required").test("Test subject", "Subject is required", function (value) {
|
|
15007
15178
|
return value > 0;
|
|
@@ -15085,7 +15256,7 @@ var SessionTemplateGeneralClassDetail = function SessionTemplateGeneralClassDeta
|
|
|
15085
15256
|
return React__default.createElement(formik.Formik, {
|
|
15086
15257
|
initialValues: sessionTemplateGeneralClassDetail,
|
|
15087
15258
|
enableReinitialize: true,
|
|
15088
|
-
validationSchema: schema$
|
|
15259
|
+
validationSchema: schema$g,
|
|
15089
15260
|
onSubmit: function onSubmit(values) {
|
|
15090
15261
|
confirmData(values);
|
|
15091
15262
|
setEdited(false);
|
|
@@ -15292,7 +15463,7 @@ var SessionTemplateGeneralClassDetail = function SessionTemplateGeneralClassDeta
|
|
|
15292
15463
|
});
|
|
15293
15464
|
};
|
|
15294
15465
|
|
|
15295
|
-
var schema$
|
|
15466
|
+
var schema$h = yup.object({
|
|
15296
15467
|
learningSupportCategoryId: yup.number().test("testLearningSupportCategoryId", "Invalid category", function (number) {
|
|
15297
15468
|
return !!number && number >= 1;
|
|
15298
15469
|
}),
|
|
@@ -15322,7 +15493,7 @@ var CustomAlertDetailModal = function CustomAlertDetailModal(props, ref) {
|
|
|
15322
15493
|
return React__default.createElement(formik.Formik, {
|
|
15323
15494
|
initialValues: customAlertDetail,
|
|
15324
15495
|
enableReinitialize: true,
|
|
15325
|
-
validationSchema: schema$
|
|
15496
|
+
validationSchema: schema$h,
|
|
15326
15497
|
onSubmit: function onSubmit(values, actions) {
|
|
15327
15498
|
onConfirm(values);
|
|
15328
15499
|
actions.resetForm();
|
|
@@ -15896,7 +16067,7 @@ var CustomAlertList = function CustomAlertList() {
|
|
|
15896
16067
|
|
|
15897
16068
|
var certificate = {"certificate-item":"_3DVMZ","add-breakpoint":"_3zOGW","box-item":"_3DQwX"};
|
|
15898
16069
|
|
|
15899
|
-
var schema$
|
|
16070
|
+
var schema$i = yup.object({
|
|
15900
16071
|
name: yup.string().required("Name is required"),
|
|
15901
16072
|
certificateItems: yup.array().test("Text label required", "Text is required", function (value) {
|
|
15902
16073
|
return value === null || value === void 0 ? void 0 : value.every(function (item) {
|
|
@@ -15921,7 +16092,7 @@ var CertificateDetailModal = function CertificateDetailModal(props, ref) {
|
|
|
15921
16092
|
return React__default.createElement(formik.Formik, {
|
|
15922
16093
|
initialValues: certificateDetail,
|
|
15923
16094
|
enableReinitialize: true,
|
|
15924
|
-
validationSchema: schema$
|
|
16095
|
+
validationSchema: schema$i,
|
|
15925
16096
|
onSubmit: function onSubmit(values, actions) {
|
|
15926
16097
|
var _values$certificateIt;
|
|
15927
16098
|
|