mario-core 2.9.186-plp → 2.9.187-plp
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 +94 -37
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +94 -37
- package/dist/index.modern.js.map +1 -1
- package/dist/services/accountService.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3650,7 +3650,9 @@ var lang_us = {
|
|
|
3650
3650
|
last_1_1_conversation: last_1_1_conversation,
|
|
3651
3651
|
student_has_started_this_conference_are_you_sure_to_delete: student_has_started_this_conference_are_you_sure_to_delete,
|
|
3652
3652
|
student_has_started_this_check_in_are_you_sure_to_delete: student_has_started_this_check_in_are_you_sure_to_delete,
|
|
3653
|
-
student_has_not_started_this_one_to_one_are_you_sure_to_delete: student_has_not_started_this_one_to_one_are_you_sure_to_delete
|
|
3653
|
+
student_has_not_started_this_one_to_one_are_you_sure_to_delete: student_has_not_started_this_one_to_one_are_you_sure_to_delete,
|
|
3654
|
+
"you_can_start_a_1-1_conversation_after_the_results_of_the_student's_check-in._If_the_check-in_is_24_hours_older,_you_can_request_the_new_check-in_or_start_the_conversation_by_viewing_the_results": "You can start a 1-1 conversation after the results of the student's check-in. If the check-in is 24 hours older, you can request the new check-in or start the conversation by viewing the results",
|
|
3655
|
+
"select_a_student_and_start_a_1-1_conversation_from_a_check-in_or_ask_the_student_to_check-in_before": "Select a student and start a 1-1 conversation from a check-in or ask the student to check-in before"
|
|
3654
3656
|
};
|
|
3655
3657
|
|
|
3656
3658
|
var dashboard$1 = "Dashboard";
|
|
@@ -7267,7 +7269,9 @@ var lang_uk = {
|
|
|
7267
7269
|
last_1_1_conversation: last_1_1_conversation$1,
|
|
7268
7270
|
student_has_started_this_conference_are_you_sure_to_delete: student_has_started_this_conference_are_you_sure_to_delete$1,
|
|
7269
7271
|
student_has_started_this_check_in_are_you_sure_to_delete: student_has_started_this_check_in_are_you_sure_to_delete$1,
|
|
7270
|
-
student_has_not_started_this_one_to_one_are_you_sure_to_delete: student_has_not_started_this_one_to_one_are_you_sure_to_delete$1
|
|
7272
|
+
student_has_not_started_this_one_to_one_are_you_sure_to_delete: student_has_not_started_this_one_to_one_are_you_sure_to_delete$1,
|
|
7273
|
+
"you_can_start_a_1-1_conversation_after_the_results_of_the_student's_check-in._If_the_check-in_is_24_hours_older,_you_can_request_the_new_check-in_or_start_the_conversation_by_viewing_the_results": "You can start a 1-1 conversation after the results of the student's check-in. If the check-in is 24 hours older, you can request the new check-in or start the conversation by viewing the results",
|
|
7274
|
+
"select_a_student_and_start_a_1-1_conversation_from_a_check-in_or_ask_the_student_to_check-in_before": "Select a student and start a 1-1 conversation from a check-in or ask the student to check-in before"
|
|
7271
7275
|
};
|
|
7272
7276
|
|
|
7273
7277
|
var dashboard$2 = "لوحة المعلومات";
|
|
@@ -10867,7 +10871,9 @@ var lang_ar = {
|
|
|
10867
10871
|
last_1_1_conversation: last_1_1_conversation$2,
|
|
10868
10872
|
student_has_started_this_conference_are_you_sure_to_delete: student_has_started_this_conference_are_you_sure_to_delete$2,
|
|
10869
10873
|
student_has_started_this_check_in_are_you_sure_to_delete: student_has_started_this_check_in_are_you_sure_to_delete$2,
|
|
10870
|
-
student_has_not_started_this_one_to_one_are_you_sure_to_delete: student_has_not_started_this_one_to_one_are_you_sure_to_delete$2
|
|
10874
|
+
student_has_not_started_this_one_to_one_are_you_sure_to_delete: student_has_not_started_this_one_to_one_are_you_sure_to_delete$2,
|
|
10875
|
+
"you_can_start_a_1-1_conversation_after_the_results_of_the_student's_check-in._If_the_check-in_is_24_hours_older,_you_can_request_the_new_check-in_or_start_the_conversation_by_viewing_the_results": "You can start a 1-1 conversation after the results of the student's check-in. If the check-in is 24 hours older, you can request the new check-in or start the conversation by viewing the results",
|
|
10876
|
+
"select_a_student_and_start_a_1-1_conversation_from_a_check-in_or_ask_the_student_to_check-in_before": "Select a student and start a 1-1 conversation from a check-in or ask the student to check-in before"
|
|
10871
10877
|
};
|
|
10872
10878
|
|
|
10873
10879
|
var dashboard$3 = "Panel de Control";
|
|
@@ -30004,6 +30010,9 @@ var apiUpload = axios.create({
|
|
|
30004
30010
|
var ACCOUNT_URL = BASE_URL + "/api/account";
|
|
30005
30011
|
var USER_URL = BASE_URL + "/api/user";
|
|
30006
30012
|
var TEACHER_URL = BASE_URL + "/api/teacher";
|
|
30013
|
+
var apiInforUserClassLink = function apiInforUserClassLink(data) {
|
|
30014
|
+
return api.post(BASE_URL + "/api/User/infor-user-classlink", data);
|
|
30015
|
+
};
|
|
30007
30016
|
var logIn = function logIn(data) {
|
|
30008
30017
|
return api.post(ACCOUNT_URL + "/login", data);
|
|
30009
30018
|
};
|
|
@@ -30095,6 +30104,9 @@ var useLogin = function useLogin() {
|
|
|
30095
30104
|
infoUser = _useState5[0],
|
|
30096
30105
|
setInfoUser = _useState5[1];
|
|
30097
30106
|
|
|
30107
|
+
var params = new URLSearchParams(location.search);
|
|
30108
|
+
var loginClassLink = params.get("type") === "classlink";
|
|
30109
|
+
var tokenClassLink = params.get("token");
|
|
30098
30110
|
var toggle = React.useCallback(function () {
|
|
30099
30111
|
setOpenLogin(!openLogin);
|
|
30100
30112
|
}, [openLogin]);
|
|
@@ -30109,8 +30121,13 @@ var useLogin = function useLogin() {
|
|
|
30109
30121
|
if (!!token) history.push("/");
|
|
30110
30122
|
getInfoGoogle();
|
|
30111
30123
|
}, []);
|
|
30112
|
-
|
|
30113
|
-
|
|
30124
|
+
React.useEffect(function () {
|
|
30125
|
+
if (loginClassLink && tokenClassLink != "") {
|
|
30126
|
+
loginAccountClassLink();
|
|
30127
|
+
}
|
|
30128
|
+
}, []);
|
|
30129
|
+
|
|
30130
|
+
var loginAccountClassLink = function loginAccountClassLink() {
|
|
30114
30131
|
try {
|
|
30115
30132
|
var _temp3 = function _temp3() {
|
|
30116
30133
|
dispatch(setLoading(false));
|
|
@@ -30119,21 +30136,61 @@ var useLogin = function useLogin() {
|
|
|
30119
30136
|
dispatch(setLoading(true));
|
|
30120
30137
|
|
|
30121
30138
|
var _temp4 = _catch(function () {
|
|
30139
|
+
var data = {
|
|
30140
|
+
tokenClassLink: tokenClassLink
|
|
30141
|
+
};
|
|
30142
|
+
return Promise.resolve(apiInforUserClassLink(data)).then(function (res) {
|
|
30143
|
+
var _res$data = res.data,
|
|
30144
|
+
email = _res$data.email,
|
|
30145
|
+
token = _res$data.token;
|
|
30146
|
+
var dataUser = {
|
|
30147
|
+
email: email,
|
|
30148
|
+
rememberMe: false,
|
|
30149
|
+
password: "default",
|
|
30150
|
+
accessToken: token
|
|
30151
|
+
};
|
|
30152
|
+
return Promise.resolve(userLogin(dataUser)).then(function () {});
|
|
30153
|
+
});
|
|
30154
|
+
}, function (err) {
|
|
30155
|
+
var _err$response, _err$response$data;
|
|
30156
|
+
|
|
30157
|
+
dispatch(setAlert({
|
|
30158
|
+
type: "danger",
|
|
30159
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
|
|
30160
|
+
}));
|
|
30161
|
+
});
|
|
30162
|
+
|
|
30163
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
30164
|
+
} catch (e) {
|
|
30165
|
+
return Promise.reject(e);
|
|
30166
|
+
}
|
|
30167
|
+
};
|
|
30168
|
+
|
|
30169
|
+
var isDistrict = window.location.host.includes("-district");
|
|
30170
|
+
var userLogin = React.useCallback(function (data) {
|
|
30171
|
+
try {
|
|
30172
|
+
var _temp7 = function _temp7() {
|
|
30173
|
+
dispatch(setLoading(false));
|
|
30174
|
+
};
|
|
30175
|
+
|
|
30176
|
+
dispatch(setLoading(true));
|
|
30177
|
+
|
|
30178
|
+
var _temp8 = _catch(function () {
|
|
30122
30179
|
var _data$email, _data$password;
|
|
30123
30180
|
|
|
30124
30181
|
return Promise.resolve(logIn(_extends({}, data, {
|
|
30125
30182
|
email: data === null || data === void 0 ? void 0 : (_data$email = data.email) === null || _data$email === void 0 ? void 0 : _data$email.trim(),
|
|
30126
30183
|
password: data === null || data === void 0 ? void 0 : (_data$password = data.password) === null || _data$password === void 0 ? void 0 : _data$password.trim()
|
|
30127
30184
|
}))).then(function (res) {
|
|
30128
|
-
var _res$
|
|
30129
|
-
token = _res$
|
|
30130
|
-
id = _res$
|
|
30131
|
-
firstName = _res$
|
|
30132
|
-
lastName = _res$
|
|
30133
|
-
roles = _res$
|
|
30134
|
-
email = _res$
|
|
30135
|
-
profileImageFileName = _res$
|
|
30136
|
-
isLoginFirst = _res$
|
|
30185
|
+
var _res$data2 = res.data,
|
|
30186
|
+
token = _res$data2.token,
|
|
30187
|
+
id = _res$data2.id,
|
|
30188
|
+
firstName = _res$data2.firstName,
|
|
30189
|
+
lastName = _res$data2.lastName,
|
|
30190
|
+
roles = _res$data2.roles,
|
|
30191
|
+
email = _res$data2.email,
|
|
30192
|
+
profileImageFileName = _res$data2.profileImageFileName,
|
|
30193
|
+
isLoginFirst = _res$data2.isLoginFirst;
|
|
30137
30194
|
localStorage.setItem(ACCESS_TOKEN, token);
|
|
30138
30195
|
localStorage.removeItem(NOTIFICATION_ALERT_KEY);
|
|
30139
30196
|
dispatch(setUser({
|
|
@@ -30191,16 +30248,16 @@ var useLogin = function useLogin() {
|
|
|
30191
30248
|
}
|
|
30192
30249
|
});
|
|
30193
30250
|
}, function (err) {
|
|
30194
|
-
var _err$
|
|
30251
|
+
var _err$response2, _err$response2$data;
|
|
30195
30252
|
|
|
30196
30253
|
dispatch(setAlert({
|
|
30197
30254
|
type: "danger",
|
|
30198
|
-
message: ((_err$
|
|
30255
|
+
message: ((_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : _err$response2$data.title) || err.message || "Login failed"
|
|
30199
30256
|
}));
|
|
30200
30257
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
30201
30258
|
});
|
|
30202
30259
|
|
|
30203
|
-
return Promise.resolve(
|
|
30260
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
|
|
30204
30261
|
} catch (e) {
|
|
30205
30262
|
return Promise.reject(e);
|
|
30206
30263
|
}
|
|
@@ -30208,21 +30265,21 @@ var useLogin = function useLogin() {
|
|
|
30208
30265
|
|
|
30209
30266
|
var getInfoGoogle = function getInfoGoogle() {
|
|
30210
30267
|
try {
|
|
30211
|
-
var
|
|
30268
|
+
var _temp10 = _catch(function () {
|
|
30212
30269
|
return Promise.resolve(getGoogleClientId()).then(function (res) {
|
|
30213
30270
|
setGoogleClientId(res.data.googleClientId);
|
|
30214
30271
|
setGoogleRecaptchaId(res.data.googleCaptchaId);
|
|
30215
30272
|
});
|
|
30216
30273
|
}, function (err) {
|
|
30217
|
-
var _err$
|
|
30274
|
+
var _err$response3, _err$response3$data;
|
|
30218
30275
|
|
|
30219
30276
|
dispatch(setAlert({
|
|
30220
30277
|
type: "danger",
|
|
30221
|
-
message: ((_err$
|
|
30278
|
+
message: ((_err$response3 = err.response) === null || _err$response3 === void 0 ? void 0 : (_err$response3$data = _err$response3.data) === null || _err$response3$data === void 0 ? void 0 : _err$response3$data.title) || err.message || "Login failed"
|
|
30222
30279
|
}));
|
|
30223
30280
|
});
|
|
30224
30281
|
|
|
30225
|
-
return Promise.resolve(
|
|
30282
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {}) : void 0);
|
|
30226
30283
|
} catch (e) {
|
|
30227
30284
|
return Promise.reject(e);
|
|
30228
30285
|
}
|
|
@@ -30230,17 +30287,17 @@ var useLogin = function useLogin() {
|
|
|
30230
30287
|
|
|
30231
30288
|
var fnIsCheckLogin = React.useCallback(function (data, token, clickHandler) {
|
|
30232
30289
|
try {
|
|
30233
|
-
var
|
|
30290
|
+
var _temp14 = function _temp14() {
|
|
30234
30291
|
dispatch(setLoading(false));
|
|
30235
30292
|
};
|
|
30236
30293
|
|
|
30237
30294
|
dispatch(setLoading(true));
|
|
30238
30295
|
|
|
30239
|
-
var
|
|
30296
|
+
var _temp15 = _catch(function () {
|
|
30240
30297
|
return Promise.resolve(checkUserGoogle(data)).then(function (res) {
|
|
30241
30298
|
var checkUser = res.data;
|
|
30242
30299
|
|
|
30243
|
-
var
|
|
30300
|
+
var _temp11 = function () {
|
|
30244
30301
|
if (checkUser) {
|
|
30245
30302
|
return Promise.resolve(clickHandler()).then(function (clickHandlerRes) {
|
|
30246
30303
|
var dataUser = {
|
|
@@ -30260,18 +30317,18 @@ var useLogin = function useLogin() {
|
|
|
30260
30317
|
}
|
|
30261
30318
|
}();
|
|
30262
30319
|
|
|
30263
|
-
if (
|
|
30320
|
+
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
|
30264
30321
|
});
|
|
30265
30322
|
}, function (err) {
|
|
30266
|
-
var _err$
|
|
30323
|
+
var _err$response4, _err$response4$data;
|
|
30267
30324
|
|
|
30268
30325
|
dispatch(setAlert({
|
|
30269
30326
|
type: "danger",
|
|
30270
|
-
message: ((_err$
|
|
30327
|
+
message: ((_err$response4 = err.response) === null || _err$response4 === void 0 ? void 0 : (_err$response4$data = _err$response4.data) === null || _err$response4$data === void 0 ? void 0 : _err$response4$data.title) || err.message || "Login failed"
|
|
30271
30328
|
}));
|
|
30272
30329
|
});
|
|
30273
30330
|
|
|
30274
|
-
return Promise.resolve(
|
|
30331
|
+
return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(_temp14) : _temp14(_temp15));
|
|
30275
30332
|
} catch (e) {
|
|
30276
30333
|
return Promise.reject(e);
|
|
30277
30334
|
}
|
|
@@ -30279,14 +30336,14 @@ var useLogin = function useLogin() {
|
|
|
30279
30336
|
|
|
30280
30337
|
var submitLogin = function submitLogin(teacherId, clickHandler) {
|
|
30281
30338
|
try {
|
|
30282
|
-
var
|
|
30339
|
+
var _temp19 = function _temp19() {
|
|
30283
30340
|
setIsLoginGoogle(false);
|
|
30284
30341
|
dispatch(setLoading(false));
|
|
30285
30342
|
};
|
|
30286
30343
|
|
|
30287
30344
|
dispatch(setLoading(true));
|
|
30288
30345
|
|
|
30289
|
-
var
|
|
30346
|
+
var _temp20 = _catch(function () {
|
|
30290
30347
|
var data = {
|
|
30291
30348
|
firstName: infoUser.firstName,
|
|
30292
30349
|
lastName: infoUser.lastName,
|
|
@@ -30297,7 +30354,7 @@ var useLogin = function useLogin() {
|
|
|
30297
30354
|
teacherId: teacherId
|
|
30298
30355
|
};
|
|
30299
30356
|
return Promise.resolve(registerUserStudent(data)).then(function (res) {
|
|
30300
|
-
var
|
|
30357
|
+
var _temp16 = function () {
|
|
30301
30358
|
if (res.data) {
|
|
30302
30359
|
return Promise.resolve(clickHandler()).then(function (clickHandlerRes) {
|
|
30303
30360
|
var dataLogin = {
|
|
@@ -30316,18 +30373,18 @@ var useLogin = function useLogin() {
|
|
|
30316
30373
|
}
|
|
30317
30374
|
}();
|
|
30318
30375
|
|
|
30319
|
-
if (
|
|
30376
|
+
if (_temp16 && _temp16.then) return _temp16.then(function () {});
|
|
30320
30377
|
});
|
|
30321
30378
|
}, function (err) {
|
|
30322
|
-
var _err$
|
|
30379
|
+
var _err$response5, _err$response5$data;
|
|
30323
30380
|
|
|
30324
30381
|
dispatch(setAlert({
|
|
30325
30382
|
type: "danger",
|
|
30326
|
-
message: ((_err$
|
|
30383
|
+
message: ((_err$response5 = err.response) === null || _err$response5 === void 0 ? void 0 : (_err$response5$data = _err$response5.data) === null || _err$response5$data === void 0 ? void 0 : _err$response5$data.title) || err.message || "Login failed"
|
|
30327
30384
|
}));
|
|
30328
30385
|
});
|
|
30329
30386
|
|
|
30330
|
-
return Promise.resolve(
|
|
30387
|
+
return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(_temp19) : _temp19(_temp20));
|
|
30331
30388
|
} catch (e) {
|
|
30332
30389
|
return Promise.reject(e);
|
|
30333
30390
|
}
|
|
@@ -30335,7 +30392,7 @@ var useLogin = function useLogin() {
|
|
|
30335
30392
|
|
|
30336
30393
|
var getInformationSetting = function getInformationSetting() {
|
|
30337
30394
|
try {
|
|
30338
|
-
var
|
|
30395
|
+
var _temp22 = _catch(function () {
|
|
30339
30396
|
return Promise.resolve(getSchoolSettings()).then(function (res) {
|
|
30340
30397
|
dispatch(setSandboxMode(res.data.isSandboxMode));
|
|
30341
30398
|
});
|
|
@@ -30343,7 +30400,7 @@ var useLogin = function useLogin() {
|
|
|
30343
30400
|
console.error(err);
|
|
30344
30401
|
});
|
|
30345
30402
|
|
|
30346
|
-
return Promise.resolve(
|
|
30403
|
+
return Promise.resolve(_temp22 && _temp22.then ? _temp22.then(function () {}) : void 0);
|
|
30347
30404
|
} catch (e) {
|
|
30348
30405
|
return Promise.reject(e);
|
|
30349
30406
|
}
|