mario-teacher-student-client 2.1.98-admin → 2.1.99-admin
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/layouts/HeaderSideBar.d.ts +1 -5
- package/dist/index.css +26 -0
- package/dist/index.js +129 -75
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +131 -77
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/ModelSelectRole.d.ts +4 -0
- package/dist/layouts/constants/constants.d.ts +2 -0
- package/dist/layouts/constants/type.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState, useCallback, useEffect, useMemo, useImperativeHandle, forwardRef, useRef, Fragment as Fragment$1 } from 'react';
|
|
2
2
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
import { api, BASE_URL, setLoading, setAlert, amplitudeClient, ACCESS_TOKEN, reset, initAmplitude, showMenuBar, setEnableIEP, setConversationOneToOne, showFontSize, canAccessRoute, INIT_AMPLITUDE_KEY, firstCheckToken, getInfo,
|
|
3
|
+
import { api, BASE_URL, setLoading, setAlert, amplitudeClient, ACCESS_TOKEN, reset, initAmplitude, showMenuBar, setEnableIEP, setConversationOneToOne, showFontSize, setUser, canAccessRoute, INIT_AMPLITUDE_KEY, firstCheckToken, getInfo, Loading as Loading$2, Dashboard as Dashboard$1, TheContent, utcToLocalTime, apiUpload, NotFound, getFileUrl, useFilters, uploadFile, ErrorHandler, generateRandomString, clearTab, setCurrentStudentId, setCurrentStudentUserId, setCurrentStudentName } from 'mario-core';
|
|
4
4
|
import { makeStyles, withStyles, createStyles } from '@material-ui/core/styles';
|
|
5
5
|
import AppBar from '@material-ui/core/AppBar';
|
|
6
6
|
import Toolbar from '@material-ui/core/Toolbar';
|
|
@@ -9,7 +9,7 @@ import NotificationsIcon from '@material-ui/icons/Notifications';
|
|
|
9
9
|
import IconButton from '@material-ui/core/IconButton';
|
|
10
10
|
import MenuIcon from '@material-ui/icons/Menu';
|
|
11
11
|
import CommentIcon from '@material-ui/icons/Comment';
|
|
12
|
-
import { Badge, Menu, MenuItem, Drawer, List, ListItem, ListItemIcon, ListItemText, SwipeableDrawer,
|
|
12
|
+
import { Badge, Menu, MenuItem, Drawer, List, ListItem, ListItemIcon, ListItemText, SwipeableDrawer, Dialog, Typography as Typography$1, Grid, makeStyles as makeStyles$1, Box, TextField, InputAdornment, createMuiTheme, MuiThemeProvider, DialogTitle, DialogContent, FormControl, InputLabel, Select, IconButton as IconButton$1, FormControlLabel, Checkbox, DialogActions, Button, Link, TableContainer, TableHead, TableBody, InputBase, TableRow, TableCell, TablePagination, Chip, Switch, OutlinedInput, Slider, Radio, RadioGroup, createTheme, Tooltip, Tabs as Tabs$1, Tab as Tab$1, createStyles as createStyles$1, DialogContentText, Table as Table$2, Avatar as Avatar$1, FormGroup, Input as Input$1, useTheme, Accordion, AccordionSummary, AccordionDetails, Stepper, Step, StepButton, StepLabel, StepContent } from '@material-ui/core';
|
|
13
13
|
import { AccountCircle } from '@material-ui/icons';
|
|
14
14
|
import HomeIcon from '@material-ui/icons/Home';
|
|
15
15
|
import GroupIcon from '@material-ui/icons/Group';
|
|
@@ -419,7 +419,7 @@ var getStudentSimpleProfile = function getStudentSimpleProfile() {
|
|
|
419
419
|
return api.get("" + STUDENT_PROFILE);
|
|
420
420
|
};
|
|
421
421
|
|
|
422
|
-
var styleIndex = {"reset-the-content":"_1zJw3","header-left":"_11kCD","header-icon":"_dqAoB","header-right":"_1jTMg","box-title-question":"_1DlZO","tooltip-question":"_29Hwk","font-description":"_2pyf5","header-component":"_2oMWx","btn-start":"_1M4r8","timer-start":"_-ZWIZ","btn-timer":"_3SGlg","timer-text":"_1Q--B","btn-conduct-session":"_2K2FJ","btn-conduct-session-disabled":"_3ae8F","box-slider":"_1bTW5","margin-right":"_2T6Ym","slider-text":"_1gs0Z","font-question-name":"_13S5D","font-question":"_t-JhH","font-question-description":"_1YLGi","question-block":"_2gqE-","font-large":"_3Sup6","font-small":"_2JnMg","question-text":"_337MJ","question-slider":"_k_dl-","question-block-mobile":"_p-cUG","emotion-list":"_1M6M1","emotion-item":"_1wmi8","emotion-active":"_3JT39","block-learning-strategories":"_KKK4u","conference-learning-strategories":"_3o_lQ","item-learning-strategories":"_1k7-R","question-today":"_WkaIn","block-button":"_275AS","talk-conduct":"_28jd3","box-talk":"_3zlbc","box-p":"_IXk4X","form-upload":"_1spIR","title":"_g-p72","description":"_2U60d","form-title":"_qDlsm","form-upload-image-box":"_2xZUq","form-upload-image":"_3C-Xm","form-upload-icon":"_2zIn5","form-upload-title":"_yNCgm","form-upload-description":"_35Wqq","header-right-download":"_27SXJ","download-title":"_1EWKg","accomondation-content":"_2qhHZ","accomondation-content-title-box":"_XTfSF","accomondation-content-title":"_1Z_hd","accomondation-body":"_1DtTP","accomondation-content-function":"_3fJXr","function-edit":"_368JR","function-delete":"_2I-ej","accomondation-block-content":"_1fpsj","accomondation-block-note":"_2INhO","accomondation-content-description":"_2BEap","accomondation-content-status":"_UdBci","content-function-mobile":"_3gaSR","card-box":"_3Flx1","card-top":"_3Mi_n","card-top-title":"_21QGx","card-top-right":"_2eeiS","card-top-switch":"_9VWFe","card-view":"_Jwjv5","card-content":"_3AVYm","block-circle":"_3o7Sh","block-item-3":"_3JeRP","item-circle":"_2wunA","block-item-4":"_3P83R","icon-btn":"_3xYAk","slider-avatar":"_2wH1X","btn-delete":"_z69mr","send-icon":"_3oH01","label-single-choice":"_3oSdM","radio-choice":"_2RwcR","canva-item-container":"_1tBto","canva-item":"_3A0Al","title-circle":"_2QAQJ","accommodation-header-right":"_4OB3z","about-header-right":"_t4lD7","text-custom":"_22kUd","page-external":"_1Qrsk","box-notification":"_iDxHF","notification-1":"_2ZvNu","notification-2":"_2zBWP","notification-3":"_1T24i","notification-4":"_2obEM","notification-5":"_20aq-","notification-6":"_RWFl1","box-item":"_Wtc0p","notification-7":"_3rw4Y","notification-assistant-1":"_1ybh1","notification-assistant-2":"_2o31Q","notification-assistant-3":"_11hn9","notification-assistant-4":"_2sPVk","notification-assistant-5":"_3ln0K","notification-assistant-6":"_3dsZQ","notification-student-1":"_1XdPP","notification-student-2":"_1I9Dc","notification-student-3":"_3DwX3","notification-student-4":"_2TKDh","notification-student-5":"_14nq1","notification-student-6":"_1zCX0","btn-got-it":"_uwWqF","btn-choice":"_hPL_o","yes-active":"_2AK7h","no-active":"_1UouU"};
|
|
422
|
+
var styleIndex = {"reset-the-content":"_1zJw3","header-left":"_11kCD","header-icon":"_dqAoB","header-right":"_1jTMg","box-title-question":"_1DlZO","tooltip-question":"_29Hwk","font-description":"_2pyf5","header-component":"_2oMWx","btn-start":"_1M4r8","timer-start":"_-ZWIZ","btn-timer":"_3SGlg","timer-text":"_1Q--B","btn-conduct-session":"_2K2FJ","btn-conduct-session-disabled":"_3ae8F","box-slider":"_1bTW5","margin-right":"_2T6Ym","slider-text":"_1gs0Z","font-question-name":"_13S5D","font-question":"_t-JhH","font-question-description":"_1YLGi","question-block":"_2gqE-","font-large":"_3Sup6","font-small":"_2JnMg","question-text":"_337MJ","question-slider":"_k_dl-","question-block-mobile":"_p-cUG","emotion-list":"_1M6M1","emotion-item":"_1wmi8","emotion-active":"_3JT39","block-learning-strategories":"_KKK4u","conference-learning-strategories":"_3o_lQ","item-learning-strategories":"_1k7-R","question-today":"_WkaIn","block-button":"_275AS","talk-conduct":"_28jd3","box-talk":"_3zlbc","box-p":"_IXk4X","form-upload":"_1spIR","title":"_g-p72","description":"_2U60d","form-title":"_qDlsm","form-upload-image-box":"_2xZUq","form-upload-image":"_3C-Xm","form-upload-icon":"_2zIn5","form-upload-title":"_yNCgm","form-upload-description":"_35Wqq","header-right-download":"_27SXJ","download-title":"_1EWKg","accomondation-content":"_2qhHZ","accomondation-content-title-box":"_XTfSF","accomondation-content-title":"_1Z_hd","accomondation-body":"_1DtTP","accomondation-content-function":"_3fJXr","function-edit":"_368JR","function-delete":"_2I-ej","accomondation-block-content":"_1fpsj","accomondation-block-note":"_2INhO","accomondation-content-description":"_2BEap","accomondation-content-status":"_UdBci","content-function-mobile":"_3gaSR","card-box":"_3Flx1","card-top":"_3Mi_n","card-top-title":"_21QGx","card-top-right":"_2eeiS","card-top-switch":"_9VWFe","card-view":"_Jwjv5","card-content":"_3AVYm","block-circle":"_3o7Sh","block-item-3":"_3JeRP","item-circle":"_2wunA","block-item-4":"_3P83R","icon-btn":"_3xYAk","slider-avatar":"_2wH1X","btn-delete":"_z69mr","send-icon":"_3oH01","label-single-choice":"_3oSdM","radio-choice":"_2RwcR","canva-item-container":"_1tBto","canva-item":"_3A0Al","title-circle":"_2QAQJ","accommodation-header-right":"_4OB3z","about-header-right":"_t4lD7","text-custom":"_22kUd","page-external":"_1Qrsk","box-notification":"_iDxHF","notification-1":"_2ZvNu","notification-2":"_2zBWP","notification-3":"_1T24i","notification-4":"_2obEM","notification-5":"_20aq-","notification-6":"_RWFl1","box-item":"_Wtc0p","notification-7":"_3rw4Y","notification-assistant-1":"_1ybh1","notification-assistant-2":"_2o31Q","notification-assistant-3":"_11hn9","notification-assistant-4":"_2sPVk","notification-assistant-5":"_3ln0K","notification-assistant-6":"_3dsZQ","notification-student-1":"_1XdPP","notification-student-2":"_1I9Dc","notification-student-3":"_3DwX3","notification-student-4":"_2TKDh","notification-student-5":"_14nq1","notification-student-6":"_1zCX0","btn-got-it":"_uwWqF","btn-choice":"_hPL_o","yes-active":"_2AK7h","no-active":"_1UouU","item-select-role":"_1KcY7","item-role-active":"_dOVso","model-switch-roles":"_3ZqxI"};
|
|
423
423
|
|
|
424
424
|
function toVal(mix) {
|
|
425
425
|
var k, y, str='';
|
|
@@ -682,6 +682,19 @@ var STEP_PROFILE = {
|
|
|
682
682
|
message: "Edit your personal settings."
|
|
683
683
|
};
|
|
684
684
|
|
|
685
|
+
var prioritizedRoles = ["Admin", "Teacher", "Assistant", "EduTeacher", "Student", "Parent"];
|
|
686
|
+
var handleUserRole = function handleUserRole(userRoles) {
|
|
687
|
+
if (userRoles.includes("Teacher") && userRoles.includes("Assistant")) {
|
|
688
|
+
var roles = userRoles.filter(function (r) {
|
|
689
|
+
return r !== "Teacher" && r !== "Assistant";
|
|
690
|
+
});
|
|
691
|
+
roles.push("Teacher/Assistant");
|
|
692
|
+
return roles;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
return userRoles;
|
|
696
|
+
};
|
|
697
|
+
|
|
685
698
|
var NOTIFICATION_CHANNEL = "NOTIFICATION_CHANNEL";
|
|
686
699
|
var NEW_NOTIFICATION = "NEW_NOTIFICATION";
|
|
687
700
|
var drawerWidth = 280;
|
|
@@ -695,53 +708,13 @@ var defaultFontSize = 16;
|
|
|
695
708
|
var defaultFontSmall = 12;
|
|
696
709
|
var defaultFontLarge = 20;
|
|
697
710
|
var LOGO = "/images/logo.svg";
|
|
698
|
-
var domainName$1 = window.location.hostname;
|
|
699
|
-
var isCheckDomainRubyoung$1 = domainName$1.includes('rubyyoung');
|
|
700
|
-
var ICON_NAV = [{
|
|
701
|
-
name: "Home",
|
|
702
|
-
icon: React__default.createElement(HomeIcon, null)
|
|
703
|
-
}, {
|
|
704
|
-
name: "My Students",
|
|
705
|
-
icon: React__default.createElement(StudentsIcon, null)
|
|
706
|
-
}, {
|
|
707
|
-
name: isCheckDomainRubyoung$1 ? "My Reflections" : "My Class Reflections",
|
|
708
|
-
icon: React__default.createElement(SchoolIcon, null)
|
|
709
|
-
}, {
|
|
710
|
-
name: "My 1-to-1",
|
|
711
|
-
icon: React__default.createElement(GroupIcon, null)
|
|
712
|
-
}, {
|
|
713
|
-
name: isCheckDomainRubyoung$1 ? "My Reflection" : "My Class Reflection",
|
|
714
|
-
icon: React__default.createElement(CommentIcon, null)
|
|
715
|
-
}, {
|
|
716
|
-
name: "My Conferences",
|
|
717
|
-
icon: React__default.createElement("i", {
|
|
718
|
-
className: "fas fa-chalkboard-teacher"
|
|
719
|
-
})
|
|
720
|
-
}, {
|
|
721
|
-
name: "My Learning Plan",
|
|
722
|
-
icon: React__default.createElement(CommentIcon, null)
|
|
723
|
-
}, {
|
|
724
|
-
name: "Learning Plan",
|
|
725
|
-
icon: React__default.createElement(CommentIcon, null)
|
|
726
|
-
}, {
|
|
727
|
-
name: "My Notes",
|
|
728
|
-
icon: React__default.createElement(NotesIcon, null)
|
|
729
|
-
}, {
|
|
730
|
-
name: "Class Schedule",
|
|
731
|
-
icon: React__default.createElement(DateRangeIcon, null)
|
|
732
|
-
}, {
|
|
733
|
-
name: "Training",
|
|
734
|
-
icon: React__default.createElement(LinkIcon, null)
|
|
735
|
-
}, {
|
|
736
|
-
name: "Settings",
|
|
737
|
-
icon: React__default.createElement(SettingsIcon, null)
|
|
738
|
-
}];
|
|
739
711
|
|
|
740
712
|
var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
741
713
|
var _currentUrl$split, _clsx;
|
|
742
714
|
|
|
743
715
|
var children = _ref.children,
|
|
744
|
-
navigations = _ref.navigations
|
|
716
|
+
navigations = _ref.navigations,
|
|
717
|
+
onToggleModel = _ref.onToggleModel;
|
|
745
718
|
var history = useHistory();
|
|
746
719
|
var location = useLocation();
|
|
747
720
|
var dispatch = useDispatch();
|
|
@@ -962,7 +935,10 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
|
962
935
|
name: "My Students",
|
|
963
936
|
icon: React__default.createElement(StudentsIcon, null)
|
|
964
937
|
}, {
|
|
965
|
-
name:
|
|
938
|
+
name: "My Reflections",
|
|
939
|
+
icon: React__default.createElement(SchoolIcon, null)
|
|
940
|
+
}, {
|
|
941
|
+
name: "My Class Reflections",
|
|
966
942
|
icon: React__default.createElement(SchoolIcon, null)
|
|
967
943
|
}, {
|
|
968
944
|
name: "My 1-to-1",
|
|
@@ -1144,7 +1120,12 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
|
1144
1120
|
onClose: handleClose
|
|
1145
1121
|
}, !!isTeacher && React__default.createElement(MenuItem, {
|
|
1146
1122
|
onClick: openProfile
|
|
1147
|
-
}, "Profile"), React__default.createElement(MenuItem, {
|
|
1123
|
+
}, "Profile"), handleUserRole(user === null || user === void 0 ? void 0 : user.userRoles).length > 1 && React__default.createElement(MenuItem, {
|
|
1124
|
+
onClick: function onClick() {
|
|
1125
|
+
onToggleModel === null || onToggleModel === void 0 ? void 0 : onToggleModel();
|
|
1126
|
+
handleClose();
|
|
1127
|
+
}
|
|
1128
|
+
}, "Role change"), React__default.createElement(MenuItem, {
|
|
1148
1129
|
onClick: signOut
|
|
1149
1130
|
}, "Logout")))), screenWidth > 600 && isOpenSideBar ? React__default.createElement("div", {
|
|
1150
1131
|
className: classes.positionBox
|
|
@@ -1420,6 +1401,48 @@ var useStyles = makeStyles(function (theme) {
|
|
|
1420
1401
|
};
|
|
1421
1402
|
});
|
|
1422
1403
|
|
|
1404
|
+
var ModelSelectRole = function ModelSelectRole(_ref) {
|
|
1405
|
+
var open = _ref.open,
|
|
1406
|
+
onToggleModel = _ref.onToggleModel;
|
|
1407
|
+
var dispatch = useDispatch();
|
|
1408
|
+
var history = useHistory();
|
|
1409
|
+
var user = useSelector(function (state) {
|
|
1410
|
+
return state.common.user;
|
|
1411
|
+
});
|
|
1412
|
+
var roles = user === null || user === void 0 ? void 0 : user.roles;
|
|
1413
|
+
|
|
1414
|
+
var handleSelectUserRoles = function handleSelectUserRoles(roles) {
|
|
1415
|
+
dispatch(setUser(_extends({}, user, {
|
|
1416
|
+
roles: roles.includes("Teacher/Assistant") ? ["Teacher", "Assistant"] : roles
|
|
1417
|
+
})));
|
|
1418
|
+
onToggleModel();
|
|
1419
|
+
|
|
1420
|
+
if (roles.includes("Parent")) {
|
|
1421
|
+
history.push("/parent");
|
|
1422
|
+
} else {
|
|
1423
|
+
history.push("/home");
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
return React__default.createElement(Dialog, {
|
|
1428
|
+
open: open,
|
|
1429
|
+
onClose: function onClose() {
|
|
1430
|
+
return onToggleModel();
|
|
1431
|
+
},
|
|
1432
|
+
className: "" + styleIndex["model-switch-roles"]
|
|
1433
|
+
}, React__default.createElement(Typography$1, {
|
|
1434
|
+
className: "" + styleIndex["title"]
|
|
1435
|
+
}, "Continue as:"), React__default.createElement("div", null, handleUserRole(user === null || user === void 0 ? void 0 : user.userRoles).map(function (r) {
|
|
1436
|
+
return React__default.createElement("p", {
|
|
1437
|
+
key: r,
|
|
1438
|
+
className: styleIndex["item-select-role"] + " " + styleIndex[roles.includes("Teacher") && roles.includes("Assistant") && r === "Teacher/Assistant" || roles.includes(r) ? "item-role-active" : ""],
|
|
1439
|
+
onClick: function onClick() {
|
|
1440
|
+
return handleSelectUserRoles([r]);
|
|
1441
|
+
}
|
|
1442
|
+
}, r);
|
|
1443
|
+
})));
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1423
1446
|
var _excluded = ["event", "duration_since"];
|
|
1424
1447
|
var DATEDEFAULT = new Date("0001-1-1");
|
|
1425
1448
|
|
|
@@ -1439,13 +1462,17 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1439
1462
|
isCheckDone = _useState[0],
|
|
1440
1463
|
setIsCheckDone = _useState[1];
|
|
1441
1464
|
|
|
1442
|
-
var _useState2 = useState(
|
|
1443
|
-
|
|
1444
|
-
|
|
1465
|
+
var _useState2 = useState(false),
|
|
1466
|
+
openModelSelectRole = _useState2[0],
|
|
1467
|
+
setOpenModelSelectRole = _useState2[1];
|
|
1445
1468
|
|
|
1446
|
-
var _useState3 = useState(
|
|
1447
|
-
|
|
1448
|
-
|
|
1469
|
+
var _useState3 = useState(DATEDEFAULT),
|
|
1470
|
+
curTime = _useState3[0],
|
|
1471
|
+
setCurTime = _useState3[1];
|
|
1472
|
+
|
|
1473
|
+
var _useState4 = useState(""),
|
|
1474
|
+
pathName = _useState4[0],
|
|
1475
|
+
setPathName = _useState4[1];
|
|
1449
1476
|
|
|
1450
1477
|
var location = useLocation();
|
|
1451
1478
|
var authRoutes = useMemo(function () {
|
|
@@ -1476,6 +1503,10 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1476
1503
|
amplitudeClient.logEvent(event, _extends({}, other));
|
|
1477
1504
|
};
|
|
1478
1505
|
|
|
1506
|
+
var handleToggleModel = function handleToggleModel() {
|
|
1507
|
+
setOpenModelSelectRole(!openModelSelectRole);
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1479
1510
|
useEffect(function () {
|
|
1480
1511
|
if (amplitude !== null && amplitude !== void 0 && amplitude.event) {
|
|
1481
1512
|
handleLogEvent();
|
|
@@ -1554,22 +1585,41 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1554
1585
|
}
|
|
1555
1586
|
};
|
|
1556
1587
|
|
|
1557
|
-
var loadInfo = function
|
|
1588
|
+
var loadInfo = useCallback(function () {
|
|
1558
1589
|
try {
|
|
1559
1590
|
var _temp6 = _catch(function () {
|
|
1560
1591
|
return Promise.resolve(getInfo()).then(function (info) {
|
|
1561
|
-
var _info$data;
|
|
1562
|
-
|
|
1563
1592
|
function _temp4() {
|
|
1564
|
-
dispatch(setUser(userData
|
|
1593
|
+
dispatch(setUser(_extends({}, user, userData, {
|
|
1594
|
+
email: userData.email,
|
|
1595
|
+
roles: roles,
|
|
1596
|
+
userRoles: userData.roles
|
|
1597
|
+
})));
|
|
1565
1598
|
}
|
|
1566
1599
|
|
|
1567
1600
|
if (!info) {
|
|
1568
1601
|
resetAuth();
|
|
1569
1602
|
}
|
|
1570
1603
|
|
|
1571
|
-
var roles =
|
|
1604
|
+
var roles = [];
|
|
1572
1605
|
var userData = info.data;
|
|
1606
|
+
|
|
1607
|
+
for (var _iterator = _createForOfIteratorHelperLoose(prioritizedRoles), _step; !(_step = _iterator()).done;) {
|
|
1608
|
+
var _userData$roles;
|
|
1609
|
+
|
|
1610
|
+
var r = _step.value;
|
|
1611
|
+
|
|
1612
|
+
if (userData !== null && userData !== void 0 && (_userData$roles = userData.roles) !== null && _userData$roles !== void 0 && _userData$roles.includes(r)) {
|
|
1613
|
+
if (r.includes("Teacher") && userData !== null && userData !== void 0 && userData.roles.includes("Assistant")) {
|
|
1614
|
+
roles = ["Teacher", "Assistant"];
|
|
1615
|
+
} else {
|
|
1616
|
+
roles = [r];
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
return;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1573
1623
|
var isTeacher = roles.includes("Teacher") || roles.includes("Assistant");
|
|
1574
1624
|
var isStudent = roles.includes("Student");
|
|
1575
1625
|
var isAssistant = !roles.includes("Teacher") && roles.includes("Assistant");
|
|
@@ -1618,7 +1668,7 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1618
1668
|
} catch (e) {
|
|
1619
1669
|
return Promise.reject(e);
|
|
1620
1670
|
}
|
|
1621
|
-
};
|
|
1671
|
+
}, [user]);
|
|
1622
1672
|
|
|
1623
1673
|
var resetAuth = function resetAuth() {
|
|
1624
1674
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
@@ -1641,7 +1691,8 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1641
1691
|
overflow: "hidden"
|
|
1642
1692
|
}
|
|
1643
1693
|
}, path !== "/notifications" ? React__default.createElement(HeaderSideBar, {
|
|
1644
|
-
navigations: authNavigations
|
|
1694
|
+
navigations: authNavigations,
|
|
1695
|
+
onToggleModel: handleToggleModel
|
|
1645
1696
|
}, React__default.createElement("div", {
|
|
1646
1697
|
className: "" + styleIndex["reset-the-content"]
|
|
1647
1698
|
}, React__default.createElement(TheContent, {
|
|
@@ -1650,7 +1701,10 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1650
1701
|
className: "" + styleIndex["reset-the-content"]
|
|
1651
1702
|
}, React__default.createElement(TheContent, {
|
|
1652
1703
|
routes: authRoutes
|
|
1653
|
-
}))
|
|
1704
|
+
})), React__default.createElement(ModelSelectRole, {
|
|
1705
|
+
open: openModelSelectRole,
|
|
1706
|
+
onToggleModel: handleToggleModel
|
|
1707
|
+
}));
|
|
1654
1708
|
};
|
|
1655
1709
|
|
|
1656
1710
|
var home = {"title-home":"_28pc4","to-do-today":"_1UG9Q","show-calendar":"_2W0R7","today-schedule":"_34JC1","box-schedule":"_UlvOc","action-point":"_1rK_Q","show-arrange-today":"_2pCuD","box":"_ppOfL","title-box":"_3DN3c","content-box":"_2X2qR","title-today-schedule":"_-NEIR","time-line-item":"_po9t4","time":"_1ickv","time-line":"_2y9cV","event":"_2slF0","event-text":"_anBzU","event-red":"_3Tk6m","full-calendar":"_26M4Q","current-time":"_23CKo","current-date":"_1ehp6","current-weekday":"_3Zq5B","action-points":"_10JrS","schedule-item":"_1XZWI","item-time":"_1dn2z","right-content":"_1XobX","font-large":"_1gBbm","font-small":"_3gyKR"};
|
|
@@ -3345,7 +3399,7 @@ var Dashboard = function Dashboard() {
|
|
|
3345
3399
|
className: "dashboard-page " + home[classFontSize]
|
|
3346
3400
|
}, React__default.createElement(Grid, {
|
|
3347
3401
|
className: "" + home["title-home"]
|
|
3348
|
-
}, React__default.createElement(Typography$1, null, "Hello ", user.
|
|
3402
|
+
}, React__default.createElement(Typography$1, null, "Hello ", user.firstName + " " + user.lastName, " ", React__default.createElement("img", {
|
|
3349
3403
|
src: "images/waving-hand.png",
|
|
3350
3404
|
style: {
|
|
3351
3405
|
marginTop: "-15px"
|
|
@@ -28844,8 +28898,8 @@ var ReadinessToLearn = function ReadinessToLearn(_ref) {
|
|
|
28844
28898
|
|
|
28845
28899
|
var styles$b = {"chart-one-to-one":"_1sc2P","header-chart-one-to-one":"_14jsg","header-right":"_cwDAr","title":"_34b83","gr-date-time":"_382Go","date-time-start":"_1Pawo","date-time-end":"_16LVQ","date-time":"_ZdRKi","text":"_ptF0O","text-to":"_hlkTl","apexcharts-legend":"_2EMC9","apx-legend-position-top":"_1Ojwo","apexcharts-align-center":"_12O6U","font-large":"_29eqh","chart-label":"_3f0nE","chart-content":"_3eAPT","font-small":"_3REW-","box-chart":"_2K3qC","box-chart-small":"_3fuHY","chart-label-one-1-one":"_3vpT7","chart-label-class-reflection":"_yJtRg","chart-label-learning":"_2bopc"};
|
|
28846
28900
|
|
|
28847
|
-
var domainName$
|
|
28848
|
-
var isCheckDomainRubyoung$
|
|
28901
|
+
var domainName$1 = window.location.hostname;
|
|
28902
|
+
var isCheckDomainRubyoung$1 = domainName$1.includes('rubyyoung');
|
|
28849
28903
|
|
|
28850
28904
|
var ChartOneToOne = function ChartOneToOne(_ref) {
|
|
28851
28905
|
var title = _ref.title,
|
|
@@ -28859,7 +28913,7 @@ var ChartOneToOne = function ChartOneToOne(_ref) {
|
|
|
28859
28913
|
classFontSize = _ref.classFontSize;
|
|
28860
28914
|
var screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
28861
28915
|
return React__default.createElement("div", {
|
|
28862
|
-
className: styles$b["chart-one-to-one"] + " " + styles$b[classFontSize] + " " + (!isCheckDomainRubyoung$
|
|
28916
|
+
className: styles$b["chart-one-to-one"] + " " + styles$b[classFontSize] + " " + (!isCheckDomainRubyoung$1 && "chart-format")
|
|
28863
28917
|
}, React__default.createElement("div", {
|
|
28864
28918
|
className: "" + styles$b["header-chart-one-to-one"]
|
|
28865
28919
|
}, React__default.createElement(Typography$1, {
|
|
@@ -29191,8 +29245,8 @@ var ChatLearningProgress = function ChatLearningProgress(_ref) {
|
|
|
29191
29245
|
}))));
|
|
29192
29246
|
};
|
|
29193
29247
|
|
|
29194
|
-
var domainName$
|
|
29195
|
-
var isCheckDomainRubyoung$
|
|
29248
|
+
var domainName$2 = window.location.hostname;
|
|
29249
|
+
var isCheckDomainRubyoung$2 = domainName$2.includes("rubyyoung");
|
|
29196
29250
|
|
|
29197
29251
|
var ChartOverview = function ChartOverview(props) {
|
|
29198
29252
|
var studentId = props.studentId,
|
|
@@ -29299,7 +29353,7 @@ var ChartOverview = function ChartOverview(props) {
|
|
|
29299
29353
|
container: true,
|
|
29300
29354
|
className: isPlp && styles$7["border-chart"]
|
|
29301
29355
|
}, React__default.createElement(ChartOneToOne, {
|
|
29302
|
-
title: isCheckDomainRubyoung$
|
|
29356
|
+
title: isCheckDomainRubyoung$2 ? "1-to-1" : "One To One",
|
|
29303
29357
|
studentId: studentId,
|
|
29304
29358
|
handleChangeStartDate: handleChangeStartDate,
|
|
29305
29359
|
handleChangeEndDate: handleChangeEndDate,
|
|
@@ -29317,7 +29371,7 @@ var ChartOverview = function ChartOverview(props) {
|
|
|
29317
29371
|
container: true,
|
|
29318
29372
|
className: isPlp && styles$7["border-chart"]
|
|
29319
29373
|
}, React__default.createElement(ChatClassReflection, {
|
|
29320
|
-
title: isCheckDomainRubyoung$
|
|
29374
|
+
title: isCheckDomainRubyoung$2 ? "Reflection" : "Class Reflection",
|
|
29321
29375
|
seriesChartClassReflection: seriesChartClassReflection,
|
|
29322
29376
|
optionClassReflection: optionClassReflection,
|
|
29323
29377
|
widthChartClassReflection: widthChartClassReflection,
|
|
@@ -37565,8 +37619,8 @@ var StudentHistory = function StudentHistory() {
|
|
|
37565
37619
|
}))))));
|
|
37566
37620
|
};
|
|
37567
37621
|
|
|
37568
|
-
var domainName$
|
|
37569
|
-
var isCheckDomainRubyoung$
|
|
37622
|
+
var domainName$3 = window.location.hostname;
|
|
37623
|
+
var isCheckDomainRubyoung$3 = domainName$3.includes('rubyyoung');
|
|
37570
37624
|
var tabs$3 = [{
|
|
37571
37625
|
path: "/my-class-reflection/to-do",
|
|
37572
37626
|
title: "To Do",
|
|
@@ -37576,7 +37630,7 @@ var tabs$3 = [{
|
|
|
37576
37630
|
title: "History",
|
|
37577
37631
|
component: StudentHistory
|
|
37578
37632
|
}];
|
|
37579
|
-
var title$2 = isCheckDomainRubyoung$
|
|
37633
|
+
var title$2 = isCheckDomainRubyoung$3 ? "My Reflections" : "My Class Reflections";
|
|
37580
37634
|
|
|
37581
37635
|
var StudentReflection = function StudentReflection() {
|
|
37582
37636
|
return React__default.createElement(Box$1, null, React__default.createElement(StudentReflectionTab, {
|
|
@@ -61048,18 +61102,18 @@ var CustomTabs$2 = function CustomTabs(props) {
|
|
|
61048
61102
|
}, renderContent());
|
|
61049
61103
|
};
|
|
61050
61104
|
|
|
61051
|
-
var domainName$
|
|
61052
|
-
var isCheckDomainRubyoung$
|
|
61105
|
+
var domainName$4 = window.location.hostname;
|
|
61106
|
+
var isCheckDomainRubyoung$4 = domainName$4.includes('rubyyoung');
|
|
61053
61107
|
var tabs$5 = [{
|
|
61054
61108
|
path: "/class-reflection/my-class-reflection",
|
|
61055
|
-
title: isCheckDomainRubyoung$
|
|
61109
|
+
title: isCheckDomainRubyoung$4 ? "Reflection" : "Student Reflections",
|
|
61056
61110
|
component: MyClassReflection
|
|
61057
61111
|
}, {
|
|
61058
61112
|
path: "/class-reflection/external-class-reflection",
|
|
61059
|
-
title: isCheckDomainRubyoung$
|
|
61113
|
+
title: isCheckDomainRubyoung$4 ? "External Reflection" : "External Class Reflection",
|
|
61060
61114
|
component: ExternalClassReflection
|
|
61061
61115
|
}];
|
|
61062
|
-
var title$3 = isCheckDomainRubyoung$
|
|
61116
|
+
var title$3 = isCheckDomainRubyoung$4 ? "Reflections" : "Class Reflections";
|
|
61063
61117
|
|
|
61064
61118
|
var TeacherClassReflection = function TeacherClassReflection() {
|
|
61065
61119
|
return React__default.createElement(Box$1, null, React__default.createElement(CustomTabs$2, {
|