mario-teacher-student-client 1.4.1 → 1.4.2
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/components/selector/StudentSelector.d.ts +1 -1
- package/dist/index.css +6 -4
- package/dist/index.js +42 -23
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +42 -23
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const StudentSelector: ({ setStudentId, setStudentUserId, setStudentName, setStudentProfileImage, studentUserId }: any) => JSX.Element | null;
|
|
2
|
+
declare const StudentSelector: ({ setStudentId, setStudentUserId, setStudentName, setStudentProfileImage, studentUserId, setIsCheckStudent }: any) => JSX.Element | null;
|
|
3
3
|
export default StudentSelector;
|
package/dist/index.css
CHANGED
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
font-size: 18px;
|
|
39
39
|
color: "#2D3748";
|
|
40
|
-
font-weight: 700;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
margin-bottom: 0; }
|
|
41
42
|
._vnH2n ._11kCD p ._dqAoB {
|
|
42
43
|
padding-right: 15;
|
|
43
44
|
font-size: 18px; }
|
|
@@ -1643,7 +1644,7 @@ p._1YLGi {
|
|
|
1643
1644
|
._T1fJ4 ._2hOFE {
|
|
1644
1645
|
padding-right: 20px;
|
|
1645
1646
|
font-weight: 800;
|
|
1646
|
-
margin-top:
|
|
1647
|
+
margin-top: 5px; }
|
|
1647
1648
|
|
|
1648
1649
|
._3-Mx5 p:nth-child(1) {
|
|
1649
1650
|
color: #2d3748;
|
|
@@ -2310,7 +2311,7 @@ h2._1OAmb {
|
|
|
2310
2311
|
|
|
2311
2312
|
._2QGnx {
|
|
2312
2313
|
text-align: center;
|
|
2313
|
-
padding: 10px
|
|
2314
|
+
padding: 20px 10px 10px 10px;
|
|
2314
2315
|
width: 205px;
|
|
2315
2316
|
margin-right: 16px;
|
|
2316
2317
|
border-radius: 9px;
|
|
@@ -2318,7 +2319,8 @@ h2._1OAmb {
|
|
|
2318
2319
|
._2QGnx ._175nT {
|
|
2319
2320
|
font-size: 17px;
|
|
2320
2321
|
font-weight: 700;
|
|
2321
|
-
color: rgba(102, 102, 112, 0.75);
|
|
2322
|
+
color: rgba(102, 102, 112, 0.75);
|
|
2323
|
+
white-space: nowrap; }
|
|
2322
2324
|
._2QGnx ._fEaRj {
|
|
2323
2325
|
color: #252733;
|
|
2324
2326
|
font-weight: 700;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,10 @@ var MenuIcon = _interopDefault(require('@material-ui/icons/Menu'));
|
|
|
15
15
|
var core = require('@material-ui/core');
|
|
16
16
|
var icons = require('@material-ui/icons');
|
|
17
17
|
var HomeIcon = _interopDefault(require('@material-ui/icons/Home'));
|
|
18
|
-
var
|
|
18
|
+
var GroupIcon = _interopDefault(require('@material-ui/icons/Group'));
|
|
19
|
+
var SettingsIcon = _interopDefault(require('@material-ui/icons/Settings'));
|
|
20
|
+
var StudentsIcon = _interopDefault(require('@material-ui/icons/Wc'));
|
|
21
|
+
var SchoolIcon = _interopDefault(require('@material-ui/icons/School'));
|
|
19
22
|
var dateFns = require('date-fns');
|
|
20
23
|
var moment = _interopDefault(require('moment'));
|
|
21
24
|
var FullCalendar = _interopDefault(require('@fullcalendar/react'));
|
|
@@ -144,20 +147,22 @@ var ICON_NAV = [{
|
|
|
144
147
|
name: "Home",
|
|
145
148
|
icon: React__default.createElement(HomeIcon, null)
|
|
146
149
|
}, {
|
|
147
|
-
name: "My
|
|
148
|
-
icon: React__default.createElement(
|
|
150
|
+
name: "My Students",
|
|
151
|
+
icon: React__default.createElement(StudentsIcon, null)
|
|
149
152
|
}, {
|
|
150
153
|
name: "My Class Reflections",
|
|
151
|
-
icon: React__default.createElement(
|
|
154
|
+
icon: React__default.createElement(SchoolIcon, null)
|
|
152
155
|
}, {
|
|
153
156
|
name: "My 1-to-1",
|
|
154
|
-
icon: React__default.createElement(
|
|
157
|
+
icon: React__default.createElement(GroupIcon, null)
|
|
155
158
|
}, {
|
|
156
159
|
name: "My Conferences",
|
|
157
|
-
icon: React__default.createElement(
|
|
160
|
+
icon: React__default.createElement("i", {
|
|
161
|
+
className: "fas fa-chalkboard-teacher"
|
|
162
|
+
})
|
|
158
163
|
}, {
|
|
159
164
|
name: "Settings",
|
|
160
|
-
icon: React__default.createElement(
|
|
165
|
+
icon: React__default.createElement(SettingsIcon, null)
|
|
161
166
|
}];
|
|
162
167
|
|
|
163
168
|
var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
@@ -1582,7 +1587,8 @@ var StudentSelector = function StudentSelector(_ref) {
|
|
|
1582
1587
|
setStudentUserId = _ref.setStudentUserId,
|
|
1583
1588
|
setStudentName = _ref.setStudentName,
|
|
1584
1589
|
setStudentProfileImage = _ref.setStudentProfileImage,
|
|
1585
|
-
studentUserId = _ref.studentUserId
|
|
1590
|
+
studentUserId = _ref.studentUserId,
|
|
1591
|
+
setIsCheckStudent = _ref.setIsCheckStudent;
|
|
1586
1592
|
|
|
1587
1593
|
var _useUpComing = useUpComing(),
|
|
1588
1594
|
studentData = _useUpComing.studentData;
|
|
@@ -1595,6 +1601,9 @@ var StudentSelector = function StudentSelector(_ref) {
|
|
|
1595
1601
|
open = _React$useState2[0],
|
|
1596
1602
|
setOpen = _React$useState2[1];
|
|
1597
1603
|
|
|
1604
|
+
React.useEffect(function () {
|
|
1605
|
+
(studentData === null || studentData === void 0 ? void 0 : studentData.length) > 0 ? setIsCheckStudent === null || setIsCheckStudent === void 0 ? void 0 : setIsCheckStudent(true) : setIsCheckStudent === null || setIsCheckStudent === void 0 ? void 0 : setIsCheckStudent(false);
|
|
1606
|
+
}, [studentData]);
|
|
1598
1607
|
if (!studentData || !studentData.length) return null;
|
|
1599
1608
|
var value = studentData === null || studentData === void 0 ? void 0 : studentData.find(function (item) {
|
|
1600
1609
|
return item.id == studentUserId;
|
|
@@ -1662,6 +1671,10 @@ var DialogRequestOneToOne = function DialogRequestOneToOne(_ref) {
|
|
|
1662
1671
|
selectData = _useState[0],
|
|
1663
1672
|
setSelectData = _useState[1];
|
|
1664
1673
|
|
|
1674
|
+
var _useState2 = React.useState(false),
|
|
1675
|
+
isCheckStudent = _useState2[0],
|
|
1676
|
+
setIsCheckStudent = _useState2[1];
|
|
1677
|
+
|
|
1665
1678
|
var history = reactRouterDom.useHistory();
|
|
1666
1679
|
var dispatch = reactRedux.useDispatch();
|
|
1667
1680
|
|
|
@@ -1728,7 +1741,8 @@ var DialogRequestOneToOne = function DialogRequestOneToOne(_ref) {
|
|
|
1728
1741
|
}
|
|
1729
1742
|
}, React__default.createElement(StudentSelector, {
|
|
1730
1743
|
setStudentId: setStudentId,
|
|
1731
|
-
setStudentName: setStudentName
|
|
1744
|
+
setStudentName: setStudentName,
|
|
1745
|
+
setIsCheckStudent: setIsCheckStudent
|
|
1732
1746
|
}), !selectData && React__default.createElement(core.Typography, {
|
|
1733
1747
|
style: {
|
|
1734
1748
|
fontSize: "14px",
|
|
@@ -1738,7 +1752,7 @@ var DialogRequestOneToOne = function DialogRequestOneToOne(_ref) {
|
|
|
1738
1752
|
style: {
|
|
1739
1753
|
fontSize: "18px"
|
|
1740
1754
|
}
|
|
1741
|
-
}, "Select a student, launch a new session or book one for later.")), React__default.createElement(core.Box, {
|
|
1755
|
+
}, !!isCheckStudent ? "Select a student, launch a new session or book one for later." : "You have no student")), (isTeacher && isCheckStudent || !isTeacher) && React__default.createElement(React__default.Fragment, null, React__default.createElement(core.Box, {
|
|
1742
1756
|
pt: 2,
|
|
1743
1757
|
className: "" + stylesOto["btn-session"]
|
|
1744
1758
|
}, React__default.createElement(core.Button, {
|
|
@@ -1767,7 +1781,7 @@ var DialogRequestOneToOne = function DialogRequestOneToOne(_ref) {
|
|
|
1767
1781
|
padding: "13px 27px"
|
|
1768
1782
|
},
|
|
1769
1783
|
onClick: handlePushBookSession
|
|
1770
|
-
}, "BOOK FOR LATER")));
|
|
1784
|
+
}, "BOOK FOR LATER"))));
|
|
1771
1785
|
};
|
|
1772
1786
|
|
|
1773
1787
|
var _excluded = ["children", "value", "index"];
|
|
@@ -3245,10 +3259,14 @@ var DialogRequestConferences = function DialogRequestConferences(_ref) {
|
|
|
3245
3259
|
var currentStudentId = currentUser.studentId;
|
|
3246
3260
|
var isTeacher = currentUser.roles.includes("Teacher");
|
|
3247
3261
|
|
|
3248
|
-
var _useState = React.useState(),
|
|
3262
|
+
var _useState = React.useState('0'),
|
|
3249
3263
|
selectData = _useState[0],
|
|
3250
3264
|
setSelectData = _useState[1];
|
|
3251
3265
|
|
|
3266
|
+
var _useState2 = React.useState(false),
|
|
3267
|
+
isCheckStudent = _useState2[0],
|
|
3268
|
+
setIsCheckStudent = _useState2[1];
|
|
3269
|
+
|
|
3252
3270
|
var history = reactRouterDom.useHistory();
|
|
3253
3271
|
var dispatch = reactRedux.useDispatch();
|
|
3254
3272
|
|
|
@@ -3315,7 +3333,8 @@ var DialogRequestConferences = function DialogRequestConferences(_ref) {
|
|
|
3315
3333
|
}
|
|
3316
3334
|
}, React__default.createElement(StudentSelector, {
|
|
3317
3335
|
setStudentId: setStudentId,
|
|
3318
|
-
setStudentName: setStudentName
|
|
3336
|
+
setStudentName: setStudentName,
|
|
3337
|
+
setIsCheckStudent: setIsCheckStudent
|
|
3319
3338
|
}), !selectData && React__default.createElement(core.Typography, {
|
|
3320
3339
|
style: {
|
|
3321
3340
|
fontSize: "14px",
|
|
@@ -3325,7 +3344,7 @@ var DialogRequestConferences = function DialogRequestConferences(_ref) {
|
|
|
3325
3344
|
style: {
|
|
3326
3345
|
fontSize: "18px"
|
|
3327
3346
|
}
|
|
3328
|
-
}, "Select a student, launch a new session or book one for later.")), React__default.createElement(core.Box, {
|
|
3347
|
+
}, isCheckStudent ? "Select a student, launch a new session or book one for later." : "You have no student")), (isTeacher && isCheckStudent || !isTeacher) && React__default.createElement(React__default.Fragment, null, React__default.createElement(core.Box, {
|
|
3329
3348
|
pt: 2,
|
|
3330
3349
|
className: "" + styles$1["btn-session"]
|
|
3331
3350
|
}, React__default.createElement(core.Button, {
|
|
@@ -3356,7 +3375,7 @@ var DialogRequestConferences = function DialogRequestConferences(_ref) {
|
|
|
3356
3375
|
padding: "13px 27px"
|
|
3357
3376
|
},
|
|
3358
3377
|
onClick: handlePushBookSession
|
|
3359
|
-
}, "BOOK FOR LATER")));
|
|
3378
|
+
}, "BOOK FOR LATER"))));
|
|
3360
3379
|
};
|
|
3361
3380
|
|
|
3362
3381
|
var SEARCH_LEARNING$1 = marioCore.BASE_URL + "/api/SearchLearning";
|
|
@@ -5004,12 +5023,12 @@ var ConductTop = function ConductTop(_ref) {
|
|
|
5004
5023
|
backgroundColor: "#FED7E2"
|
|
5005
5024
|
}];
|
|
5006
5025
|
var teacherRequest = {
|
|
5007
|
-
label: "Teacher request",
|
|
5026
|
+
label: isConference ? "" : "Teacher request",
|
|
5008
5027
|
color: "#702459",
|
|
5009
5028
|
backgroundColor: "#FED7E2"
|
|
5010
5029
|
};
|
|
5011
5030
|
var studentRequest = {
|
|
5012
|
-
label: "Student request",
|
|
5031
|
+
label: isConference ? "" : "Student request",
|
|
5013
5032
|
color: "#702459",
|
|
5014
5033
|
backgroundColor: "#FED7E2"
|
|
5015
5034
|
};
|
|
@@ -10482,7 +10501,7 @@ var StudentList = function StudentList() {
|
|
|
10482
10501
|
history.push(url);
|
|
10483
10502
|
}, [isTeacher]);
|
|
10484
10503
|
React.useEffect(function () {
|
|
10485
|
-
document.title = "My
|
|
10504
|
+
document.title = "My Students";
|
|
10486
10505
|
}, []);
|
|
10487
10506
|
return React__default.createElement(core.Grid, null, React__default.createElement(core.Grid, {
|
|
10488
10507
|
className: "" + myStudent["title-student-gr"]
|
|
@@ -11045,7 +11064,7 @@ var OverviewLeft = function OverviewLeft(props) {
|
|
|
11045
11064
|
sm: 6,
|
|
11046
11065
|
justifyContent: "flex-end",
|
|
11047
11066
|
style: {
|
|
11048
|
-
paddingRight: "
|
|
11067
|
+
paddingRight: "15px",
|
|
11049
11068
|
textAlign: "right"
|
|
11050
11069
|
}
|
|
11051
11070
|
}, React__default.createElement(core.Button, {
|
|
@@ -11262,10 +11281,10 @@ var useOverview = function useOverview(studentId) {
|
|
|
11262
11281
|
var timeResult = "";
|
|
11263
11282
|
|
|
11264
11283
|
if (time >= 60) {
|
|
11265
|
-
hour = time / 60;
|
|
11266
|
-
minute = time - hour * 60;
|
|
11284
|
+
hour = Math.floor(time / 60);
|
|
11285
|
+
minute = Math.round(time - hour * 60);
|
|
11267
11286
|
} else {
|
|
11268
|
-
minute = time;
|
|
11287
|
+
minute = Math.round(time);
|
|
11269
11288
|
}
|
|
11270
11289
|
|
|
11271
11290
|
if (hour > 0) {
|
|
@@ -12746,7 +12765,7 @@ var InformationUser = function InformationUser(_ref) {
|
|
|
12746
12765
|
className: styles$6["grey-desc"]
|
|
12747
12766
|
}, "Time and date"), React__default.createElement("h5", {
|
|
12748
12767
|
className: styles$6["science-class"]
|
|
12749
|
-
}, moment(informationUser.time).format("
|
|
12768
|
+
}, moment(informationUser.time).format("DD/MM/YY - HH:mm A"))));
|
|
12750
12769
|
};
|
|
12751
12770
|
|
|
12752
12771
|
var useStartReflection = function useStartReflection() {
|