mario-teacher-student-client 2.1.40-beta → 2.1.41-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/index.js
CHANGED
|
@@ -12107,8 +12107,7 @@ var useDetailSession = function useDetailSession() {
|
|
|
12107
12107
|
var history = reactRouterDom.useHistory();
|
|
12108
12108
|
|
|
12109
12109
|
var _useParams = reactRouterDom.useParams(),
|
|
12110
|
-
sessionId = _useParams.sessionId
|
|
12111
|
-
studentId = _useParams.studentId;
|
|
12110
|
+
sessionId = _useParams.sessionId;
|
|
12112
12111
|
|
|
12113
12112
|
var _useState = React.useState(),
|
|
12114
12113
|
dataSession = _useState[0],
|
|
@@ -12144,7 +12143,7 @@ var useDetailSession = function useDetailSession() {
|
|
|
12144
12143
|
return Promise.reject(e);
|
|
12145
12144
|
}
|
|
12146
12145
|
}, [sessionId]);
|
|
12147
|
-
var update = React.useCallback(function (data) {
|
|
12146
|
+
var update = React.useCallback(function (data, studentFullName) {
|
|
12148
12147
|
try {
|
|
12149
12148
|
var _temp7 = function _temp7() {
|
|
12150
12149
|
dispatch(marioCore.setLoading(false));
|
|
@@ -12154,7 +12153,7 @@ var useDetailSession = function useDetailSession() {
|
|
|
12154
12153
|
|
|
12155
12154
|
var _temp8 = _catch(function () {
|
|
12156
12155
|
return Promise.resolve(updateSession(parseInt(sessionId), data)).then(function (res) {
|
|
12157
|
-
!!res.data && history.push("/
|
|
12156
|
+
!!res.data && history.push("/my-one-to-one/up-coming?startDateReq=" + new Date(data.time) + "&studentNameReq=" + studentFullName);
|
|
12158
12157
|
});
|
|
12159
12158
|
}, function (err) {
|
|
12160
12159
|
var _err$response2, _err$response2$data;
|
|
@@ -13004,9 +13003,7 @@ var SessionDetail = function SessionDetail() {
|
|
|
13004
13003
|
var checkTimePast = moment(formatDate).isAfter(new Date());
|
|
13005
13004
|
return Promise.resolve(_catch(function () {
|
|
13006
13005
|
if (!checkTimePast) throw new Error("Invalid time");
|
|
13007
|
-
return Promise.resolve(update(data)).then(function () {
|
|
13008
|
-
history.push("/my-one-to-one/up-coming?startDateReq=" + new Date(data.time) + "&studentNameReq=" + studentFullName);
|
|
13009
|
-
});
|
|
13006
|
+
return Promise.resolve(update(data, studentFullName)).then(function () {});
|
|
13010
13007
|
}, function (error) {
|
|
13011
13008
|
dispatch(marioCore.setAlert({
|
|
13012
13009
|
type: "danger",
|