mario-core 2.9.238-layout → 2.9.239-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 +14 -0
- package/dist/containers/Login/hooks/useLogin.d.ts +4 -4
- package/dist/containers/Login/views/block/BlockSelectTeacher.d.ts +0 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +278 -91
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +277 -92
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/commons/action.d.ts +2 -0
- package/dist/rootReducer.d.ts +5 -0
- package/dist/services/accountService.d.ts +1 -1
- package/dist/services/weeklyQuestService.d.ts +1 -0
- package/dist/types/WeeklyQuest.d.ts +37 -0
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -7,9 +7,10 @@ var React = require('react');
|
|
|
7
7
|
var React__default = _interopDefault(React);
|
|
8
8
|
var reactstrap = require('reactstrap');
|
|
9
9
|
var reactRouterDom = require('react-router-dom');
|
|
10
|
+
var reactRedux = require('react-redux');
|
|
10
11
|
var formik = require('formik');
|
|
11
12
|
var yup = require('yup');
|
|
12
|
-
var
|
|
13
|
+
var msalBrowser = require('@azure/msal-browser');
|
|
13
14
|
var toolkit = require('@reduxjs/toolkit');
|
|
14
15
|
var axios = _interopDefault(require('axios'));
|
|
15
16
|
var amplitude = _interopDefault(require('amplitude-js'));
|
|
@@ -1845,6 +1846,7 @@ var accommodation_set = "Accommodation Set";
|
|
|
1845
1846
|
var add_new_accommodation = "Add new accommodation";
|
|
1846
1847
|
var print_my_accommodations = "Print my accommodations";
|
|
1847
1848
|
var my_learning_progress = "My Learning Progress";
|
|
1849
|
+
var weekly_quests = "Weekly quests";
|
|
1848
1850
|
var responses_comparisons = "Responses Comparisons";
|
|
1849
1851
|
var dropdown_and_verbal_questions_responses = "Dropdown and Verbal Questions Responses";
|
|
1850
1852
|
var mario_tools = "MARIO TOOLS";
|
|
@@ -1986,6 +1988,7 @@ var suggestion = "suggestion";
|
|
|
1986
1988
|
var tutorial_screen = "tutorial screen";
|
|
1987
1989
|
var reflection_forms = "reflection forms";
|
|
1988
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";
|
|
1989
1992
|
var lang_us = {
|
|
1990
1993
|
dashboard: dashboard,
|
|
1991
1994
|
user: user,
|
|
@@ -3813,6 +3816,7 @@ var lang_us = {
|
|
|
3813
3816
|
my_learning_progress: my_learning_progress,
|
|
3814
3817
|
"here_your_teacher_can_edit_or_add_your_accommodation_details._please_note_that_you_can_view_the_information,_but_for_any_edits_or_additions,_kindly_contact_your_teacher_directly.": "Here your teacher can edit or add your accommodation details. Please note that you can view the information, but for any edits or additions, kindly contact your teacher directly.",
|
|
3815
3818
|
"this_is_a_brand_new_beta_version_for_your_personal_learning_journey._you_can_think_about_what_you_want_like_to_do_and_how_you_like_to_learn._we_advise_you_to_do_it_gradually_per_section_and_visit_it_once_a_month.": "This is a brand new beta version for your personal learning journey. You can think about what you want like to do and how you like to learn. We advise you to do it gradually per section and visit it once a month.",
|
|
3819
|
+
weekly_quests: weekly_quests,
|
|
3816
3820
|
responses_comparisons: responses_comparisons,
|
|
3817
3821
|
dropdown_and_verbal_questions_responses: dropdown_and_verbal_questions_responses,
|
|
3818
3822
|
mario_tools: mario_tools,
|
|
@@ -3969,7 +3973,8 @@ var lang_us = {
|
|
|
3969
3973
|
suggestion: suggestion,
|
|
3970
3974
|
tutorial_screen: tutorial_screen,
|
|
3971
3975
|
reflection_forms: reflection_forms,
|
|
3972
|
-
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
|
|
3973
3978
|
};
|
|
3974
3979
|
|
|
3975
3980
|
var dashboard$1 = "Dashboard";
|
|
@@ -4522,6 +4527,7 @@ var do_you_want_to_share_a_survey_to_teachers$1 = "Do you want to share a survey
|
|
|
4522
4527
|
var you_can_share_this_survey_to_teachers_to_get_more_insight_about_your_student$1 = "You can share this survey to teachers to get more insight about your student.";
|
|
4523
4528
|
var skip$1 = "skip";
|
|
4524
4529
|
var survey_questions$1 = "Survey questions";
|
|
4530
|
+
var weekly_quests$1 = "Weekly quests";
|
|
4525
4531
|
var add_survey_question$1 = "Add Survey Question";
|
|
4526
4532
|
var additional_question$1 = "Additional Question";
|
|
4527
4533
|
var add_additional_question$1 = "Add additional question";
|
|
@@ -5778,13 +5784,13 @@ var accommodation_set$1 = "Accommodation Set";
|
|
|
5778
5784
|
var add_new_accommodation$1 = "Add new accommodation";
|
|
5779
5785
|
var print_my_accommodations$1 = "Print my accommodations";
|
|
5780
5786
|
var my_learning_progress$1 = "My Learning Progress";
|
|
5787
|
+
var inactive_students$1 = "Inactive Students";
|
|
5781
5788
|
var responses_comparisons$1 = "Responses Comparisons";
|
|
5782
5789
|
var dropdown_and_verbal_questions_responses$1 = "Dropdown and Verbal Questions Responses";
|
|
5783
5790
|
var mario_tools$1 = "MARIO TOOLS";
|
|
5784
5791
|
var customize$1 = "Customize";
|
|
5785
5792
|
var techical_settings$1 = "Technical Settings";
|
|
5786
5793
|
var data_import_export$1 = "Data Import/Export";
|
|
5787
|
-
var inactive_students$1 = "Inactive Students";
|
|
5788
5794
|
var admin_general_tips$1 = "Admin General Tips";
|
|
5789
5795
|
var school_usage$1 = "School Usage";
|
|
5790
5796
|
var total_conversations_time$1 = "Total Conversations Time";
|
|
@@ -5919,6 +5925,7 @@ var suggestion$1 = "suggestion";
|
|
|
5919
5925
|
var tutorial_screen$1 = "tutorial screen";
|
|
5920
5926
|
var reflection_forms$1 = "reflection forms";
|
|
5921
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";
|
|
5922
5929
|
var lang_uk = {
|
|
5923
5930
|
dashboard: dashboard$1,
|
|
5924
5931
|
user: user$1,
|
|
@@ -6476,6 +6483,7 @@ var lang_uk = {
|
|
|
6476
6483
|
you_can_share_this_survey_to_teachers_to_get_more_insight_about_your_student: you_can_share_this_survey_to_teachers_to_get_more_insight_about_your_student$1,
|
|
6477
6484
|
skip: skip$1,
|
|
6478
6485
|
survey_questions: survey_questions$1,
|
|
6486
|
+
weekly_quests: weekly_quests$1,
|
|
6479
6487
|
add_survey_question: add_survey_question$1,
|
|
6480
6488
|
additional_question: additional_question$1,
|
|
6481
6489
|
add_additional_question: add_additional_question$1,
|
|
@@ -7745,6 +7753,7 @@ var lang_uk = {
|
|
|
7745
7753
|
print_my_accommodations: print_my_accommodations$1,
|
|
7746
7754
|
my_learning_progress: my_learning_progress$1,
|
|
7747
7755
|
"here_your_teacher_can_edit_or_add_your_accommodation_details._please_note_that_you_can_view_the_information,_but_for_any_edits_or_additions,_kindly_contact_your_teacher_directly.": "Here your teacher can edit or add your accommodation details. Please note that you can view the information, but for any edits or additions, kindly contact your teacher directly.",
|
|
7756
|
+
inactive_students: inactive_students$1,
|
|
7748
7757
|
"this_is_a_brand_new_beta_version_for_your_personal_learning_journey._you_can_think_about_what_you_want_like_to_do_and_how_you_like_to_learn._we_advise_you_to_do_it_gradually_per_section_and_visit_it_once_a_month.": "This is a brand new beta version for your personal learning journey. You can think about what you want like to do and how you like to learn. We advise you to do it gradually per section and visit it once a month.",
|
|
7749
7758
|
responses_comparisons: responses_comparisons$1,
|
|
7750
7759
|
dropdown_and_verbal_questions_responses: dropdown_and_verbal_questions_responses$1,
|
|
@@ -7752,7 +7761,6 @@ var lang_uk = {
|
|
|
7752
7761
|
customize: customize$1,
|
|
7753
7762
|
techical_settings: techical_settings$1,
|
|
7754
7763
|
data_import_export: data_import_export$1,
|
|
7755
|
-
inactive_students: inactive_students$1,
|
|
7756
7764
|
admin_general_tips: admin_general_tips$1,
|
|
7757
7765
|
school_usage: school_usage$1,
|
|
7758
7766
|
total_conversations_time: total_conversations_time$1,
|
|
@@ -7902,7 +7910,8 @@ var lang_uk = {
|
|
|
7902
7910
|
suggestion: suggestion$1,
|
|
7903
7911
|
tutorial_screen: tutorial_screen$1,
|
|
7904
7912
|
reflection_forms: reflection_forms$1,
|
|
7905
|
-
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
|
|
7906
7915
|
};
|
|
7907
7916
|
|
|
7908
7917
|
var dashboard$2 = "لوحة المعلومات";
|
|
@@ -12521,8 +12530,6 @@ var performance$4 = "Actuación";
|
|
|
12521
12530
|
var not_enough_challenge_leading_to_boredom_and_lack_of_interest$3 = "No hay suficientes desafíos lo que lleva al aburrimiento y la falta de interés.";
|
|
12522
12531
|
var calm_and_relaxed_but_not_enough_motivation_to_perform_at_my_best$3 = "Tranquilo y relajado pero no hay suficiente motivación para dar lo mejor de mí.";
|
|
12523
12532
|
var manageable_levels_of_stress_allowing_me_to_perform_at_my_best$3 = "Niveles manejables de estrés que me permiten rendir al máximo.";
|
|
12524
|
-
var still_in_control_but_starting_to_feel_the_pressure$3 = "Aún tengo el control pero empiezo a sentir la presión.";
|
|
12525
|
-
var too_much_pressure_and_really_struggling_to_manage_my_workload$3 = "Demasiada presión y muchas dificultades para gestionar mi carga de trabajo.";
|
|
12526
12533
|
var import_emails_by_csv$3 = "Importar correo electrónico por csv";
|
|
12527
12534
|
var request_number$3 = "Número de solicitud";
|
|
12528
12535
|
var select_or_input_class_type$3 = "Seleccione o ingrese el tipo de clase";
|
|
@@ -13602,7 +13609,7 @@ var customize$3 = "Personalizar";
|
|
|
13602
13609
|
var techical_settings$3 = "Configuración técnica";
|
|
13603
13610
|
var data_import_export$3 = "Importación/Exportación de datos";
|
|
13604
13611
|
var question_text$3 = "Texto de la pregunta";
|
|
13605
|
-
var weekly_quests = "Misiones semanales";
|
|
13612
|
+
var weekly_quests$2 = "Misiones semanales";
|
|
13606
13613
|
var inactive_students$3 = "Estudiantes inactivos";
|
|
13607
13614
|
var admin_general_tips$3 = "Consejos generales para el administrador";
|
|
13608
13615
|
var school_usage$3 = "Uso escolar";
|
|
@@ -14455,8 +14462,6 @@ var lang_es = {
|
|
|
14455
14462
|
not_enough_challenge_leading_to_boredom_and_lack_of_interest: not_enough_challenge_leading_to_boredom_and_lack_of_interest$3,
|
|
14456
14463
|
calm_and_relaxed_but_not_enough_motivation_to_perform_at_my_best: calm_and_relaxed_but_not_enough_motivation_to_perform_at_my_best$3,
|
|
14457
14464
|
manageable_levels_of_stress_allowing_me_to_perform_at_my_best: manageable_levels_of_stress_allowing_me_to_perform_at_my_best$3,
|
|
14458
|
-
still_in_control_but_starting_to_feel_the_pressure: still_in_control_but_starting_to_feel_the_pressure$3,
|
|
14459
|
-
too_much_pressure_and_really_struggling_to_manage_my_workload: too_much_pressure_and_really_struggling_to_manage_my_workload$3,
|
|
14460
14465
|
import_emails_by_csv: import_emails_by_csv$3,
|
|
14461
14466
|
request_number: request_number$3,
|
|
14462
14467
|
select_or_input_class_type: select_or_input_class_type$3,
|
|
@@ -15541,7 +15546,7 @@ var lang_es = {
|
|
|
15541
15546
|
techical_settings: techical_settings$3,
|
|
15542
15547
|
data_import_export: data_import_export$3,
|
|
15543
15548
|
question_text: question_text$3,
|
|
15544
|
-
weekly_quests: weekly_quests,
|
|
15549
|
+
weekly_quests: weekly_quests$2,
|
|
15545
15550
|
inactive_students: inactive_students$3,
|
|
15546
15551
|
admin_general_tips: admin_general_tips$3,
|
|
15547
15552
|
school_usage: school_usage$3,
|
|
@@ -16424,8 +16429,8 @@ var performance$5 = "表现";
|
|
|
16424
16429
|
var not_enough_challenge_leading_to_boredom_and_lack_of_interest$4 = "挑战不够,导致无聊和缺乏兴趣。";
|
|
16425
16430
|
var calm_and_relaxed_but_not_enough_motivation_to_perform_at_my_best$4 = "平静而放松,但没有足够的动力来发挥我的最佳水平。";
|
|
16426
16431
|
var manageable_levels_of_stress_allowing_me_to_perform_at_my_best$4 = "可控的压力水平让我能够发挥出最佳水平。";
|
|
16427
|
-
var still_in_control_but_starting_to_feel_the_pressure$
|
|
16428
|
-
var too_much_pressure_and_really_struggling_to_manage_my_workload$
|
|
16432
|
+
var still_in_control_but_starting_to_feel_the_pressure$3 = "仍在控制之中,但开始感到压力。";
|
|
16433
|
+
var too_much_pressure_and_really_struggling_to_manage_my_workload$3 = "压力过大,真的很难管理我的工作量。";
|
|
16429
16434
|
var import_emails_by_csv$4 = "通过 csv 导入电子邮件";
|
|
16430
16435
|
var request_number$4 = "请求编号";
|
|
16431
16436
|
var select_or_input_class_type$4 = "选择或输入班级类型";
|
|
@@ -17505,7 +17510,7 @@ var customize$4 = "自定义";
|
|
|
17505
17510
|
var techical_settings$4 = "技术设置";
|
|
17506
17511
|
var data_import_export$4 = "数据导入/导出";
|
|
17507
17512
|
var question_text$4 = "问题文本";
|
|
17508
|
-
var weekly_quests$
|
|
17513
|
+
var weekly_quests$3 = "每周任务";
|
|
17509
17514
|
var inactive_students$4 = "非活跃学生";
|
|
17510
17515
|
var admin_general_tips$4 = "管理员一般提示";
|
|
17511
17516
|
var school_usage$4 = "学校使用";
|
|
@@ -18385,8 +18390,8 @@ var lang_zh = {
|
|
|
18385
18390
|
not_enough_challenge_leading_to_boredom_and_lack_of_interest: not_enough_challenge_leading_to_boredom_and_lack_of_interest$4,
|
|
18386
18391
|
calm_and_relaxed_but_not_enough_motivation_to_perform_at_my_best: calm_and_relaxed_but_not_enough_motivation_to_perform_at_my_best$4,
|
|
18387
18392
|
manageable_levels_of_stress_allowing_me_to_perform_at_my_best: manageable_levels_of_stress_allowing_me_to_perform_at_my_best$4,
|
|
18388
|
-
still_in_control_but_starting_to_feel_the_pressure: still_in_control_but_starting_to_feel_the_pressure$
|
|
18389
|
-
too_much_pressure_and_really_struggling_to_manage_my_workload: too_much_pressure_and_really_struggling_to_manage_my_workload$
|
|
18393
|
+
still_in_control_but_starting_to_feel_the_pressure: still_in_control_but_starting_to_feel_the_pressure$3,
|
|
18394
|
+
too_much_pressure_and_really_struggling_to_manage_my_workload: too_much_pressure_and_really_struggling_to_manage_my_workload$3,
|
|
18390
18395
|
import_emails_by_csv: import_emails_by_csv$4,
|
|
18391
18396
|
request_number: request_number$4,
|
|
18392
18397
|
select_or_input_class_type: select_or_input_class_type$4,
|
|
@@ -19471,7 +19476,7 @@ var lang_zh = {
|
|
|
19471
19476
|
techical_settings: techical_settings$4,
|
|
19472
19477
|
data_import_export: data_import_export$4,
|
|
19473
19478
|
question_text: question_text$4,
|
|
19474
|
-
weekly_quests: weekly_quests$
|
|
19479
|
+
weekly_quests: weekly_quests$3,
|
|
19475
19480
|
inactive_students: inactive_students$4,
|
|
19476
19481
|
admin_general_tips: admin_general_tips$4,
|
|
19477
19482
|
school_usage: school_usage$4,
|
|
@@ -37173,6 +37178,8 @@ var setModal = toolkit.createAction("common/setModal");
|
|
|
37173
37178
|
var setUser = toolkit.createAction("common/setUser");
|
|
37174
37179
|
var setSidebar = toolkit.createAction("common/setSidebar");
|
|
37175
37180
|
var setAlert = toolkit.createAction("common/setAlert");
|
|
37181
|
+
var setIsLoginGoogle = toolkit.createAction("common/setIsLoginGoogle");
|
|
37182
|
+
var setInforUserGoogle = toolkit.createAction("common/setInforUserGoogle");
|
|
37176
37183
|
var reset = toolkit.createAction("common/reset");
|
|
37177
37184
|
var showMenuBar = toolkit.createAction("common/showMenuBar");
|
|
37178
37185
|
var showFontSize = toolkit.createAction("common/showFontSize");
|
|
@@ -37236,13 +37243,11 @@ var apiUpload = axios.create({
|
|
|
37236
37243
|
return i.interceptors.response.use(function (response) {
|
|
37237
37244
|
return response;
|
|
37238
37245
|
}, function (error) {
|
|
37239
|
-
var _error$response$confi, _error$response$confi2, _error$response$confi3, _error$response$confi4;
|
|
37240
|
-
|
|
37241
37246
|
console.log({
|
|
37242
37247
|
error: error
|
|
37243
37248
|
});
|
|
37244
37249
|
|
|
37245
|
-
if (error.response.status === 401
|
|
37250
|
+
if (error.response.status === 401) {
|
|
37246
37251
|
Object.keys(localStorage).forEach(function (key) {
|
|
37247
37252
|
if (!key.includes('learning-plan')) delete localStorage[key];
|
|
37248
37253
|
});
|
|
@@ -37259,13 +37264,16 @@ var apiUpload = axios.create({
|
|
|
37259
37264
|
amplitude.getInstance().resetSessionId();
|
|
37260
37265
|
}
|
|
37261
37266
|
|
|
37262
|
-
localStorage.
|
|
37267
|
+
localStorage.removeItem(ACCESS_TOKEN);
|
|
37268
|
+
localStorage.removeItem("USER_EMAIL");
|
|
37269
|
+
localStorage.removeItem("ROLES");
|
|
37263
37270
|
window.location.href = "/login";
|
|
37264
37271
|
}
|
|
37265
37272
|
|
|
37266
|
-
if (error.response.status == 403
|
|
37273
|
+
if (error.response.status == 403) {
|
|
37267
37274
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
37268
37275
|
localStorage.removeItem("USER_EMAIL");
|
|
37276
|
+
localStorage.removeItem("ROLES");
|
|
37269
37277
|
window.location.href = "/login";
|
|
37270
37278
|
}
|
|
37271
37279
|
|
|
@@ -37309,8 +37317,12 @@ var checkResetToken = function checkResetToken(token, key) {
|
|
|
37309
37317
|
var resetPassword = function resetPassword(data) {
|
|
37310
37318
|
return api.post(ACCOUNT_URL + "/resetpassword", data);
|
|
37311
37319
|
};
|
|
37312
|
-
var checkUserGoogle = function checkUserGoogle(body) {
|
|
37313
|
-
return api.post(USER_URL + "/check-user", body
|
|
37320
|
+
var checkUserGoogle = function checkUserGoogle(type, body) {
|
|
37321
|
+
return api.post(USER_URL + "/check-user", body, {
|
|
37322
|
+
params: {
|
|
37323
|
+
type: type
|
|
37324
|
+
}
|
|
37325
|
+
});
|
|
37314
37326
|
};
|
|
37315
37327
|
var getAllLoginTeacher = function getAllLoginTeacher(param) {
|
|
37316
37328
|
return api.get(TEACHER_URL + "/get-teacher-login", {
|
|
@@ -37332,6 +37344,14 @@ var getSchoolSettings = function getSchoolSettings() {
|
|
|
37332
37344
|
return api.get(SCHOOL_URL + "/settings");
|
|
37333
37345
|
};
|
|
37334
37346
|
|
|
37347
|
+
var TypeLogin;
|
|
37348
|
+
|
|
37349
|
+
(function (TypeLogin) {
|
|
37350
|
+
TypeLogin[TypeLogin["Google"] = 0] = "Google";
|
|
37351
|
+
TypeLogin[TypeLogin["ClassLink"] = 1] = "ClassLink";
|
|
37352
|
+
TypeLogin[TypeLogin["MicrosoftSSO"] = 2] = "MicrosoftSSO";
|
|
37353
|
+
})(TypeLogin || (TypeLogin = {}));
|
|
37354
|
+
|
|
37335
37355
|
var LoginType;
|
|
37336
37356
|
|
|
37337
37357
|
(function (LoginType) {
|
|
@@ -37340,6 +37360,48 @@ var LoginType;
|
|
|
37340
37360
|
LoginType[LoginType["Impersonate"] = 2] = "Impersonate";
|
|
37341
37361
|
})(LoginType || (LoginType = {}));
|
|
37342
37362
|
|
|
37363
|
+
var msalConfig = {
|
|
37364
|
+
auth: {
|
|
37365
|
+
clientId: "90c6897c-f17b-475e-a7a8-9a19651e0060",
|
|
37366
|
+
authority: "https://login.microsoftonline.com/common",
|
|
37367
|
+
redirectUri: window.location.origin + "/login"
|
|
37368
|
+
},
|
|
37369
|
+
cache: {
|
|
37370
|
+
cacheLocation: "sessionStorage",
|
|
37371
|
+
storeAuthStateInCookie: false
|
|
37372
|
+
},
|
|
37373
|
+
system: {
|
|
37374
|
+
loggerOptions: {
|
|
37375
|
+
loggerCallback: function loggerCallback(level, message, containsPii) {
|
|
37376
|
+
if (containsPii) {
|
|
37377
|
+
return;
|
|
37378
|
+
}
|
|
37379
|
+
|
|
37380
|
+
switch (level) {
|
|
37381
|
+
case msalBrowser.LogLevel.Error:
|
|
37382
|
+
console.error(message);
|
|
37383
|
+
return;
|
|
37384
|
+
|
|
37385
|
+
case msalBrowser.LogLevel.Info:
|
|
37386
|
+
console.info(message);
|
|
37387
|
+
return;
|
|
37388
|
+
|
|
37389
|
+
case msalBrowser.LogLevel.Verbose:
|
|
37390
|
+
console.debug(message);
|
|
37391
|
+
return;
|
|
37392
|
+
|
|
37393
|
+
case msalBrowser.LogLevel.Warning:
|
|
37394
|
+
console.warn(message);
|
|
37395
|
+
return;
|
|
37396
|
+
|
|
37397
|
+
default:
|
|
37398
|
+
return;
|
|
37399
|
+
}
|
|
37400
|
+
}
|
|
37401
|
+
}
|
|
37402
|
+
}
|
|
37403
|
+
};
|
|
37404
|
+
|
|
37343
37405
|
var defaultInfo = {
|
|
37344
37406
|
email: "",
|
|
37345
37407
|
password: "",
|
|
@@ -37362,36 +37424,39 @@ var useLogin = function useLogin() {
|
|
|
37362
37424
|
openLogin = _useState[0],
|
|
37363
37425
|
setOpenLogin = _useState[1];
|
|
37364
37426
|
|
|
37365
|
-
var
|
|
37366
|
-
|
|
37367
|
-
|
|
37368
|
-
|
|
37369
|
-
var _useState3 = React.useState(""),
|
|
37370
|
-
googleClientId = _useState3[0],
|
|
37371
|
-
setGoogleClientId = _useState3[1];
|
|
37427
|
+
var isLoginGoogle = reactRedux.useSelector(function (state) {
|
|
37428
|
+
return state.common.isLoginGoogle;
|
|
37429
|
+
});
|
|
37372
37430
|
|
|
37373
|
-
var
|
|
37374
|
-
|
|
37375
|
-
|
|
37431
|
+
var _useState2 = React.useState(""),
|
|
37432
|
+
googleClientId = _useState2[0],
|
|
37433
|
+
setGoogleClientId = _useState2[1];
|
|
37376
37434
|
|
|
37377
|
-
var
|
|
37378
|
-
|
|
37379
|
-
|
|
37435
|
+
var _useState3 = React.useState(""),
|
|
37436
|
+
googleRecaptchaId = _useState3[0],
|
|
37437
|
+
setGoogleRecaptchaId = _useState3[1];
|
|
37380
37438
|
|
|
37439
|
+
var infoUser = reactRedux.useSelector(function (state) {
|
|
37440
|
+
return state.common.inforUserGoogle;
|
|
37441
|
+
});
|
|
37381
37442
|
var params = new URLSearchParams(location.search);
|
|
37382
37443
|
var loginClassLink = params.get("type") === "classlink";
|
|
37383
37444
|
var tokenClassLink = params.get("token");
|
|
37384
37445
|
|
|
37385
|
-
var
|
|
37386
|
-
openModelAssign =
|
|
37446
|
+
var _useState4 = React.useState(false),
|
|
37447
|
+
openModelAssign = _useState4[0];
|
|
37448
|
+
|
|
37449
|
+
var _useState5 = React.useState(),
|
|
37450
|
+
msalInstance = _useState5[0],
|
|
37451
|
+
setMsalInstance = _useState5[1];
|
|
37387
37452
|
|
|
37388
37453
|
var toggle = React.useCallback(function () {
|
|
37389
37454
|
setOpenLogin(!openLogin);
|
|
37390
37455
|
}, [openLogin]);
|
|
37391
37456
|
|
|
37392
|
-
var
|
|
37393
|
-
isShowPassword =
|
|
37394
|
-
setIsShowPassword =
|
|
37457
|
+
var _useState6 = React.useState(false),
|
|
37458
|
+
isShowPassword = _useState6[0],
|
|
37459
|
+
setIsShowPassword = _useState6[1];
|
|
37395
37460
|
|
|
37396
37461
|
React.useEffect(function () {
|
|
37397
37462
|
document.title = TITLE;
|
|
@@ -37573,40 +37638,51 @@ var useLogin = function useLogin() {
|
|
|
37573
37638
|
}
|
|
37574
37639
|
};
|
|
37575
37640
|
|
|
37576
|
-
var fnIsCheckLogin = React.useCallback(function (data, token, clickHandler) {
|
|
37641
|
+
var fnIsCheckLogin = React.useCallback(function (type, data, token, clickHandler) {
|
|
37577
37642
|
try {
|
|
37578
|
-
var
|
|
37643
|
+
var _temp16 = function _temp16() {
|
|
37579
37644
|
dispatch(setLoading(false));
|
|
37580
37645
|
};
|
|
37581
37646
|
|
|
37582
37647
|
dispatch(setLoading(true));
|
|
37583
37648
|
|
|
37584
|
-
var
|
|
37585
|
-
return Promise.resolve(checkUserGoogle(data)).then(function (res) {
|
|
37649
|
+
var _temp17 = _catch(function () {
|
|
37650
|
+
return Promise.resolve(checkUserGoogle(type, data)).then(function (res) {
|
|
37586
37651
|
var checkUser = res.data;
|
|
37587
37652
|
|
|
37588
|
-
var
|
|
37653
|
+
var _temp13 = function () {
|
|
37589
37654
|
if (checkUser) {
|
|
37590
|
-
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
captcha: clickHandlerRes,
|
|
37594
|
-
isLoginGoogle: true,
|
|
37595
|
-
rememberMe: false,
|
|
37596
|
-
password: "default",
|
|
37597
|
-
accessToken: token,
|
|
37598
|
-
loginType: LoginType.Google
|
|
37599
|
-
};
|
|
37600
|
-
return Promise.resolve(userLogin(dataUser)).then(function () {
|
|
37601
|
-
setIsLoginGoogle(false);
|
|
37655
|
+
var _temp18 = function _temp18() {
|
|
37656
|
+
return Promise.resolve(userLogin(_dataUser)).then(function () {
|
|
37657
|
+
dispatch(setIsLoginGoogle(false));
|
|
37602
37658
|
});
|
|
37603
|
-
}
|
|
37659
|
+
};
|
|
37660
|
+
|
|
37661
|
+
var _dataUser = {
|
|
37662
|
+
email: data.email,
|
|
37663
|
+
isLoginGoogle: true,
|
|
37664
|
+
rememberMe: false,
|
|
37665
|
+
password: "default",
|
|
37666
|
+
accessToken: token,
|
|
37667
|
+
captcha: "",
|
|
37668
|
+
loginType: LoginType.Google
|
|
37669
|
+
};
|
|
37670
|
+
|
|
37671
|
+
var _temp19 = function () {
|
|
37672
|
+
if (clickHandler != null) {
|
|
37673
|
+
return Promise.resolve(clickHandler()).then(function (clickHandlerRes) {
|
|
37674
|
+
_dataUser.captcha = clickHandlerRes;
|
|
37675
|
+
});
|
|
37676
|
+
}
|
|
37677
|
+
}();
|
|
37678
|
+
|
|
37679
|
+
return _temp19 && _temp19.then ? _temp19.then(_temp18) : _temp18(_temp19);
|
|
37604
37680
|
} else {
|
|
37605
|
-
setIsLoginGoogle(true);
|
|
37681
|
+
dispatch(setIsLoginGoogle(true));
|
|
37606
37682
|
}
|
|
37607
37683
|
}();
|
|
37608
37684
|
|
|
37609
|
-
if (
|
|
37685
|
+
if (_temp13 && _temp13.then) return _temp13.then(function () {});
|
|
37610
37686
|
});
|
|
37611
37687
|
}, function (err) {
|
|
37612
37688
|
var _err$response4, _err$response4$data;
|
|
@@ -37617,7 +37693,7 @@ var useLogin = function useLogin() {
|
|
|
37617
37693
|
}));
|
|
37618
37694
|
});
|
|
37619
37695
|
|
|
37620
|
-
return Promise.resolve(
|
|
37696
|
+
return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(_temp16) : _temp16(_temp17));
|
|
37621
37697
|
} catch (e) {
|
|
37622
37698
|
return Promise.reject(e);
|
|
37623
37699
|
}
|
|
@@ -37625,14 +37701,14 @@ var useLogin = function useLogin() {
|
|
|
37625
37701
|
|
|
37626
37702
|
var submitLogin = function submitLogin(teacherId, clickHandler) {
|
|
37627
37703
|
try {
|
|
37628
|
-
var
|
|
37629
|
-
setIsLoginGoogle(false);
|
|
37704
|
+
var _temp23 = function _temp23() {
|
|
37705
|
+
dispatch(setIsLoginGoogle(false));
|
|
37630
37706
|
dispatch(setLoading(false));
|
|
37631
37707
|
};
|
|
37632
37708
|
|
|
37633
37709
|
dispatch(setLoading(true));
|
|
37634
37710
|
|
|
37635
|
-
var
|
|
37711
|
+
var _temp24 = _catch(function () {
|
|
37636
37712
|
var data = {
|
|
37637
37713
|
firstName: infoUser.firstName,
|
|
37638
37714
|
lastName: infoUser.lastName,
|
|
@@ -37643,7 +37719,7 @@ var useLogin = function useLogin() {
|
|
|
37643
37719
|
teacherId: teacherId
|
|
37644
37720
|
};
|
|
37645
37721
|
return Promise.resolve(registerUserStudent(data)).then(function (res) {
|
|
37646
|
-
var
|
|
37722
|
+
var _temp20 = function () {
|
|
37647
37723
|
if (res.data) {
|
|
37648
37724
|
return Promise.resolve(clickHandler()).then(function (clickHandlerRes) {
|
|
37649
37725
|
var dataLogin = {
|
|
@@ -37655,7 +37731,7 @@ var useLogin = function useLogin() {
|
|
|
37655
37731
|
accessToken: infoUser.accessToken,
|
|
37656
37732
|
loginType: LoginType.Google
|
|
37657
37733
|
};
|
|
37658
|
-
setIsLoginGoogle(false);
|
|
37734
|
+
dispatch(setIsLoginGoogle(false));
|
|
37659
37735
|
return Promise.resolve(userLogin(dataLogin)).then(function () {
|
|
37660
37736
|
history.push(HOMEPAGE_STUDENT);
|
|
37661
37737
|
});
|
|
@@ -37663,7 +37739,7 @@ var useLogin = function useLogin() {
|
|
|
37663
37739
|
}
|
|
37664
37740
|
}();
|
|
37665
37741
|
|
|
37666
|
-
if (
|
|
37742
|
+
if (_temp20 && _temp20.then) return _temp20.then(function () {});
|
|
37667
37743
|
});
|
|
37668
37744
|
}, function (err) {
|
|
37669
37745
|
var _err$response5, _err$response5$data;
|
|
@@ -37674,7 +37750,7 @@ var useLogin = function useLogin() {
|
|
|
37674
37750
|
}));
|
|
37675
37751
|
});
|
|
37676
37752
|
|
|
37677
|
-
return Promise.resolve(
|
|
37753
|
+
return Promise.resolve(_temp24 && _temp24.then ? _temp24.then(_temp23) : _temp23(_temp24));
|
|
37678
37754
|
} catch (e) {
|
|
37679
37755
|
return Promise.reject(e);
|
|
37680
37756
|
}
|
|
@@ -37682,7 +37758,7 @@ var useLogin = function useLogin() {
|
|
|
37682
37758
|
|
|
37683
37759
|
var getInformationSetting = function getInformationSetting() {
|
|
37684
37760
|
try {
|
|
37685
|
-
var
|
|
37761
|
+
var _temp26 = _catch(function () {
|
|
37686
37762
|
return Promise.resolve(getSchoolSettings()).then(function (res) {
|
|
37687
37763
|
dispatch(setSandboxMode(res.data.isSandboxMode));
|
|
37688
37764
|
});
|
|
@@ -37690,14 +37766,89 @@ var useLogin = function useLogin() {
|
|
|
37690
37766
|
console.error(err);
|
|
37691
37767
|
});
|
|
37692
37768
|
|
|
37693
|
-
return Promise.resolve(
|
|
37769
|
+
return Promise.resolve(_temp26 && _temp26.then ? _temp26.then(function () {}) : void 0);
|
|
37770
|
+
} catch (e) {
|
|
37771
|
+
return Promise.reject(e);
|
|
37772
|
+
}
|
|
37773
|
+
};
|
|
37774
|
+
|
|
37775
|
+
var fnLoginSSO = function fnLoginSSO(clickHandler) {
|
|
37776
|
+
try {
|
|
37777
|
+
msalInstance.handleRedirectPromise().then(function (tokenResponse) {
|
|
37778
|
+
try {
|
|
37779
|
+
var _temp29 = function () {
|
|
37780
|
+
if (!tokenResponse) {
|
|
37781
|
+
var accounts = msalInstance.getAllAccounts();
|
|
37782
|
+
|
|
37783
|
+
var _temp30 = function () {
|
|
37784
|
+
if (accounts.length === 0) {
|
|
37785
|
+
msalInstance.loginRedirect();
|
|
37786
|
+
} else {
|
|
37787
|
+
var currentAccount = accounts[0];
|
|
37788
|
+
return Promise.resolve(getCurrentAccount(currentAccount, clickHandler)).then(function () {});
|
|
37789
|
+
}
|
|
37790
|
+
}();
|
|
37791
|
+
|
|
37792
|
+
if (_temp30 && _temp30.then) return _temp30.then(function () {});
|
|
37793
|
+
} else {
|
|
37794
|
+
var currentAccount = tokenResponse.account;
|
|
37795
|
+
return Promise.resolve(getCurrentAccount(currentAccount, clickHandler)).then(function () {});
|
|
37796
|
+
}
|
|
37797
|
+
}();
|
|
37798
|
+
|
|
37799
|
+
return Promise.resolve(_temp29 && _temp29.then ? _temp29.then(function () {}) : void 0);
|
|
37800
|
+
} catch (e) {
|
|
37801
|
+
return Promise.reject(e);
|
|
37802
|
+
}
|
|
37803
|
+
})["catch"](function (err) {
|
|
37804
|
+
console.error(err);
|
|
37805
|
+
});
|
|
37806
|
+
return Promise.resolve();
|
|
37807
|
+
} catch (e) {
|
|
37808
|
+
return Promise.reject(e);
|
|
37809
|
+
}
|
|
37810
|
+
};
|
|
37811
|
+
|
|
37812
|
+
var getCurrentAccount = function getCurrentAccount(account, clickHandler) {
|
|
37813
|
+
try {
|
|
37814
|
+
var fullName = account.name;
|
|
37815
|
+
var infoLogin = {
|
|
37816
|
+
firstName: fullName.split(' ').slice(0, -1).join(' '),
|
|
37817
|
+
lastName: fullName.split(' ').slice(-1).join(' '),
|
|
37818
|
+
fullName: fullName,
|
|
37819
|
+
imageUrl: "",
|
|
37820
|
+
email: account.username,
|
|
37821
|
+
accessToken: account.idTokenClaims.aio,
|
|
37822
|
+
googleId: account.tenantId
|
|
37823
|
+
};
|
|
37824
|
+
dispatch(setInforUserGoogle(infoLogin));
|
|
37825
|
+
return Promise.resolve(fnIsCheckLogin(TypeLogin.MicrosoftSSO, infoLogin, account.idTokenClaims.aio, clickHandler)).then(function () {});
|
|
37826
|
+
} catch (e) {
|
|
37827
|
+
return Promise.reject(e);
|
|
37828
|
+
}
|
|
37829
|
+
};
|
|
37830
|
+
|
|
37831
|
+
var initInformationSSO = function initInformationSSO() {
|
|
37832
|
+
try {
|
|
37833
|
+
var _msalInstance = new msalBrowser.PublicClientApplication(msalConfig);
|
|
37834
|
+
|
|
37835
|
+
setMsalInstance(_msalInstance);
|
|
37836
|
+
return Promise.resolve();
|
|
37694
37837
|
} catch (e) {
|
|
37695
37838
|
return Promise.reject(e);
|
|
37696
37839
|
}
|
|
37697
37840
|
};
|
|
37698
37841
|
|
|
37842
|
+
React.useEffect(function () {
|
|
37843
|
+
var redirectUrl = window.location.href;
|
|
37844
|
+
|
|
37845
|
+
if (!!msalInstance && redirectUrl.includes("code") && redirectUrl.includes("client_info")) {
|
|
37846
|
+
fnLoginSSO();
|
|
37847
|
+
}
|
|
37848
|
+
}, [JSON.stringify(msalInstance)]);
|
|
37699
37849
|
React.useEffect(function () {
|
|
37700
37850
|
getInformationSetting();
|
|
37851
|
+
initInformationSSO();
|
|
37701
37852
|
}, []);
|
|
37702
37853
|
return {
|
|
37703
37854
|
defaultInfo: defaultInfo,
|
|
@@ -37709,13 +37860,12 @@ var useLogin = function useLogin() {
|
|
|
37709
37860
|
fnIsCheckLogin: fnIsCheckLogin,
|
|
37710
37861
|
isLoginGoogle: isLoginGoogle,
|
|
37711
37862
|
infoUser: infoUser,
|
|
37712
|
-
setInfoUser: setInfoUser,
|
|
37713
37863
|
submitLogin: submitLogin,
|
|
37714
|
-
setIsLoginGoogle: setIsLoginGoogle,
|
|
37715
37864
|
googleClientId: googleClientId,
|
|
37716
37865
|
googleRecaptchaId: googleRecaptchaId,
|
|
37717
37866
|
handleCancelModelAssign: handleCancelModelAssign,
|
|
37718
|
-
openModelAssign: openModelAssign
|
|
37867
|
+
openModelAssign: openModelAssign,
|
|
37868
|
+
fnLoginSSO: fnLoginSSO
|
|
37719
37869
|
};
|
|
37720
37870
|
};
|
|
37721
37871
|
|
|
@@ -37743,8 +37893,7 @@ var BlockSelectTeacher = function BlockSelectTeacher(_ref) {
|
|
|
37743
37893
|
openModal = _ref.openModal,
|
|
37744
37894
|
onSubmit = _ref.onSubmit,
|
|
37745
37895
|
token = _ref.token,
|
|
37746
|
-
email = _ref.email
|
|
37747
|
-
setOpenModal = _ref.setOpenModal;
|
|
37896
|
+
email = _ref.email;
|
|
37748
37897
|
|
|
37749
37898
|
var _useState = React.useState(false),
|
|
37750
37899
|
modal = _useState[0],
|
|
@@ -37753,12 +37902,6 @@ var BlockSelectTeacher = function BlockSelectTeacher(_ref) {
|
|
|
37753
37902
|
React.useEffect(function () {
|
|
37754
37903
|
setModal(openModal);
|
|
37755
37904
|
}, [openModal]);
|
|
37756
|
-
|
|
37757
|
-
var toggle = function toggle() {
|
|
37758
|
-
setModal(!modal);
|
|
37759
|
-
setOpenModal(!modal);
|
|
37760
|
-
};
|
|
37761
|
-
|
|
37762
37905
|
var dispatch = reactRedux.useDispatch();
|
|
37763
37906
|
|
|
37764
37907
|
var _useState2 = React.useState([]),
|
|
@@ -37778,6 +37921,12 @@ var BlockSelectTeacher = function BlockSelectTeacher(_ref) {
|
|
|
37778
37921
|
setLoading = _useState5[1];
|
|
37779
37922
|
|
|
37780
37923
|
var timeout = React.useRef();
|
|
37924
|
+
|
|
37925
|
+
var toggle = function toggle() {
|
|
37926
|
+
setModal(!modal);
|
|
37927
|
+
dispatch(setIsLoginGoogle(!modal));
|
|
37928
|
+
};
|
|
37929
|
+
|
|
37781
37930
|
var loadData = React.useCallback(function () {
|
|
37782
37931
|
try {
|
|
37783
37932
|
var _temp3 = function _temp3() {
|
|
@@ -37886,16 +38035,17 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
37886
38035
|
setIsShowPassword = _useLogin.setIsShowPassword,
|
|
37887
38036
|
fnIsCheckLogin = _useLogin.fnIsCheckLogin,
|
|
37888
38037
|
isLoginGoogle = _useLogin.isLoginGoogle,
|
|
37889
|
-
setInfoUser = _useLogin.setInfoUser,
|
|
37890
38038
|
submitLogin = _useLogin.submitLogin,
|
|
37891
38039
|
infoUser = _useLogin.infoUser,
|
|
37892
|
-
|
|
37893
|
-
|
|
38040
|
+
googleClientId = _useLogin.googleClientId,
|
|
38041
|
+
fnLoginSSO = _useLogin.fnLoginSSO;
|
|
37894
38042
|
|
|
37895
38043
|
var togglePasswordVisible = function togglePasswordVisible() {
|
|
37896
38044
|
return setIsShowPassword(!isShowPassword);
|
|
37897
38045
|
};
|
|
37898
38046
|
|
|
38047
|
+
var dispatch = reactRedux.useDispatch();
|
|
38048
|
+
|
|
37899
38049
|
var _useGoogleReCaptcha = reactGoogleRecaptchaV3.useGoogleReCaptcha(),
|
|
37900
38050
|
executeRecaptcha = _useGoogleReCaptcha.executeRecaptcha;
|
|
37901
38051
|
|
|
@@ -37929,6 +38079,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
37929
38079
|
return;
|
|
37930
38080
|
}
|
|
37931
38081
|
|
|
38082
|
+
console.log("assss");
|
|
37932
38083
|
var infoLogin = {
|
|
37933
38084
|
firstName: givenName,
|
|
37934
38085
|
lastName: familyName,
|
|
@@ -37938,8 +38089,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
37938
38089
|
accessToken: accessToken,
|
|
37939
38090
|
googleId: googleId
|
|
37940
38091
|
};
|
|
37941
|
-
|
|
37942
|
-
fnIsCheckLogin(infoLogin, accessToken, clickHandler);
|
|
38092
|
+
dispatch(setInforUserGoogle(infoLogin));
|
|
38093
|
+
fnIsCheckLogin(TypeLogin.Google, infoLogin, accessToken, clickHandler);
|
|
37943
38094
|
}
|
|
37944
38095
|
};
|
|
37945
38096
|
|
|
@@ -38024,6 +38175,15 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
38024
38175
|
cookiePolicy: 'single_host_origin',
|
|
38025
38176
|
className: "" + styles["btn-login-google"]
|
|
38026
38177
|
})), React__default.createElement("div", {
|
|
38178
|
+
className: styles["btn-login-sso"] + " mb-3"
|
|
38179
|
+
}, React__default.createElement("div", {
|
|
38180
|
+
className: styles["btn-login-with-sso"],
|
|
38181
|
+
onClick: function onClick() {
|
|
38182
|
+
return fnLoginSSO(clickHandler);
|
|
38183
|
+
}
|
|
38184
|
+
}, React__default.createElement("img", {
|
|
38185
|
+
src: "images/Single-Sign-On.png"
|
|
38186
|
+
}), " Login with SSO")), React__default.createElement("div", {
|
|
38027
38187
|
className: "d-flex justify-content-between"
|
|
38028
38188
|
}, React__default.createElement(reactRouterDom.Link, {
|
|
38029
38189
|
to: "/forgot-password",
|
|
@@ -38046,8 +38206,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
38046
38206
|
},
|
|
38047
38207
|
openModal: isLoginGoogle,
|
|
38048
38208
|
token: infoUser.accessToken,
|
|
38049
|
-
email: infoUser.email
|
|
38050
|
-
setOpenModal: setIsLoginGoogle
|
|
38209
|
+
email: infoUser.email
|
|
38051
38210
|
}));
|
|
38052
38211
|
};
|
|
38053
38212
|
|
|
@@ -47062,6 +47221,8 @@ var initialState = {
|
|
|
47062
47221
|
isEnableSurvey: false,
|
|
47063
47222
|
isConversationOneToOne: false,
|
|
47064
47223
|
isSandboxMode: false,
|
|
47224
|
+
isLoginGoogle: false,
|
|
47225
|
+
inforUserGoogle: null,
|
|
47065
47226
|
language: DEFAULT_LANGUAGE_CODE,
|
|
47066
47227
|
amplitude: {
|
|
47067
47228
|
user_id: "",
|
|
@@ -47087,6 +47248,10 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
|
47087
47248
|
state.user = action.payload;
|
|
47088
47249
|
}).addCase(setSidebar, function (state, action) {
|
|
47089
47250
|
state.sidebarShow = action.payload;
|
|
47251
|
+
}).addCase(setIsLoginGoogle, function (state, action) {
|
|
47252
|
+
state.isLoginGoogle = action.payload;
|
|
47253
|
+
}).addCase(setInforUserGoogle, function (state, action) {
|
|
47254
|
+
state.inforUserGoogle = action.payload;
|
|
47090
47255
|
}).addCase(setAlert, function (state, action) {
|
|
47091
47256
|
state.alert = action.payload;
|
|
47092
47257
|
}).addCase(reset, function (_state, _action) {
|
|
@@ -47962,6 +48127,24 @@ var navMobileReducer = toolkit.createReducer(initialState$B, function (builder)
|
|
|
47962
48127
|
});
|
|
47963
48128
|
});
|
|
47964
48129
|
|
|
48130
|
+
var setWeeklyQuestList = toolkit.createAction("setWeeklyQuestList");
|
|
48131
|
+
var setOpenModelCongratulation = toolkit.createAction("setOpenModelCongratulation");
|
|
48132
|
+
|
|
48133
|
+
var initialState$C = {
|
|
48134
|
+
isOpenModelCongratulation: false,
|
|
48135
|
+
lastQuest: undefined,
|
|
48136
|
+
weeklyQuests: []
|
|
48137
|
+
};
|
|
48138
|
+
var weeklyQuestReducer = toolkit.createReducer(initialState$C, function (builder) {
|
|
48139
|
+
builder.addCase(setWeeklyQuestList, function (state, action) {
|
|
48140
|
+
state.weeklyQuests = action.payload;
|
|
48141
|
+
}).addCase(setOpenModelCongratulation, function (state, action) {
|
|
48142
|
+
state.isOpenModelCongratulation = action.payload;
|
|
48143
|
+
}).addCase(reset, function (_state, _action) {
|
|
48144
|
+
return initialState$C;
|
|
48145
|
+
});
|
|
48146
|
+
});
|
|
48147
|
+
|
|
47965
48148
|
var rootReducer = combineReducers({
|
|
47966
48149
|
common: commonReducer,
|
|
47967
48150
|
classes: classReducer,
|
|
@@ -48002,7 +48185,8 @@ var rootReducer = combineReducers({
|
|
|
48002
48185
|
widget: widgetReducer,
|
|
48003
48186
|
bandScores: commonReducer$h,
|
|
48004
48187
|
schoolBlankDays: commonReducer$i,
|
|
48005
|
-
navMobileReducer: navMobileReducer
|
|
48188
|
+
navMobileReducer: navMobileReducer,
|
|
48189
|
+
weeklyQuests: weeklyQuestReducer
|
|
48006
48190
|
});
|
|
48007
48191
|
|
|
48008
48192
|
var store = toolkit.configureStore({
|
|
@@ -48458,6 +48642,7 @@ var TheLayout = function TheLayout(_ref) {
|
|
|
48458
48642
|
|
|
48459
48643
|
var resetAuth = function resetAuth() {
|
|
48460
48644
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
48645
|
+
localStorage.removeItem("ROLES");
|
|
48461
48646
|
history.push("/");
|
|
48462
48647
|
};
|
|
48463
48648
|
|
|
@@ -48625,6 +48810,7 @@ exports.setMailCategory = setMailCategory;
|
|
|
48625
48810
|
exports.setModal = setModal;
|
|
48626
48811
|
exports.setMoveItemQuestion = setMoveItemQuestion;
|
|
48627
48812
|
exports.setMyStudent = setMyStudent;
|
|
48813
|
+
exports.setOpenModelCongratulation = setOpenModelCongratulation;
|
|
48628
48814
|
exports.setQuestionByCategory = setQuestionByCategory;
|
|
48629
48815
|
exports.setQuestionCateList = setQuestionCateList;
|
|
48630
48816
|
exports.setQuestionList = setQuestionList;
|
|
@@ -48648,6 +48834,7 @@ exports.setTurnOffPassWhenChangeMode = setTurnOffPassWhenChangeMode;
|
|
|
48648
48834
|
exports.setTutorialScreenList = setTutorialScreenList;
|
|
48649
48835
|
exports.setUser = setUser;
|
|
48650
48836
|
exports.setUserList = setUserList;
|
|
48837
|
+
exports.setWeeklyQuestList = setWeeklyQuestList;
|
|
48651
48838
|
exports.showFontSize = showFontSize;
|
|
48652
48839
|
exports.showMenuBar = showMenuBar;
|
|
48653
48840
|
exports.store = store;
|