mario-core 2.9.238-release → 2.9.240-release
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/Login/constant/types.d.ts +4 -0
- package/dist/containers/Login/hooks/useLogin.d.ts +3 -1
- package/dist/containers/Login/views/block/BlockForgetPassword.d.ts +5 -1
- package/dist/containers/Login/views/block/BlockLogin.d.ts +2 -0
- package/dist/index.css +203 -65
- package/dist/index.d.ts +2 -2
- package/dist/index.js +221 -123
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +222 -125
- package/dist/index.modern.js.map +1 -1
- package/dist/services/schoolService.d.ts +1 -0
- package/dist/utils/constants.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1988,6 +1988,7 @@ var suggestion = "suggestion";
|
|
|
1988
1988
|
var tutorial_screen = "tutorial screen";
|
|
1989
1989
|
var reflection_forms = "reflection forms";
|
|
1990
1990
|
var select_question_to_add = "Select question to add";
|
|
1991
|
+
var all_of_the_students_marked_as_feeling_safe = "All of the students marked as feeling safe";
|
|
1991
1992
|
var lang_us = {
|
|
1992
1993
|
dashboard: dashboard,
|
|
1993
1994
|
user: user,
|
|
@@ -3972,7 +3973,8 @@ var lang_us = {
|
|
|
3972
3973
|
suggestion: suggestion,
|
|
3973
3974
|
tutorial_screen: tutorial_screen,
|
|
3974
3975
|
reflection_forms: reflection_forms,
|
|
3975
|
-
select_question_to_add: select_question_to_add
|
|
3976
|
+
select_question_to_add: select_question_to_add,
|
|
3977
|
+
all_of_the_students_marked_as_feeling_safe: all_of_the_students_marked_as_feeling_safe
|
|
3976
3978
|
};
|
|
3977
3979
|
|
|
3978
3980
|
var dashboard$1 = "Dashboard";
|
|
@@ -5923,6 +5925,7 @@ var suggestion$1 = "suggestion";
|
|
|
5923
5925
|
var tutorial_screen$1 = "tutorial screen";
|
|
5924
5926
|
var reflection_forms$1 = "reflection forms";
|
|
5925
5927
|
var select_question_to_add$1 = "Select question to add";
|
|
5928
|
+
var all_of_the_students_marked_as_feeling_safe$1 = "All of the students marked as feeling safe";
|
|
5926
5929
|
var lang_uk = {
|
|
5927
5930
|
dashboard: dashboard$1,
|
|
5928
5931
|
user: user$1,
|
|
@@ -7907,7 +7910,8 @@ var lang_uk = {
|
|
|
7907
7910
|
suggestion: suggestion$1,
|
|
7908
7911
|
tutorial_screen: tutorial_screen$1,
|
|
7909
7912
|
reflection_forms: reflection_forms$1,
|
|
7910
|
-
select_question_to_add: select_question_to_add$1
|
|
7913
|
+
select_question_to_add: select_question_to_add$1,
|
|
7914
|
+
all_of_the_students_marked_as_feeling_safe: all_of_the_students_marked_as_feeling_safe$1
|
|
7911
7915
|
};
|
|
7912
7916
|
|
|
7913
7917
|
var dashboard$2 = "لوحة المعلومات";
|
|
@@ -19628,6 +19632,7 @@ var GOOGLE_RECAPTCHA_KEY = "6LfNtLUaAAAAAL24lbBV11jS-gBtt1mhtxb4NXs0";
|
|
|
19628
19632
|
var INIT_AMPLITUDE_KEY_PROD = "860fa99c52ae79d98e904b4c862ddaac";
|
|
19629
19633
|
var INIT_AMPLITUDE_KEY_STAGE = "adf89d0ed9b0d5fcc0d1bcfd535345dc";
|
|
19630
19634
|
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
|
19635
|
+
var IS_USER_SESSION_BROWSER = "IS_USER_SESSION_BROWSER";
|
|
19631
19636
|
var DEFAULT_PAGE_SIZE_VALUES = [{
|
|
19632
19637
|
label: "10",
|
|
19633
19638
|
value: 10
|
|
@@ -19824,7 +19829,7 @@ function _catch(body, recover) {
|
|
|
19824
19829
|
return result;
|
|
19825
19830
|
}
|
|
19826
19831
|
|
|
19827
|
-
var styles = {"btn-login-google":"_2HqmH","notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","digital-privacy-icon":"_141p1","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","descriptions-icon":"_3SOdX","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","form-user-name":"_39BJD","input":"_ozRAq","checkbox-remember":"_2K9b2","btn-rounder":"_2VvIr","btn-active":"_2A0HF","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","bg-animate":"_30npl","active":"_3oAH-","show":"_16rY4","fade-in":"_26nbh","behind":"_3A7Vv","login":"_F-hjL","login-content":"_149oA","logo-home":"_24U3W","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","box-sidebar":"_2vcmv","sidebar-logo":"_1hXpy","sidebar-nav-links":"_3vb3s","c-active":"_36jSM","sidebar-nav-links-hover":"_DNrus","box-sidebar-header":"_3NEZj","box-logout":"_1wUDG","sidebar-btn-minimized":"_1S7Px","sidebar-minimized-logo":"_3846X","sidebar-logout":"_2P85D","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","popover__sort__item":"_1ocBa","popover__sort__item--active":"_18NhM","popover__search__icon":"_2bquW","popover__search__input":"_3A4G4","popover__options":"_1MsEW","button-export":"_2rTzM","button-content":"_18y0w","button-icon":"_3cZAT","hide-in-mobile":"_1INnO","hamburger-menu":"_2yRc8","box-content-home-page":"_ABUIP","collapse-box":"_WX97m","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5","item-select-role":"_1KcY7","item-role-active":"_dOVso","model-switch-roles":"_3ZqxI","title":"_g-p72","btn-login-with-sso":"_DrSlA","app-alert":"_3Vgah","app-alert--success":"_1jraB"};
|
|
19832
|
+
var styles = {"btn-login-google":"_2HqmH","notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","school-icon":"_2OUwW","school-name":"_2Owso","login-description":"_fx-kA","digital-privacy-icon":"_141p1","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","privacy-policy":"_I4SVu","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","descriptions-icon":"_3SOdX","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","checkbox-keep-login":"_1AiX0","label-keep-login":"_2uNvW","option-text":"_pqn4y","form-user-name":"_39BJD","input":"_ozRAq","checkbox-remember":"_2K9b2","btn-rounder":"_2VvIr","btn-active":"_2A0HF","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","bg-animate":"_30npl","active":"_3oAH-","show":"_16rY4","fade-in":"_26nbh","behind":"_3A7Vv","login":"_F-hjL","login-content":"_149oA","logo-home":"_24U3W","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","box-sidebar":"_2vcmv","sidebar-logo":"_1hXpy","sidebar-nav-links":"_3vb3s","c-active":"_36jSM","sidebar-nav-links-hover":"_DNrus","box-sidebar-header":"_3NEZj","box-logout":"_1wUDG","sidebar-btn-minimized":"_1S7Px","sidebar-minimized-logo":"_3846X","sidebar-logout":"_2P85D","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","popover__sort__item":"_1ocBa","popover__sort__item--active":"_18NhM","popover__search__icon":"_2bquW","popover__search__input":"_3A4G4","popover__options":"_1MsEW","button-export":"_2rTzM","button-content":"_18y0w","button-icon":"_3cZAT","hide-in-mobile":"_1INnO","hamburger-menu":"_2yRc8","box-content-home-page":"_ABUIP","collapse-box":"_WX97m","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5","item-select-role":"_1KcY7","item-role-active":"_dOVso","model-switch-roles":"_3ZqxI","title":"_g-p72","btn-login-with-sso":"_DrSlA","app-alert":"_3Vgah","app-alert--success":"_1jraB"};
|
|
19828
19833
|
|
|
19829
19834
|
var style = {
|
|
19830
19835
|
fontSize: "0.85rem"
|
|
@@ -37046,13 +37051,14 @@ var containerStyle = {
|
|
|
37046
37051
|
position: "relative"
|
|
37047
37052
|
};
|
|
37048
37053
|
var inputStyle = {
|
|
37049
|
-
backgroundColor: "#
|
|
37054
|
+
backgroundColor: "#ffffff",
|
|
37050
37055
|
paddingRight: "50px"
|
|
37051
37056
|
};
|
|
37052
37057
|
var eyeIconStyle = {
|
|
37053
37058
|
fontSize: "20px",
|
|
37054
37059
|
position: "absolute",
|
|
37055
|
-
right: "10px"
|
|
37060
|
+
right: "10px",
|
|
37061
|
+
color: "#316CD9"
|
|
37056
37062
|
};
|
|
37057
37063
|
|
|
37058
37064
|
var PasswordInput = function PasswordInput(_ref) {
|
|
@@ -37163,7 +37169,8 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
37163
37169
|
|
|
37164
37170
|
var getAccessToken = (function () {
|
|
37165
37171
|
try {
|
|
37166
|
-
|
|
37172
|
+
var isSessionUserBrowser = sessionStorage.getItem(IS_USER_SESSION_BROWSER);
|
|
37173
|
+
return !isSessionUserBrowser ? localStorage.getItem(ACCESS_TOKEN) : sessionStorage.getItem(ACCESS_TOKEN);
|
|
37167
37174
|
} catch (err) {
|
|
37168
37175
|
return null;
|
|
37169
37176
|
}
|
|
@@ -37261,6 +37268,8 @@ var apiUpload = axios.create({
|
|
|
37261
37268
|
}
|
|
37262
37269
|
|
|
37263
37270
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
37271
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
37272
|
+
sessionStorage.removeItem(IS_USER_SESSION_BROWSER);
|
|
37264
37273
|
localStorage.removeItem("USER_EMAIL");
|
|
37265
37274
|
localStorage.removeItem("ROLES");
|
|
37266
37275
|
window.location.href = "/login";
|
|
@@ -37339,6 +37348,9 @@ var SCHOOL_URL = BASE_URL + "/api/school";
|
|
|
37339
37348
|
var getSchoolSettings = function getSchoolSettings() {
|
|
37340
37349
|
return api.get(SCHOOL_URL + "/settings");
|
|
37341
37350
|
};
|
|
37351
|
+
var getInfo$1 = function getInfo() {
|
|
37352
|
+
return api.get(SCHOOL_URL + "/info");
|
|
37353
|
+
};
|
|
37342
37354
|
|
|
37343
37355
|
var TypeLogin;
|
|
37344
37356
|
|
|
@@ -37398,11 +37410,13 @@ var msalConfig = {
|
|
|
37398
37410
|
}
|
|
37399
37411
|
};
|
|
37400
37412
|
|
|
37413
|
+
var _sessionStorage$getIt;
|
|
37401
37414
|
var defaultInfo = {
|
|
37402
37415
|
email: "",
|
|
37403
37416
|
password: "",
|
|
37404
37417
|
captcha: "",
|
|
37405
|
-
rememberMe: false
|
|
37418
|
+
rememberMe: false,
|
|
37419
|
+
isSessionUserBrowser: (_sessionStorage$getIt = !!sessionStorage.getItem(IS_USER_SESSION_BROWSER)) != null ? _sessionStorage$getIt : false
|
|
37406
37420
|
};
|
|
37407
37421
|
var HOMEPAGE_TEACHER = "/home";
|
|
37408
37422
|
var HOMEPAGE_STUDENT = "/home";
|
|
@@ -37442,17 +37456,24 @@ var useLogin = function useLogin() {
|
|
|
37442
37456
|
var _useState4 = React.useState(false),
|
|
37443
37457
|
openModelAssign = _useState4[0];
|
|
37444
37458
|
|
|
37445
|
-
var _useState5 = React.useState(
|
|
37446
|
-
|
|
37447
|
-
|
|
37459
|
+
var _useState5 = React.useState({
|
|
37460
|
+
schoolName: "",
|
|
37461
|
+
schoolLogo: ""
|
|
37462
|
+
}),
|
|
37463
|
+
school = _useState5[0],
|
|
37464
|
+
setSchool = _useState5[1];
|
|
37465
|
+
|
|
37466
|
+
var _useState6 = React.useState(),
|
|
37467
|
+
msalInstance = _useState6[0],
|
|
37468
|
+
setMsalInstance = _useState6[1];
|
|
37448
37469
|
|
|
37449
37470
|
var toggle = React.useCallback(function () {
|
|
37450
37471
|
setOpenLogin(!openLogin);
|
|
37451
37472
|
}, [openLogin]);
|
|
37452
37473
|
|
|
37453
|
-
var
|
|
37454
|
-
isShowPassword =
|
|
37455
|
-
setIsShowPassword =
|
|
37474
|
+
var _useState7 = React.useState(false),
|
|
37475
|
+
isShowPassword = _useState7[0],
|
|
37476
|
+
setIsShowPassword = _useState7[1];
|
|
37456
37477
|
|
|
37457
37478
|
React.useEffect(function () {
|
|
37458
37479
|
document.title = TITLE;
|
|
@@ -37463,6 +37484,7 @@ var useLogin = function useLogin() {
|
|
|
37463
37484
|
|
|
37464
37485
|
var handleCancelModelAssign = function handleCancelModelAssign() {
|
|
37465
37486
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
37487
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
37466
37488
|
localStorage.removeItem("USER_EMAIL");
|
|
37467
37489
|
};
|
|
37468
37490
|
|
|
@@ -37512,7 +37534,7 @@ var useLogin = function useLogin() {
|
|
|
37512
37534
|
};
|
|
37513
37535
|
|
|
37514
37536
|
var isDistrict = window.location.host.includes("-district");
|
|
37515
|
-
var
|
|
37537
|
+
var getSchoolInfo = React.useCallback(function () {
|
|
37516
37538
|
try {
|
|
37517
37539
|
var _temp7 = function _temp7() {
|
|
37518
37540
|
dispatch(setLoading(false));
|
|
@@ -37521,8 +37543,37 @@ var useLogin = function useLogin() {
|
|
|
37521
37543
|
dispatch(setLoading(true));
|
|
37522
37544
|
|
|
37523
37545
|
var _temp8 = _catch(function () {
|
|
37524
|
-
|
|
37546
|
+
return Promise.resolve(getInfo$1()).then(function (res) {
|
|
37547
|
+
if (!!res.data) {
|
|
37548
|
+
setSchool(res.data);
|
|
37549
|
+
}
|
|
37550
|
+
});
|
|
37551
|
+
}, function (err) {
|
|
37552
|
+
var _err$response2, _err$response2$data;
|
|
37553
|
+
|
|
37554
|
+
dispatch(setAlert({
|
|
37555
|
+
type: "danger",
|
|
37556
|
+
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
|
|
37557
|
+
}));
|
|
37558
|
+
});
|
|
37559
|
+
|
|
37560
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
|
|
37561
|
+
} catch (e) {
|
|
37562
|
+
return Promise.reject(e);
|
|
37563
|
+
}
|
|
37564
|
+
}, []);
|
|
37565
|
+
var userLogin = React.useCallback(function (data) {
|
|
37566
|
+
try {
|
|
37567
|
+
var _temp11 = function _temp11() {
|
|
37568
|
+
dispatch(setLoading(false));
|
|
37569
|
+
};
|
|
37570
|
+
|
|
37571
|
+
dispatch(setLoading(true));
|
|
37525
37572
|
|
|
37573
|
+
var _temp12 = _catch(function () {
|
|
37574
|
+
var _data$isSessionUserBr, _data$email, _data$password;
|
|
37575
|
+
|
|
37576
|
+
var isSessionUserBrowser = (_data$isSessionUserBr = data === null || data === void 0 ? void 0 : data.isSessionUserBrowser) != null ? _data$isSessionUserBr : false;
|
|
37526
37577
|
return Promise.resolve(logIn(_extends({}, data, {
|
|
37527
37578
|
email: data === null || data === void 0 ? void 0 : (_data$email = data.email) === null || _data$email === void 0 ? void 0 : _data$email.trim(),
|
|
37528
37579
|
password: data === null || data === void 0 ? void 0 : (_data$password = data.password) === null || _data$password === void 0 ? void 0 : _data$password.trim()
|
|
@@ -37536,7 +37587,15 @@ var useLogin = function useLogin() {
|
|
|
37536
37587
|
email = _res$data2.email,
|
|
37537
37588
|
profileImageFileName = _res$data2.profileImageFileName,
|
|
37538
37589
|
isLoginFirst = _res$data2.isLoginFirst;
|
|
37539
|
-
|
|
37590
|
+
|
|
37591
|
+
if (!isSessionUserBrowser) {
|
|
37592
|
+
sessionStorage.removeItem(IS_USER_SESSION_BROWSER);
|
|
37593
|
+
localStorage.setItem(ACCESS_TOKEN, token);
|
|
37594
|
+
} else {
|
|
37595
|
+
sessionStorage.setItem(ACCESS_TOKEN, token);
|
|
37596
|
+
sessionStorage.setItem(IS_USER_SESSION_BROWSER, isSessionUserBrowser);
|
|
37597
|
+
}
|
|
37598
|
+
|
|
37540
37599
|
localStorage.removeItem(NOTIFICATION_ALERT_KEY);
|
|
37541
37600
|
dispatch(setUser({
|
|
37542
37601
|
id: id,
|
|
@@ -37597,16 +37656,17 @@ var useLogin = function useLogin() {
|
|
|
37597
37656
|
}
|
|
37598
37657
|
});
|
|
37599
37658
|
}, function (err) {
|
|
37600
|
-
var _err$
|
|
37659
|
+
var _err$response3, _err$response3$data;
|
|
37601
37660
|
|
|
37602
37661
|
dispatch(setAlert({
|
|
37603
37662
|
type: "danger",
|
|
37604
|
-
message: ((_err$
|
|
37663
|
+
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"
|
|
37605
37664
|
}));
|
|
37606
37665
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
37666
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
37607
37667
|
});
|
|
37608
37668
|
|
|
37609
|
-
return Promise.resolve(
|
|
37669
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12));
|
|
37610
37670
|
} catch (e) {
|
|
37611
37671
|
return Promise.reject(e);
|
|
37612
37672
|
}
|
|
@@ -37614,21 +37674,21 @@ var useLogin = function useLogin() {
|
|
|
37614
37674
|
|
|
37615
37675
|
var getInfoGoogle = function getInfoGoogle() {
|
|
37616
37676
|
try {
|
|
37617
|
-
var
|
|
37677
|
+
var _temp14 = _catch(function () {
|
|
37618
37678
|
return Promise.resolve(getGoogleClientId()).then(function (res) {
|
|
37619
37679
|
setGoogleClientId(res.data.googleClientId);
|
|
37620
37680
|
setGoogleRecaptchaId(res.data.googleCaptchaId);
|
|
37621
37681
|
});
|
|
37622
37682
|
}, function (err) {
|
|
37623
|
-
var _err$
|
|
37683
|
+
var _err$response4, _err$response4$data;
|
|
37624
37684
|
|
|
37625
37685
|
dispatch(setAlert({
|
|
37626
37686
|
type: "danger",
|
|
37627
|
-
message: ((_err$
|
|
37687
|
+
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"
|
|
37628
37688
|
}));
|
|
37629
37689
|
});
|
|
37630
37690
|
|
|
37631
|
-
return Promise.resolve(
|
|
37691
|
+
return Promise.resolve(_temp14 && _temp14.then ? _temp14.then(function () {}) : void 0);
|
|
37632
37692
|
} catch (e) {
|
|
37633
37693
|
return Promise.reject(e);
|
|
37634
37694
|
}
|
|
@@ -37636,19 +37696,19 @@ var useLogin = function useLogin() {
|
|
|
37636
37696
|
|
|
37637
37697
|
var fnIsCheckLogin = React.useCallback(function (type, data, token, clickHandler) {
|
|
37638
37698
|
try {
|
|
37639
|
-
var
|
|
37699
|
+
var _temp20 = function _temp20() {
|
|
37640
37700
|
dispatch(setLoading(false));
|
|
37641
37701
|
};
|
|
37642
37702
|
|
|
37643
37703
|
dispatch(setLoading(true));
|
|
37644
37704
|
|
|
37645
|
-
var
|
|
37705
|
+
var _temp21 = _catch(function () {
|
|
37646
37706
|
return Promise.resolve(checkUserGoogle(type, data)).then(function (res) {
|
|
37647
37707
|
var checkUser = res.data;
|
|
37648
37708
|
|
|
37649
|
-
var
|
|
37709
|
+
var _temp17 = function () {
|
|
37650
37710
|
if (checkUser) {
|
|
37651
|
-
var
|
|
37711
|
+
var _temp22 = function _temp22() {
|
|
37652
37712
|
return Promise.resolve(userLogin(_dataUser)).then(function () {
|
|
37653
37713
|
dispatch(setIsLoginGoogle(false));
|
|
37654
37714
|
});
|
|
@@ -37664,7 +37724,7 @@ var useLogin = function useLogin() {
|
|
|
37664
37724
|
loginType: LoginType.Google
|
|
37665
37725
|
};
|
|
37666
37726
|
|
|
37667
|
-
var
|
|
37727
|
+
var _temp23 = function () {
|
|
37668
37728
|
if (clickHandler != null) {
|
|
37669
37729
|
return Promise.resolve(clickHandler()).then(function (clickHandlerRes) {
|
|
37670
37730
|
_dataUser.captcha = clickHandlerRes;
|
|
@@ -37672,24 +37732,24 @@ var useLogin = function useLogin() {
|
|
|
37672
37732
|
}
|
|
37673
37733
|
}();
|
|
37674
37734
|
|
|
37675
|
-
return
|
|
37735
|
+
return _temp23 && _temp23.then ? _temp23.then(_temp22) : _temp22(_temp23);
|
|
37676
37736
|
} else {
|
|
37677
37737
|
dispatch(setIsLoginGoogle(true));
|
|
37678
37738
|
}
|
|
37679
37739
|
}();
|
|
37680
37740
|
|
|
37681
|
-
if (
|
|
37741
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
|
37682
37742
|
});
|
|
37683
37743
|
}, function (err) {
|
|
37684
|
-
var _err$
|
|
37744
|
+
var _err$response5, _err$response5$data;
|
|
37685
37745
|
|
|
37686
37746
|
dispatch(setAlert({
|
|
37687
37747
|
type: "danger",
|
|
37688
|
-
message: ((_err$
|
|
37748
|
+
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"
|
|
37689
37749
|
}));
|
|
37690
37750
|
});
|
|
37691
37751
|
|
|
37692
|
-
return Promise.resolve(
|
|
37752
|
+
return Promise.resolve(_temp21 && _temp21.then ? _temp21.then(_temp20) : _temp20(_temp21));
|
|
37693
37753
|
} catch (e) {
|
|
37694
37754
|
return Promise.reject(e);
|
|
37695
37755
|
}
|
|
@@ -37697,14 +37757,14 @@ var useLogin = function useLogin() {
|
|
|
37697
37757
|
|
|
37698
37758
|
var submitLogin = function submitLogin(teacherId, clickHandler) {
|
|
37699
37759
|
try {
|
|
37700
|
-
var
|
|
37760
|
+
var _temp27 = function _temp27() {
|
|
37701
37761
|
dispatch(setIsLoginGoogle(false));
|
|
37702
37762
|
dispatch(setLoading(false));
|
|
37703
37763
|
};
|
|
37704
37764
|
|
|
37705
37765
|
dispatch(setLoading(true));
|
|
37706
37766
|
|
|
37707
|
-
var
|
|
37767
|
+
var _temp28 = _catch(function () {
|
|
37708
37768
|
var data = {
|
|
37709
37769
|
firstName: infoUser.firstName,
|
|
37710
37770
|
lastName: infoUser.lastName,
|
|
@@ -37715,7 +37775,7 @@ var useLogin = function useLogin() {
|
|
|
37715
37775
|
teacherId: teacherId
|
|
37716
37776
|
};
|
|
37717
37777
|
return Promise.resolve(registerUserStudent(data)).then(function (res) {
|
|
37718
|
-
var
|
|
37778
|
+
var _temp24 = function () {
|
|
37719
37779
|
if (res.data) {
|
|
37720
37780
|
return Promise.resolve(clickHandler()).then(function (clickHandlerRes) {
|
|
37721
37781
|
var dataLogin = {
|
|
@@ -37735,18 +37795,18 @@ var useLogin = function useLogin() {
|
|
|
37735
37795
|
}
|
|
37736
37796
|
}();
|
|
37737
37797
|
|
|
37738
|
-
if (
|
|
37798
|
+
if (_temp24 && _temp24.then) return _temp24.then(function () {});
|
|
37739
37799
|
});
|
|
37740
37800
|
}, function (err) {
|
|
37741
|
-
var _err$
|
|
37801
|
+
var _err$response6, _err$response6$data;
|
|
37742
37802
|
|
|
37743
37803
|
dispatch(setAlert({
|
|
37744
37804
|
type: "danger",
|
|
37745
|
-
message: ((_err$
|
|
37805
|
+
message: ((_err$response6 = err.response) === null || _err$response6 === void 0 ? void 0 : (_err$response6$data = _err$response6.data) === null || _err$response6$data === void 0 ? void 0 : _err$response6$data.title) || err.message || "Login failed"
|
|
37746
37806
|
}));
|
|
37747
37807
|
});
|
|
37748
37808
|
|
|
37749
|
-
return Promise.resolve(
|
|
37809
|
+
return Promise.resolve(_temp28 && _temp28.then ? _temp28.then(_temp27) : _temp27(_temp28));
|
|
37750
37810
|
} catch (e) {
|
|
37751
37811
|
return Promise.reject(e);
|
|
37752
37812
|
}
|
|
@@ -37754,15 +37814,16 @@ var useLogin = function useLogin() {
|
|
|
37754
37814
|
|
|
37755
37815
|
var getInformationSetting = function getInformationSetting() {
|
|
37756
37816
|
try {
|
|
37757
|
-
var
|
|
37817
|
+
var _temp30 = _catch(function () {
|
|
37758
37818
|
return Promise.resolve(getSchoolSettings()).then(function (res) {
|
|
37759
37819
|
dispatch(setSandboxMode(res.data.isSandboxMode));
|
|
37820
|
+
setSchool(res.data);
|
|
37760
37821
|
});
|
|
37761
37822
|
}, function (err) {
|
|
37762
37823
|
console.error(err);
|
|
37763
37824
|
});
|
|
37764
37825
|
|
|
37765
|
-
return Promise.resolve(
|
|
37826
|
+
return Promise.resolve(_temp30 && _temp30.then ? _temp30.then(function () {}) : void 0);
|
|
37766
37827
|
} catch (e) {
|
|
37767
37828
|
return Promise.reject(e);
|
|
37768
37829
|
}
|
|
@@ -37772,11 +37833,11 @@ var useLogin = function useLogin() {
|
|
|
37772
37833
|
try {
|
|
37773
37834
|
msalInstance.handleRedirectPromise().then(function (tokenResponse) {
|
|
37774
37835
|
try {
|
|
37775
|
-
var
|
|
37836
|
+
var _temp33 = function () {
|
|
37776
37837
|
if (!tokenResponse) {
|
|
37777
37838
|
var accounts = msalInstance.getAllAccounts();
|
|
37778
37839
|
|
|
37779
|
-
var
|
|
37840
|
+
var _temp34 = function () {
|
|
37780
37841
|
if (accounts.length === 0) {
|
|
37781
37842
|
msalInstance.loginRedirect();
|
|
37782
37843
|
} else {
|
|
@@ -37785,14 +37846,14 @@ var useLogin = function useLogin() {
|
|
|
37785
37846
|
}
|
|
37786
37847
|
}();
|
|
37787
37848
|
|
|
37788
|
-
if (
|
|
37849
|
+
if (_temp34 && _temp34.then) return _temp34.then(function () {});
|
|
37789
37850
|
} else {
|
|
37790
37851
|
var currentAccount = tokenResponse.account;
|
|
37791
37852
|
return Promise.resolve(getCurrentAccount(currentAccount, clickHandler)).then(function () {});
|
|
37792
37853
|
}
|
|
37793
37854
|
}();
|
|
37794
37855
|
|
|
37795
|
-
return Promise.resolve(
|
|
37856
|
+
return Promise.resolve(_temp33 && _temp33.then ? _temp33.then(function () {}) : void 0);
|
|
37796
37857
|
} catch (e) {
|
|
37797
37858
|
return Promise.reject(e);
|
|
37798
37859
|
}
|
|
@@ -37845,6 +37906,7 @@ var useLogin = function useLogin() {
|
|
|
37845
37906
|
React.useEffect(function () {
|
|
37846
37907
|
getInformationSetting();
|
|
37847
37908
|
initInformationSSO();
|
|
37909
|
+
getSchoolInfo();
|
|
37848
37910
|
}, []);
|
|
37849
37911
|
return {
|
|
37850
37912
|
defaultInfo: defaultInfo,
|
|
@@ -37861,7 +37923,8 @@ var useLogin = function useLogin() {
|
|
|
37861
37923
|
googleRecaptchaId: googleRecaptchaId,
|
|
37862
37924
|
handleCancelModelAssign: handleCancelModelAssign,
|
|
37863
37925
|
openModelAssign: openModelAssign,
|
|
37864
|
-
fnLoginSSO: fnLoginSSO
|
|
37926
|
+
fnLoginSSO: fnLoginSSO,
|
|
37927
|
+
school: school
|
|
37865
37928
|
};
|
|
37866
37929
|
};
|
|
37867
37930
|
|
|
@@ -38016,6 +38079,11 @@ var getStaticFileUrl = function getStaticFileUrl(url) {
|
|
|
38016
38079
|
if (url.startsWith("/")) return "" + (isStage ? STAGE_DOMAIN : MARIO_SUCCESS_BASE_URL) + url;else return (isStage ? STAGE_DOMAIN : MARIO_SUCCESS_BASE_URL) + "/" + url;
|
|
38017
38080
|
};
|
|
38018
38081
|
|
|
38082
|
+
var getFileUrl = function getFileUrl(fileName) {
|
|
38083
|
+
if (!fileName || !fileName.trim()) return "";
|
|
38084
|
+
return BASE_URL + "/api/file/viewer?key=" + fileName;
|
|
38085
|
+
};
|
|
38086
|
+
|
|
38019
38087
|
var schema = yup.object({
|
|
38020
38088
|
email: yup.string().email("Email is invalid").required("Email is required"),
|
|
38021
38089
|
password: yup.string().required("Password is required"),
|
|
@@ -38024,7 +38092,8 @@ var schema = yup.object({
|
|
|
38024
38092
|
|
|
38025
38093
|
var BlockLogin = function BlockLogin(_ref) {
|
|
38026
38094
|
var defaultInfo = _ref.defaultInfo,
|
|
38027
|
-
userLogin = _ref.userLogin
|
|
38095
|
+
userLogin = _ref.userLogin,
|
|
38096
|
+
school = _ref.school;
|
|
38028
38097
|
|
|
38029
38098
|
var _useLogin = useLogin(),
|
|
38030
38099
|
isShowPassword = _useLogin.isShowPassword,
|
|
@@ -38075,7 +38144,6 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
38075
38144
|
return;
|
|
38076
38145
|
}
|
|
38077
38146
|
|
|
38078
|
-
console.log("assss");
|
|
38079
38147
|
var infoLogin = {
|
|
38080
38148
|
firstName: givenName,
|
|
38081
38149
|
lastName: familyName,
|
|
@@ -38119,21 +38187,25 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
38119
38187
|
setFieldValue = formikProps.setFieldValue;
|
|
38120
38188
|
var emailError = touched.email && errors.email;
|
|
38121
38189
|
var passwordError = touched.password && errors.password;
|
|
38122
|
-
return React__default.createElement(
|
|
38123
|
-
className: "" +
|
|
38124
|
-
}, React__default.createElement(reactstrap.Col, {
|
|
38125
|
-
className: "p-0"
|
|
38190
|
+
return React__default.createElement("div", {
|
|
38191
|
+
className: styles["box-login"] + " w-100"
|
|
38126
38192
|
}, React__default.createElement(reactstrap.Form, {
|
|
38127
38193
|
className: "" + styles["block-login"],
|
|
38128
38194
|
onSubmit: handleSubmit
|
|
38129
38195
|
}, React__default.createElement("div", {
|
|
38130
38196
|
className: "" + styles["block-form"]
|
|
38197
|
+
}, React__default.createElement("div", {
|
|
38198
|
+
className: "d-flex align-items-center mb-4"
|
|
38131
38199
|
}, React__default.createElement("img", {
|
|
38132
|
-
src: "" + getStaticFileUrl("/images/
|
|
38133
|
-
className: "" +
|
|
38200
|
+
src: "" + (school !== null && school !== void 0 && school.schoolLogo ? getFileUrl("" + (school === null || school === void 0 ? void 0 : school.schoolLogo)) : getStaticFileUrl("/images/logoR.png")),
|
|
38201
|
+
className: styles["school-icon"] + " mr-3"
|
|
38134
38202
|
}), React__default.createElement("p", {
|
|
38203
|
+
className: styles["school-name"] + " mb-0"
|
|
38204
|
+
}, school.schoolName)), React__default.createElement("p", {
|
|
38135
38205
|
className: "" + styles["title-login"]
|
|
38136
|
-
}, "
|
|
38206
|
+
}, "Welcome Back!"), React__default.createElement("p", {
|
|
38207
|
+
className: styles["login-description"] + " mb-5"
|
|
38208
|
+
}, "Please enter your MARIO Education account details"), React__default.createElement(reactstrap.FormGroup, {
|
|
38137
38209
|
className: "" + styles["form-user-name"]
|
|
38138
38210
|
}, React__default.createElement(reactstrap.Input, {
|
|
38139
38211
|
type: "text",
|
|
@@ -38157,45 +38229,53 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
38157
38229
|
})), React__default.createElement(reactstrap.FormGroup, null, React__default.createElement(reactGoogleRecaptchaV3.GoogleReCaptcha, {
|
|
38158
38230
|
action: "login",
|
|
38159
38231
|
onVerify: handleVerify
|
|
38160
|
-
})), React__default.createElement(
|
|
38161
|
-
className: "
|
|
38162
|
-
}, React__default.createElement("
|
|
38163
|
-
className: "
|
|
38232
|
+
})), React__default.createElement("div", {
|
|
38233
|
+
className: "d-flex justify-content-between"
|
|
38234
|
+
}, React__default.createElement("div", {
|
|
38235
|
+
className: "d-flex align-items-center"
|
|
38236
|
+
}, React__default.createElement("input", {
|
|
38237
|
+
type: "checkbox",
|
|
38238
|
+
checked: !values.isSessionUserBrowser,
|
|
38239
|
+
className: "" + styles["checkbox-keep-login"],
|
|
38240
|
+
onChange: function onChange() {
|
|
38241
|
+
return setFieldValue("isSessionUserBrowser", !values.isSessionUserBrowser);
|
|
38242
|
+
}
|
|
38243
|
+
}), React__default.createElement("p", {
|
|
38244
|
+
className: styles["label-keep-login"] + " mb-0 ml-2"
|
|
38245
|
+
}, "Keep me logged in")), React__default.createElement(reactRouterDom.Link, {
|
|
38246
|
+
to: "/forgot-password",
|
|
38247
|
+
className: "" + styles["link-to-login"]
|
|
38248
|
+
}, "Forgot password?")), React__default.createElement("button", {
|
|
38249
|
+
className: styles["btn-login"] + " mt-5",
|
|
38164
38250
|
type: "submit"
|
|
38165
|
-
}, "
|
|
38166
|
-
className: "
|
|
38167
|
-
}, React__default.createElement(
|
|
38251
|
+
}, "LOG IN"), React__default.createElement("p", {
|
|
38252
|
+
className: styles["option-text"] + " my-3 text-center"
|
|
38253
|
+
}, "OR"), React__default.createElement(reactstrap.Row, {
|
|
38254
|
+
className: "mb-4"
|
|
38255
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
38256
|
+
lg: 6,
|
|
38257
|
+
md: 6,
|
|
38258
|
+
xs: 12,
|
|
38259
|
+
className: "pr-md-2"
|
|
38260
|
+
}, !!googleClientId && React__default.createElement(GoogleLogin, {
|
|
38168
38261
|
clientId: googleClientId,
|
|
38169
|
-
buttonText: "
|
|
38262
|
+
buttonText: "GOOGLE",
|
|
38170
38263
|
onSuccess: onSuccessGoogle,
|
|
38171
|
-
cookiePolicy:
|
|
38172
|
-
className:
|
|
38173
|
-
})), React__default.createElement(
|
|
38174
|
-
|
|
38264
|
+
cookiePolicy: "single_host_origin",
|
|
38265
|
+
className: styles["btn-login-google"] + " p-0 mb-4 mb-md-0"
|
|
38266
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
38267
|
+
lg: 6,
|
|
38268
|
+
md: 6,
|
|
38269
|
+
xs: 12,
|
|
38270
|
+
className: styles["btn-login-sso"] + " pl-md-2"
|
|
38175
38271
|
}, React__default.createElement("div", {
|
|
38176
38272
|
className: styles["btn-login-with-sso"],
|
|
38177
38273
|
onClick: function onClick() {
|
|
38178
38274
|
return fnLoginSSO(clickHandler);
|
|
38179
38275
|
}
|
|
38180
38276
|
}, React__default.createElement("img", {
|
|
38181
|
-
src: "images/
|
|
38182
|
-
}),
|
|
38183
|
-
className: "d-flex justify-content-between"
|
|
38184
|
-
}, React__default.createElement(reactRouterDom.Link, {
|
|
38185
|
-
to: "/forgot-password",
|
|
38186
|
-
className: "" + styles["link-to-login"]
|
|
38187
|
-
}, "Forgot password?"), React__default.createElement("a", {
|
|
38188
|
-
href: "/privacy-policy/",
|
|
38189
|
-
target: "blank",
|
|
38190
|
-
className: "" + styles["link-to-login"]
|
|
38191
|
-
}, "Privacy Policy"))))), React__default.createElement(reactstrap.Col, {
|
|
38192
|
-
lg: 4,
|
|
38193
|
-
md: 4,
|
|
38194
|
-
className: "" + styles["img-box"]
|
|
38195
|
-
}, React__default.createElement("img", {
|
|
38196
|
-
src: "" + getStaticFileUrl("/images/img-login.jpg"),
|
|
38197
|
-
className: "" + styles["img-login"]
|
|
38198
|
-
})));
|
|
38277
|
+
src: "images/microsoft-logo.png"
|
|
38278
|
+
}), React__default.createElement("p", null, "MICROSOFT")))))));
|
|
38199
38279
|
}), isLoginGoogle && React__default.createElement(BlockSelectTeacher$1, {
|
|
38200
38280
|
onSubmit: function onSubmit(e) {
|
|
38201
38281
|
return submitLogin(e, clickHandler);
|
|
@@ -38285,6 +38365,7 @@ var useForgotPassword = function useForgotPassword() {
|
|
|
38285
38365
|
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 || "Error occured"
|
|
38286
38366
|
}));
|
|
38287
38367
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
38368
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
38288
38369
|
});
|
|
38289
38370
|
|
|
38290
38371
|
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
@@ -38346,6 +38427,7 @@ var useForgotPassword = function useForgotPassword() {
|
|
|
38346
38427
|
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 || "Error occured"
|
|
38347
38428
|
}));
|
|
38348
38429
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
38430
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
38349
38431
|
});
|
|
38350
38432
|
|
|
38351
38433
|
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12));
|
|
@@ -38395,7 +38477,9 @@ var forgotPasswordSchema = yup.object({
|
|
|
38395
38477
|
email: yup.string().email("Email is invalid").required("Email is required")
|
|
38396
38478
|
});
|
|
38397
38479
|
|
|
38398
|
-
var BlockForgetPassword = function BlockForgetPassword() {
|
|
38480
|
+
var BlockForgetPassword = function BlockForgetPassword(_ref) {
|
|
38481
|
+
var school = _ref.school;
|
|
38482
|
+
|
|
38399
38483
|
var _useForgotPassword = useForgotPassword(),
|
|
38400
38484
|
forgotPasswordRequest = _useForgotPassword.forgotPasswordRequest,
|
|
38401
38485
|
clickHandler = _useForgotPassword.clickHandler,
|
|
@@ -38422,15 +38506,20 @@ var BlockForgetPassword = function BlockForgetPassword() {
|
|
|
38422
38506
|
values = formikProps.values,
|
|
38423
38507
|
touched = formikProps.touched,
|
|
38424
38508
|
errors = formikProps.errors;
|
|
38425
|
-
return React__default.createElement(
|
|
38509
|
+
return React__default.createElement("div", {
|
|
38426
38510
|
className: "" + styles["box-login"]
|
|
38427
|
-
}, React__default.createElement(reactstrap.Col, {
|
|
38428
|
-
className: "p-0"
|
|
38429
38511
|
}, React__default.createElement("div", {
|
|
38430
38512
|
className: "" + styles["block-login"]
|
|
38431
38513
|
}, React__default.createElement("div", {
|
|
38432
38514
|
className: "" + styles["block-form"]
|
|
38433
|
-
}, React__default.createElement("
|
|
38515
|
+
}, React__default.createElement("div", {
|
|
38516
|
+
className: "d-flex align-items-center mb-4"
|
|
38517
|
+
}, React__default.createElement("img", {
|
|
38518
|
+
src: "" + getStaticFileUrl("/images/isb-icon.png"),
|
|
38519
|
+
className: styles["school-icon"] + " mr-3"
|
|
38520
|
+
}), React__default.createElement("p", {
|
|
38521
|
+
className: styles["school-name"] + " mb-0"
|
|
38522
|
+
}, school.schoolName)), React__default.createElement("p", {
|
|
38434
38523
|
className: styles["title-login"] + " "
|
|
38435
38524
|
}, "Forgot password"), React__default.createElement("p", {
|
|
38436
38525
|
className: styles["recover-account"] + " mb-5"
|
|
@@ -38445,7 +38534,10 @@ var BlockForgetPassword = function BlockForgetPassword() {
|
|
|
38445
38534
|
value: values.email
|
|
38446
38535
|
}), touched.email && errors.email && React__default.createElement(ErrorHandler, {
|
|
38447
38536
|
text: errors.email
|
|
38448
|
-
})), React__default.createElement(
|
|
38537
|
+
})), React__default.createElement(reactRouterDom.Link, {
|
|
38538
|
+
to: "/login",
|
|
38539
|
+
className: styles["link-to-login"] + " mt-2"
|
|
38540
|
+
}, "Return to login"), React__default.createElement(reactGoogleRecaptchaV3.GoogleReCaptcha, {
|
|
38449
38541
|
action: "forgetPass",
|
|
38450
38542
|
onVerify: handleVerify
|
|
38451
38543
|
}), React__default.createElement(reactstrap.Col, {
|
|
@@ -38455,23 +38547,7 @@ var BlockForgetPassword = function BlockForgetPassword() {
|
|
|
38455
38547
|
onClick: function onClick() {
|
|
38456
38548
|
return handleSubmit();
|
|
38457
38549
|
}
|
|
38458
|
-
}, "Continue"))
|
|
38459
|
-
className: "d-flex justify-content-between"
|
|
38460
|
-
}, React__default.createElement(reactRouterDom.Link, {
|
|
38461
|
-
to: "/login",
|
|
38462
|
-
className: "" + styles["link-to-login"]
|
|
38463
|
-
}, "Return to login"), React__default.createElement("a", {
|
|
38464
|
-
href: "/privacy-policy",
|
|
38465
|
-
target: "blank",
|
|
38466
|
-
className: "" + styles["link-to-login"]
|
|
38467
|
-
}, "Privacy Policy"))))), React__default.createElement(reactstrap.Col, {
|
|
38468
|
-
lg: 4,
|
|
38469
|
-
md: 4,
|
|
38470
|
-
className: "" + styles["img-box"]
|
|
38471
|
-
}, React__default.createElement("img", {
|
|
38472
|
-
src: getStaticFileUrl("/images/img-login.jpg"),
|
|
38473
|
-
className: "" + styles["img-login"]
|
|
38474
|
-
})));
|
|
38550
|
+
}, "Continue")))));
|
|
38475
38551
|
});
|
|
38476
38552
|
};
|
|
38477
38553
|
|
|
@@ -38572,7 +38648,7 @@ var BlockResetPassword = function BlockResetPassword() {
|
|
|
38572
38648
|
md: 4,
|
|
38573
38649
|
className: "" + styles["img-box"]
|
|
38574
38650
|
}, React__default.createElement("img", {
|
|
38575
|
-
src: getStaticFileUrl("/images/img-login.
|
|
38651
|
+
src: getStaticFileUrl("/images/img-login.png"),
|
|
38576
38652
|
className: "" + styles["img-login"]
|
|
38577
38653
|
})));
|
|
38578
38654
|
});
|
|
@@ -38660,6 +38736,7 @@ var useCreatePassword = function useCreatePassword() {
|
|
|
38660
38736
|
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 || "Error occured"
|
|
38661
38737
|
}));
|
|
38662
38738
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
38739
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
38663
38740
|
});
|
|
38664
38741
|
|
|
38665
38742
|
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
|
|
@@ -38804,7 +38881,7 @@ var BlockCreatePassword = function BlockCreatePassword() {
|
|
|
38804
38881
|
md: 4,
|
|
38805
38882
|
className: "" + styles["img-box"]
|
|
38806
38883
|
}, React__default.createElement("img", {
|
|
38807
|
-
src: "/images/img-login.
|
|
38884
|
+
src: "/images/img-login.png",
|
|
38808
38885
|
className: "" + styles["img-login"]
|
|
38809
38886
|
})));
|
|
38810
38887
|
});
|
|
@@ -38825,6 +38902,7 @@ var Login = function Login(props) {
|
|
|
38825
38902
|
userLogin = _useLogin.userLogin,
|
|
38826
38903
|
googleRecaptchaId = _useLogin.googleRecaptchaId,
|
|
38827
38904
|
handleCancelModelAssign = _useLogin.handleCancelModelAssign,
|
|
38905
|
+
school = _useLogin.school,
|
|
38828
38906
|
openModelAssign = _useLogin.openModelAssign;
|
|
38829
38907
|
|
|
38830
38908
|
React.useEffect(function () {
|
|
@@ -38837,10 +38915,10 @@ var Login = function Login(props) {
|
|
|
38837
38915
|
}, React__default.createElement(reactstrap.Row, {
|
|
38838
38916
|
className: "h-100"
|
|
38839
38917
|
}, React__default.createElement(reactstrap.Col, {
|
|
38840
|
-
lg:
|
|
38918
|
+
lg: 8,
|
|
38841
38919
|
md: 12,
|
|
38842
38920
|
xs: 12,
|
|
38843
|
-
className: "d-flex justify-content-center h-100 align-items-center"
|
|
38921
|
+
className: "d-flex justify-content-center h-100 align-items-center p-3 flex-column"
|
|
38844
38922
|
}, !!googleRecaptchaId && React__default.createElement(reactGoogleRecaptchaV3.GoogleReCaptchaProvider, {
|
|
38845
38923
|
useRecaptchaNet: true,
|
|
38846
38924
|
reCaptchaKey: googleRecaptchaId,
|
|
@@ -38853,8 +38931,23 @@ var Login = function Login(props) {
|
|
|
38853
38931
|
userLogin: userLogin,
|
|
38854
38932
|
defaultInfo: defaultInfo,
|
|
38855
38933
|
onCancelModelAssign: handleCancelModelAssign,
|
|
38856
|
-
openModelAssign: openModelAssign
|
|
38857
|
-
|
|
38934
|
+
openModelAssign: openModelAssign,
|
|
38935
|
+
school: school
|
|
38936
|
+
}), isForgotPassword && React__default.createElement(BlockForgetPassword, {
|
|
38937
|
+
school: school
|
|
38938
|
+
})), isResetPassword && React__default.createElement(BlockResetPassword, null), isCreatePassword && React__default.createElement(BlockCreatePassword, null), React__default.createElement("a", {
|
|
38939
|
+
href: "/privacy-policy/",
|
|
38940
|
+
target: "blank",
|
|
38941
|
+
className: "" + styles["privacy-policy"]
|
|
38942
|
+
}, "Privacy Policy")), React__default.createElement(reactstrap.Col, {
|
|
38943
|
+
className: "p-3 mh-100 d-flex justify-content-end",
|
|
38944
|
+
lg: 4,
|
|
38945
|
+
md: 12,
|
|
38946
|
+
xs: 12
|
|
38947
|
+
}, React__default.createElement("img", {
|
|
38948
|
+
src: "" + getStaticFileUrl(window.innerWidth > 992 ? "/images/img-login.png" : "/images/img-login-tablet.png"),
|
|
38949
|
+
className: "" + styles["img-login"]
|
|
38950
|
+
}))));
|
|
38858
38951
|
};
|
|
38859
38952
|
|
|
38860
38953
|
var QuoteContent = function QuoteContent() {
|
|
@@ -39071,6 +39164,7 @@ var TheSidebar = function TheSidebar(_ref) {
|
|
|
39071
39164
|
|
|
39072
39165
|
var signOut = React.useCallback(function () {
|
|
39073
39166
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
39167
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
39074
39168
|
localStorage.removeItem("ROLES");
|
|
39075
39169
|
dispatch(reset());
|
|
39076
39170
|
history.push("/");
|
|
@@ -39234,11 +39328,6 @@ var NotificationButton = function NotificationButton(_ref) {
|
|
|
39234
39328
|
}, unReadNotification)));
|
|
39235
39329
|
};
|
|
39236
39330
|
|
|
39237
|
-
var getFileUrl = function getFileUrl(fileName) {
|
|
39238
|
-
if (!fileName || !fileName.trim()) return "";
|
|
39239
|
-
return BASE_URL + "/api/file/viewer?key=" + fileName;
|
|
39240
|
-
};
|
|
39241
|
-
|
|
39242
39331
|
var DEFAULT_USER_AVATAR = "/avatars/default-avatar.png";
|
|
39243
39332
|
var ADMIN_ROLE = "Admin";
|
|
39244
39333
|
var TEACHER_ROLE = "Teacher";
|
|
@@ -39268,6 +39357,7 @@ var TheHeaderDropdown = function TheHeaderDropdown(_ref) {
|
|
|
39268
39357
|
var isTeacher = roles.includes(TEACHER_ROLE);
|
|
39269
39358
|
var signOut = React.useCallback(function () {
|
|
39270
39359
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
39360
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
39271
39361
|
localStorage.removeItem("ROLES");
|
|
39272
39362
|
dispatch(reset());
|
|
39273
39363
|
history.push("/");
|
|
@@ -42123,6 +42213,7 @@ var useUserList = function useUserList() {
|
|
|
42123
42213
|
}, [JSON.stringify(filters)]);
|
|
42124
42214
|
|
|
42125
42215
|
var redirectLoginUser = function redirectLoginUser(res) {
|
|
42216
|
+
var isSessionUserBrowser = sessionStorage.getItem(IS_USER_SESSION_BROWSER);
|
|
42126
42217
|
var _res$data2 = res.data,
|
|
42127
42218
|
token = _res$data2.token,
|
|
42128
42219
|
id = _res$data2.id,
|
|
@@ -42131,7 +42222,12 @@ var useUserList = function useUserList() {
|
|
|
42131
42222
|
roles = _res$data2.roles,
|
|
42132
42223
|
email = _res$data2.email,
|
|
42133
42224
|
profileImageFileName = _res$data2.profileImageFileName;
|
|
42134
|
-
|
|
42225
|
+
|
|
42226
|
+
if (!isSessionUserBrowser) {
|
|
42227
|
+
localStorage.setItem(ACCESS_TOKEN, token);
|
|
42228
|
+
} else {
|
|
42229
|
+
sessionStorage.setItem(ACCESS_TOKEN, token);
|
|
42230
|
+
}
|
|
42135
42231
|
|
|
42136
42232
|
if (roles.includes("Admin")) {
|
|
42137
42233
|
localStorage.setItem("ROLES", "Admin");
|
|
@@ -45312,9 +45408,9 @@ var NotificationLogoutModal = function NotificationLogoutModal() {
|
|
|
45312
45408
|
};
|
|
45313
45409
|
|
|
45314
45410
|
React.useEffect(function () {
|
|
45315
|
-
var
|
|
45411
|
+
var accessToken = getAccessToken();
|
|
45316
45412
|
|
|
45317
|
-
if (
|
|
45413
|
+
if (accessToken) {
|
|
45318
45414
|
var interval = setInterval(function () {
|
|
45319
45415
|
checkOpenModalLogout();
|
|
45320
45416
|
}, 60 * 1000);
|
|
@@ -48638,6 +48734,7 @@ var TheLayout = function TheLayout(_ref) {
|
|
|
48638
48734
|
|
|
48639
48735
|
var resetAuth = function resetAuth() {
|
|
48640
48736
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
48737
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
48641
48738
|
localStorage.removeItem("ROLES");
|
|
48642
48739
|
history.push("/");
|
|
48643
48740
|
};
|
|
@@ -48712,6 +48809,7 @@ exports.GOOGLE_RECAPTCHA_KEY = GOOGLE_RECAPTCHA_KEY;
|
|
|
48712
48809
|
exports.GalleryList = GalleryList;
|
|
48713
48810
|
exports.INIT_AMPLITUDE_KEY_PROD = INIT_AMPLITUDE_KEY_PROD;
|
|
48714
48811
|
exports.INIT_AMPLITUDE_KEY_STAGE = INIT_AMPLITUDE_KEY_STAGE;
|
|
48812
|
+
exports.IS_USER_SESSION_BROWSER = IS_USER_SESSION_BROWSER;
|
|
48715
48813
|
exports.Images = Images;
|
|
48716
48814
|
exports.LANGUAGES = LANGUAGES;
|
|
48717
48815
|
exports.LICENSE_AGGRID = LICENSE_AGGRID;
|