mario-teacher-student-client 1.9.9 → 2.0.0
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/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +18 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -28,6 +28,8 @@ var Tabs = _interopDefault(require('@material-ui/core/Tabs'));
|
|
|
28
28
|
var Tab = _interopDefault(require('@material-ui/core/Tab'));
|
|
29
29
|
var Box = _interopDefault(require('@material-ui/core/Box'));
|
|
30
30
|
var AddBoxIcon = _interopDefault(require('@material-ui/icons/AddBox'));
|
|
31
|
+
var _ = require('lodash');
|
|
32
|
+
var ___default = _interopDefault(_);
|
|
31
33
|
var Autocomplete = _interopDefault(require('@material-ui/lab/Autocomplete'));
|
|
32
34
|
var SearchIcon = _interopDefault(require('@material-ui/icons/Search'));
|
|
33
35
|
var ArrowDropDownIcon = _interopDefault(require('@material-ui/icons/ArrowDropDown'));
|
|
@@ -45,7 +47,6 @@ var TableRow = _interopDefault(require('@material-ui/core/TableRow'));
|
|
|
45
47
|
var FilterListIcon = _interopDefault(require('@material-ui/icons/FilterList'));
|
|
46
48
|
var StarBorderIcon = _interopDefault(require('@material-ui/icons/StarBorder'));
|
|
47
49
|
var StarIcon = _interopDefault(require('@material-ui/icons/Star'));
|
|
48
|
-
var _ = _interopDefault(require('lodash'));
|
|
49
50
|
var styled = _interopDefault(require('@emotion/styled'));
|
|
50
51
|
var TimelineIcon = _interopDefault(require('@material-ui/icons/Timeline'));
|
|
51
52
|
var CloseIcon = _interopDefault(require('@material-ui/icons/Close'));
|
|
@@ -1376,6 +1377,10 @@ var useUpComing = function useUpComing() {
|
|
|
1376
1377
|
return (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
|
1377
1378
|
});
|
|
1378
1379
|
var isTeacher = currentUser.roles.includes("Teacher");
|
|
1380
|
+
var search = location.search;
|
|
1381
|
+
var params = new URLSearchParams(search);
|
|
1382
|
+
var studentNameReq = params.get('studentNameReq');
|
|
1383
|
+
var startDateReq = params.get('startDateReq');
|
|
1379
1384
|
var filters = null;
|
|
1380
1385
|
var setFilters = null;
|
|
1381
1386
|
|
|
@@ -1394,11 +1399,11 @@ var useUpComing = function useUpComing() {
|
|
|
1394
1399
|
setFilters = _useState3[1];
|
|
1395
1400
|
} else {
|
|
1396
1401
|
var _useState4 = React.useState({
|
|
1397
|
-
startDate: Date.now(),
|
|
1398
|
-
endDate: moment().add(7, "days").valueOf(),
|
|
1402
|
+
startDate: startDateReq != null ? _.parseInt(startDateReq) : Date.now(),
|
|
1403
|
+
endDate: startDateReq != null ? _.parseInt(startDateReq) : moment().add(7, "days").valueOf(),
|
|
1399
1404
|
currentPage: 1,
|
|
1400
1405
|
pageSize: 10,
|
|
1401
|
-
searchString: "",
|
|
1406
|
+
searchString: studentNameReq != null ? studentNameReq : "",
|
|
1402
1407
|
sortBy: "StartTime",
|
|
1403
1408
|
sortOrder: "ASC"
|
|
1404
1409
|
});
|
|
@@ -2778,7 +2783,7 @@ var useSessionCompleted = function useSessionCompleted() {
|
|
|
2778
2783
|
var _temp10 = _catch(function () {
|
|
2779
2784
|
return Promise.resolve(updateItemFavourite(itemID)).then(function (res) {
|
|
2780
2785
|
if (!!res) {
|
|
2781
|
-
var clonedData =
|
|
2786
|
+
var clonedData = ___default.cloneDeep(sessionDataHistory);
|
|
2782
2787
|
|
|
2783
2788
|
clonedData.items.map(function (row) {
|
|
2784
2789
|
if (row.id == itemID && isTeacher) {
|
|
@@ -3666,12 +3671,17 @@ var useUpComing$1 = function useUpComing() {
|
|
|
3666
3671
|
studentData = _useState2[0],
|
|
3667
3672
|
setStudentData = _useState2[1];
|
|
3668
3673
|
|
|
3674
|
+
var search = location.search;
|
|
3675
|
+
var params = new URLSearchParams(search);
|
|
3676
|
+
var studentNameReq = params.get('studentNameReq');
|
|
3677
|
+
var startDateReq = params.get('startDateReq');
|
|
3678
|
+
|
|
3669
3679
|
var _useState3 = React.useState({
|
|
3670
|
-
startDate: Date.now(),
|
|
3671
|
-
endDate: moment().add(7, "days").valueOf(),
|
|
3680
|
+
startDate: startDateReq != null ? parseInt(startDateReq) : Date.now(),
|
|
3681
|
+
endDate: startDateReq != null ? parseInt(startDateReq) : moment().add(7, "days").valueOf(),
|
|
3672
3682
|
currentPage: 1,
|
|
3673
3683
|
pageSize: 10,
|
|
3674
|
-
searchString: "",
|
|
3684
|
+
searchString: studentNameReq != null ? studentNameReq : "",
|
|
3675
3685
|
sortBy: "StartTime",
|
|
3676
3686
|
sortOrder: "DESC"
|
|
3677
3687
|
}),
|
|
@@ -4665,7 +4675,7 @@ var useSessionCompleted$1 = function useSessionCompleted() {
|
|
|
4665
4675
|
var _temp8 = _catch(function () {
|
|
4666
4676
|
return Promise.resolve(updateItemFavourite(itemID)).then(function (res) {
|
|
4667
4677
|
if (!!res) {
|
|
4668
|
-
var clonedData =
|
|
4678
|
+
var clonedData = ___default.cloneDeep(sessionDataHistory);
|
|
4669
4679
|
|
|
4670
4680
|
clonedData.items.map(function (row) {
|
|
4671
4681
|
if (row.id == itemID && isTeacher) {
|
|
@@ -8636,7 +8646,7 @@ var BookSession = function BookSession() {
|
|
|
8636
8646
|
type: "success",
|
|
8637
8647
|
message: "Book session successfully"
|
|
8638
8648
|
}));
|
|
8639
|
-
history.push("/my-one-to-one/up-coming");
|
|
8649
|
+
history.push("/my-one-to-one/up-coming?startDateReq=" + time + "&studentNameReq=" + studentFullName);
|
|
8640
8650
|
});
|
|
8641
8651
|
}, function (err) {
|
|
8642
8652
|
var _err$response, _err$response$data;
|
|
@@ -18182,7 +18192,7 @@ var BookSessionConferences = function BookSessionConferences() {
|
|
|
18182
18192
|
type: "success",
|
|
18183
18193
|
message: "Book conferences successfully"
|
|
18184
18194
|
}));
|
|
18185
|
-
history.push("/my-conferences/up-coming");
|
|
18195
|
+
history.push("/my-conferences/up-coming?startDateReq=" + time + "&studentNameReq=" + studentFullName);
|
|
18186
18196
|
});
|
|
18187
18197
|
}, function (err) {
|
|
18188
18198
|
dispatch(marioCore.setAlert({
|