mario-teacher-student-client 1.4.4 → 1.4.5
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/containers/MyStudent/configs/createStudentSchema.d.ts +10 -0
- package/dist/index.css +25 -2
- package/dist/index.js +59 -15
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +59 -15
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const schema: import("yup/lib/object").OptionalObjectSchema<{
|
|
2
|
+
firstName: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
3
|
+
lastName: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
4
|
+
email: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
5
|
+
}, Record<string, any>, import("yup/lib/object").TypeOfShape<{
|
|
6
|
+
firstName: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
7
|
+
lastName: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
8
|
+
email: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
9
|
+
}>>;
|
|
10
|
+
export default schema;
|
package/dist/index.css
CHANGED
|
@@ -3893,6 +3893,18 @@ h4._pDCgR {
|
|
|
3893
3893
|
._1OUbl p {
|
|
3894
3894
|
color: #a80000; }
|
|
3895
3895
|
|
|
3896
|
+
@font-face {
|
|
3897
|
+
font-family: "Lato-Regular";
|
|
3898
|
+
src: url("/fonts/Lato-Regular.ttf");
|
|
3899
|
+
font-weight: normal;
|
|
3900
|
+
font-style: normal; }
|
|
3901
|
+
|
|
3902
|
+
@font-face {
|
|
3903
|
+
font-family: "Lato-Bold";
|
|
3904
|
+
src: url("/fonts/Lato-Bold.ttf");
|
|
3905
|
+
font-weight: normal;
|
|
3906
|
+
font-style: normal; }
|
|
3907
|
+
|
|
3896
3908
|
._12tWP ._1WNMT ._3BU0L p, ._1WNMT ._3BU0L p {
|
|
3897
3909
|
color: #2d3748;
|
|
3898
3910
|
font-size: 18px;
|
|
@@ -3926,6 +3938,9 @@ h4._pDCgR {
|
|
|
3926
3938
|
border-right: 1px solid #e2e8f0; }
|
|
3927
3939
|
._23ZHZ ._3DiW6 > div {
|
|
3928
3940
|
display: inline-block; }
|
|
3941
|
+
@media (max-width: 767px) {
|
|
3942
|
+
._23ZHZ {
|
|
3943
|
+
min-width: 1200px; } }
|
|
3929
3944
|
|
|
3930
3945
|
._1QPtC {
|
|
3931
3946
|
padding: 0px 20px;
|
|
@@ -4022,8 +4037,8 @@ h2._1KpSK {
|
|
|
4022
4037
|
._2_UXR img,
|
|
4023
4038
|
._1fQy_ img,
|
|
4024
4039
|
._q3ph4 img {
|
|
4025
|
-
width:
|
|
4026
|
-
height:
|
|
4040
|
+
width: 40px;
|
|
4041
|
+
height: 40px;
|
|
4027
4042
|
border-radius: 50%; }
|
|
4028
4043
|
|
|
4029
4044
|
._11rk4 {
|
|
@@ -4189,6 +4204,10 @@ h2._1KpSK {
|
|
|
4189
4204
|
font-size: 15px;
|
|
4190
4205
|
font-weight: 400; }
|
|
4191
4206
|
|
|
4207
|
+
._2fk-W {
|
|
4208
|
+
font-size: 15px;
|
|
4209
|
+
color: red; }
|
|
4210
|
+
|
|
4192
4211
|
._xFFH1 {
|
|
4193
4212
|
width: 60px;
|
|
4194
4213
|
height: 60px;
|
|
@@ -4232,3 +4251,7 @@ h2._1KpSK {
|
|
|
4232
4251
|
color: #0a4da2;
|
|
4233
4252
|
font-size: 15px;
|
|
4234
4253
|
font-weight: 400; }
|
|
4254
|
+
|
|
4255
|
+
._knGhP {
|
|
4256
|
+
font-size: 15px;
|
|
4257
|
+
color: red; }
|
package/dist/index.js
CHANGED
|
@@ -66,6 +66,7 @@ var SaveSharpIcon = _interopDefault(require('@material-ui/icons/SaveSharp'));
|
|
|
66
66
|
var CloudUploadIcon = _interopDefault(require('@material-ui/icons/CloudUpload'));
|
|
67
67
|
var formik = require('formik');
|
|
68
68
|
var SaveIcon = _interopDefault(require('@material-ui/icons/Save'));
|
|
69
|
+
var yup = require('yup');
|
|
69
70
|
|
|
70
71
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
71
72
|
|
|
@@ -12740,7 +12741,7 @@ var InformationUser = function InformationUser(_ref) {
|
|
|
12740
12741
|
}, React__default.createElement("div", {
|
|
12741
12742
|
className: styles$6["infor-image"]
|
|
12742
12743
|
}, React__default.createElement("img", {
|
|
12743
|
-
src: !!(informationUser !== null && informationUser !== void 0 && informationUser.studentProfileImage)
|
|
12744
|
+
src: !!(informationUser !== null && informationUser !== void 0 && informationUser.studentProfileImage) && (informationUser === null || informationUser === void 0 ? void 0 : informationUser.studentProfileImage) || "/images/image-default.png",
|
|
12744
12745
|
alt: ""
|
|
12745
12746
|
})), React__default.createElement("div", {
|
|
12746
12747
|
className: styles$6["infor-text"]
|
|
@@ -13248,7 +13249,7 @@ var useResultReflection = function useResultReflection() {
|
|
|
13248
13249
|
return Promise.resolve(request).then(function (res) {
|
|
13249
13250
|
var body = {
|
|
13250
13251
|
name: isTeacher ? res.data.studentName : res.data.teacherName,
|
|
13251
|
-
studentProfileImage: !isTeacher ? res.data.teacherAvatar : res.data.studentAvatar,
|
|
13252
|
+
studentProfileImage: !isTeacher ? res.data.teacherAvatar : marioCore.getFileUrl(res.data.studentAvatar),
|
|
13252
13253
|
time: res.data.time,
|
|
13253
13254
|
classType: res.data.classType,
|
|
13254
13255
|
studentName: res.data.studentName,
|
|
@@ -17732,7 +17733,7 @@ var NewLearningPlan = function NewLearningPlan() {
|
|
|
17732
17733
|
}));
|
|
17733
17734
|
};
|
|
17734
17735
|
|
|
17735
|
-
var styles$8 = {"avatar_user":"_2YQY8","update-form":"_r-HQr","select-field":"_1ZSLy","profile-label":"_3ixvM","input-field":"_bWHlA","MuiInputLabel-outlined":"_2O323","MuiFormLabel-root":"_15UDz","MuiInputBase-input":"_a8fEp","btn-submit":"_j6FQq","upload-field":"_1tibz"};
|
|
17736
|
+
var styles$8 = {"avatar_user":"_2YQY8","update-form":"_r-HQr","select-field":"_1ZSLy","profile-label":"_3ixvM","input-field":"_bWHlA","MuiInputLabel-outlined":"_2O323","MuiFormLabel-root":"_15UDz","MuiInputBase-input":"_a8fEp","btn-submit":"_j6FQq","upload-field":"_1tibz","input-error":"_2fk-W"};
|
|
17736
17737
|
|
|
17737
17738
|
var useUpdateProfile = function useUpdateProfile(studentId) {
|
|
17738
17739
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -17834,6 +17835,12 @@ var useUpdateProfile = function useUpdateProfile(studentId) {
|
|
|
17834
17835
|
};
|
|
17835
17836
|
};
|
|
17836
17837
|
|
|
17838
|
+
var schema = yup.object({
|
|
17839
|
+
firstName: yup.string().required("First name is required"),
|
|
17840
|
+
lastName: yup.string().required("Last name is required"),
|
|
17841
|
+
email: yup.string().required("Email is required")
|
|
17842
|
+
});
|
|
17843
|
+
|
|
17837
17844
|
var DEFAULT_USER_AVATAR$d = "/images/image-default.png";
|
|
17838
17845
|
var parents = ["Mother", "Father"];
|
|
17839
17846
|
|
|
@@ -17890,11 +17897,14 @@ var UpdateStudentProfile = function UpdateStudentProfile() {
|
|
|
17890
17897
|
enableReinitialize: true,
|
|
17891
17898
|
onSubmit: function onSubmit(values) {
|
|
17892
17899
|
updateStudentProfile(studentId, values);
|
|
17893
|
-
}
|
|
17900
|
+
},
|
|
17901
|
+
validationSchema: schema
|
|
17894
17902
|
}, function (formikProps) {
|
|
17895
17903
|
var values = formikProps.values,
|
|
17896
17904
|
setFieldValue = formikProps.setFieldValue,
|
|
17897
|
-
handleSubmit = formikProps.handleSubmit
|
|
17905
|
+
handleSubmit = formikProps.handleSubmit,
|
|
17906
|
+
errors = formikProps.errors,
|
|
17907
|
+
touched = formikProps.touched;
|
|
17898
17908
|
return React__default.createElement("div", {
|
|
17899
17909
|
className: "" + styles$8["page-update"]
|
|
17900
17910
|
}, React__default.createElement(HeaderComponent, {
|
|
@@ -17935,7 +17945,9 @@ var UpdateStudentProfile = function UpdateStudentProfile() {
|
|
|
17935
17945
|
onChange: function onChange(e) {
|
|
17936
17946
|
setFieldValue("firstName", e.target.value);
|
|
17937
17947
|
}
|
|
17938
|
-
}), React__default.createElement(
|
|
17948
|
+
}), errors.firstName && touched.firstName ? React__default.createElement("div", {
|
|
17949
|
+
className: "" + styles$8["input-error"]
|
|
17950
|
+
}, errors.firstName) : null, React__default.createElement(core.Typography, {
|
|
17939
17951
|
className: "" + styles$8["profile-label"]
|
|
17940
17952
|
}, "Last Name"), React__default.createElement(core.TextField, {
|
|
17941
17953
|
variant: "outlined",
|
|
@@ -17944,7 +17956,9 @@ var UpdateStudentProfile = function UpdateStudentProfile() {
|
|
|
17944
17956
|
onChange: function onChange(e) {
|
|
17945
17957
|
return setFieldValue("lastName", e.target.value);
|
|
17946
17958
|
}
|
|
17947
|
-
}), React__default.createElement(
|
|
17959
|
+
}), errors.lastName && touched.lastName ? React__default.createElement("div", {
|
|
17960
|
+
className: "" + styles$8["input-error"]
|
|
17961
|
+
}, errors.lastName) : null, React__default.createElement(core.Typography, {
|
|
17948
17962
|
className: "" + styles$8["profile-label"]
|
|
17949
17963
|
}, "Email"), React__default.createElement(core.TextField, {
|
|
17950
17964
|
variant: "outlined",
|
|
@@ -17953,7 +17967,9 @@ var UpdateStudentProfile = function UpdateStudentProfile() {
|
|
|
17953
17967
|
onChange: function onChange(e) {
|
|
17954
17968
|
return setFieldValue("email", e.target.value);
|
|
17955
17969
|
}
|
|
17956
|
-
}), React__default.createElement(
|
|
17970
|
+
}), errors.email && touched.email ? React__default.createElement("div", {
|
|
17971
|
+
className: "" + styles$8["input-error"]
|
|
17972
|
+
}, errors.email) : null, React__default.createElement(core.Typography, {
|
|
17957
17973
|
className: "" + styles$8["profile-label"]
|
|
17958
17974
|
}, "Email Owner"), React__default.createElement(core.TextField, {
|
|
17959
17975
|
select: true,
|
|
@@ -18067,6 +18083,15 @@ var UpdateStudentProfile = function UpdateStudentProfile() {
|
|
|
18067
18083
|
onChange: function onChange(e) {
|
|
18068
18084
|
return setFieldValue("note", e.target.value);
|
|
18069
18085
|
}
|
|
18086
|
+
}), React__default.createElement(core.Typography, {
|
|
18087
|
+
className: "" + styles$8["profile-label"]
|
|
18088
|
+
}, "CalendarId"), React__default.createElement(core.TextField, {
|
|
18089
|
+
variant: "outlined",
|
|
18090
|
+
value: values === null || values === void 0 ? void 0 : values.calendarId,
|
|
18091
|
+
className: "" + styles$8["input-field"],
|
|
18092
|
+
onChange: function onChange(e) {
|
|
18093
|
+
return setFieldValue("calendarId", e.target.value);
|
|
18094
|
+
}
|
|
18070
18095
|
}), React__default.createElement(core.Button, {
|
|
18071
18096
|
variant: "contained",
|
|
18072
18097
|
color: "primary",
|
|
@@ -18080,7 +18105,7 @@ var UpdateStudentProfile = function UpdateStudentProfile() {
|
|
|
18080
18105
|
});
|
|
18081
18106
|
};
|
|
18082
18107
|
|
|
18083
|
-
var styles$9 = {"avatar_user":"_xFFH1","update-form":"_37Us4","select-field":"_27dzc","profile-label":"_3Nl5D","input-field":"_3O2xZ","MuiInputLabel-outlined":"_LOIyE","MuiFormLabel-root":"_1anAm","MuiInputBase-input":"_1SUmr","btn-submit":"_2KMds","upload-field":"_2mhbx"};
|
|
18108
|
+
var styles$9 = {"avatar_user":"_xFFH1","update-form":"_37Us4","select-field":"_27dzc","profile-label":"_3Nl5D","input-field":"_3O2xZ","MuiInputLabel-outlined":"_LOIyE","MuiFormLabel-root":"_1anAm","MuiInputBase-input":"_1SUmr","btn-submit":"_2KMds","upload-field":"_2mhbx","input-error":"_knGhP"};
|
|
18084
18109
|
|
|
18085
18110
|
var useCreateStudent = function useCreateStudent() {
|
|
18086
18111
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -18172,7 +18197,8 @@ var CreateStudent = function CreateStudent() {
|
|
|
18172
18197
|
address: "",
|
|
18173
18198
|
note: "",
|
|
18174
18199
|
profileImage: "",
|
|
18175
|
-
gradeLevel: 0
|
|
18200
|
+
gradeLevel: 0,
|
|
18201
|
+
calendarId: ""
|
|
18176
18202
|
};
|
|
18177
18203
|
var MAX_SIZE = 20097152;
|
|
18178
18204
|
|
|
@@ -18208,11 +18234,14 @@ var CreateStudent = function CreateStudent() {
|
|
|
18208
18234
|
enableReinitialize: true,
|
|
18209
18235
|
onSubmit: function onSubmit(values) {
|
|
18210
18236
|
createStudent(values);
|
|
18211
|
-
}
|
|
18237
|
+
},
|
|
18238
|
+
validationSchema: schema
|
|
18212
18239
|
}, function (formikProps) {
|
|
18213
18240
|
var values = formikProps.values,
|
|
18214
18241
|
setFieldValue = formikProps.setFieldValue,
|
|
18215
|
-
handleSubmit = formikProps.handleSubmit
|
|
18242
|
+
handleSubmit = formikProps.handleSubmit,
|
|
18243
|
+
errors = formikProps.errors,
|
|
18244
|
+
touched = formikProps.touched;
|
|
18216
18245
|
return React__default.createElement("div", {
|
|
18217
18246
|
className: "" + styles$9["page-update"]
|
|
18218
18247
|
}, React__default.createElement(HeaderComponent, {
|
|
@@ -18255,7 +18284,9 @@ var CreateStudent = function CreateStudent() {
|
|
|
18255
18284
|
onChange: function onChange(e) {
|
|
18256
18285
|
setFieldValue("firstName", e.target.value);
|
|
18257
18286
|
}
|
|
18258
|
-
}), React__default.createElement(
|
|
18287
|
+
}), errors.firstName && touched.firstName ? React__default.createElement("div", {
|
|
18288
|
+
className: "" + styles$9["input-error"]
|
|
18289
|
+
}, errors.firstName) : null, React__default.createElement(core.Typography, {
|
|
18259
18290
|
className: "" + styles$9["profile-label"]
|
|
18260
18291
|
}, "Last Name"), React__default.createElement(core.TextField, {
|
|
18261
18292
|
variant: "outlined",
|
|
@@ -18264,7 +18295,9 @@ var CreateStudent = function CreateStudent() {
|
|
|
18264
18295
|
onChange: function onChange(e) {
|
|
18265
18296
|
return setFieldValue("lastName", e.target.value);
|
|
18266
18297
|
}
|
|
18267
|
-
}), React__default.createElement(
|
|
18298
|
+
}), errors.lastName && touched.lastName ? React__default.createElement("div", {
|
|
18299
|
+
className: "" + styles$9["input-error"]
|
|
18300
|
+
}, errors.lastName) : null, React__default.createElement(core.Typography, {
|
|
18268
18301
|
className: "" + styles$9["profile-label"]
|
|
18269
18302
|
}, "Email"), React__default.createElement(core.TextField, {
|
|
18270
18303
|
variant: "outlined",
|
|
@@ -18273,7 +18306,9 @@ var CreateStudent = function CreateStudent() {
|
|
|
18273
18306
|
onChange: function onChange(e) {
|
|
18274
18307
|
return setFieldValue("email", e.target.value);
|
|
18275
18308
|
}
|
|
18276
|
-
}), React__default.createElement(
|
|
18309
|
+
}), errors.email && touched.email ? React__default.createElement("div", {
|
|
18310
|
+
className: "" + styles$9["input-error"]
|
|
18311
|
+
}, errors.email) : null, React__default.createElement(core.Typography, {
|
|
18277
18312
|
className: "" + styles$9["profile-label"]
|
|
18278
18313
|
}, "Email Owner"), React__default.createElement(core.TextField, {
|
|
18279
18314
|
select: true,
|
|
@@ -18387,6 +18422,15 @@ var CreateStudent = function CreateStudent() {
|
|
|
18387
18422
|
onChange: function onChange(e) {
|
|
18388
18423
|
return setFieldValue("note", e.target.value);
|
|
18389
18424
|
}
|
|
18425
|
+
}), React__default.createElement(core.Typography, {
|
|
18426
|
+
className: "" + styles$9["profile-label"]
|
|
18427
|
+
}, "CalendarID"), React__default.createElement(core.TextField, {
|
|
18428
|
+
variant: "outlined",
|
|
18429
|
+
value: values === null || values === void 0 ? void 0 : values.calendarId,
|
|
18430
|
+
className: "" + styles$9["input-field"],
|
|
18431
|
+
onChange: function onChange(e) {
|
|
18432
|
+
return setFieldValue("calendarId", e.target.value);
|
|
18433
|
+
}
|
|
18390
18434
|
}), React__default.createElement(core.Button, {
|
|
18391
18435
|
variant: "contained",
|
|
18392
18436
|
color: "primary",
|