mario-core 2.10.13-release → 2.10.14-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/index.js +548 -478
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +551 -481
- package/dist/index.modern.js.map +1 -1
- package/package.json +105 -105
- package/dist/containers/Login/views/block/BlockAssignTeacherByCode.d.ts +0 -8
- package/dist/services/weeklyQuestService.d.ts +0 -1
- package/dist/types/WeeklyQuest.d.ts +0 -37
package/dist/index.modern.js
CHANGED
|
@@ -2,8 +2,8 @@ import 'bootstrap/dist/css/bootstrap.min.css';
|
|
|
2
2
|
import i18n from 'i18next';
|
|
3
3
|
import { initReactI18next, useTranslation } from 'react-i18next';
|
|
4
4
|
export { I18nextProvider, useTranslation } from 'react-i18next';
|
|
5
|
-
import React, { useCallback, useState, useEffect, useRef, Suspense, memo, Fragment, forwardRef, useImperativeHandle
|
|
6
|
-
import { Input, Form, FormGroup, Row, Col, Navbar, NavbarBrand, Collapse, Nav, NavItem, NavLink, Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Button, Alert, Pagination, PaginationItem, PaginationLink, Table, Label,
|
|
5
|
+
import React, { useCallback, useState, useEffect, useRef, useMemo, Suspense, memo, Fragment, forwardRef, useImperativeHandle } from 'react';
|
|
6
|
+
import { Input, Form, FormGroup, Row, Col, Navbar, NavbarBrand, Collapse, Nav, NavItem, NavLink, Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Modal, Button, Alert, Pagination, PaginationItem, PaginationLink, Table, Label, ModalHeader, ModalBody, ModalFooter, Popover, PopoverBody, TabContent, TabPane, Card, CardBody, CardText, Tooltip, CustomInput, CardImg, CardTitle, CardHeader } from 'reactstrap';
|
|
7
7
|
import { Link, useLocation, useHistory, Switch, Route, Prompt, useParams } from 'react-router-dom';
|
|
8
8
|
import { useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import { Formik } from 'formik';
|
|
@@ -17,7 +17,7 @@ import { track, setSessionId, init, Identify, identify } from '@amplitude/analyt
|
|
|
17
17
|
import moment from 'moment';
|
|
18
18
|
import { LogLevel, PublicClientApplication } from '@azure/msal-browser';
|
|
19
19
|
import { GiHamburgerMenu } from 'react-icons/gi';
|
|
20
|
-
import { CSidebar, CSidebarBrand, CSidebarNav, CCreateElement, CSidebarNavDivider, CSidebarNavDropdown, CSidebarNavItem, CSidebarNavTitle, CSidebarFooter,
|
|
20
|
+
import { CSidebar, CSidebarBrand, CSidebarNav, CCreateElement, CSidebarNavDivider, CSidebarNavDropdown, CSidebarNavItem, CSidebarNavTitle, CSidebarFooter, CHeader, CToggler, CHeaderBrand, CHeaderNav, CContainer } from '@coreui/react';
|
|
21
21
|
import { CgMenuRight } from 'react-icons/cg';
|
|
22
22
|
import { RiLogoutBoxRLine } from 'react-icons/ri';
|
|
23
23
|
import Pusher from 'pusher-js/with-encryption';
|
|
@@ -844,7 +844,7 @@ var email_notifications = "Email Notifications";
|
|
|
844
844
|
var turn_on_all_emails = "Turn on all emails";
|
|
845
845
|
var a_student_responds_to_a_1_1_readiness_to_learn_with_no = "A student responds to a 1-1 Readiness to Learn with “NO”";
|
|
846
846
|
var a_student_reported_a_low_safety_score_on_a_check_in = "A student reported a low safety score on a check-in";
|
|
847
|
-
var continue_as = "Continue as
|
|
847
|
+
var continue_as = "Continue as";
|
|
848
848
|
var admin = "Admin";
|
|
849
849
|
var counselor = "Counselor";
|
|
850
850
|
var support_teacher = "SupportTeacher";
|
|
@@ -2034,6 +2034,7 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
|
|
|
2034
2034
|
var leave = "leave";
|
|
2035
2035
|
var go_to_the_survey_dashboard = "Go to the Survey Dashboard";
|
|
2036
2036
|
var my_dashboard = "My Dashboard";
|
|
2037
|
+
var nice_choice_what_area_of_category_would_you_like_to_work_on = "Nice choice! What area of {{category}} would you like to work on?";
|
|
2037
2038
|
var nice_choice_what_area_of_academics_would_you_like_to_work_on = "Nice choice! What area of Academics would you like to work on?";
|
|
2038
2039
|
var nice_choice_what_area_of_organization_would_you_like_to_work_on = "Nice choice! What area of Organization would you like to work on?";
|
|
2039
2040
|
var nice_choice_what_area_of_focus_would_you_like_to_work_on = "Nice choice! What area of Focus would you like to work on?";
|
|
@@ -2107,7 +2108,7 @@ var add_1_1_conversation_notes = "Add 1-1 Conversation notes";
|
|
|
2107
2108
|
var save_data = "Save data";
|
|
2108
2109
|
var please_select_date_1_1_conversation = "Please select date 1-1 conversation!";
|
|
2109
2110
|
var please_write_something_to_this_1_1_conversation = "Please write something to this 1-1 conversation!";
|
|
2110
|
-
var data_1_1_conversation_cannot_exceed_300_characters = "Data 1-1 conversation cannot exceed
|
|
2111
|
+
var data_1_1_conversation_cannot_exceed_300_characters = "Data 1-1 conversation cannot exceed 1000 characters!";
|
|
2111
2112
|
var no_need_for_it = "No need for it";
|
|
2112
2113
|
var conversation_saved = "Conversation saved!";
|
|
2113
2114
|
var what_did_you_and_the_student_choose_as_an_action_step_would_you_like_to_add_it_as_a_goal = "What did you and the student choose as an action step?<br/>Would you like to add it as a Goal?";
|
|
@@ -2124,7 +2125,7 @@ var yes_view_student_goals = "Yes, view student goals";
|
|
|
2124
2125
|
var please_set_time_1_1_conversation = "Please set time 1-1 conversation";
|
|
2125
2126
|
var type_your_answer_here = "Type your answer here...";
|
|
2126
2127
|
var delete_bulk = "Delete Bulk";
|
|
2127
|
-
var number_of_students_with_at_least_one_very_low_metric = "
|
|
2128
|
+
var number_of_students_with_at_least_one_very_low_metric = "Students with concerning metrics";
|
|
2128
2129
|
var this_flags_if_the_student_is_not_ready_to_learn_or_has_at_least_one_success_or_readiness_to_learn_metrics_under_40 = "This flags if the student is not ready to learn or has at least one success, or readiness to learn metrics under 40%";
|
|
2129
2130
|
var of_students_have_concerned_metrics = "of students have concerned metrics";
|
|
2130
2131
|
var have_metrics_40 = "have metrics <40%";
|
|
@@ -2182,6 +2183,12 @@ var type_the_main_focus_of_this_session = "Type the main focus of this session";
|
|
|
2182
2183
|
var please_add_title_note = "Please add note title";
|
|
2183
2184
|
var notes_and_logs = "Notes and Logs";
|
|
2184
2185
|
var school_monthly_usage = "School Monthly Usage";
|
|
2186
|
+
var location$1 = "Location";
|
|
2187
|
+
var edit_my_profile = "Edit My Profile";
|
|
2188
|
+
var save_new_password = "Save new password";
|
|
2189
|
+
var teacher_code = "Teacher code";
|
|
2190
|
+
var number_of_conversations = "Number of conversations";
|
|
2191
|
+
var number_of_expected_conversations_based_on_the_goal = "Number of expected conversations based on the goal";
|
|
2185
2192
|
var lang_us = {
|
|
2186
2193
|
dashboard: dashboard,
|
|
2187
2194
|
user: user,
|
|
@@ -4220,6 +4227,7 @@ var lang_us = {
|
|
|
4220
4227
|
leave: leave,
|
|
4221
4228
|
go_to_the_survey_dashboard: go_to_the_survey_dashboard,
|
|
4222
4229
|
my_dashboard: my_dashboard,
|
|
4230
|
+
nice_choice_what_area_of_category_would_you_like_to_work_on: nice_choice_what_area_of_category_would_you_like_to_work_on,
|
|
4223
4231
|
"nice_choice_what_area_of_well-being_would_you_like_to_work_on": "Nice choice! What area of Well-being would you like to work on?",
|
|
4224
4232
|
nice_choice_what_area_of_academics_would_you_like_to_work_on: nice_choice_what_area_of_academics_would_you_like_to_work_on,
|
|
4225
4233
|
nice_choice_what_area_of_organization_would_you_like_to_work_on: nice_choice_what_area_of_organization_would_you_like_to_work_on,
|
|
@@ -4380,7 +4388,13 @@ var lang_us = {
|
|
|
4380
4388
|
type_the_main_focus_of_this_session: type_the_main_focus_of_this_session,
|
|
4381
4389
|
please_add_title_note: please_add_title_note,
|
|
4382
4390
|
notes_and_logs: notes_and_logs,
|
|
4383
|
-
school_monthly_usage: school_monthly_usage
|
|
4391
|
+
school_monthly_usage: school_monthly_usage,
|
|
4392
|
+
location: location$1,
|
|
4393
|
+
edit_my_profile: edit_my_profile,
|
|
4394
|
+
save_new_password: save_new_password,
|
|
4395
|
+
teacher_code: teacher_code,
|
|
4396
|
+
number_of_conversations: number_of_conversations,
|
|
4397
|
+
number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal
|
|
4384
4398
|
};
|
|
4385
4399
|
|
|
4386
4400
|
var dashboard$1 = "Dashboard";
|
|
@@ -5192,7 +5206,7 @@ var email_notifications$1 = "Email Notifications";
|
|
|
5192
5206
|
var turn_on_all_emails$1 = "Turn on all emails";
|
|
5193
5207
|
var a_student_responds_to_a_1_1_readiness_to_learn_with_no$1 = "A student responds to a 1-1 Readiness to Learn with “NO”";
|
|
5194
5208
|
var a_student_reported_a_low_safety_score_on_a_check_in$1 = "A student reported a low safety score on a check-in";
|
|
5195
|
-
var continue_as$1 = "Continue as
|
|
5209
|
+
var continue_as$1 = "Continue as";
|
|
5196
5210
|
var admin$1 = "Admin";
|
|
5197
5211
|
var counselor$1 = "Counselor";
|
|
5198
5212
|
var support_teacher$1 = "SupportTeacher";
|
|
@@ -6381,6 +6395,7 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
|
|
|
6381
6395
|
var leave$1 = "leave";
|
|
6382
6396
|
var go_to_the_survey_dashboard$1 = "Go to the Survey Dashboard";
|
|
6383
6397
|
var my_dashboard$1 = "My Dashboard";
|
|
6398
|
+
var nice_choice_what_area_of_category_would_you_like_to_work_on$1 = "Nice choice! What area of {{category}} would you like to work on?";
|
|
6384
6399
|
var nice_choice_what_area_of_academics_would_you_like_to_work_on$1 = "Nice choice! What area of Academics would you like to work on?";
|
|
6385
6400
|
var nice_choice_what_area_of_organization_would_you_like_to_work_on$1 = "Nice choice! What area of Organization would you like to work on?";
|
|
6386
6401
|
var nice_choice_what_area_of_focus_would_you_like_to_work_on$1 = "Nice choice! What area of Focus would you like to work on?";
|
|
@@ -6454,7 +6469,7 @@ var add_1_1_conversation_notes$1 = "Add 1-1 Conversation notes";
|
|
|
6454
6469
|
var save_data$1 = "Save data";
|
|
6455
6470
|
var please_select_date_1_1_conversation$1 = "Please select date 1-1 conversation!";
|
|
6456
6471
|
var please_write_something_to_this_1_1_conversation$1 = "Please write something to this 1-1 conversation!";
|
|
6457
|
-
var data_1_1_conversation_cannot_exceed_300_characters$1 = "Data 1-1 conversation cannot exceed
|
|
6472
|
+
var data_1_1_conversation_cannot_exceed_300_characters$1 = "Data 1-1 conversation cannot exceed 1000 characters!";
|
|
6458
6473
|
var no_need_for_it$1 = "No need for it";
|
|
6459
6474
|
var conversation_saved$1 = "Conversation saved!";
|
|
6460
6475
|
var what_did_you_and_the_student_choose_as_an_action_step_would_you_like_to_add_it_as_a_goal$1 = "What did you and the student choose as an action step?<br/>Would you like to add it as a Goal?";
|
|
@@ -6471,7 +6486,7 @@ var yes_view_student_goals$1 = "Yes, view student goals";
|
|
|
6471
6486
|
var please_set_time_1_1_conversation$1 = "Please set time 1-1 conversation";
|
|
6472
6487
|
var type_your_answer_here$1 = "Type your answer here...";
|
|
6473
6488
|
var delete_bulk$1 = "Delete Bulk";
|
|
6474
|
-
var number_of_students_with_at_least_one_very_low_metric$1 = "
|
|
6489
|
+
var number_of_students_with_at_least_one_very_low_metric$1 = "Students with concerning metrics";
|
|
6475
6490
|
var this_flags_if_the_student_is_not_ready_to_learn_or_has_at_least_one_success_or_readiness_to_learn_metrics_under_40$1 = "This flags if the student is not ready to learn or has at least one success, or readiness to learn metrics under 40%";
|
|
6476
6491
|
var of_students_have_concerned_metrics$1 = "of students have concerned metrics";
|
|
6477
6492
|
var have_metrics_40$1 = "have metrics <40%";
|
|
@@ -6527,6 +6542,12 @@ var type_the_main_focus_of_this_session$1 = "Type the main focus of this session
|
|
|
6527
6542
|
var please_add_title_note$1 = "Please add note title";
|
|
6528
6543
|
var notes_and_logs$1 = "Notes and Logs";
|
|
6529
6544
|
var school_monthly_usage$1 = "School Monthly Usage";
|
|
6545
|
+
var location$2 = "Location";
|
|
6546
|
+
var edit_my_profile$1 = "Edit My Profile";
|
|
6547
|
+
var save_new_password$1 = "Save new password";
|
|
6548
|
+
var teacher_code$1 = "Teacher code";
|
|
6549
|
+
var number_of_conversations$1 = "Number of conversations";
|
|
6550
|
+
var number_of_expected_conversations_based_on_the_goal$1 = "Number of expected conversations based on the goal";
|
|
6530
6551
|
var lang_uk = {
|
|
6531
6552
|
dashboard: dashboard$1,
|
|
6532
6553
|
user: user$1,
|
|
@@ -8565,6 +8586,7 @@ var lang_uk = {
|
|
|
8565
8586
|
leave: leave$1,
|
|
8566
8587
|
go_to_the_survey_dashboard: go_to_the_survey_dashboard$1,
|
|
8567
8588
|
my_dashboard: my_dashboard$1,
|
|
8589
|
+
nice_choice_what_area_of_category_would_you_like_to_work_on: nice_choice_what_area_of_category_would_you_like_to_work_on$1,
|
|
8568
8590
|
"nice_choice_what_area_of_well-being_would_you_like_to_work_on": "Nice choice! What area of Well-being would you like to work on?",
|
|
8569
8591
|
nice_choice_what_area_of_academics_would_you_like_to_work_on: nice_choice_what_area_of_academics_would_you_like_to_work_on$1,
|
|
8570
8592
|
nice_choice_what_area_of_organization_would_you_like_to_work_on: nice_choice_what_area_of_organization_would_you_like_to_work_on$1,
|
|
@@ -8723,7 +8745,13 @@ var lang_uk = {
|
|
|
8723
8745
|
type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$1,
|
|
8724
8746
|
please_add_title_note: please_add_title_note$1,
|
|
8725
8747
|
notes_and_logs: notes_and_logs$1,
|
|
8726
|
-
school_monthly_usage: school_monthly_usage$1
|
|
8748
|
+
school_monthly_usage: school_monthly_usage$1,
|
|
8749
|
+
location: location$2,
|
|
8750
|
+
edit_my_profile: edit_my_profile$1,
|
|
8751
|
+
save_new_password: save_new_password$1,
|
|
8752
|
+
teacher_code: teacher_code$1,
|
|
8753
|
+
number_of_conversations: number_of_conversations$1,
|
|
8754
|
+
number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$1
|
|
8727
8755
|
};
|
|
8728
8756
|
|
|
8729
8757
|
var dashboard$2 = "لوحة المعلومات";
|
|
@@ -9532,7 +9560,7 @@ var email_notifications$2 = "إشعارات البريد الإلكتروني";
|
|
|
9532
9560
|
var turn_on_all_emails$2 = "تشغيل جميع عناوين البريد الإلكتروني";
|
|
9533
9561
|
var a_student_responds_to_a_1_1_readiness_to_learn_with_no$2 = "استجابة طالب للاستعداد للتعلم في المحادثة الفردية بـ \"لا\"";
|
|
9534
9562
|
var a_student_reported_a_low_safety_score_on_a_check_in$2 = "إبلاغ طالب عن انخفاض درجة السلامة عند تسجيل حضوره";
|
|
9535
|
-
var continue_as$2 = "الاستمرار
|
|
9563
|
+
var continue_as$2 = "الاستمرار كـ";
|
|
9536
9564
|
var admin$2 = "المدير";
|
|
9537
9565
|
var counselor$2 = "المستشار";
|
|
9538
9566
|
var support_teacher$2 = "معلِّم الدعم";
|
|
@@ -10756,6 +10784,7 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
|
|
|
10756
10784
|
var leave$2 = "يترك";
|
|
10757
10785
|
var go_to_the_survey_dashboard$2 = "انتقل إلى لوحة معلومات الاستطلاع";
|
|
10758
10786
|
var my_dashboard$2 = "لوحة التحكم الخاصة بي";
|
|
10787
|
+
var nice_choice_what_area_of_category_would_you_like_to_work_on$2 = "اختيار جميل! ما هو مجال {{category}} الذي ترغب في العمل عليه؟";
|
|
10759
10788
|
var nice_choice_what_area_of_academics_would_you_like_to_work_on$2 = "اختيار جميل! ما هو المجال الأكاديمي الذي ترغب بالعمل فيه؟";
|
|
10760
10789
|
var nice_choice_what_area_of_organization_would_you_like_to_work_on$2 = "اختيار جميل! في أي مجال من مجالات المنظمة تود العمل؟";
|
|
10761
10790
|
var nice_choice_what_area_of_focus_would_you_like_to_work_on$2 = "اختيار جميل! ما هو مجال التركيز الذي ترغب في العمل عليه؟";
|
|
@@ -10826,7 +10855,7 @@ var add_1_1_conversation_notes$2 = "Add 1-1 Conversation notes";
|
|
|
10826
10855
|
var save_data$2 = "Save data";
|
|
10827
10856
|
var please_select_date_1_1_conversation$2 = "Please select date 1-1 conversation!";
|
|
10828
10857
|
var please_write_something_to_this_1_1_conversation$2 = "Please write something to this 1-1 conversation!";
|
|
10829
|
-
var data_1_1_conversation_cannot_exceed_300_characters$2 = "Data 1-1 conversation cannot exceed
|
|
10858
|
+
var data_1_1_conversation_cannot_exceed_300_characters$2 = "Data 1-1 conversation cannot exceed 1000 characters!";
|
|
10830
10859
|
var no_need_for_it$2 = "No need for it";
|
|
10831
10860
|
var conversation_saved$2 = "Conversation saved!";
|
|
10832
10861
|
var what_did_you_and_the_student_choose_as_an_action_step_would_you_like_to_add_it_as_a_goal$2 = "What did you and the student choose as an action step?<br/>Would you like to add it as a Goal?";
|
|
@@ -10844,7 +10873,7 @@ var please_set_time_1_1_conversation$2 = "Please set time 1-1 conversation";
|
|
|
10844
10873
|
var type_your_answer_here$2 = "Type your answer here...";
|
|
10845
10874
|
var not_ready_to_learn$2 = "Not ready to learn";
|
|
10846
10875
|
var delete_bulk$2 = "Delete Bulk";
|
|
10847
|
-
var number_of_students_with_at_least_one_very_low_metric$2 = "
|
|
10876
|
+
var number_of_students_with_at_least_one_very_low_metric$2 = "Students with concerning metrics";
|
|
10848
10877
|
var this_flags_if_the_student_is_not_ready_to_learn_or_has_at_least_one_success_or_readiness_to_learn_metrics_under_40$2 = "This flags if the student is not ready to learn or has at least one success, or readiness to learn metrics under 40%";
|
|
10849
10878
|
var of_students_have_concerned_metrics$2 = "of students have concerned metrics";
|
|
10850
10879
|
var have_metrics_40$2 = "have metrics <40%";
|
|
@@ -10900,6 +10929,12 @@ var type_the_main_focus_of_this_session$2 = "Type the main focus of this session
|
|
|
10900
10929
|
var please_add_title_note$2 = "Please add note title";
|
|
10901
10930
|
var notes_and_logs$2 = "Notes and Logs";
|
|
10902
10931
|
var school_monthly_usage$2 = "School Monthly Usage";
|
|
10932
|
+
var location$3 = "Location";
|
|
10933
|
+
var edit_my_profile$2 = "Edit My Profile";
|
|
10934
|
+
var save_new_password$2 = "Save new password";
|
|
10935
|
+
var teacher_code$2 = "Teacher code";
|
|
10936
|
+
var number_of_conversations$2 = "Number of conversations";
|
|
10937
|
+
var number_of_expected_conversations_based_on_the_goal$2 = "Number of expected conversations based on the goal";
|
|
10903
10938
|
var lang_ar = {
|
|
10904
10939
|
dashboard: dashboard$2,
|
|
10905
10940
|
user: user$2,
|
|
@@ -12972,6 +13007,7 @@ var lang_ar = {
|
|
|
12972
13007
|
leave: leave$2,
|
|
12973
13008
|
go_to_the_survey_dashboard: go_to_the_survey_dashboard$2,
|
|
12974
13009
|
my_dashboard: my_dashboard$2,
|
|
13010
|
+
nice_choice_what_area_of_category_would_you_like_to_work_on: nice_choice_what_area_of_category_would_you_like_to_work_on$2,
|
|
12975
13011
|
"nice_choice_what_area_of_well-being_would_you_like_to_work_on": "اختيار جميل! ما هو مجال الصحة والرفاهية الذي ترغب في العمل فيه؟",
|
|
12976
13012
|
nice_choice_what_area_of_academics_would_you_like_to_work_on: nice_choice_what_area_of_academics_would_you_like_to_work_on$2,
|
|
12977
13013
|
nice_choice_what_area_of_organization_would_you_like_to_work_on: nice_choice_what_area_of_organization_would_you_like_to_work_on$2,
|
|
@@ -13128,7 +13164,13 @@ var lang_ar = {
|
|
|
13128
13164
|
type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$2,
|
|
13129
13165
|
please_add_title_note: please_add_title_note$2,
|
|
13130
13166
|
notes_and_logs: notes_and_logs$2,
|
|
13131
|
-
school_monthly_usage: school_monthly_usage$2
|
|
13167
|
+
school_monthly_usage: school_monthly_usage$2,
|
|
13168
|
+
location: location$3,
|
|
13169
|
+
edit_my_profile: edit_my_profile$2,
|
|
13170
|
+
save_new_password: save_new_password$2,
|
|
13171
|
+
teacher_code: teacher_code$2,
|
|
13172
|
+
number_of_conversations: number_of_conversations$2,
|
|
13173
|
+
number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$2
|
|
13132
13174
|
};
|
|
13133
13175
|
|
|
13134
13176
|
var dashboard$3 = "Cuadro de mandos";
|
|
@@ -13937,7 +13979,7 @@ var email_notifications$3 = "Notificaciones por correo electrónico";
|
|
|
13937
13979
|
var turn_on_all_emails$3 = "Active todos los correos electrónicos";
|
|
13938
13980
|
var a_student_responds_to_a_1_1_readiness_to_learn_with_no$3 = "Un estudiante responde a un 1-1 Preparación para aprender con un No";
|
|
13939
13981
|
var a_student_reported_a_low_safety_score_on_a_check_in$3 = "Un estudiante informó de una puntuación de seguridad baja en un registro";
|
|
13940
|
-
var continue_as$3 = "Continuar como
|
|
13982
|
+
var continue_as$3 = "Continuar como";
|
|
13941
13983
|
var admin$3 = "Administrador";
|
|
13942
13984
|
var counselor$3 = "Consejero";
|
|
13943
13985
|
var support_teacher$3 = "Profesor de apoyo";
|
|
@@ -15161,6 +15203,7 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
|
|
|
15161
15203
|
var leave$3 = "dejar";
|
|
15162
15204
|
var go_to_the_survey_dashboard$3 = "Ir al panel de encuestas";
|
|
15163
15205
|
var my_dashboard$3 = "Mi panel de control";
|
|
15206
|
+
var nice_choice_what_area_of_category_would_you_like_to_work_on$3 = "¡Buena elección! ¿En qué área de {{category}} te gustaría trabajar?";
|
|
15164
15207
|
var nice_choice_what_area_of_academics_would_you_like_to_work_on$3 = "¡Chica Nick! Y veo si tienes estudios académicos y un hijo tuyo, Taher, ¿tienes algún trabajo?";
|
|
15165
15208
|
var nice_choice_what_area_of_organization_would_you_like_to_work_on$3 = "¡Chica Nick! Y a ver si ya estás arreglando y tienes un hijo, tienes un papel?";
|
|
15166
15209
|
var nice_choice_what_area_of_focus_would_you_like_to_work_on$3 = "¡Chica Nick! Y a ver si Fox y su hijo son como tú, Taher, ¿qué pasa?";
|
|
@@ -15232,7 +15275,7 @@ var add_1_1_conversation_notes$3 = "Add 1-1 Conversation notes";
|
|
|
15232
15275
|
var save_data$3 = "Save data";
|
|
15233
15276
|
var please_select_date_1_1_conversation$3 = "Please select date 1-1 conversation!";
|
|
15234
15277
|
var please_write_something_to_this_1_1_conversation$3 = "Please write something to this 1-1 conversation!";
|
|
15235
|
-
var data_1_1_conversation_cannot_exceed_300_characters$3 = "Data 1-1 conversation cannot exceed
|
|
15278
|
+
var data_1_1_conversation_cannot_exceed_300_characters$3 = "Data 1-1 conversation cannot exceed 1000 characters!";
|
|
15236
15279
|
var no_need_for_it$3 = "No need for it";
|
|
15237
15280
|
var conversation_saved$3 = "Conversation saved!";
|
|
15238
15281
|
var what_did_you_and_the_student_choose_as_an_action_step_would_you_like_to_add_it_as_a_goal$3 = "What did you and the student choose as an action step?<br/>Would you like to add it as a Goal?";
|
|
@@ -15249,7 +15292,7 @@ var yes_view_student_goals$3 = "Yes, view student goals";
|
|
|
15249
15292
|
var please_set_time_1_1_conversation$3 = "Please set time 1-1 conversation";
|
|
15250
15293
|
var type_your_answer_here$3 = "Type your answer here...";
|
|
15251
15294
|
var delete_bulk$3 = "Delete Bulk";
|
|
15252
|
-
var number_of_students_with_at_least_one_very_low_metric$3 = "
|
|
15295
|
+
var number_of_students_with_at_least_one_very_low_metric$3 = "Students with concerning metrics";
|
|
15253
15296
|
var this_flags_if_the_student_is_not_ready_to_learn_or_has_at_least_one_success_or_readiness_to_learn_metrics_under_40$3 = "This flags if the student is not ready to learn or has at least one success, or readiness to learn metrics under 40%";
|
|
15254
15297
|
var of_students_have_concerned_metrics$3 = "of students have concerned metrics";
|
|
15255
15298
|
var have_metrics_40$3 = "have metrics <40%";
|
|
@@ -15305,6 +15348,12 @@ var type_the_main_focus_of_this_session$3 = "Type the main focus of this session
|
|
|
15305
15348
|
var please_add_title_note$3 = "Please add note title";
|
|
15306
15349
|
var notes_and_logs$3 = "Notes and Logs";
|
|
15307
15350
|
var school_monthly_usage$3 = "School Monthly Usage";
|
|
15351
|
+
var location$4 = "Location";
|
|
15352
|
+
var edit_my_profile$3 = "Edit My Profile";
|
|
15353
|
+
var save_new_password$3 = "Save new password";
|
|
15354
|
+
var teacher_code$3 = "Teacher code";
|
|
15355
|
+
var number_of_conversations$3 = "Number of conversations";
|
|
15356
|
+
var number_of_expected_conversations_based_on_the_goal$3 = "Number of expected conversations based on the goal";
|
|
15308
15357
|
var lang_es = {
|
|
15309
15358
|
dashboard: dashboard$3,
|
|
15310
15359
|
user: user$3,
|
|
@@ -17377,6 +17426,7 @@ var lang_es = {
|
|
|
17377
17426
|
leave: leave$3,
|
|
17378
17427
|
go_to_the_survey_dashboard: go_to_the_survey_dashboard$3,
|
|
17379
17428
|
my_dashboard: my_dashboard$3,
|
|
17429
|
+
nice_choice_what_area_of_category_would_you_like_to_work_on: nice_choice_what_area_of_category_would_you_like_to_work_on$3,
|
|
17380
17430
|
"nice_choice_what_area_of_well-being_would_you_like_to_work_on": "¡Buena elección! ¿En qué área del bienestar te gustaría trabajar?",
|
|
17381
17431
|
nice_choice_what_area_of_academics_would_you_like_to_work_on: nice_choice_what_area_of_academics_would_you_like_to_work_on$3,
|
|
17382
17432
|
nice_choice_what_area_of_organization_would_you_like_to_work_on: nice_choice_what_area_of_organization_would_you_like_to_work_on$3,
|
|
@@ -17533,7 +17583,13 @@ var lang_es = {
|
|
|
17533
17583
|
type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$3,
|
|
17534
17584
|
please_add_title_note: please_add_title_note$3,
|
|
17535
17585
|
notes_and_logs: notes_and_logs$3,
|
|
17536
|
-
school_monthly_usage: school_monthly_usage$3
|
|
17586
|
+
school_monthly_usage: school_monthly_usage$3,
|
|
17587
|
+
location: location$4,
|
|
17588
|
+
edit_my_profile: edit_my_profile$3,
|
|
17589
|
+
save_new_password: save_new_password$3,
|
|
17590
|
+
teacher_code: teacher_code$3,
|
|
17591
|
+
number_of_conversations: number_of_conversations$3,
|
|
17592
|
+
number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$3
|
|
17537
17593
|
};
|
|
17538
17594
|
|
|
17539
17595
|
var dashboard$4 = "仪表板";
|
|
@@ -18342,7 +18398,7 @@ var email_notifications$4 = "电子邮件通知";
|
|
|
18342
18398
|
var turn_on_all_emails$4 = "打开所有电子邮件";
|
|
18343
18399
|
var a_student_responds_to_a_1_1_readiness_to_learn_with_no$4 = "学生对 1-1 学习准备度的回复为“否”";
|
|
18344
18400
|
var a_student_reported_a_low_safety_score_on_a_check_in$4 = "学生在签到时报告安全分数低";
|
|
18345
|
-
var continue_as$4 = "
|
|
18401
|
+
var continue_as$4 = "继续担任";
|
|
18346
18402
|
var admin$4 = "管理员";
|
|
18347
18403
|
var counselor$4 = "辅导员";
|
|
18348
18404
|
var support_teacher$4 = "支持老师";
|
|
@@ -19566,6 +19622,7 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
|
|
|
19566
19622
|
var leave$4 = "离开";
|
|
19567
19623
|
var go_to_the_survey_dashboard$4 = "前往调查仪表板";
|
|
19568
19624
|
var my_dashboard$4 = "我的仪表板";
|
|
19625
|
+
var nice_choice_what_area_of_category_would_you_like_to_work_on$4 = "不错的选择!您想在哪个{{category}}领域开展工作?";
|
|
19569
19626
|
var nice_choice_what_area_of_academics_would_you_like_to_work_on$4 = "尼克·奇克!我看到如果你有学者和你的儿子塔希尔,你有论文吗?";
|
|
19570
19627
|
var nice_choice_what_area_of_organization_would_you_like_to_work_on$4 = "尼克·奇克!让我看看,如果您正在安排,并且您有一个儿子,您有文件吗?";
|
|
19571
19628
|
var nice_choice_what_area_of_focus_would_you_like_to_work_on$4 = "不错的选择!您希望在哪个重点领域开展工作?";
|
|
@@ -19637,7 +19694,7 @@ var add_1_1_conversation_notes$4 = "Add 1-1 Conversation notes";
|
|
|
19637
19694
|
var save_data$4 = "Save data";
|
|
19638
19695
|
var please_select_date_1_1_conversation$4 = "Please select date 1-1 conversation!";
|
|
19639
19696
|
var please_write_something_to_this_1_1_conversation$4 = "Please write something to this 1-1 conversation!";
|
|
19640
|
-
var data_1_1_conversation_cannot_exceed_300_characters$4 = "Data 1-1 conversation cannot exceed
|
|
19697
|
+
var data_1_1_conversation_cannot_exceed_300_characters$4 = "Data 1-1 conversation cannot exceed 1000 characters!";
|
|
19641
19698
|
var no_need_for_it$4 = "No need for it";
|
|
19642
19699
|
var conversation_saved$4 = "Conversation saved!";
|
|
19643
19700
|
var what_did_you_and_the_student_choose_as_an_action_step_would_you_like_to_add_it_as_a_goal$4 = "What did you and the student choose as an action step?<br/>Would you like to add it as a Goal?";
|
|
@@ -19654,7 +19711,7 @@ var yes_view_student_goals$4 = "Yes, view student goals";
|
|
|
19654
19711
|
var please_set_time_1_1_conversation$4 = "Please set time 1-1 conversation";
|
|
19655
19712
|
var type_your_answer_here$4 = "Type your answer here...";
|
|
19656
19713
|
var delete_bulk$4 = "Delete Bulk";
|
|
19657
|
-
var number_of_students_with_at_least_one_very_low_metric$4 = "
|
|
19714
|
+
var number_of_students_with_at_least_one_very_low_metric$4 = "Students with concerning metrics";
|
|
19658
19715
|
var this_flags_if_the_student_is_not_ready_to_learn_or_has_at_least_one_success_or_readiness_to_learn_metrics_under_40$4 = "This flags if the student is not ready to learn or has at least one success, or readiness to learn metrics under 40%";
|
|
19659
19716
|
var of_students_have_concerned_metrics$4 = "of students have concerned metrics";
|
|
19660
19717
|
var have_metrics_40$4 = "have metrics <40%";
|
|
@@ -19710,6 +19767,12 @@ var type_the_main_focus_of_this_session$4 = "Type the main focus of this session
|
|
|
19710
19767
|
var please_add_title_note$4 = "Please add note title";
|
|
19711
19768
|
var notes_and_logs$4 = "Notes and Logs";
|
|
19712
19769
|
var school_monthly_usage$4 = "School Monthly Usage";
|
|
19770
|
+
var location$5 = "Location";
|
|
19771
|
+
var edit_my_profile$4 = "Edit My Profile";
|
|
19772
|
+
var save_new_password$4 = "Save new password";
|
|
19773
|
+
var teacher_code$4 = "Teacher code";
|
|
19774
|
+
var number_of_conversations$4 = "Number of conversations";
|
|
19775
|
+
var number_of_expected_conversations_based_on_the_goal$4 = "Number of expected conversations based on the goal";
|
|
19713
19776
|
var lang_zh = {
|
|
19714
19777
|
dashboard: dashboard$4,
|
|
19715
19778
|
user: user$4,
|
|
@@ -21782,6 +21845,7 @@ var lang_zh = {
|
|
|
21782
21845
|
leave: leave$4,
|
|
21783
21846
|
go_to_the_survey_dashboard: go_to_the_survey_dashboard$4,
|
|
21784
21847
|
my_dashboard: my_dashboard$4,
|
|
21848
|
+
nice_choice_what_area_of_category_would_you_like_to_work_on: nice_choice_what_area_of_category_would_you_like_to_work_on$4,
|
|
21785
21849
|
"nice_choice_what_area_of_well-being_would_you_like_to_work_on": "不错的选择!您想在哪个幸福健康领域开展工作?",
|
|
21786
21850
|
nice_choice_what_area_of_academics_would_you_like_to_work_on: nice_choice_what_area_of_academics_would_you_like_to_work_on$4,
|
|
21787
21851
|
nice_choice_what_area_of_organization_would_you_like_to_work_on: nice_choice_what_area_of_organization_would_you_like_to_work_on$4,
|
|
@@ -21938,7 +22002,13 @@ var lang_zh = {
|
|
|
21938
22002
|
type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$4,
|
|
21939
22003
|
please_add_title_note: please_add_title_note$4,
|
|
21940
22004
|
notes_and_logs: notes_and_logs$4,
|
|
21941
|
-
school_monthly_usage: school_monthly_usage$4
|
|
22005
|
+
school_monthly_usage: school_monthly_usage$4,
|
|
22006
|
+
location: location$5,
|
|
22007
|
+
edit_my_profile: edit_my_profile$4,
|
|
22008
|
+
save_new_password: save_new_password$4,
|
|
22009
|
+
teacher_code: teacher_code$4,
|
|
22010
|
+
number_of_conversations: number_of_conversations$4,
|
|
22011
|
+
number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$4
|
|
21942
22012
|
};
|
|
21943
22013
|
|
|
21944
22014
|
var TINY_MCE_API_KEY = "htqausuofrnali3nh9ivmlpq6v415o0tv2qikpg39bqf4pnk";
|
|
@@ -41809,6 +41879,212 @@ var TheHeaderDropdown = function TheHeaderDropdown(_ref) {
|
|
|
41809
41879
|
})), t("log_out")))));
|
|
41810
41880
|
};
|
|
41811
41881
|
|
|
41882
|
+
var apiGetLanguage = function apiGetLanguage() {
|
|
41883
|
+
return api.get(BASE_URL + "/api/language");
|
|
41884
|
+
};
|
|
41885
|
+
|
|
41886
|
+
var apiUpdateLanguage = function apiUpdateLanguage(lang) {
|
|
41887
|
+
return api.put(BASE_URL + "/api/language?lang=" + lang);
|
|
41888
|
+
};
|
|
41889
|
+
|
|
41890
|
+
var LANGUAGE_SYSTEM = "LANGUAGE_SYSTEM";
|
|
41891
|
+
|
|
41892
|
+
var useLanguages = function useLanguages() {
|
|
41893
|
+
var dispatch = useDispatch();
|
|
41894
|
+
|
|
41895
|
+
var _useTranslation = useTranslation(),
|
|
41896
|
+
i18n = _useTranslation.i18n;
|
|
41897
|
+
|
|
41898
|
+
var language = useSelector(function (state) {
|
|
41899
|
+
return state.common.language;
|
|
41900
|
+
});
|
|
41901
|
+
var defaultLanguage = getCookieValue(LANGUAGE_SYSTEM) != null ? getCookieValue(LANGUAGE_SYSTEM) : DEFAULT_LANGUAGE_CODE;
|
|
41902
|
+
|
|
41903
|
+
var _useState = useState([]),
|
|
41904
|
+
languageList = _useState[0],
|
|
41905
|
+
setLanguageList = _useState[1];
|
|
41906
|
+
|
|
41907
|
+
var _useState2 = useState(false),
|
|
41908
|
+
dropdownOpen = _useState2[0],
|
|
41909
|
+
setDropdownOpen = _useState2[1];
|
|
41910
|
+
|
|
41911
|
+
var _useState3 = useState(defaultLanguage),
|
|
41912
|
+
currentLang = _useState3[0],
|
|
41913
|
+
setCurrentLang = _useState3[1];
|
|
41914
|
+
|
|
41915
|
+
var toggle = function toggle() {
|
|
41916
|
+
return setDropdownOpen(function (prevState) {
|
|
41917
|
+
return !prevState;
|
|
41918
|
+
});
|
|
41919
|
+
};
|
|
41920
|
+
|
|
41921
|
+
var changeLanguageApp = function changeLanguageApp(lang) {
|
|
41922
|
+
try {
|
|
41923
|
+
var _temp3 = function _temp3() {
|
|
41924
|
+
dispatch(setLoading(false));
|
|
41925
|
+
};
|
|
41926
|
+
|
|
41927
|
+
dispatch(setLoading(true));
|
|
41928
|
+
|
|
41929
|
+
var _temp4 = _catch(function () {
|
|
41930
|
+
return Promise.resolve(apiUpdateLanguage(lang)).then(function () {
|
|
41931
|
+
i18n.changeLanguage(lang);
|
|
41932
|
+
setCurrentLang(lang);
|
|
41933
|
+
dispatch(setLanguage(lang));
|
|
41934
|
+
});
|
|
41935
|
+
}, function (err) {
|
|
41936
|
+
var _err$response, _err$response$data;
|
|
41937
|
+
|
|
41938
|
+
dispatch(setAlert({
|
|
41939
|
+
type: "danger",
|
|
41940
|
+
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
|
|
41941
|
+
}));
|
|
41942
|
+
});
|
|
41943
|
+
|
|
41944
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
41945
|
+
} catch (e) {
|
|
41946
|
+
return Promise.reject(e);
|
|
41947
|
+
}
|
|
41948
|
+
};
|
|
41949
|
+
|
|
41950
|
+
var getListLanguage = function getListLanguage() {
|
|
41951
|
+
try {
|
|
41952
|
+
var _temp6 = _catch(function () {
|
|
41953
|
+
return Promise.resolve(apiGetLanguage()).then(function (res) {
|
|
41954
|
+
setLanguageList(res.data);
|
|
41955
|
+
});
|
|
41956
|
+
}, function (err) {
|
|
41957
|
+
var _err$response2, _err$response2$data;
|
|
41958
|
+
|
|
41959
|
+
dispatch(setAlert({
|
|
41960
|
+
type: "danger",
|
|
41961
|
+
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
|
|
41962
|
+
}));
|
|
41963
|
+
});
|
|
41964
|
+
|
|
41965
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
41966
|
+
} catch (e) {
|
|
41967
|
+
return Promise.reject(e);
|
|
41968
|
+
}
|
|
41969
|
+
};
|
|
41970
|
+
|
|
41971
|
+
useEffect(function () {
|
|
41972
|
+
defaultLanguage != language && changeLanguageApp(defaultLanguage);
|
|
41973
|
+
getListLanguage();
|
|
41974
|
+
}, []);
|
|
41975
|
+
return {
|
|
41976
|
+
languageList: languageList,
|
|
41977
|
+
toggle: toggle,
|
|
41978
|
+
dropdownOpen: dropdownOpen,
|
|
41979
|
+
currentLang: currentLang,
|
|
41980
|
+
changeLanguageApp: changeLanguageApp,
|
|
41981
|
+
setCurrentLang: setCurrentLang
|
|
41982
|
+
};
|
|
41983
|
+
};
|
|
41984
|
+
|
|
41985
|
+
var TheLanguageDropdown = function TheLanguageDropdown() {
|
|
41986
|
+
var _useLanguages = useLanguages(),
|
|
41987
|
+
languageList = _useLanguages.languageList,
|
|
41988
|
+
toggle = _useLanguages.toggle,
|
|
41989
|
+
dropdownOpen = _useLanguages.dropdownOpen,
|
|
41990
|
+
currentLang = _useLanguages.currentLang,
|
|
41991
|
+
changeLanguageApp = _useLanguages.changeLanguageApp;
|
|
41992
|
+
|
|
41993
|
+
var currentLanguage = useMemo(function () {
|
|
41994
|
+
var current = languageList.find(function (i) {
|
|
41995
|
+
return i.code === currentLang;
|
|
41996
|
+
});
|
|
41997
|
+
if (!current) return null;
|
|
41998
|
+
return React.createElement(React.Fragment, null, React.createElement("img", {
|
|
41999
|
+
className: "mr-2 " + styles['dropdown-menu-flag'],
|
|
42000
|
+
src: "" + getStaticFileUrl(current.image)
|
|
42001
|
+
}), " ", current.name);
|
|
42002
|
+
}, [currentLang, languageList]);
|
|
42003
|
+
return React.createElement(Dropdown, {
|
|
42004
|
+
isOpen: dropdownOpen,
|
|
42005
|
+
toggle: toggle,
|
|
42006
|
+
className: "" + styles["dropdown-menu"]
|
|
42007
|
+
}, React.createElement(DropdownToggle, {
|
|
42008
|
+
className: styles["header-avatar"] + " d-flex align-items-center"
|
|
42009
|
+
}, React.createElement("span", {
|
|
42010
|
+
style: {
|
|
42011
|
+
color: "#000",
|
|
42012
|
+
textTransform: "capitalize",
|
|
42013
|
+
display: 'flex',
|
|
42014
|
+
alignItems: 'center'
|
|
42015
|
+
}
|
|
42016
|
+
}, currentLanguage, React.createElement(BsChevronDown, {
|
|
42017
|
+
className: "ml-2",
|
|
42018
|
+
style: {
|
|
42019
|
+
fontSize: '10px'
|
|
42020
|
+
}
|
|
42021
|
+
}))), React.createElement(DropdownMenu, {
|
|
42022
|
+
className: styles["dropdown-content-language"]
|
|
42023
|
+
}, !!languageList && languageList.length > 0 && languageList.map(function (lang, index) {
|
|
42024
|
+
return React.createElement(DropdownItem, {
|
|
42025
|
+
key: lang.code,
|
|
42026
|
+
className: styles["dropdown-change"] + " px-0 py-0 " + (index === languageList.length - 1 ? "pb-2" : "pt-2"),
|
|
42027
|
+
onClick: function onClick() {
|
|
42028
|
+
return changeLanguageApp(lang.code);
|
|
42029
|
+
}
|
|
42030
|
+
}, React.createElement("div", {
|
|
42031
|
+
className: styles["dropdown-item-language"] + " " + styles["item-logout"] + " " + (currentLang == lang.code ? styles['dropdown-item-language-active'] : "") + " d-flex align-items-center w-100"
|
|
42032
|
+
}, React.createElement("span", {
|
|
42033
|
+
className: "mr-2 d-flex hover-opacity"
|
|
42034
|
+
}, React.createElement("img", {
|
|
42035
|
+
style: {
|
|
42036
|
+
width: "30px",
|
|
42037
|
+
height: "25px",
|
|
42038
|
+
borderRadius: "5px"
|
|
42039
|
+
},
|
|
42040
|
+
src: getStaticFileUrl(lang.image)
|
|
42041
|
+
})), lang.name));
|
|
42042
|
+
})));
|
|
42043
|
+
};
|
|
42044
|
+
|
|
42045
|
+
var TheHeader = function TheHeader(_ref) {
|
|
42046
|
+
var onToggleModel = _ref.onToggleModel;
|
|
42047
|
+
var dispatch = useDispatch();
|
|
42048
|
+
var sidebarShow = useSelector(function (state) {
|
|
42049
|
+
return state.common.sidebarShow;
|
|
42050
|
+
});
|
|
42051
|
+
|
|
42052
|
+
var _useTranslation = useTranslation(),
|
|
42053
|
+
t = _useTranslation.t;
|
|
42054
|
+
|
|
42055
|
+
var toggleSidebarMobile = function toggleSidebarMobile() {
|
|
42056
|
+
var val = [false, "responsive"].includes(sidebarShow) ? true : "responsive";
|
|
42057
|
+
dispatch(setSidebar(val));
|
|
42058
|
+
};
|
|
42059
|
+
|
|
42060
|
+
var isDistrict = window.location.host.includes("-district");
|
|
42061
|
+
return React.createElement(CHeader, {
|
|
42062
|
+
withSubheader: true,
|
|
42063
|
+
className: "d-flex align-items-center justify-content-end"
|
|
42064
|
+
}, React.createElement(CToggler, {
|
|
42065
|
+
inHeader: true,
|
|
42066
|
+
className: "ml-md-3 d-lg-none",
|
|
42067
|
+
onClick: toggleSidebarMobile
|
|
42068
|
+
}), React.createElement(CHeaderBrand, {
|
|
42069
|
+
className: "mx-auto flex-grow-1 d-lg-none",
|
|
42070
|
+
to: "/"
|
|
42071
|
+
}, React.createElement("img", {
|
|
42072
|
+
src: getStaticFileUrl(Images.LOGO_HEADER),
|
|
42073
|
+
className: styles["header-logo"]
|
|
42074
|
+
})), React.createElement(CHeaderNav, {
|
|
42075
|
+
className: "pr-3"
|
|
42076
|
+
}, React.createElement(TheLanguageDropdown, null), React.createElement("a", {
|
|
42077
|
+
className: "mr-3",
|
|
42078
|
+
style: {
|
|
42079
|
+
color: '#000'
|
|
42080
|
+
},
|
|
42081
|
+
href: '/privacy-policy',
|
|
42082
|
+
target: "blank"
|
|
42083
|
+
}, t("privacy_policy")), !isDistrict && React.createElement(NotificationButton, null), React.createElement(TheHeaderDropdown, {
|
|
42084
|
+
onToggleModel: onToggleModel
|
|
42085
|
+
})));
|
|
42086
|
+
};
|
|
42087
|
+
|
|
41812
42088
|
var TITLE$3 = "Not found";
|
|
41813
42089
|
|
|
41814
42090
|
var NotFound = function NotFound() {
|
|
@@ -41866,6 +42142,258 @@ var TheContent = function TheContent(_ref) {
|
|
|
41866
42142
|
|
|
41867
42143
|
var TheContent$1 = React.memo(TheContent);
|
|
41868
42144
|
|
|
42145
|
+
var loadingStyle = {
|
|
42146
|
+
minWidth: "100vw",
|
|
42147
|
+
minHeight: "100vh",
|
|
42148
|
+
position: "fixed",
|
|
42149
|
+
top: 0,
|
|
42150
|
+
left: 0,
|
|
42151
|
+
zIndex: 999999999,
|
|
42152
|
+
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
42153
|
+
display: "flex",
|
|
42154
|
+
justifyContent: "center",
|
|
42155
|
+
alignItems: "center"
|
|
42156
|
+
};
|
|
42157
|
+
|
|
42158
|
+
var Loading = function Loading() {
|
|
42159
|
+
var isLoading = useSelector(function (state) {
|
|
42160
|
+
return state.common.isLoading;
|
|
42161
|
+
});
|
|
42162
|
+
localStorage.setItem("LAST_TIME_REQUETST", moment().utc().format("YYYY-MM-DD HH:mm:ss"));
|
|
42163
|
+
return isLoading ? React.createElement("div", {
|
|
42164
|
+
style: loadingStyle
|
|
42165
|
+
}, React.createElement("div", {
|
|
42166
|
+
className: "spinner-border text-secondary",
|
|
42167
|
+
role: "status"
|
|
42168
|
+
}, React.createElement("span", {
|
|
42169
|
+
className: "sr-only"
|
|
42170
|
+
}, "Loading..."))) : null;
|
|
42171
|
+
};
|
|
42172
|
+
|
|
42173
|
+
var firstCheckToken = function firstCheckToken() {
|
|
42174
|
+
return Promise.resolve(_catch(function () {
|
|
42175
|
+
var token = getAccessToken();
|
|
42176
|
+
return token ? Promise.resolve(checkToken(token)).then(function (tokenStatus) {
|
|
42177
|
+
return tokenStatus.data ? true : false;
|
|
42178
|
+
}) : false;
|
|
42179
|
+
}, function () {
|
|
42180
|
+
return false;
|
|
42181
|
+
}));
|
|
42182
|
+
};
|
|
42183
|
+
|
|
42184
|
+
var canAccess = function canAccess(userRoles, componentRoles) {
|
|
42185
|
+
if (!Array.isArray(userRoles)) {
|
|
42186
|
+
return false;
|
|
42187
|
+
}
|
|
42188
|
+
|
|
42189
|
+
if (Array.isArray(componentRoles)) {
|
|
42190
|
+
var intersects = userRoles.filter(function (i) {
|
|
42191
|
+
return componentRoles.includes(i);
|
|
42192
|
+
});
|
|
42193
|
+
return intersects.length > 0;
|
|
42194
|
+
}
|
|
42195
|
+
|
|
42196
|
+
return true;
|
|
42197
|
+
};
|
|
42198
|
+
|
|
42199
|
+
var ModelSelectRole = function ModelSelectRole(_ref) {
|
|
42200
|
+
var _handleUserRole;
|
|
42201
|
+
|
|
42202
|
+
var open = _ref.open,
|
|
42203
|
+
onToggleModel = _ref.onToggleModel;
|
|
42204
|
+
var dispatch = useDispatch();
|
|
42205
|
+
|
|
42206
|
+
var _useTranslation = useTranslation(),
|
|
42207
|
+
t = _useTranslation.t;
|
|
42208
|
+
|
|
42209
|
+
var history = useHistory();
|
|
42210
|
+
var pathname = window.location.pathname;
|
|
42211
|
+
var user = useSelector(function (state) {
|
|
42212
|
+
return state.common.user;
|
|
42213
|
+
});
|
|
42214
|
+
var roles = user === null || user === void 0 ? void 0 : user.roles;
|
|
42215
|
+
|
|
42216
|
+
var handleSelectUserRoles = function handleSelectUserRoles(roles) {
|
|
42217
|
+
dispatch(setLoading(true));
|
|
42218
|
+
var roleSelect = roles.includes("Teacher/Assistant") ? ["Teacher", "Assistant"] : roles;
|
|
42219
|
+
dispatch(setUser(_extends({}, user, {
|
|
42220
|
+
roles: roleSelect
|
|
42221
|
+
})));
|
|
42222
|
+
localStorage.setItem("ROLES", roleSelect.toString());
|
|
42223
|
+
onToggleModel();
|
|
42224
|
+
|
|
42225
|
+
if (roles.includes("Parent")) {
|
|
42226
|
+
history.push("/parent");
|
|
42227
|
+
} else if (roles.includes("Admin")) {
|
|
42228
|
+
history.push("/admin/home");
|
|
42229
|
+
} else {
|
|
42230
|
+
pathname !== "/home" ? history.push("/home") : window.location.reload();
|
|
42231
|
+
}
|
|
42232
|
+
};
|
|
42233
|
+
|
|
42234
|
+
return React.createElement(Modal, {
|
|
42235
|
+
isOpen: open,
|
|
42236
|
+
toggle: function toggle() {
|
|
42237
|
+
return onToggleModel();
|
|
42238
|
+
},
|
|
42239
|
+
className: "" + styles["model-switch-roles"],
|
|
42240
|
+
centered: true
|
|
42241
|
+
}, React.createElement("p", {
|
|
42242
|
+
className: "" + styles["title"]
|
|
42243
|
+
}, t("continue_as")), React.createElement("div", null, (_handleUserRole = handleUserRole(user === null || user === void 0 ? void 0 : user.roles)) === null || _handleUserRole === void 0 ? void 0 : _handleUserRole.map(function (r) {
|
|
42244
|
+
return React.createElement("p", {
|
|
42245
|
+
key: r,
|
|
42246
|
+
className: styles["item-select-role"] + " " + styles[roles.includes("Teacher") && roles.includes("Assistant") && r === "Teacher/Assistant" && !roles.includes("Admin") || roles.includes("Admin") && r === "Admin" || roles.includes(r) && !roles.includes("Admin") ? "item-role-active" : ""],
|
|
42247
|
+
onClick: function onClick() {
|
|
42248
|
+
return handleSelectUserRoles([r]);
|
|
42249
|
+
}
|
|
42250
|
+
}, r == "SecondaryTeacher" ? "Support Teacher" : r);
|
|
42251
|
+
})));
|
|
42252
|
+
};
|
|
42253
|
+
|
|
42254
|
+
var TheLayout = function TheLayout(_ref) {
|
|
42255
|
+
var routes = _ref.routes,
|
|
42256
|
+
navigation = _ref.navigation;
|
|
42257
|
+
var history = useHistory();
|
|
42258
|
+
var dispatch = useDispatch();
|
|
42259
|
+
var user = useSelector(function (state) {
|
|
42260
|
+
return state.common.user;
|
|
42261
|
+
});
|
|
42262
|
+
var language = useSelector(function (state) {
|
|
42263
|
+
return state.common.language;
|
|
42264
|
+
});
|
|
42265
|
+
|
|
42266
|
+
var _useState = useState(false),
|
|
42267
|
+
openModelSelectRole = _useState[0],
|
|
42268
|
+
setOpenModelSelectRole = _useState[1];
|
|
42269
|
+
|
|
42270
|
+
var _useTranslation = useTranslation(),
|
|
42271
|
+
t = _useTranslation.t;
|
|
42272
|
+
|
|
42273
|
+
var location = useLocation();
|
|
42274
|
+
var isNotification = location.pathname.includes("notifications");
|
|
42275
|
+
var isDistrict = window.location.host.includes("-district");
|
|
42276
|
+
|
|
42277
|
+
var handleToggleModel = function handleToggleModel() {
|
|
42278
|
+
setOpenModelSelectRole(!openModelSelectRole);
|
|
42279
|
+
};
|
|
42280
|
+
|
|
42281
|
+
var authRoutes = useMemo(function () {
|
|
42282
|
+
return routes.filter(function (route) {
|
|
42283
|
+
return canAccess(user === null || user === void 0 ? void 0 : user.roles, route.roles);
|
|
42284
|
+
}).filter(function (route) {
|
|
42285
|
+
return !!route.isDistrict === isDistrict;
|
|
42286
|
+
});
|
|
42287
|
+
}, [user, language]);
|
|
42288
|
+
var authNavigations = useMemo(function () {
|
|
42289
|
+
return navigation.map(function (item) {
|
|
42290
|
+
var _item$_children, _item$_children2;
|
|
42291
|
+
|
|
42292
|
+
return _extends({}, item, {
|
|
42293
|
+
name: t(item.name),
|
|
42294
|
+
_children: item !== null && item !== void 0 && (_item$_children = item._children) !== null && _item$_children !== void 0 && _item$_children.length ? item === null || item === void 0 ? void 0 : (_item$_children2 = item._children) === null || _item$_children2 === void 0 ? void 0 : _item$_children2.map(function (x) {
|
|
42295
|
+
return _extends({}, x, {
|
|
42296
|
+
name: t(x.name)
|
|
42297
|
+
});
|
|
42298
|
+
}) : undefined
|
|
42299
|
+
});
|
|
42300
|
+
}).filter(function (nav) {
|
|
42301
|
+
return canAccess(user === null || user === void 0 ? void 0 : user.roles, nav.roles);
|
|
42302
|
+
}).filter(function (nav) {
|
|
42303
|
+
return !!nav.isDistrict === isDistrict;
|
|
42304
|
+
});
|
|
42305
|
+
}, [user, language]);
|
|
42306
|
+
|
|
42307
|
+
var getInformationSetting = function getInformationSetting() {
|
|
42308
|
+
try {
|
|
42309
|
+
var _temp2 = _catch(function () {
|
|
42310
|
+
return Promise.resolve(getSchoolSettings()).then(function (res) {
|
|
42311
|
+
dispatch(setSandboxMode(res.data.isSandboxMode));
|
|
42312
|
+
});
|
|
42313
|
+
}, function (err) {
|
|
42314
|
+
console.error(err);
|
|
42315
|
+
});
|
|
42316
|
+
|
|
42317
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
42318
|
+
} catch (e) {
|
|
42319
|
+
return Promise.reject(e);
|
|
42320
|
+
}
|
|
42321
|
+
};
|
|
42322
|
+
|
|
42323
|
+
useEffect(function () {
|
|
42324
|
+
checkAuthentication();
|
|
42325
|
+
}, []);
|
|
42326
|
+
useEffect(function () {
|
|
42327
|
+
getInformationSetting();
|
|
42328
|
+
}, [location.pathname]);
|
|
42329
|
+
|
|
42330
|
+
var checkAuthentication = function checkAuthentication() {
|
|
42331
|
+
try {
|
|
42332
|
+
var _temp4 = _catch(function () {
|
|
42333
|
+
return Promise.resolve(firstCheckToken()).then(function (tokenStatus) {
|
|
42334
|
+
tokenStatus ? loadInfo() : resetAuth();
|
|
42335
|
+
});
|
|
42336
|
+
}, function () {
|
|
42337
|
+
resetAuth();
|
|
42338
|
+
});
|
|
42339
|
+
|
|
42340
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
|
|
42341
|
+
} catch (e) {
|
|
42342
|
+
return Promise.reject(e);
|
|
42343
|
+
}
|
|
42344
|
+
};
|
|
42345
|
+
|
|
42346
|
+
var loadInfo = function loadInfo() {
|
|
42347
|
+
try {
|
|
42348
|
+
var _temp6 = _catch(function () {
|
|
42349
|
+
return Promise.resolve(getInfo()).then(function (info) {
|
|
42350
|
+
var _info$data, _info$data$roles;
|
|
42351
|
+
|
|
42352
|
+
if (!info || !(info !== null && info !== void 0 && (_info$data = info.data) !== null && _info$data !== void 0 && (_info$data$roles = _info$data.roles) !== null && _info$data$roles !== void 0 && _info$data$roles.includes("Admin"))) {
|
|
42353
|
+
resetAuth();
|
|
42354
|
+
}
|
|
42355
|
+
|
|
42356
|
+
dispatch(setUser(info.data));
|
|
42357
|
+
});
|
|
42358
|
+
}, function () {
|
|
42359
|
+
resetAuth();
|
|
42360
|
+
});
|
|
42361
|
+
|
|
42362
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
42363
|
+
} catch (e) {
|
|
42364
|
+
return Promise.reject(e);
|
|
42365
|
+
}
|
|
42366
|
+
};
|
|
42367
|
+
|
|
42368
|
+
var resetAuth = function resetAuth() {
|
|
42369
|
+
localStorage.removeItem(ACCESS_TOKEN);
|
|
42370
|
+
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
42371
|
+
localStorage.removeItem("ROLES");
|
|
42372
|
+
history.push("/");
|
|
42373
|
+
};
|
|
42374
|
+
|
|
42375
|
+
if (!user) {
|
|
42376
|
+
return React.createElement(Loading, null);
|
|
42377
|
+
}
|
|
42378
|
+
|
|
42379
|
+
return React.createElement("div", {
|
|
42380
|
+
className: "c-app c-default-layout"
|
|
42381
|
+
}, !isNotification && React.createElement(TheSidebar, {
|
|
42382
|
+
navigation: authNavigations
|
|
42383
|
+
}), React.createElement("div", {
|
|
42384
|
+
className: "c-wrapper"
|
|
42385
|
+
}, !isNotification && React.createElement(TheHeader, {
|
|
42386
|
+
onToggleModel: handleToggleModel
|
|
42387
|
+
}), React.createElement("div", {
|
|
42388
|
+
className: "c-body bg-white"
|
|
42389
|
+
}, React.createElement(TheContent$1, {
|
|
42390
|
+
routes: authRoutes
|
|
42391
|
+
}))), React.createElement(ModelSelectRole, {
|
|
42392
|
+
open: openModelSelectRole,
|
|
42393
|
+
onToggleModel: handleToggleModel
|
|
42394
|
+
}));
|
|
42395
|
+
};
|
|
42396
|
+
|
|
41869
42397
|
var buttonTextStyle = {
|
|
41870
42398
|
fontWeight: 500
|
|
41871
42399
|
};
|
|
@@ -51212,34 +51740,6 @@ var UserDetail = function UserDetail() {
|
|
|
51212
51740
|
});
|
|
51213
51741
|
};
|
|
51214
51742
|
|
|
51215
|
-
var loadingStyle = {
|
|
51216
|
-
minWidth: "100vw",
|
|
51217
|
-
minHeight: "100vh",
|
|
51218
|
-
position: "fixed",
|
|
51219
|
-
top: 0,
|
|
51220
|
-
left: 0,
|
|
51221
|
-
zIndex: 999999999,
|
|
51222
|
-
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
51223
|
-
display: "flex",
|
|
51224
|
-
justifyContent: "center",
|
|
51225
|
-
alignItems: "center"
|
|
51226
|
-
};
|
|
51227
|
-
|
|
51228
|
-
var Loading = function Loading() {
|
|
51229
|
-
var isLoading = useSelector(function (state) {
|
|
51230
|
-
return state.common.isLoading;
|
|
51231
|
-
});
|
|
51232
|
-
localStorage.setItem("LAST_TIME_REQUETST", moment().utc().format("YYYY-MM-DD HH:mm:ss"));
|
|
51233
|
-
return isLoading ? React.createElement("div", {
|
|
51234
|
-
style: loadingStyle
|
|
51235
|
-
}, React.createElement("div", {
|
|
51236
|
-
className: "spinner-border text-secondary",
|
|
51237
|
-
role: "status"
|
|
51238
|
-
}, React.createElement("span", {
|
|
51239
|
-
className: "sr-only"
|
|
51240
|
-
}, "Loading..."))) : null;
|
|
51241
|
-
};
|
|
51242
|
-
|
|
51243
51743
|
var ScrollToTop = function ScrollToTop() {
|
|
51244
51744
|
var _useLocation = useLocation(),
|
|
51245
51745
|
pathname = _useLocation.pathname;
|
|
@@ -54263,32 +54763,6 @@ var store = configureStore({
|
|
|
54263
54763
|
}
|
|
54264
54764
|
});
|
|
54265
54765
|
|
|
54266
|
-
var firstCheckToken = function firstCheckToken() {
|
|
54267
|
-
return Promise.resolve(_catch(function () {
|
|
54268
|
-
var token = getAccessToken();
|
|
54269
|
-
return token ? Promise.resolve(checkToken(token)).then(function (tokenStatus) {
|
|
54270
|
-
return tokenStatus.data ? true : false;
|
|
54271
|
-
}) : false;
|
|
54272
|
-
}, function () {
|
|
54273
|
-
return false;
|
|
54274
|
-
}));
|
|
54275
|
-
};
|
|
54276
|
-
|
|
54277
|
-
var canAccess = function canAccess(userRoles, componentRoles) {
|
|
54278
|
-
if (!Array.isArray(userRoles)) {
|
|
54279
|
-
return false;
|
|
54280
|
-
}
|
|
54281
|
-
|
|
54282
|
-
if (Array.isArray(componentRoles)) {
|
|
54283
|
-
var intersects = userRoles.filter(function (i) {
|
|
54284
|
-
return componentRoles.includes(i);
|
|
54285
|
-
});
|
|
54286
|
-
return intersects.length > 0;
|
|
54287
|
-
}
|
|
54288
|
-
|
|
54289
|
-
return true;
|
|
54290
|
-
};
|
|
54291
|
-
|
|
54292
54766
|
var isInViewport = function isInViewport(el) {
|
|
54293
54767
|
var rect = el === null || el === void 0 ? void 0 : el.getBoundingClientRect();
|
|
54294
54768
|
return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
@@ -54322,410 +54796,6 @@ var generateRandomString = (function () {
|
|
|
54322
54796
|
return (Math.random() + 1).toString(36).substring(7);
|
|
54323
54797
|
});
|
|
54324
54798
|
|
|
54325
|
-
var apiGetLanguage = function apiGetLanguage() {
|
|
54326
|
-
return api.get(BASE_URL + "/api/language");
|
|
54327
|
-
};
|
|
54328
|
-
|
|
54329
|
-
var apiUpdateLanguage = function apiUpdateLanguage(lang) {
|
|
54330
|
-
return api.put(BASE_URL + "/api/language?lang=" + lang);
|
|
54331
|
-
};
|
|
54332
|
-
|
|
54333
|
-
var LANGUAGE_SYSTEM = "LANGUAGE_SYSTEM";
|
|
54334
|
-
|
|
54335
|
-
var useLanguages = function useLanguages() {
|
|
54336
|
-
var dispatch = useDispatch();
|
|
54337
|
-
|
|
54338
|
-
var _useTranslation = useTranslation(),
|
|
54339
|
-
i18n = _useTranslation.i18n;
|
|
54340
|
-
|
|
54341
|
-
var language = useSelector(function (state) {
|
|
54342
|
-
return state.common.language;
|
|
54343
|
-
});
|
|
54344
|
-
var defaultLanguage = getCookieValue(LANGUAGE_SYSTEM) != null ? getCookieValue(LANGUAGE_SYSTEM) : DEFAULT_LANGUAGE_CODE;
|
|
54345
|
-
|
|
54346
|
-
var _useState = useState([]),
|
|
54347
|
-
languageList = _useState[0],
|
|
54348
|
-
setLanguageList = _useState[1];
|
|
54349
|
-
|
|
54350
|
-
var _useState2 = useState(false),
|
|
54351
|
-
dropdownOpen = _useState2[0],
|
|
54352
|
-
setDropdownOpen = _useState2[1];
|
|
54353
|
-
|
|
54354
|
-
var _useState3 = useState(defaultLanguage),
|
|
54355
|
-
currentLang = _useState3[0],
|
|
54356
|
-
setCurrentLang = _useState3[1];
|
|
54357
|
-
|
|
54358
|
-
var toggle = function toggle() {
|
|
54359
|
-
return setDropdownOpen(function (prevState) {
|
|
54360
|
-
return !prevState;
|
|
54361
|
-
});
|
|
54362
|
-
};
|
|
54363
|
-
|
|
54364
|
-
var changeLanguageApp = function changeLanguageApp(lang) {
|
|
54365
|
-
try {
|
|
54366
|
-
var _temp3 = function _temp3() {
|
|
54367
|
-
dispatch(setLoading(false));
|
|
54368
|
-
};
|
|
54369
|
-
|
|
54370
|
-
dispatch(setLoading(true));
|
|
54371
|
-
|
|
54372
|
-
var _temp4 = _catch(function () {
|
|
54373
|
-
return Promise.resolve(apiUpdateLanguage(lang)).then(function () {
|
|
54374
|
-
i18n.changeLanguage(lang);
|
|
54375
|
-
setCurrentLang(lang);
|
|
54376
|
-
dispatch(setLanguage(lang));
|
|
54377
|
-
});
|
|
54378
|
-
}, function (err) {
|
|
54379
|
-
var _err$response, _err$response$data;
|
|
54380
|
-
|
|
54381
|
-
dispatch(setAlert({
|
|
54382
|
-
type: "danger",
|
|
54383
|
-
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
|
|
54384
|
-
}));
|
|
54385
|
-
});
|
|
54386
|
-
|
|
54387
|
-
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
54388
|
-
} catch (e) {
|
|
54389
|
-
return Promise.reject(e);
|
|
54390
|
-
}
|
|
54391
|
-
};
|
|
54392
|
-
|
|
54393
|
-
var getListLanguage = function getListLanguage() {
|
|
54394
|
-
try {
|
|
54395
|
-
var _temp6 = _catch(function () {
|
|
54396
|
-
return Promise.resolve(apiGetLanguage()).then(function (res) {
|
|
54397
|
-
setLanguageList(res.data);
|
|
54398
|
-
});
|
|
54399
|
-
}, function (err) {
|
|
54400
|
-
var _err$response2, _err$response2$data;
|
|
54401
|
-
|
|
54402
|
-
dispatch(setAlert({
|
|
54403
|
-
type: "danger",
|
|
54404
|
-
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
|
|
54405
|
-
}));
|
|
54406
|
-
});
|
|
54407
|
-
|
|
54408
|
-
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
54409
|
-
} catch (e) {
|
|
54410
|
-
return Promise.reject(e);
|
|
54411
|
-
}
|
|
54412
|
-
};
|
|
54413
|
-
|
|
54414
|
-
useEffect(function () {
|
|
54415
|
-
defaultLanguage != language && changeLanguageApp(defaultLanguage);
|
|
54416
|
-
getListLanguage();
|
|
54417
|
-
}, []);
|
|
54418
|
-
return {
|
|
54419
|
-
languageList: languageList,
|
|
54420
|
-
toggle: toggle,
|
|
54421
|
-
dropdownOpen: dropdownOpen,
|
|
54422
|
-
currentLang: currentLang,
|
|
54423
|
-
changeLanguageApp: changeLanguageApp,
|
|
54424
|
-
setCurrentLang: setCurrentLang
|
|
54425
|
-
};
|
|
54426
|
-
};
|
|
54427
|
-
|
|
54428
|
-
var TheLanguageDropdown = function TheLanguageDropdown() {
|
|
54429
|
-
var _useLanguages = useLanguages(),
|
|
54430
|
-
languageList = _useLanguages.languageList,
|
|
54431
|
-
toggle = _useLanguages.toggle,
|
|
54432
|
-
dropdownOpen = _useLanguages.dropdownOpen,
|
|
54433
|
-
currentLang = _useLanguages.currentLang,
|
|
54434
|
-
changeLanguageApp = _useLanguages.changeLanguageApp;
|
|
54435
|
-
|
|
54436
|
-
var currentLanguage = useMemo(function () {
|
|
54437
|
-
var current = languageList.find(function (i) {
|
|
54438
|
-
return i.code === currentLang;
|
|
54439
|
-
});
|
|
54440
|
-
if (!current) return null;
|
|
54441
|
-
return React.createElement(React.Fragment, null, React.createElement("img", {
|
|
54442
|
-
className: "mr-2 " + styles['dropdown-menu-flag'],
|
|
54443
|
-
src: "" + getStaticFileUrl(current.image)
|
|
54444
|
-
}), " ", current.name);
|
|
54445
|
-
}, [currentLang, languageList]);
|
|
54446
|
-
return React.createElement(Dropdown, {
|
|
54447
|
-
isOpen: dropdownOpen,
|
|
54448
|
-
toggle: toggle,
|
|
54449
|
-
className: "" + styles["dropdown-menu"]
|
|
54450
|
-
}, React.createElement(DropdownToggle, {
|
|
54451
|
-
className: styles["header-avatar"] + " d-flex align-items-center"
|
|
54452
|
-
}, React.createElement("span", {
|
|
54453
|
-
style: {
|
|
54454
|
-
color: "#000",
|
|
54455
|
-
textTransform: "capitalize",
|
|
54456
|
-
display: 'flex',
|
|
54457
|
-
alignItems: 'center'
|
|
54458
|
-
}
|
|
54459
|
-
}, currentLanguage, React.createElement(BsChevronDown, {
|
|
54460
|
-
className: "ml-2",
|
|
54461
|
-
style: {
|
|
54462
|
-
fontSize: '10px'
|
|
54463
|
-
}
|
|
54464
|
-
}))), React.createElement(DropdownMenu, {
|
|
54465
|
-
className: styles["dropdown-content-language"]
|
|
54466
|
-
}, !!languageList && languageList.length > 0 && languageList.map(function (lang, index) {
|
|
54467
|
-
return React.createElement(DropdownItem, {
|
|
54468
|
-
key: lang.code,
|
|
54469
|
-
className: styles["dropdown-change"] + " px-0 py-0 " + (index === languageList.length - 1 ? "pb-2" : "pt-2"),
|
|
54470
|
-
onClick: function onClick() {
|
|
54471
|
-
return changeLanguageApp(lang.code);
|
|
54472
|
-
}
|
|
54473
|
-
}, React.createElement("div", {
|
|
54474
|
-
className: styles["dropdown-item-language"] + " " + styles["item-logout"] + " " + (currentLang == lang.code ? styles['dropdown-item-language-active'] : "") + " d-flex align-items-center w-100"
|
|
54475
|
-
}, React.createElement("span", {
|
|
54476
|
-
className: "mr-2 d-flex hover-opacity"
|
|
54477
|
-
}, React.createElement("img", {
|
|
54478
|
-
style: {
|
|
54479
|
-
width: "30px",
|
|
54480
|
-
height: "25px",
|
|
54481
|
-
borderRadius: "5px"
|
|
54482
|
-
},
|
|
54483
|
-
src: getStaticFileUrl(lang.image)
|
|
54484
|
-
})), lang.name));
|
|
54485
|
-
})));
|
|
54486
|
-
};
|
|
54487
|
-
|
|
54488
|
-
var TheHeader = function TheHeader(_ref) {
|
|
54489
|
-
var onToggleModel = _ref.onToggleModel;
|
|
54490
|
-
var dispatch = useDispatch();
|
|
54491
|
-
var sidebarShow = useSelector(function (state) {
|
|
54492
|
-
return state.common.sidebarShow;
|
|
54493
|
-
});
|
|
54494
|
-
|
|
54495
|
-
var _useTranslation = useTranslation(),
|
|
54496
|
-
t = _useTranslation.t;
|
|
54497
|
-
|
|
54498
|
-
var toggleSidebarMobile = function toggleSidebarMobile() {
|
|
54499
|
-
var val = [false, "responsive"].includes(sidebarShow) ? true : "responsive";
|
|
54500
|
-
dispatch(setSidebar(val));
|
|
54501
|
-
};
|
|
54502
|
-
|
|
54503
|
-
var isDistrict = window.location.host.includes("-district");
|
|
54504
|
-
return React.createElement(CHeader, {
|
|
54505
|
-
withSubheader: true,
|
|
54506
|
-
className: "d-flex align-items-center justify-content-end"
|
|
54507
|
-
}, React.createElement(CToggler, {
|
|
54508
|
-
inHeader: true,
|
|
54509
|
-
className: "ml-md-3 d-lg-none",
|
|
54510
|
-
onClick: toggleSidebarMobile
|
|
54511
|
-
}), React.createElement(CHeaderBrand, {
|
|
54512
|
-
className: "mx-auto flex-grow-1 d-lg-none",
|
|
54513
|
-
to: "/"
|
|
54514
|
-
}, React.createElement("img", {
|
|
54515
|
-
src: getStaticFileUrl(Images.LOGO_HEADER),
|
|
54516
|
-
className: styles["header-logo"]
|
|
54517
|
-
})), React.createElement(CHeaderNav, {
|
|
54518
|
-
className: "pr-3"
|
|
54519
|
-
}, React.createElement(TheLanguageDropdown, null), React.createElement("a", {
|
|
54520
|
-
className: "mr-3",
|
|
54521
|
-
style: {
|
|
54522
|
-
color: '#000'
|
|
54523
|
-
},
|
|
54524
|
-
href: '/privacy-policy',
|
|
54525
|
-
target: "blank"
|
|
54526
|
-
}, t("privacy_policy")), !isDistrict && React.createElement(NotificationButton, null), React.createElement(TheHeaderDropdown, {
|
|
54527
|
-
onToggleModel: onToggleModel
|
|
54528
|
-
})));
|
|
54529
|
-
};
|
|
54530
|
-
|
|
54531
|
-
var ModelSelectRole = function ModelSelectRole(_ref) {
|
|
54532
|
-
var _handleUserRole;
|
|
54533
|
-
|
|
54534
|
-
var open = _ref.open,
|
|
54535
|
-
onToggleModel = _ref.onToggleModel;
|
|
54536
|
-
var dispatch = useDispatch();
|
|
54537
|
-
|
|
54538
|
-
var _useTranslation = useTranslation(),
|
|
54539
|
-
t = _useTranslation.t;
|
|
54540
|
-
|
|
54541
|
-
var history = useHistory();
|
|
54542
|
-
var pathname = window.location.pathname;
|
|
54543
|
-
var user = useSelector(function (state) {
|
|
54544
|
-
return state.common.user;
|
|
54545
|
-
});
|
|
54546
|
-
var roles = user === null || user === void 0 ? void 0 : user.roles;
|
|
54547
|
-
|
|
54548
|
-
var handleSelectUserRoles = function handleSelectUserRoles(roles) {
|
|
54549
|
-
dispatch(setLoading(true));
|
|
54550
|
-
var roleSelect = roles.includes("Teacher/Assistant") ? ["Teacher", "Assistant"] : roles;
|
|
54551
|
-
dispatch(setUser(_extends({}, user, {
|
|
54552
|
-
roles: roleSelect
|
|
54553
|
-
})));
|
|
54554
|
-
localStorage.setItem("ROLES", roleSelect.toString());
|
|
54555
|
-
onToggleModel();
|
|
54556
|
-
|
|
54557
|
-
if (roles.includes("Parent")) {
|
|
54558
|
-
history.push("/parent");
|
|
54559
|
-
} else if (roles.includes("Admin")) {
|
|
54560
|
-
history.push("/admin/home");
|
|
54561
|
-
} else {
|
|
54562
|
-
pathname !== "/home" ? history.push("/home") : window.location.reload();
|
|
54563
|
-
}
|
|
54564
|
-
};
|
|
54565
|
-
|
|
54566
|
-
return React.createElement(Modal, {
|
|
54567
|
-
isOpen: open,
|
|
54568
|
-
toggle: function toggle() {
|
|
54569
|
-
return onToggleModel();
|
|
54570
|
-
},
|
|
54571
|
-
className: "" + styles["model-switch-roles"],
|
|
54572
|
-
centered: true
|
|
54573
|
-
}, React.createElement("p", {
|
|
54574
|
-
className: "" + styles["title"]
|
|
54575
|
-
}, t("continue_as")), React.createElement("div", null, (_handleUserRole = handleUserRole(user === null || user === void 0 ? void 0 : user.roles)) === null || _handleUserRole === void 0 ? void 0 : _handleUserRole.map(function (r) {
|
|
54576
|
-
return React.createElement("p", {
|
|
54577
|
-
key: r,
|
|
54578
|
-
className: styles["item-select-role"] + " " + styles[roles.includes("Teacher") && roles.includes("Assistant") && r === "Teacher/Assistant" && !roles.includes("Admin") || roles.includes("Admin") && r === "Admin" || roles.includes(r) && !roles.includes("Admin") ? "item-role-active" : ""],
|
|
54579
|
-
onClick: function onClick() {
|
|
54580
|
-
return handleSelectUserRoles([r]);
|
|
54581
|
-
}
|
|
54582
|
-
}, r == "SecondaryTeacher" ? "Support Teacher" : r);
|
|
54583
|
-
})));
|
|
54584
|
-
};
|
|
54585
|
-
|
|
54586
|
-
var TheLayout = function TheLayout(_ref) {
|
|
54587
|
-
var routes = _ref.routes,
|
|
54588
|
-
navigation = _ref.navigation;
|
|
54589
|
-
var history = useHistory();
|
|
54590
|
-
var dispatch = useDispatch();
|
|
54591
|
-
var user = useSelector(function (state) {
|
|
54592
|
-
return state.common.user;
|
|
54593
|
-
});
|
|
54594
|
-
var language = useSelector(function (state) {
|
|
54595
|
-
return state.common.language;
|
|
54596
|
-
});
|
|
54597
|
-
|
|
54598
|
-
var _useState = useState(false),
|
|
54599
|
-
openModelSelectRole = _useState[0],
|
|
54600
|
-
setOpenModelSelectRole = _useState[1];
|
|
54601
|
-
|
|
54602
|
-
var _useTranslation = useTranslation(),
|
|
54603
|
-
t = _useTranslation.t;
|
|
54604
|
-
|
|
54605
|
-
var location = useLocation();
|
|
54606
|
-
var isNotification = location.pathname.includes("notifications");
|
|
54607
|
-
var isDistrict = window.location.host.includes("-district");
|
|
54608
|
-
|
|
54609
|
-
var handleToggleModel = function handleToggleModel() {
|
|
54610
|
-
setOpenModelSelectRole(!openModelSelectRole);
|
|
54611
|
-
};
|
|
54612
|
-
|
|
54613
|
-
var authRoutes = useMemo(function () {
|
|
54614
|
-
return routes.filter(function (route) {
|
|
54615
|
-
return canAccess(user === null || user === void 0 ? void 0 : user.roles, route.roles);
|
|
54616
|
-
}).filter(function (route) {
|
|
54617
|
-
return !!route.isDistrict === isDistrict;
|
|
54618
|
-
});
|
|
54619
|
-
}, [user, language]);
|
|
54620
|
-
var authNavigations = useMemo(function () {
|
|
54621
|
-
return navigation.map(function (item) {
|
|
54622
|
-
var _item$_children, _item$_children2;
|
|
54623
|
-
|
|
54624
|
-
return _extends({}, item, {
|
|
54625
|
-
name: t(item.name),
|
|
54626
|
-
_children: item !== null && item !== void 0 && (_item$_children = item._children) !== null && _item$_children !== void 0 && _item$_children.length ? item === null || item === void 0 ? void 0 : (_item$_children2 = item._children) === null || _item$_children2 === void 0 ? void 0 : _item$_children2.map(function (x) {
|
|
54627
|
-
return _extends({}, x, {
|
|
54628
|
-
name: t(x.name)
|
|
54629
|
-
});
|
|
54630
|
-
}) : undefined
|
|
54631
|
-
});
|
|
54632
|
-
}).filter(function (nav) {
|
|
54633
|
-
return canAccess(user === null || user === void 0 ? void 0 : user.roles, nav.roles);
|
|
54634
|
-
}).filter(function (nav) {
|
|
54635
|
-
return !!nav.isDistrict === isDistrict;
|
|
54636
|
-
});
|
|
54637
|
-
}, [user, language]);
|
|
54638
|
-
|
|
54639
|
-
var getInformationSetting = function getInformationSetting() {
|
|
54640
|
-
try {
|
|
54641
|
-
var _temp2 = _catch(function () {
|
|
54642
|
-
return Promise.resolve(getSchoolSettings()).then(function (res) {
|
|
54643
|
-
dispatch(setSandboxMode(res.data.isSandboxMode));
|
|
54644
|
-
});
|
|
54645
|
-
}, function (err) {
|
|
54646
|
-
console.error(err);
|
|
54647
|
-
});
|
|
54648
|
-
|
|
54649
|
-
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
54650
|
-
} catch (e) {
|
|
54651
|
-
return Promise.reject(e);
|
|
54652
|
-
}
|
|
54653
|
-
};
|
|
54654
|
-
|
|
54655
|
-
useEffect(function () {
|
|
54656
|
-
checkAuthentication();
|
|
54657
|
-
}, []);
|
|
54658
|
-
useEffect(function () {
|
|
54659
|
-
getInformationSetting();
|
|
54660
|
-
}, [location.pathname]);
|
|
54661
|
-
|
|
54662
|
-
var checkAuthentication = function checkAuthentication() {
|
|
54663
|
-
try {
|
|
54664
|
-
var _temp4 = _catch(function () {
|
|
54665
|
-
return Promise.resolve(firstCheckToken()).then(function (tokenStatus) {
|
|
54666
|
-
tokenStatus ? loadInfo() : resetAuth();
|
|
54667
|
-
});
|
|
54668
|
-
}, function () {
|
|
54669
|
-
resetAuth();
|
|
54670
|
-
});
|
|
54671
|
-
|
|
54672
|
-
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
|
|
54673
|
-
} catch (e) {
|
|
54674
|
-
return Promise.reject(e);
|
|
54675
|
-
}
|
|
54676
|
-
};
|
|
54677
|
-
|
|
54678
|
-
var loadInfo = function loadInfo() {
|
|
54679
|
-
try {
|
|
54680
|
-
var _temp6 = _catch(function () {
|
|
54681
|
-
return Promise.resolve(getInfo()).then(function (info) {
|
|
54682
|
-
var _info$data, _info$data$roles;
|
|
54683
|
-
|
|
54684
|
-
if (!info || !(info !== null && info !== void 0 && (_info$data = info.data) !== null && _info$data !== void 0 && (_info$data$roles = _info$data.roles) !== null && _info$data$roles !== void 0 && _info$data$roles.includes("Admin"))) {
|
|
54685
|
-
resetAuth();
|
|
54686
|
-
}
|
|
54687
|
-
|
|
54688
|
-
dispatch(setUser(info.data));
|
|
54689
|
-
});
|
|
54690
|
-
}, function () {
|
|
54691
|
-
resetAuth();
|
|
54692
|
-
});
|
|
54693
|
-
|
|
54694
|
-
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
54695
|
-
} catch (e) {
|
|
54696
|
-
return Promise.reject(e);
|
|
54697
|
-
}
|
|
54698
|
-
};
|
|
54699
|
-
|
|
54700
|
-
var resetAuth = function resetAuth() {
|
|
54701
|
-
localStorage.removeItem(ACCESS_TOKEN);
|
|
54702
|
-
sessionStorage.removeItem(ACCESS_TOKEN);
|
|
54703
|
-
localStorage.removeItem("ROLES");
|
|
54704
|
-
history.push("/");
|
|
54705
|
-
};
|
|
54706
|
-
|
|
54707
|
-
if (!user) {
|
|
54708
|
-
return React.createElement(Loading, null);
|
|
54709
|
-
}
|
|
54710
|
-
|
|
54711
|
-
return React.createElement("div", {
|
|
54712
|
-
className: "c-app c-default-layout"
|
|
54713
|
-
}, !isNotification && React.createElement(TheSidebar, {
|
|
54714
|
-
navigation: authNavigations
|
|
54715
|
-
}), React.createElement("div", {
|
|
54716
|
-
className: "c-wrapper"
|
|
54717
|
-
}, !isNotification && React.createElement(TheHeader, {
|
|
54718
|
-
onToggleModel: handleToggleModel
|
|
54719
|
-
}), React.createElement("div", {
|
|
54720
|
-
className: "c-body bg-white"
|
|
54721
|
-
}, React.createElement(TheContent$1, {
|
|
54722
|
-
routes: authRoutes
|
|
54723
|
-
}))), React.createElement(ModelSelectRole, {
|
|
54724
|
-
open: openModelSelectRole,
|
|
54725
|
-
onToggleModel: handleToggleModel
|
|
54726
|
-
}));
|
|
54727
|
-
};
|
|
54728
|
-
|
|
54729
54799
|
var amplitudeClient = amplitude;
|
|
54730
54800
|
|
|
54731
54801
|
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CategorySelector, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, DEFAULT_LANGUAGE_CODE, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, INIT_AMPLITUDE_KEY_PROD, INIT_AMPLITUDE_KEY_STAGE, IS_USER_SESSION_BROWSER, Images, LANGUAGES, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_ALERT_KEY, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationLogoutModal, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SANDBOX_NOTIFICATION, SUPPORTED_LANGUAGES_CODE, SandboxAlert, SchoolList, ScrollToTop, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserContainer, UserDetail, UserList, addTab, amplitudeClient, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getCookieValue, getFileUrl, getInfo, getStaticFileUrl, getTextFromHTML, i18n, initAmplitude, isInViewport, isLocalhost, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setConversationOneToOne, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setEnableIEP, setEnableMarioAi, setEnableSurvey, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLanguage, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setOpenModelCongratulation, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSandboxMode, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, setWeeklyQuestList, showFontSize, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|