mario-teacher-student-client 2.1.78-beta → 2.1.82-beta
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/Goals/constants/constants.d.ts +5 -0
- package/dist/index.css +2 -2
- package/dist/index.js +60 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -28
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -4274,7 +4274,6 @@ h2._1OAmb {
|
|
|
4274
4274
|
transform-origin: top left;
|
|
4275
4275
|
top: 2;
|
|
4276
4276
|
left: 0;
|
|
4277
|
-
margin-left: 20px;
|
|
4278
4277
|
padding: 0 10px 0 5px;
|
|
4279
4278
|
position: absolute;
|
|
4280
4279
|
color: rgba(0, 0, 0, 0.54);
|
|
@@ -5084,7 +5083,8 @@ h2._1OAmb {
|
|
|
5084
5083
|
width: -webkit-fit-content;
|
|
5085
5084
|
width: -moz-fit-content;
|
|
5086
5085
|
width: fit-content;
|
|
5087
|
-
margin: auto;
|
|
5086
|
+
margin: auto;
|
|
5087
|
+
white-space: nowrap; }
|
|
5088
5088
|
|
|
5089
5089
|
._3KX9R {
|
|
5090
5090
|
color: #22543d;
|
package/dist/index.js
CHANGED
|
@@ -25,8 +25,6 @@ var Pusher = _interopDefault(require('pusher-js/with-encryption'));
|
|
|
25
25
|
var TimelineIcon = _interopDefault(require('@material-ui/icons/Timeline'));
|
|
26
26
|
var DateRangeIcon = _interopDefault(require('@material-ui/icons/DateRange'));
|
|
27
27
|
var LinkIcon = _interopDefault(require('@material-ui/icons/Link'));
|
|
28
|
-
var reactRouter = require('react-router');
|
|
29
|
-
var constants = require('mario-core/dist/utils/constants');
|
|
30
28
|
var dateFns = require('date-fns');
|
|
31
29
|
var moment = _interopDefault(require('moment'));
|
|
32
30
|
var Alert = _interopDefault(require('@material-ui/lab/Alert'));
|
|
@@ -807,14 +805,14 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
|
807
805
|
}
|
|
808
806
|
}, [isLoading]);
|
|
809
807
|
React.useEffect(function () {
|
|
810
|
-
if (isLoginFirst) {
|
|
808
|
+
if (!!user && isLoginFirst) {
|
|
811
809
|
dispatch(marioCore.initAmplitude({
|
|
812
810
|
name: user.email,
|
|
813
811
|
first_login: new Date().toISOString().slice(0, 10),
|
|
814
812
|
event: "general: first login"
|
|
815
813
|
}));
|
|
816
814
|
}
|
|
817
|
-
}, [
|
|
815
|
+
}, [user === null || user === void 0 ? void 0 : user.id]);
|
|
818
816
|
var screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
819
817
|
var classes = useStyles();
|
|
820
818
|
|
|
@@ -1430,7 +1428,7 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1430
1428
|
pathName = _useState3[0],
|
|
1431
1429
|
setPathName = _useState3[1];
|
|
1432
1430
|
|
|
1433
|
-
var location =
|
|
1431
|
+
var location = reactRouterDom.useLocation();
|
|
1434
1432
|
var authRoutes = React.useMemo(function () {
|
|
1435
1433
|
return routes.filter(function (route) {
|
|
1436
1434
|
return marioCore.canAccessRoute(user === null || user === void 0 ? void 0 : user.roles, route.roles);
|
|
@@ -1444,8 +1442,6 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1444
1442
|
});
|
|
1445
1443
|
}, [user]);
|
|
1446
1444
|
React.useEffect(function () {
|
|
1447
|
-
console.log("amplitude", amplitude);
|
|
1448
|
-
|
|
1449
1445
|
if (amplitude.user_id) {
|
|
1450
1446
|
var event = amplitude.event,
|
|
1451
1447
|
other = _objectWithoutPropertiesLoose(amplitude, _excluded);
|
|
@@ -1456,29 +1452,29 @@ var MainLayout = function MainLayout(_ref) {
|
|
|
1456
1452
|
React.useEffect(function () {
|
|
1457
1453
|
if (!!user) {
|
|
1458
1454
|
marioCore.amplitudeClient.resetSessionId();
|
|
1459
|
-
marioCore.amplitudeClient.init(
|
|
1455
|
+
marioCore.amplitudeClient.init(marioCore.INIT_AMPLITUDE_KEY, user.email, {
|
|
1460
1456
|
includeReferrer: true,
|
|
1461
1457
|
includeUtm: true
|
|
1462
1458
|
});
|
|
1463
1459
|
marioCore.amplitudeClient.enableTracking();
|
|
1464
|
-
console.log("session start");
|
|
1465
1460
|
dispatch(marioCore.initAmplitude({
|
|
1466
1461
|
name: user.email,
|
|
1467
1462
|
event: "general: session start"
|
|
1468
1463
|
}));
|
|
1469
1464
|
}
|
|
1470
|
-
|
|
1465
|
+
}, [user === null || user === void 0 ? void 0 : user.id]);
|
|
1466
|
+
React.useEffect(function () {
|
|
1471
1467
|
return function () {
|
|
1472
|
-
marioCore.initAmplitude({
|
|
1468
|
+
(user === null || user === void 0 ? void 0 : user.id) && dispatch(marioCore.initAmplitude({
|
|
1473
1469
|
name: user.email,
|
|
1474
1470
|
event: "general: end start"
|
|
1475
|
-
});
|
|
1471
|
+
}));
|
|
1476
1472
|
};
|
|
1477
|
-
}, [
|
|
1473
|
+
}, []);
|
|
1478
1474
|
React.useEffect(function () {
|
|
1479
1475
|
var newCurTime = new Date();
|
|
1480
1476
|
|
|
1481
|
-
if (curTime != DATEDEFAULT) {
|
|
1477
|
+
if (curTime != DATEDEFAULT && !!user) {
|
|
1482
1478
|
dispatch(marioCore.initAmplitude({
|
|
1483
1479
|
name: user.email,
|
|
1484
1480
|
event: "general: duration url",
|
|
@@ -17474,6 +17470,23 @@ function CheckPoint(_ref) {
|
|
|
17474
17470
|
}));
|
|
17475
17471
|
}
|
|
17476
17472
|
|
|
17473
|
+
var StatusDefault = [{
|
|
17474
|
+
key: "Active",
|
|
17475
|
+
value: "Active"
|
|
17476
|
+
}, {
|
|
17477
|
+
key: "InProgress",
|
|
17478
|
+
value: "In progress"
|
|
17479
|
+
}, {
|
|
17480
|
+
key: "NotYetStarted",
|
|
17481
|
+
value: "Not yet started"
|
|
17482
|
+
}];
|
|
17483
|
+
var handleShowStatus = function handleShowStatus(status) {
|
|
17484
|
+
var result = StatusDefault.find(function (r) {
|
|
17485
|
+
return r.key === status;
|
|
17486
|
+
});
|
|
17487
|
+
return result === null || result === void 0 ? void 0 : result.value;
|
|
17488
|
+
};
|
|
17489
|
+
|
|
17477
17490
|
var GoalProgress = function GoalProgress(props) {
|
|
17478
17491
|
var studentId = props.studentId,
|
|
17479
17492
|
classFontSize = props.classFontSize;
|
|
@@ -17543,7 +17556,7 @@ var GoalProgress = function GoalProgress(props) {
|
|
|
17543
17556
|
className: "" + styles$8["box-status"]
|
|
17544
17557
|
}, React__default.createElement(core.Typography, {
|
|
17545
17558
|
className: styles$8["status-item"] + "\n " + styles$8["status-item-margin"] + "\n " + styles$8[i.status === "Completed" ? "completed" : i.status === "NotYetStarted" ? "inactive" : "in-progress"]
|
|
17546
|
-
}, i.status
|
|
17559
|
+
}, handleShowStatus(i.status)), React__default.createElement(core.Typography, {
|
|
17547
17560
|
className: "" + styles$8["category-item"]
|
|
17548
17561
|
}, i.source)));
|
|
17549
17562
|
}) : null);
|
|
@@ -24947,7 +24960,7 @@ var Goals = function Goals(_ref) {
|
|
|
24947
24960
|
className: "" + styles$8["right-item"]
|
|
24948
24961
|
}, React__default.createElement(core.Typography, {
|
|
24949
24962
|
className: styles$8["status-item"] + " " + styles$8[i.status === "Completed" ? "completed" : i.status === "NotYetStarted" ? "inactive" : "in-progress"]
|
|
24950
|
-
},
|
|
24963
|
+
}, handleShowStatus(i.status))));
|
|
24951
24964
|
}) : null)) : React__default.createElement(React__default.Fragment, null, React__default.createElement("p", {
|
|
24952
24965
|
className: "" + styles$8["title-mobile"]
|
|
24953
24966
|
}, "Goals"), React__default.createElement("div", {
|
|
@@ -40486,9 +40499,22 @@ var NewLearningPlan = function NewLearningPlan() {
|
|
|
40486
40499
|
setInitialValues(_extends({}, cloneData));
|
|
40487
40500
|
};
|
|
40488
40501
|
|
|
40489
|
-
var handleRemoveGoalItem = function handleRemoveGoalItem(index) {
|
|
40502
|
+
var handleRemoveGoalItem = function handleRemoveGoalItem(index, type, goalLearningPlanOder) {
|
|
40490
40503
|
var cloneData = values;
|
|
40491
|
-
|
|
40504
|
+
|
|
40505
|
+
if (type === "Annual" && !!goalLearningPlanOder) {
|
|
40506
|
+
var listGoalByOder = cloneData.goalLearningPlans.filter(function (r) {
|
|
40507
|
+
return r.goalLearningPlanOder === goalLearningPlanOder;
|
|
40508
|
+
});
|
|
40509
|
+
listGoalByOder.forEach(function (x) {
|
|
40510
|
+
return cloneData.goalLearningPlans.splice(cloneData.goalLearningPlans.findIndex(function (n) {
|
|
40511
|
+
return n === x;
|
|
40512
|
+
}), 1);
|
|
40513
|
+
});
|
|
40514
|
+
} else {
|
|
40515
|
+
cloneData.goalLearningPlans.splice(index, 1);
|
|
40516
|
+
}
|
|
40517
|
+
|
|
40492
40518
|
setInitialValues(_extends({}, cloneData));
|
|
40493
40519
|
};
|
|
40494
40520
|
|
|
@@ -40703,16 +40729,16 @@ var NewLearningPlan = function NewLearningPlan() {
|
|
|
40703
40729
|
className: "" + myStudent["write-and-date-content"]
|
|
40704
40730
|
}, "Benchmarks or short-term objectives are required only for children with disabilities who take alternate assessments aligned to alternate achievement standards."), values.goalLearningPlans.some(function (i) {
|
|
40705
40731
|
return i.goalLearningPlanOder;
|
|
40706
|
-
}) ? values.goalLearningPlans.map(function (e, index) {
|
|
40732
|
+
}) || values.goalLearningPlans.length === 0 ? values.goalLearningPlans.map(function (e, index) {
|
|
40707
40733
|
return React__default.createElement(pickers.MuiPickersUtilsProvider, {
|
|
40708
40734
|
utils: MomentUtils
|
|
40709
40735
|
}, React__default.createElement(core.Grid, {
|
|
40710
40736
|
className: myStudent["input-write-date"] + " " + myStudent[e.type === "ReportingProgress" ? "objectives" : ""]
|
|
40711
40737
|
}, React__default.createElement(core.Grid, {
|
|
40712
40738
|
className: "" + myStudent["input-date"]
|
|
40713
|
-
}, !!values.goalLearningPlans[index].startTime
|
|
40739
|
+
}, !!values.goalLearningPlans[index].startTime && values.goalLearningPlans[index].type == "Annual" && React__default.createElement("label", {
|
|
40714
40740
|
className: "" + myStudent["input-date-label"]
|
|
40715
|
-
}, "Enter a date range")
|
|
40741
|
+
}, "Enter a date range"), React__default.createElement(DatePicker, {
|
|
40716
40742
|
selectsRange: true,
|
|
40717
40743
|
startDate: e.startTime ? new Date(e.startTime) : null,
|
|
40718
40744
|
endDate: values.goalLearningPlans[index].endTime ? new Date(values.goalLearningPlans[index].endTime) : null,
|
|
@@ -40735,9 +40761,9 @@ var NewLearningPlan = function NewLearningPlan() {
|
|
|
40735
40761
|
onChange: function onChange(text) {
|
|
40736
40762
|
return setFieldValue("goalLearningPlans[" + index + "].text", text.target.value);
|
|
40737
40763
|
}
|
|
40738
|
-
}),
|
|
40764
|
+
}), React__default.createElement("img", {
|
|
40739
40765
|
onClick: function onClick() {
|
|
40740
|
-
return handleRemoveGoalItem(index);
|
|
40766
|
+
return handleRemoveGoalItem(index, e.type, e.goalLearningPlanOder);
|
|
40741
40767
|
},
|
|
40742
40768
|
src: "/teacher-student/icons/delete.png",
|
|
40743
40769
|
className: "" + myStudent["icon-remove"]
|
|
@@ -40765,9 +40791,9 @@ var NewLearningPlan = function NewLearningPlan() {
|
|
|
40765
40791
|
className: "" + myStudent["input-write-date"]
|
|
40766
40792
|
}, React__default.createElement(core.Grid, {
|
|
40767
40793
|
className: "" + myStudent["input-date"]
|
|
40768
|
-
}, !!values.goalLearningPlans[index].startTime
|
|
40794
|
+
}, !!values.goalLearningPlans[index].startTime && values.goalLearningPlans[index].type == "Annual" && React__default.createElement("label", {
|
|
40769
40795
|
className: "" + myStudent["input-date-label"]
|
|
40770
|
-
}, "Enter a date range")
|
|
40796
|
+
}, "Enter a date range"), React__default.createElement(DatePicker, {
|
|
40771
40797
|
selectsRange: true,
|
|
40772
40798
|
startDate: e.startTime ? new Date(e.startTime) : null,
|
|
40773
40799
|
endDate: values.goalLearningPlans[index].endTime ? new Date(values.goalLearningPlans[index].endTime) : null,
|
|
@@ -40840,7 +40866,12 @@ var NewLearningPlan = function NewLearningPlan() {
|
|
|
40840
40866
|
})), touched.goalLearningPlans && errors.goalLearningPlans && React__default.createElement(core.Typography, {
|
|
40841
40867
|
className: "" + myStudent["err-message"]
|
|
40842
40868
|
}, errors.goalLearningPlans[index] && "Annual goals is a required"));
|
|
40843
|
-
}))), React__default.createElement(core.Grid, {
|
|
40869
|
+
}))), values.goalLearningPlans.length === 0 && React__default.createElement(core.Grid, null, React__default.createElement(core.Typography, {
|
|
40870
|
+
className: "" + myStudent["reporting"],
|
|
40871
|
+
onClick: function onClick() {
|
|
40872
|
+
return handleAddGoalItem(0, "Annual", 1);
|
|
40873
|
+
}
|
|
40874
|
+
}, "Add Goals")), React__default.createElement(core.Grid, {
|
|
40844
40875
|
className: "" + myStudent["goals-write-and-date"]
|
|
40845
40876
|
}, React__default.createElement(core.Typography, {
|
|
40846
40877
|
className: "" + myStudent["write-and-date-title"]
|
|
@@ -53621,7 +53652,7 @@ var GoalList = function GoalList() {
|
|
|
53621
53652
|
className: "" + styles$8["status-title"]
|
|
53622
53653
|
}, "Status"), React__default.createElement(core.Typography, {
|
|
53623
53654
|
className: styles$8["status-item"] + " " + styles$8[i.status === "Completed" ? "completed" : i.status === "NotYetStarted" ? "inactive" : "in-progress"]
|
|
53624
|
-
}, !!(i !== null && i !== void 0 && i.status) &&
|
|
53655
|
+
}, !!(i !== null && i !== void 0 && i.status) && handleShowStatus(i.status))), React__default.createElement(CheckPoint, {
|
|
53625
53656
|
target: completedCheckpoint(i.checkPoints),
|
|
53626
53657
|
status: i.status,
|
|
53627
53658
|
point: completedCheckpoint(i.checkPoints, true)
|
|
@@ -54857,7 +54888,7 @@ var GoalDetail = function GoalDetail() {
|
|
|
54857
54888
|
className: "" + styles$8["content-title"]
|
|
54858
54889
|
}, "Status"), React__default.createElement(core.Typography, {
|
|
54859
54890
|
className: "" + styles$8["content"]
|
|
54860
|
-
}, !!(getOneData !== null && getOneData !== void 0 && getOneData.status) &&
|
|
54891
|
+
}, !!(getOneData !== null && getOneData !== void 0 && getOneData.status) && handleShowStatus(getOneData === null || getOneData === void 0 ? void 0 : getOneData.status))), React__default.createElement(core.Grid, {
|
|
54861
54892
|
className: "" + styles$8["box-content"]
|
|
54862
54893
|
}, React__default.createElement(core.Typography, {
|
|
54863
54894
|
className: "" + styles$8["content-title"]
|
|
@@ -57948,6 +57979,7 @@ var TrainingLink = function TrainingLink() {
|
|
|
57948
57979
|
});
|
|
57949
57980
|
var isTeacher = user.roles.includes("Teacher") || user.roles.includes("Assistant");
|
|
57950
57981
|
var link = isTeacher ? linkTraining.teacherTraining : linkTraining.studentTraining;
|
|
57982
|
+
document.title = "Training";
|
|
57951
57983
|
return React__default.createElement(core.Grid, null, React__default.createElement(core.Grid, {
|
|
57952
57984
|
className: "" + styles$I["header-page"]
|
|
57953
57985
|
}, React__default.createElement(core.Typography, {
|