mario-core 2.9.412-feedback → 2.9.414-feedback

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2035,7 +2035,6 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
2035
2035
  var leave = "leave";
2036
2036
  var go_to_the_survey_dashboard = "Go to the Survey Dashboard";
2037
2037
  var my_dashboard = "My Dashboard";
2038
- 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?";
2039
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?";
2040
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?";
2041
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?";
@@ -2109,7 +2108,7 @@ var add_1_1_conversation_notes = "Add 1-1 Conversation notes";
2109
2108
  var save_data = "Save data";
2110
2109
  var please_select_date_1_1_conversation = "Please select date 1-1 conversation!";
2111
2110
  var please_write_something_to_this_1_1_conversation = "Please write something to this 1-1 conversation!";
2112
- var data_1_1_conversation_cannot_exceed_300_characters = "Data 1-1 conversation cannot exceed 300 characters!";
2111
+ var data_1_1_conversation_cannot_exceed_300_characters = "Data 1-1 conversation cannot exceed 1000 characters!";
2113
2112
  var no_need_for_it = "No need for it";
2114
2113
  var conversation_saved = "Conversation saved!";
2115
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?";
@@ -2126,7 +2125,7 @@ var yes_view_student_goals = "Yes, view student goals";
2126
2125
  var please_set_time_1_1_conversation = "Please set time 1-1 conversation";
2127
2126
  var type_your_answer_here = "Type your answer here...";
2128
2127
  var delete_bulk = "Delete Bulk";
2129
- var number_of_students_with_at_least_one_very_low_metric = "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";
2130
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%";
2131
2130
  var of_students_have_concerned_metrics = "of students have concerned metrics";
2132
2131
  var have_metrics_40 = "have metrics <40%";
@@ -2188,6 +2187,8 @@ var location$1 = "Location";
2188
2187
  var edit_my_profile = "Edit My Profile";
2189
2188
  var save_new_password = "Save new password";
2190
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";
2191
2192
  var lang_us = {
2192
2193
  dashboard: dashboard,
2193
2194
  user: user,
@@ -4226,7 +4227,6 @@ var lang_us = {
4226
4227
  leave: leave,
4227
4228
  go_to_the_survey_dashboard: go_to_the_survey_dashboard,
4228
4229
  my_dashboard: my_dashboard,
4229
- nice_choice_what_area_of_category_would_you_like_to_work_on: nice_choice_what_area_of_category_would_you_like_to_work_on,
4230
4230
  "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?",
4231
4231
  nice_choice_what_area_of_academics_would_you_like_to_work_on: nice_choice_what_area_of_academics_would_you_like_to_work_on,
4232
4232
  nice_choice_what_area_of_organization_would_you_like_to_work_on: nice_choice_what_area_of_organization_would_you_like_to_work_on,
@@ -4391,7 +4391,9 @@ var lang_us = {
4391
4391
  location: location$1,
4392
4392
  edit_my_profile: edit_my_profile,
4393
4393
  save_new_password: save_new_password,
4394
- teacher_code: teacher_code
4394
+ teacher_code: teacher_code,
4395
+ number_of_conversations: number_of_conversations,
4396
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal
4395
4397
  };
4396
4398
 
4397
4399
  var dashboard$1 = "Dashboard";
@@ -6392,7 +6394,6 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
6392
6394
  var leave$1 = "leave";
6393
6395
  var go_to_the_survey_dashboard$1 = "Go to the Survey Dashboard";
6394
6396
  var my_dashboard$1 = "My Dashboard";
6395
- 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?";
6396
6397
  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?";
6397
6398
  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?";
6398
6399
  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?";
@@ -6466,7 +6467,7 @@ var add_1_1_conversation_notes$1 = "Add 1-1 Conversation notes";
6466
6467
  var save_data$1 = "Save data";
6467
6468
  var please_select_date_1_1_conversation$1 = "Please select date 1-1 conversation!";
6468
6469
  var please_write_something_to_this_1_1_conversation$1 = "Please write something to this 1-1 conversation!";
6469
- var data_1_1_conversation_cannot_exceed_300_characters$1 = "Data 1-1 conversation cannot exceed 300 characters!";
6470
+ var data_1_1_conversation_cannot_exceed_300_characters$1 = "Data 1-1 conversation cannot exceed 1000 characters!";
6470
6471
  var no_need_for_it$1 = "No need for it";
6471
6472
  var conversation_saved$1 = "Conversation saved!";
6472
6473
  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?";
@@ -6483,7 +6484,7 @@ var yes_view_student_goals$1 = "Yes, view student goals";
6483
6484
  var please_set_time_1_1_conversation$1 = "Please set time 1-1 conversation";
6484
6485
  var type_your_answer_here$1 = "Type your answer here...";
6485
6486
  var delete_bulk$1 = "Delete Bulk";
6486
- var number_of_students_with_at_least_one_very_low_metric$1 = "Number of students with at least one very low metric";
6487
+ var number_of_students_with_at_least_one_very_low_metric$1 = "Students with concerning metrics";
6487
6488
  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%";
6488
6489
  var of_students_have_concerned_metrics$1 = "of students have concerned metrics";
6489
6490
  var have_metrics_40$1 = "have metrics <40%";
@@ -6543,6 +6544,8 @@ var location$2 = "Location";
6543
6544
  var edit_my_profile$1 = "Edit My Profile";
6544
6545
  var save_new_password$1 = "Save new password";
6545
6546
  var teacher_code$1 = "Teacher code";
6547
+ var number_of_conversations$1 = "Number of conversations";
6548
+ var number_of_expected_conversations_based_on_the_goal$1 = "Number of expected conversations based on the goal";
6546
6549
  var lang_uk = {
6547
6550
  dashboard: dashboard$1,
6548
6551
  user: user$1,
@@ -8581,7 +8584,6 @@ var lang_uk = {
8581
8584
  leave: leave$1,
8582
8585
  go_to_the_survey_dashboard: go_to_the_survey_dashboard$1,
8583
8586
  my_dashboard: my_dashboard$1,
8584
- 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,
8585
8587
  "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?",
8586
8588
  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,
8587
8589
  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,
@@ -8744,7 +8746,9 @@ var lang_uk = {
8744
8746
  location: location$2,
8745
8747
  edit_my_profile: edit_my_profile$1,
8746
8748
  save_new_password: save_new_password$1,
8747
- teacher_code: teacher_code$1
8749
+ teacher_code: teacher_code$1,
8750
+ number_of_conversations: number_of_conversations$1,
8751
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$1
8748
8752
  };
8749
8753
 
8750
8754
  var dashboard$2 = "لوحة المعلومات";
@@ -10777,7 +10781,6 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
10777
10781
  var leave$2 = "يترك";
10778
10782
  var go_to_the_survey_dashboard$2 = "انتقل إلى لوحة معلومات الاستطلاع";
10779
10783
  var my_dashboard$2 = "لوحة التحكم الخاصة بي";
10780
- var nice_choice_what_area_of_category_would_you_like_to_work_on$2 = "اختيار جميل! ما هو مجال {{category}} الذي ترغب في العمل عليه؟";
10781
10784
  var nice_choice_what_area_of_academics_would_you_like_to_work_on$2 = "اختيار جميل! ما هو المجال الأكاديمي الذي ترغب بالعمل فيه؟";
10782
10785
  var nice_choice_what_area_of_organization_would_you_like_to_work_on$2 = "اختيار جميل! في أي مجال من مجالات المنظمة تود العمل؟";
10783
10786
  var nice_choice_what_area_of_focus_would_you_like_to_work_on$2 = "اختيار جميل! ما هو مجال التركيز الذي ترغب في العمل عليه؟";
@@ -10848,7 +10851,7 @@ var add_1_1_conversation_notes$2 = "Add 1-1 Conversation notes";
10848
10851
  var save_data$2 = "Save data";
10849
10852
  var please_select_date_1_1_conversation$2 = "Please select date 1-1 conversation!";
10850
10853
  var please_write_something_to_this_1_1_conversation$2 = "Please write something to this 1-1 conversation!";
10851
- var data_1_1_conversation_cannot_exceed_300_characters$2 = "Data 1-1 conversation cannot exceed 300 characters!";
10854
+ var data_1_1_conversation_cannot_exceed_300_characters$2 = "Data 1-1 conversation cannot exceed 1000 characters!";
10852
10855
  var no_need_for_it$2 = "No need for it";
10853
10856
  var conversation_saved$2 = "Conversation saved!";
10854
10857
  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?";
@@ -10866,7 +10869,7 @@ var please_set_time_1_1_conversation$2 = "Please set time 1-1 conversation";
10866
10869
  var type_your_answer_here$2 = "Type your answer here...";
10867
10870
  var not_ready_to_learn$2 = "Not ready to learn";
10868
10871
  var delete_bulk$2 = "Delete Bulk";
10869
- var number_of_students_with_at_least_one_very_low_metric$2 = "Number of students with at least one very low metric";
10872
+ var number_of_students_with_at_least_one_very_low_metric$2 = "Students with concerning metrics";
10870
10873
  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%";
10871
10874
  var of_students_have_concerned_metrics$2 = "of students have concerned metrics";
10872
10875
  var have_metrics_40$2 = "have metrics <40%";
@@ -10926,6 +10929,8 @@ var location$3 = "Location";
10926
10929
  var edit_my_profile$2 = "Edit My Profile";
10927
10930
  var save_new_password$2 = "Save new password";
10928
10931
  var teacher_code$2 = "Teacher code";
10932
+ var number_of_conversations$2 = "Number of conversations";
10933
+ var number_of_expected_conversations_based_on_the_goal$2 = "Number of expected conversations based on the goal";
10929
10934
  var lang_ar = {
10930
10935
  dashboard: dashboard$2,
10931
10936
  user: user$2,
@@ -12998,7 +13003,6 @@ var lang_ar = {
12998
13003
  leave: leave$2,
12999
13004
  go_to_the_survey_dashboard: go_to_the_survey_dashboard$2,
13000
13005
  my_dashboard: my_dashboard$2,
13001
- 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,
13002
13006
  "nice_choice_what_area_of_well-being_would_you_like_to_work_on": "اختيار جميل! ما هو مجال الصحة والرفاهية الذي ترغب في العمل فيه؟",
13003
13007
  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,
13004
13008
  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,
@@ -13159,7 +13163,9 @@ var lang_ar = {
13159
13163
  location: location$3,
13160
13164
  edit_my_profile: edit_my_profile$2,
13161
13165
  save_new_password: save_new_password$2,
13162
- teacher_code: teacher_code$2
13166
+ teacher_code: teacher_code$2,
13167
+ number_of_conversations: number_of_conversations$2,
13168
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$2
13163
13169
  };
13164
13170
 
13165
13171
  var dashboard$3 = "Cuadro de mandos";
@@ -15192,7 +15198,6 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
15192
15198
  var leave$3 = "dejar";
15193
15199
  var go_to_the_survey_dashboard$3 = "Ir al panel de encuestas";
15194
15200
  var my_dashboard$3 = "Mi panel de control";
15195
- 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?";
15196
15201
  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?";
15197
15202
  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?";
15198
15203
  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?";
@@ -15264,7 +15269,7 @@ var add_1_1_conversation_notes$3 = "Add 1-1 Conversation notes";
15264
15269
  var save_data$3 = "Save data";
15265
15270
  var please_select_date_1_1_conversation$3 = "Please select date 1-1 conversation!";
15266
15271
  var please_write_something_to_this_1_1_conversation$3 = "Please write something to this 1-1 conversation!";
15267
- var data_1_1_conversation_cannot_exceed_300_characters$3 = "Data 1-1 conversation cannot exceed 300 characters!";
15272
+ var data_1_1_conversation_cannot_exceed_300_characters$3 = "Data 1-1 conversation cannot exceed 1000 characters!";
15268
15273
  var no_need_for_it$3 = "No need for it";
15269
15274
  var conversation_saved$3 = "Conversation saved!";
15270
15275
  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?";
@@ -15281,7 +15286,7 @@ var yes_view_student_goals$3 = "Yes, view student goals";
15281
15286
  var please_set_time_1_1_conversation$3 = "Please set time 1-1 conversation";
15282
15287
  var type_your_answer_here$3 = "Type your answer here...";
15283
15288
  var delete_bulk$3 = "Delete Bulk";
15284
- var number_of_students_with_at_least_one_very_low_metric$3 = "Number of students with at least one very low metric";
15289
+ var number_of_students_with_at_least_one_very_low_metric$3 = "Students with concerning metrics";
15285
15290
  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%";
15286
15291
  var of_students_have_concerned_metrics$3 = "of students have concerned metrics";
15287
15292
  var have_metrics_40$3 = "have metrics <40%";
@@ -15341,6 +15346,8 @@ var location$4 = "Location";
15341
15346
  var edit_my_profile$3 = "Edit My Profile";
15342
15347
  var save_new_password$3 = "Save new password";
15343
15348
  var teacher_code$3 = "Teacher code";
15349
+ var number_of_conversations$3 = "Number of conversations";
15350
+ var number_of_expected_conversations_based_on_the_goal$3 = "Number of expected conversations based on the goal";
15344
15351
  var lang_es = {
15345
15352
  dashboard: dashboard$3,
15346
15353
  user: user$3,
@@ -17413,7 +17420,6 @@ var lang_es = {
17413
17420
  leave: leave$3,
17414
17421
  go_to_the_survey_dashboard: go_to_the_survey_dashboard$3,
17415
17422
  my_dashboard: my_dashboard$3,
17416
- 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,
17417
17423
  "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?",
17418
17424
  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,
17419
17425
  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,
@@ -17574,7 +17580,9 @@ var lang_es = {
17574
17580
  location: location$4,
17575
17581
  edit_my_profile: edit_my_profile$3,
17576
17582
  save_new_password: save_new_password$3,
17577
- teacher_code: teacher_code$3
17583
+ teacher_code: teacher_code$3,
17584
+ number_of_conversations: number_of_conversations$3,
17585
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$3
17578
17586
  };
17579
17587
 
17580
17588
  var dashboard$4 = "仪表板";
@@ -19607,7 +19615,6 @@ var your_survey_was_sent_to_x_students_and_y_staff_members_you_can_keep_track_of
19607
19615
  var leave$4 = "离开";
19608
19616
  var go_to_the_survey_dashboard$4 = "前往调查仪表板";
19609
19617
  var my_dashboard$4 = "我的仪表板";
19610
- var nice_choice_what_area_of_category_would_you_like_to_work_on$4 = "不错的选择!您想在哪个{{category}}领域开展工作?";
19611
19618
  var nice_choice_what_area_of_academics_would_you_like_to_work_on$4 = "尼克·奇克!我看到如果你有学者和你的儿子塔希尔,你有论文吗?";
19612
19619
  var nice_choice_what_area_of_organization_would_you_like_to_work_on$4 = "尼克·奇克!让我看看,如果您正在安排,并且您有一个儿子,您有文件吗?";
19613
19620
  var nice_choice_what_area_of_focus_would_you_like_to_work_on$4 = "不错的选择!您希望在哪个重点领域开展工作?";
@@ -19679,7 +19686,7 @@ var add_1_1_conversation_notes$4 = "Add 1-1 Conversation notes";
19679
19686
  var save_data$4 = "Save data";
19680
19687
  var please_select_date_1_1_conversation$4 = "Please select date 1-1 conversation!";
19681
19688
  var please_write_something_to_this_1_1_conversation$4 = "Please write something to this 1-1 conversation!";
19682
- var data_1_1_conversation_cannot_exceed_300_characters$4 = "Data 1-1 conversation cannot exceed 300 characters!";
19689
+ var data_1_1_conversation_cannot_exceed_300_characters$4 = "Data 1-1 conversation cannot exceed 1000 characters!";
19683
19690
  var no_need_for_it$4 = "No need for it";
19684
19691
  var conversation_saved$4 = "Conversation saved!";
19685
19692
  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?";
@@ -19696,7 +19703,7 @@ var yes_view_student_goals$4 = "Yes, view student goals";
19696
19703
  var please_set_time_1_1_conversation$4 = "Please set time 1-1 conversation";
19697
19704
  var type_your_answer_here$4 = "Type your answer here...";
19698
19705
  var delete_bulk$4 = "Delete Bulk";
19699
- var number_of_students_with_at_least_one_very_low_metric$4 = "Number of students with at least one very low metric";
19706
+ var number_of_students_with_at_least_one_very_low_metric$4 = "Students with concerning metrics";
19700
19707
  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%";
19701
19708
  var of_students_have_concerned_metrics$4 = "of students have concerned metrics";
19702
19709
  var have_metrics_40$4 = "have metrics <40%";
@@ -19756,6 +19763,8 @@ var location$5 = "Location";
19756
19763
  var edit_my_profile$4 = "Edit My Profile";
19757
19764
  var save_new_password$4 = "Save new password";
19758
19765
  var teacher_code$4 = "Teacher code";
19766
+ var number_of_conversations$4 = "Number of conversations";
19767
+ var number_of_expected_conversations_based_on_the_goal$4 = "Number of expected conversations based on the goal";
19759
19768
  var lang_zh = {
19760
19769
  dashboard: dashboard$4,
19761
19770
  user: user$4,
@@ -21828,7 +21837,6 @@ var lang_zh = {
21828
21837
  leave: leave$4,
21829
21838
  go_to_the_survey_dashboard: go_to_the_survey_dashboard$4,
21830
21839
  my_dashboard: my_dashboard$4,
21831
- 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,
21832
21840
  "nice_choice_what_area_of_well-being_would_you_like_to_work_on": "不错的选择!您想在哪个幸福健康领域开展工作?",
21833
21841
  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,
21834
21842
  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,
@@ -21989,7 +21997,9 @@ var lang_zh = {
21989
21997
  location: location$5,
21990
21998
  edit_my_profile: edit_my_profile$4,
21991
21999
  save_new_password: save_new_password$4,
21992
- teacher_code: teacher_code$4
22000
+ teacher_code: teacher_code$4,
22001
+ number_of_conversations: number_of_conversations$4,
22002
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$4
21993
22003
  };
21994
22004
 
21995
22005
  var TINY_MCE_API_KEY = "htqausuofrnali3nh9ivmlpq6v415o0tv2qikpg39bqf4pnk";
@@ -41860,6 +41870,212 @@ var TheHeaderDropdown = function TheHeaderDropdown(_ref) {
41860
41870
  })), t("log_out")))));
41861
41871
  };
41862
41872
 
41873
+ var apiGetLanguage = function apiGetLanguage() {
41874
+ return api.get(BASE_URL + "/api/language");
41875
+ };
41876
+
41877
+ var apiUpdateLanguage = function apiUpdateLanguage(lang) {
41878
+ return api.put(BASE_URL + "/api/language?lang=" + lang);
41879
+ };
41880
+
41881
+ var LANGUAGE_SYSTEM = "LANGUAGE_SYSTEM";
41882
+
41883
+ var useLanguages = function useLanguages() {
41884
+ var dispatch = reactRedux.useDispatch();
41885
+
41886
+ var _useTranslation = reactI18next.useTranslation(),
41887
+ i18n = _useTranslation.i18n;
41888
+
41889
+ var language = reactRedux.useSelector(function (state) {
41890
+ return state.common.language;
41891
+ });
41892
+ var defaultLanguage = getCookieValue(LANGUAGE_SYSTEM) != null ? getCookieValue(LANGUAGE_SYSTEM) : DEFAULT_LANGUAGE_CODE;
41893
+
41894
+ var _useState = React.useState([]),
41895
+ languageList = _useState[0],
41896
+ setLanguageList = _useState[1];
41897
+
41898
+ var _useState2 = React.useState(false),
41899
+ dropdownOpen = _useState2[0],
41900
+ setDropdownOpen = _useState2[1];
41901
+
41902
+ var _useState3 = React.useState(defaultLanguage),
41903
+ currentLang = _useState3[0],
41904
+ setCurrentLang = _useState3[1];
41905
+
41906
+ var toggle = function toggle() {
41907
+ return setDropdownOpen(function (prevState) {
41908
+ return !prevState;
41909
+ });
41910
+ };
41911
+
41912
+ var changeLanguageApp = function changeLanguageApp(lang) {
41913
+ try {
41914
+ var _temp3 = function _temp3() {
41915
+ dispatch(setLoading(false));
41916
+ };
41917
+
41918
+ dispatch(setLoading(true));
41919
+
41920
+ var _temp4 = _catch(function () {
41921
+ return Promise.resolve(apiUpdateLanguage(lang)).then(function () {
41922
+ i18n.changeLanguage(lang);
41923
+ setCurrentLang(lang);
41924
+ dispatch(setLanguage(lang));
41925
+ });
41926
+ }, function (err) {
41927
+ var _err$response, _err$response$data;
41928
+
41929
+ dispatch(setAlert({
41930
+ type: "danger",
41931
+ 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
41932
+ }));
41933
+ });
41934
+
41935
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
41936
+ } catch (e) {
41937
+ return Promise.reject(e);
41938
+ }
41939
+ };
41940
+
41941
+ var getListLanguage = function getListLanguage() {
41942
+ try {
41943
+ var _temp6 = _catch(function () {
41944
+ return Promise.resolve(apiGetLanguage()).then(function (res) {
41945
+ setLanguageList(res.data);
41946
+ });
41947
+ }, function (err) {
41948
+ var _err$response2, _err$response2$data;
41949
+
41950
+ dispatch(setAlert({
41951
+ type: "danger",
41952
+ 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
41953
+ }));
41954
+ });
41955
+
41956
+ return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
41957
+ } catch (e) {
41958
+ return Promise.reject(e);
41959
+ }
41960
+ };
41961
+
41962
+ React.useEffect(function () {
41963
+ defaultLanguage != language && changeLanguageApp(defaultLanguage);
41964
+ getListLanguage();
41965
+ }, []);
41966
+ return {
41967
+ languageList: languageList,
41968
+ toggle: toggle,
41969
+ dropdownOpen: dropdownOpen,
41970
+ currentLang: currentLang,
41971
+ changeLanguageApp: changeLanguageApp,
41972
+ setCurrentLang: setCurrentLang
41973
+ };
41974
+ };
41975
+
41976
+ var TheLanguageDropdown = function TheLanguageDropdown() {
41977
+ var _useLanguages = useLanguages(),
41978
+ languageList = _useLanguages.languageList,
41979
+ toggle = _useLanguages.toggle,
41980
+ dropdownOpen = _useLanguages.dropdownOpen,
41981
+ currentLang = _useLanguages.currentLang,
41982
+ changeLanguageApp = _useLanguages.changeLanguageApp;
41983
+
41984
+ var currentLanguage = React.useMemo(function () {
41985
+ var current = languageList.find(function (i) {
41986
+ return i.code === currentLang;
41987
+ });
41988
+ if (!current) return null;
41989
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement("img", {
41990
+ className: "mr-2 " + styles['dropdown-menu-flag'],
41991
+ src: "" + getStaticFileUrl(current.image)
41992
+ }), " ", current.name);
41993
+ }, [currentLang, languageList]);
41994
+ return React__default.createElement(reactstrap.Dropdown, {
41995
+ isOpen: dropdownOpen,
41996
+ toggle: toggle,
41997
+ className: "" + styles["dropdown-menu"]
41998
+ }, React__default.createElement(reactstrap.DropdownToggle, {
41999
+ className: styles["header-avatar"] + " d-flex align-items-center"
42000
+ }, React__default.createElement("span", {
42001
+ style: {
42002
+ color: "#000",
42003
+ textTransform: "capitalize",
42004
+ display: 'flex',
42005
+ alignItems: 'center'
42006
+ }
42007
+ }, currentLanguage, React__default.createElement(bs.BsChevronDown, {
42008
+ className: "ml-2",
42009
+ style: {
42010
+ fontSize: '10px'
42011
+ }
42012
+ }))), React__default.createElement(reactstrap.DropdownMenu, {
42013
+ className: styles["dropdown-content-language"]
42014
+ }, !!languageList && languageList.length > 0 && languageList.map(function (lang, index) {
42015
+ return React__default.createElement(reactstrap.DropdownItem, {
42016
+ key: lang.code,
42017
+ className: styles["dropdown-change"] + " px-0 py-0 " + (index === languageList.length - 1 ? "pb-2" : "pt-2"),
42018
+ onClick: function onClick() {
42019
+ return changeLanguageApp(lang.code);
42020
+ }
42021
+ }, React__default.createElement("div", {
42022
+ className: styles["dropdown-item-language"] + " " + styles["item-logout"] + " " + (currentLang == lang.code ? styles['dropdown-item-language-active'] : "") + " d-flex align-items-center w-100"
42023
+ }, React__default.createElement("span", {
42024
+ className: "mr-2 d-flex hover-opacity"
42025
+ }, React__default.createElement("img", {
42026
+ style: {
42027
+ width: "30px",
42028
+ height: "25px",
42029
+ borderRadius: "5px"
42030
+ },
42031
+ src: getStaticFileUrl(lang.image)
42032
+ })), lang.name));
42033
+ })));
42034
+ };
42035
+
42036
+ var TheHeader = function TheHeader(_ref) {
42037
+ var onToggleModel = _ref.onToggleModel;
42038
+ var dispatch = reactRedux.useDispatch();
42039
+ var sidebarShow = reactRedux.useSelector(function (state) {
42040
+ return state.common.sidebarShow;
42041
+ });
42042
+
42043
+ var _useTranslation = reactI18next.useTranslation(),
42044
+ t = _useTranslation.t;
42045
+
42046
+ var toggleSidebarMobile = function toggleSidebarMobile() {
42047
+ var val = [false, "responsive"].includes(sidebarShow) ? true : "responsive";
42048
+ dispatch(setSidebar(val));
42049
+ };
42050
+
42051
+ var isDistrict = window.location.host.includes("-district");
42052
+ return React__default.createElement(react.CHeader, {
42053
+ withSubheader: true,
42054
+ className: "d-flex align-items-center justify-content-end"
42055
+ }, React__default.createElement(react.CToggler, {
42056
+ inHeader: true,
42057
+ className: "ml-md-3 d-lg-none",
42058
+ onClick: toggleSidebarMobile
42059
+ }), React__default.createElement(react.CHeaderBrand, {
42060
+ className: "mx-auto flex-grow-1 d-lg-none",
42061
+ to: "/"
42062
+ }, React__default.createElement("img", {
42063
+ src: getStaticFileUrl(Images.LOGO_HEADER),
42064
+ className: styles["header-logo"]
42065
+ })), React__default.createElement(react.CHeaderNav, {
42066
+ className: "pr-3"
42067
+ }, React__default.createElement(TheLanguageDropdown, null), React__default.createElement("a", {
42068
+ className: "mr-3",
42069
+ style: {
42070
+ color: '#000'
42071
+ },
42072
+ href: '/privacy-policy',
42073
+ target: "blank"
42074
+ }, t("privacy_policy")), !isDistrict && React__default.createElement(NotificationButton, null), React__default.createElement(TheHeaderDropdown, {
42075
+ onToggleModel: onToggleModel
42076
+ })));
42077
+ };
42078
+
41863
42079
  var TITLE$3 = "Not found";
41864
42080
 
41865
42081
  var NotFound = function NotFound() {
@@ -41917,6 +42133,258 @@ var TheContent = function TheContent(_ref) {
41917
42133
 
41918
42134
  var TheContent$1 = React__default.memo(TheContent);
41919
42135
 
42136
+ var loadingStyle = {
42137
+ minWidth: "100vw",
42138
+ minHeight: "100vh",
42139
+ position: "fixed",
42140
+ top: 0,
42141
+ left: 0,
42142
+ zIndex: 999999999,
42143
+ backgroundColor: "rgba(0, 0, 0, 0.4)",
42144
+ display: "flex",
42145
+ justifyContent: "center",
42146
+ alignItems: "center"
42147
+ };
42148
+
42149
+ var Loading = function Loading() {
42150
+ var isLoading = reactRedux.useSelector(function (state) {
42151
+ return state.common.isLoading;
42152
+ });
42153
+ localStorage.setItem("LAST_TIME_REQUETST", moment().utc().format("YYYY-MM-DD HH:mm:ss"));
42154
+ return isLoading ? React__default.createElement("div", {
42155
+ style: loadingStyle
42156
+ }, React__default.createElement("div", {
42157
+ className: "spinner-border text-secondary",
42158
+ role: "status"
42159
+ }, React__default.createElement("span", {
42160
+ className: "sr-only"
42161
+ }, "Loading..."))) : null;
42162
+ };
42163
+
42164
+ var firstCheckToken = function firstCheckToken() {
42165
+ return Promise.resolve(_catch(function () {
42166
+ var token = getAccessToken();
42167
+ return token ? Promise.resolve(checkToken(token)).then(function (tokenStatus) {
42168
+ return tokenStatus.data ? true : false;
42169
+ }) : false;
42170
+ }, function () {
42171
+ return false;
42172
+ }));
42173
+ };
42174
+
42175
+ var canAccess = function canAccess(userRoles, componentRoles) {
42176
+ if (!Array.isArray(userRoles)) {
42177
+ return false;
42178
+ }
42179
+
42180
+ if (Array.isArray(componentRoles)) {
42181
+ var intersects = userRoles.filter(function (i) {
42182
+ return componentRoles.includes(i);
42183
+ });
42184
+ return intersects.length > 0;
42185
+ }
42186
+
42187
+ return true;
42188
+ };
42189
+
42190
+ var ModelSelectRole = function ModelSelectRole(_ref) {
42191
+ var _handleUserRole;
42192
+
42193
+ var open = _ref.open,
42194
+ onToggleModel = _ref.onToggleModel;
42195
+ var dispatch = reactRedux.useDispatch();
42196
+
42197
+ var _useTranslation = reactI18next.useTranslation(),
42198
+ t = _useTranslation.t;
42199
+
42200
+ var history = reactRouterDom.useHistory();
42201
+ var pathname = window.location.pathname;
42202
+ var user = reactRedux.useSelector(function (state) {
42203
+ return state.common.user;
42204
+ });
42205
+ var roles = user === null || user === void 0 ? void 0 : user.roles;
42206
+
42207
+ var handleSelectUserRoles = function handleSelectUserRoles(roles) {
42208
+ dispatch(setLoading(true));
42209
+ var roleSelect = roles.includes("Teacher/Assistant") ? ["Teacher", "Assistant"] : roles;
42210
+ dispatch(setUser(_extends({}, user, {
42211
+ roles: roleSelect
42212
+ })));
42213
+ localStorage.setItem("ROLES", roleSelect.toString());
42214
+ onToggleModel();
42215
+
42216
+ if (roles.includes("Parent")) {
42217
+ history.push("/parent");
42218
+ } else if (roles.includes("Admin")) {
42219
+ history.push("/admin/home");
42220
+ } else {
42221
+ pathname !== "/home" ? history.push("/home") : window.location.reload();
42222
+ }
42223
+ };
42224
+
42225
+ return React__default.createElement(reactstrap.Modal, {
42226
+ isOpen: open,
42227
+ toggle: function toggle() {
42228
+ return onToggleModel();
42229
+ },
42230
+ className: "" + styles["model-switch-roles"],
42231
+ centered: true
42232
+ }, React__default.createElement("p", {
42233
+ className: "" + styles["title"]
42234
+ }, t("continue_as")), React__default.createElement("div", null, (_handleUserRole = handleUserRole(user === null || user === void 0 ? void 0 : user.roles)) === null || _handleUserRole === void 0 ? void 0 : _handleUserRole.map(function (r) {
42235
+ return React__default.createElement("p", {
42236
+ key: r,
42237
+ 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" : ""],
42238
+ onClick: function onClick() {
42239
+ return handleSelectUserRoles([r]);
42240
+ }
42241
+ }, r == "SecondaryTeacher" ? "Support Teacher" : r);
42242
+ })));
42243
+ };
42244
+
42245
+ var TheLayout = function TheLayout(_ref) {
42246
+ var routes = _ref.routes,
42247
+ navigation = _ref.navigation;
42248
+ var history = reactRouterDom.useHistory();
42249
+ var dispatch = reactRedux.useDispatch();
42250
+ var user = reactRedux.useSelector(function (state) {
42251
+ return state.common.user;
42252
+ });
42253
+ var language = reactRedux.useSelector(function (state) {
42254
+ return state.common.language;
42255
+ });
42256
+
42257
+ var _useState = React.useState(false),
42258
+ openModelSelectRole = _useState[0],
42259
+ setOpenModelSelectRole = _useState[1];
42260
+
42261
+ var _useTranslation = reactI18next.useTranslation(),
42262
+ t = _useTranslation.t;
42263
+
42264
+ var location = reactRouterDom.useLocation();
42265
+ var isNotification = location.pathname.includes("notifications");
42266
+ var isDistrict = window.location.host.includes("-district");
42267
+
42268
+ var handleToggleModel = function handleToggleModel() {
42269
+ setOpenModelSelectRole(!openModelSelectRole);
42270
+ };
42271
+
42272
+ var authRoutes = React.useMemo(function () {
42273
+ return routes.filter(function (route) {
42274
+ return canAccess(user === null || user === void 0 ? void 0 : user.roles, route.roles);
42275
+ }).filter(function (route) {
42276
+ return !!route.isDistrict === isDistrict;
42277
+ });
42278
+ }, [user, language]);
42279
+ var authNavigations = React.useMemo(function () {
42280
+ return navigation.map(function (item) {
42281
+ var _item$_children, _item$_children2;
42282
+
42283
+ return _extends({}, item, {
42284
+ name: t(item.name),
42285
+ _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) {
42286
+ return _extends({}, x, {
42287
+ name: t(x.name)
42288
+ });
42289
+ }) : undefined
42290
+ });
42291
+ }).filter(function (nav) {
42292
+ return canAccess(user === null || user === void 0 ? void 0 : user.roles, nav.roles);
42293
+ }).filter(function (nav) {
42294
+ return !!nav.isDistrict === isDistrict;
42295
+ });
42296
+ }, [user, language]);
42297
+
42298
+ var getInformationSetting = function getInformationSetting() {
42299
+ try {
42300
+ var _temp2 = _catch(function () {
42301
+ return Promise.resolve(getSchoolSettings()).then(function (res) {
42302
+ dispatch(setSandboxMode(res.data.isSandboxMode));
42303
+ });
42304
+ }, function (err) {
42305
+ console.error(err);
42306
+ });
42307
+
42308
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
42309
+ } catch (e) {
42310
+ return Promise.reject(e);
42311
+ }
42312
+ };
42313
+
42314
+ React.useEffect(function () {
42315
+ checkAuthentication();
42316
+ }, []);
42317
+ React.useEffect(function () {
42318
+ getInformationSetting();
42319
+ }, [location.pathname]);
42320
+
42321
+ var checkAuthentication = function checkAuthentication() {
42322
+ try {
42323
+ var _temp4 = _catch(function () {
42324
+ return Promise.resolve(firstCheckToken()).then(function (tokenStatus) {
42325
+ tokenStatus ? loadInfo() : resetAuth();
42326
+ });
42327
+ }, function () {
42328
+ resetAuth();
42329
+ });
42330
+
42331
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
42332
+ } catch (e) {
42333
+ return Promise.reject(e);
42334
+ }
42335
+ };
42336
+
42337
+ var loadInfo = function loadInfo() {
42338
+ try {
42339
+ var _temp6 = _catch(function () {
42340
+ return Promise.resolve(getInfo()).then(function (info) {
42341
+ var _info$data, _info$data$roles;
42342
+
42343
+ 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"))) {
42344
+ resetAuth();
42345
+ }
42346
+
42347
+ dispatch(setUser(info.data));
42348
+ });
42349
+ }, function () {
42350
+ resetAuth();
42351
+ });
42352
+
42353
+ return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
42354
+ } catch (e) {
42355
+ return Promise.reject(e);
42356
+ }
42357
+ };
42358
+
42359
+ var resetAuth = function resetAuth() {
42360
+ localStorage.removeItem(ACCESS_TOKEN);
42361
+ sessionStorage.removeItem(ACCESS_TOKEN);
42362
+ localStorage.removeItem("ROLES");
42363
+ history.push("/");
42364
+ };
42365
+
42366
+ if (!user) {
42367
+ return React__default.createElement(Loading, null);
42368
+ }
42369
+
42370
+ return React__default.createElement("div", {
42371
+ className: "c-app c-default-layout"
42372
+ }, !isNotification && React__default.createElement(TheSidebar, {
42373
+ navigation: authNavigations
42374
+ }), React__default.createElement("div", {
42375
+ className: "c-wrapper"
42376
+ }, !isNotification && React__default.createElement(TheHeader, {
42377
+ onToggleModel: handleToggleModel
42378
+ }), React__default.createElement("div", {
42379
+ className: "c-body bg-white"
42380
+ }, React__default.createElement(TheContent$1, {
42381
+ routes: authRoutes
42382
+ }))), React__default.createElement(ModelSelectRole, {
42383
+ open: openModelSelectRole,
42384
+ onToggleModel: handleToggleModel
42385
+ }));
42386
+ };
42387
+
41920
42388
  var buttonTextStyle = {
41921
42389
  fontWeight: 500
41922
42390
  };
@@ -51263,34 +51731,6 @@ var UserDetail = function UserDetail() {
51263
51731
  });
51264
51732
  };
51265
51733
 
51266
- var loadingStyle = {
51267
- minWidth: "100vw",
51268
- minHeight: "100vh",
51269
- position: "fixed",
51270
- top: 0,
51271
- left: 0,
51272
- zIndex: 999999999,
51273
- backgroundColor: "rgba(0, 0, 0, 0.4)",
51274
- display: "flex",
51275
- justifyContent: "center",
51276
- alignItems: "center"
51277
- };
51278
-
51279
- var Loading = function Loading() {
51280
- var isLoading = reactRedux.useSelector(function (state) {
51281
- return state.common.isLoading;
51282
- });
51283
- localStorage.setItem("LAST_TIME_REQUETST", moment().utc().format("YYYY-MM-DD HH:mm:ss"));
51284
- return isLoading ? React__default.createElement("div", {
51285
- style: loadingStyle
51286
- }, React__default.createElement("div", {
51287
- className: "spinner-border text-secondary",
51288
- role: "status"
51289
- }, React__default.createElement("span", {
51290
- className: "sr-only"
51291
- }, "Loading..."))) : null;
51292
- };
51293
-
51294
51734
  var ScrollToTop = function ScrollToTop() {
51295
51735
  var _useLocation = reactRouterDom.useLocation(),
51296
51736
  pathname = _useLocation.pathname;
@@ -54314,32 +54754,6 @@ var store = toolkit.configureStore({
54314
54754
  }
54315
54755
  });
54316
54756
 
54317
- var firstCheckToken = function firstCheckToken() {
54318
- return Promise.resolve(_catch(function () {
54319
- var token = getAccessToken();
54320
- return token ? Promise.resolve(checkToken(token)).then(function (tokenStatus) {
54321
- return tokenStatus.data ? true : false;
54322
- }) : false;
54323
- }, function () {
54324
- return false;
54325
- }));
54326
- };
54327
-
54328
- var canAccess = function canAccess(userRoles, componentRoles) {
54329
- if (!Array.isArray(userRoles)) {
54330
- return false;
54331
- }
54332
-
54333
- if (Array.isArray(componentRoles)) {
54334
- var intersects = userRoles.filter(function (i) {
54335
- return componentRoles.includes(i);
54336
- });
54337
- return intersects.length > 0;
54338
- }
54339
-
54340
- return true;
54341
- };
54342
-
54343
54757
  var isInViewport = function isInViewport(el) {
54344
54758
  var rect = el === null || el === void 0 ? void 0 : el.getBoundingClientRect();
54345
54759
  return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
@@ -54373,410 +54787,6 @@ var generateRandomString = (function () {
54373
54787
  return (Math.random() + 1).toString(36).substring(7);
54374
54788
  });
54375
54789
 
54376
- var apiGetLanguage = function apiGetLanguage() {
54377
- return api.get(BASE_URL + "/api/language");
54378
- };
54379
-
54380
- var apiUpdateLanguage = function apiUpdateLanguage(lang) {
54381
- return api.put(BASE_URL + "/api/language?lang=" + lang);
54382
- };
54383
-
54384
- var LANGUAGE_SYSTEM = "LANGUAGE_SYSTEM";
54385
-
54386
- var useLanguages = function useLanguages() {
54387
- var dispatch = reactRedux.useDispatch();
54388
-
54389
- var _useTranslation = reactI18next.useTranslation(),
54390
- i18n = _useTranslation.i18n;
54391
-
54392
- var language = reactRedux.useSelector(function (state) {
54393
- return state.common.language;
54394
- });
54395
- var defaultLanguage = getCookieValue(LANGUAGE_SYSTEM) != null ? getCookieValue(LANGUAGE_SYSTEM) : DEFAULT_LANGUAGE_CODE;
54396
-
54397
- var _useState = React.useState([]),
54398
- languageList = _useState[0],
54399
- setLanguageList = _useState[1];
54400
-
54401
- var _useState2 = React.useState(false),
54402
- dropdownOpen = _useState2[0],
54403
- setDropdownOpen = _useState2[1];
54404
-
54405
- var _useState3 = React.useState(defaultLanguage),
54406
- currentLang = _useState3[0],
54407
- setCurrentLang = _useState3[1];
54408
-
54409
- var toggle = function toggle() {
54410
- return setDropdownOpen(function (prevState) {
54411
- return !prevState;
54412
- });
54413
- };
54414
-
54415
- var changeLanguageApp = function changeLanguageApp(lang) {
54416
- try {
54417
- var _temp3 = function _temp3() {
54418
- dispatch(setLoading(false));
54419
- };
54420
-
54421
- dispatch(setLoading(true));
54422
-
54423
- var _temp4 = _catch(function () {
54424
- return Promise.resolve(apiUpdateLanguage(lang)).then(function () {
54425
- i18n.changeLanguage(lang);
54426
- setCurrentLang(lang);
54427
- dispatch(setLanguage(lang));
54428
- });
54429
- }, function (err) {
54430
- var _err$response, _err$response$data;
54431
-
54432
- dispatch(setAlert({
54433
- type: "danger",
54434
- 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
54435
- }));
54436
- });
54437
-
54438
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
54439
- } catch (e) {
54440
- return Promise.reject(e);
54441
- }
54442
- };
54443
-
54444
- var getListLanguage = function getListLanguage() {
54445
- try {
54446
- var _temp6 = _catch(function () {
54447
- return Promise.resolve(apiGetLanguage()).then(function (res) {
54448
- setLanguageList(res.data);
54449
- });
54450
- }, function (err) {
54451
- var _err$response2, _err$response2$data;
54452
-
54453
- dispatch(setAlert({
54454
- type: "danger",
54455
- 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
54456
- }));
54457
- });
54458
-
54459
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
54460
- } catch (e) {
54461
- return Promise.reject(e);
54462
- }
54463
- };
54464
-
54465
- React.useEffect(function () {
54466
- defaultLanguage != language && changeLanguageApp(defaultLanguage);
54467
- getListLanguage();
54468
- }, []);
54469
- return {
54470
- languageList: languageList,
54471
- toggle: toggle,
54472
- dropdownOpen: dropdownOpen,
54473
- currentLang: currentLang,
54474
- changeLanguageApp: changeLanguageApp,
54475
- setCurrentLang: setCurrentLang
54476
- };
54477
- };
54478
-
54479
- var TheLanguageDropdown = function TheLanguageDropdown() {
54480
- var _useLanguages = useLanguages(),
54481
- languageList = _useLanguages.languageList,
54482
- toggle = _useLanguages.toggle,
54483
- dropdownOpen = _useLanguages.dropdownOpen,
54484
- currentLang = _useLanguages.currentLang,
54485
- changeLanguageApp = _useLanguages.changeLanguageApp;
54486
-
54487
- var currentLanguage = React.useMemo(function () {
54488
- var current = languageList.find(function (i) {
54489
- return i.code === currentLang;
54490
- });
54491
- if (!current) return null;
54492
- return React__default.createElement(React__default.Fragment, null, React__default.createElement("img", {
54493
- className: "mr-2 " + styles['dropdown-menu-flag'],
54494
- src: "" + getStaticFileUrl(current.image)
54495
- }), " ", current.name);
54496
- }, [currentLang, languageList]);
54497
- return React__default.createElement(reactstrap.Dropdown, {
54498
- isOpen: dropdownOpen,
54499
- toggle: toggle,
54500
- className: "" + styles["dropdown-menu"]
54501
- }, React__default.createElement(reactstrap.DropdownToggle, {
54502
- className: styles["header-avatar"] + " d-flex align-items-center"
54503
- }, React__default.createElement("span", {
54504
- style: {
54505
- color: "#000",
54506
- textTransform: "capitalize",
54507
- display: 'flex',
54508
- alignItems: 'center'
54509
- }
54510
- }, currentLanguage, React__default.createElement(bs.BsChevronDown, {
54511
- className: "ml-2",
54512
- style: {
54513
- fontSize: '10px'
54514
- }
54515
- }))), React__default.createElement(reactstrap.DropdownMenu, {
54516
- className: styles["dropdown-content-language"]
54517
- }, !!languageList && languageList.length > 0 && languageList.map(function (lang, index) {
54518
- return React__default.createElement(reactstrap.DropdownItem, {
54519
- key: lang.code,
54520
- className: styles["dropdown-change"] + " px-0 py-0 " + (index === languageList.length - 1 ? "pb-2" : "pt-2"),
54521
- onClick: function onClick() {
54522
- return changeLanguageApp(lang.code);
54523
- }
54524
- }, React__default.createElement("div", {
54525
- className: styles["dropdown-item-language"] + " " + styles["item-logout"] + " " + (currentLang == lang.code ? styles['dropdown-item-language-active'] : "") + " d-flex align-items-center w-100"
54526
- }, React__default.createElement("span", {
54527
- className: "mr-2 d-flex hover-opacity"
54528
- }, React__default.createElement("img", {
54529
- style: {
54530
- width: "30px",
54531
- height: "25px",
54532
- borderRadius: "5px"
54533
- },
54534
- src: getStaticFileUrl(lang.image)
54535
- })), lang.name));
54536
- })));
54537
- };
54538
-
54539
- var TheHeader = function TheHeader(_ref) {
54540
- var onToggleModel = _ref.onToggleModel;
54541
- var dispatch = reactRedux.useDispatch();
54542
- var sidebarShow = reactRedux.useSelector(function (state) {
54543
- return state.common.sidebarShow;
54544
- });
54545
-
54546
- var _useTranslation = reactI18next.useTranslation(),
54547
- t = _useTranslation.t;
54548
-
54549
- var toggleSidebarMobile = function toggleSidebarMobile() {
54550
- var val = [false, "responsive"].includes(sidebarShow) ? true : "responsive";
54551
- dispatch(setSidebar(val));
54552
- };
54553
-
54554
- var isDistrict = window.location.host.includes("-district");
54555
- return React__default.createElement(react.CHeader, {
54556
- withSubheader: true,
54557
- className: "d-flex align-items-center justify-content-end"
54558
- }, React__default.createElement(react.CToggler, {
54559
- inHeader: true,
54560
- className: "ml-md-3 d-lg-none",
54561
- onClick: toggleSidebarMobile
54562
- }), React__default.createElement(react.CHeaderBrand, {
54563
- className: "mx-auto flex-grow-1 d-lg-none",
54564
- to: "/"
54565
- }, React__default.createElement("img", {
54566
- src: getStaticFileUrl(Images.LOGO_HEADER),
54567
- className: styles["header-logo"]
54568
- })), React__default.createElement(react.CHeaderNav, {
54569
- className: "pr-3"
54570
- }, React__default.createElement(TheLanguageDropdown, null), React__default.createElement("a", {
54571
- className: "mr-3",
54572
- style: {
54573
- color: '#000'
54574
- },
54575
- href: '/privacy-policy',
54576
- target: "blank"
54577
- }, t("privacy_policy")), !isDistrict && React__default.createElement(NotificationButton, null), React__default.createElement(TheHeaderDropdown, {
54578
- onToggleModel: onToggleModel
54579
- })));
54580
- };
54581
-
54582
- var ModelSelectRole = function ModelSelectRole(_ref) {
54583
- var _handleUserRole;
54584
-
54585
- var open = _ref.open,
54586
- onToggleModel = _ref.onToggleModel;
54587
- var dispatch = reactRedux.useDispatch();
54588
-
54589
- var _useTranslation = reactI18next.useTranslation(),
54590
- t = _useTranslation.t;
54591
-
54592
- var history = reactRouterDom.useHistory();
54593
- var pathname = window.location.pathname;
54594
- var user = reactRedux.useSelector(function (state) {
54595
- return state.common.user;
54596
- });
54597
- var roles = user === null || user === void 0 ? void 0 : user.roles;
54598
-
54599
- var handleSelectUserRoles = function handleSelectUserRoles(roles) {
54600
- dispatch(setLoading(true));
54601
- var roleSelect = roles.includes("Teacher/Assistant") ? ["Teacher", "Assistant"] : roles;
54602
- dispatch(setUser(_extends({}, user, {
54603
- roles: roleSelect
54604
- })));
54605
- localStorage.setItem("ROLES", roleSelect.toString());
54606
- onToggleModel();
54607
-
54608
- if (roles.includes("Parent")) {
54609
- history.push("/parent");
54610
- } else if (roles.includes("Admin")) {
54611
- history.push("/admin/home");
54612
- } else {
54613
- pathname !== "/home" ? history.push("/home") : window.location.reload();
54614
- }
54615
- };
54616
-
54617
- return React__default.createElement(reactstrap.Modal, {
54618
- isOpen: open,
54619
- toggle: function toggle() {
54620
- return onToggleModel();
54621
- },
54622
- className: "" + styles["model-switch-roles"],
54623
- centered: true
54624
- }, React__default.createElement("p", {
54625
- className: "" + styles["title"]
54626
- }, t("continue_as")), React__default.createElement("div", null, (_handleUserRole = handleUserRole(user === null || user === void 0 ? void 0 : user.roles)) === null || _handleUserRole === void 0 ? void 0 : _handleUserRole.map(function (r) {
54627
- return React__default.createElement("p", {
54628
- key: r,
54629
- 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" : ""],
54630
- onClick: function onClick() {
54631
- return handleSelectUserRoles([r]);
54632
- }
54633
- }, r == "SecondaryTeacher" ? "Support Teacher" : r);
54634
- })));
54635
- };
54636
-
54637
- var TheLayout = function TheLayout(_ref) {
54638
- var routes = _ref.routes,
54639
- navigation = _ref.navigation;
54640
- var history = reactRouterDom.useHistory();
54641
- var dispatch = reactRedux.useDispatch();
54642
- var user = reactRedux.useSelector(function (state) {
54643
- return state.common.user;
54644
- });
54645
- var language = reactRedux.useSelector(function (state) {
54646
- return state.common.language;
54647
- });
54648
-
54649
- var _useState = React.useState(false),
54650
- openModelSelectRole = _useState[0],
54651
- setOpenModelSelectRole = _useState[1];
54652
-
54653
- var _useTranslation = reactI18next.useTranslation(),
54654
- t = _useTranslation.t;
54655
-
54656
- var location = reactRouterDom.useLocation();
54657
- var isNotification = location.pathname.includes("notifications");
54658
- var isDistrict = window.location.host.includes("-district");
54659
-
54660
- var handleToggleModel = function handleToggleModel() {
54661
- setOpenModelSelectRole(!openModelSelectRole);
54662
- };
54663
-
54664
- var authRoutes = React.useMemo(function () {
54665
- return routes.filter(function (route) {
54666
- return canAccess(user === null || user === void 0 ? void 0 : user.roles, route.roles);
54667
- }).filter(function (route) {
54668
- return !!route.isDistrict === isDistrict;
54669
- });
54670
- }, [user, language]);
54671
- var authNavigations = React.useMemo(function () {
54672
- return navigation.map(function (item) {
54673
- var _item$_children, _item$_children2;
54674
-
54675
- return _extends({}, item, {
54676
- name: t(item.name),
54677
- _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) {
54678
- return _extends({}, x, {
54679
- name: t(x.name)
54680
- });
54681
- }) : undefined
54682
- });
54683
- }).filter(function (nav) {
54684
- return canAccess(user === null || user === void 0 ? void 0 : user.roles, nav.roles);
54685
- }).filter(function (nav) {
54686
- return !!nav.isDistrict === isDistrict;
54687
- });
54688
- }, [user, language]);
54689
-
54690
- var getInformationSetting = function getInformationSetting() {
54691
- try {
54692
- var _temp2 = _catch(function () {
54693
- return Promise.resolve(getSchoolSettings()).then(function (res) {
54694
- dispatch(setSandboxMode(res.data.isSandboxMode));
54695
- });
54696
- }, function (err) {
54697
- console.error(err);
54698
- });
54699
-
54700
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
54701
- } catch (e) {
54702
- return Promise.reject(e);
54703
- }
54704
- };
54705
-
54706
- React.useEffect(function () {
54707
- checkAuthentication();
54708
- }, []);
54709
- React.useEffect(function () {
54710
- getInformationSetting();
54711
- }, [location.pathname]);
54712
-
54713
- var checkAuthentication = function checkAuthentication() {
54714
- try {
54715
- var _temp4 = _catch(function () {
54716
- return Promise.resolve(firstCheckToken()).then(function (tokenStatus) {
54717
- tokenStatus ? loadInfo() : resetAuth();
54718
- });
54719
- }, function () {
54720
- resetAuth();
54721
- });
54722
-
54723
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
54724
- } catch (e) {
54725
- return Promise.reject(e);
54726
- }
54727
- };
54728
-
54729
- var loadInfo = function loadInfo() {
54730
- try {
54731
- var _temp6 = _catch(function () {
54732
- return Promise.resolve(getInfo()).then(function (info) {
54733
- var _info$data, _info$data$roles;
54734
-
54735
- 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"))) {
54736
- resetAuth();
54737
- }
54738
-
54739
- dispatch(setUser(info.data));
54740
- });
54741
- }, function () {
54742
- resetAuth();
54743
- });
54744
-
54745
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
54746
- } catch (e) {
54747
- return Promise.reject(e);
54748
- }
54749
- };
54750
-
54751
- var resetAuth = function resetAuth() {
54752
- localStorage.removeItem(ACCESS_TOKEN);
54753
- sessionStorage.removeItem(ACCESS_TOKEN);
54754
- localStorage.removeItem("ROLES");
54755
- history.push("/");
54756
- };
54757
-
54758
- if (!user) {
54759
- return React__default.createElement(Loading, null);
54760
- }
54761
-
54762
- return React__default.createElement("div", {
54763
- className: "c-app c-default-layout"
54764
- }, !isNotification && React__default.createElement(TheSidebar, {
54765
- navigation: authNavigations
54766
- }), React__default.createElement("div", {
54767
- className: "c-wrapper"
54768
- }, !isNotification && React__default.createElement(TheHeader, {
54769
- onToggleModel: handleToggleModel
54770
- }), React__default.createElement("div", {
54771
- className: "c-body bg-white"
54772
- }, React__default.createElement(TheContent$1, {
54773
- routes: authRoutes
54774
- }))), React__default.createElement(ModelSelectRole, {
54775
- open: openModelSelectRole,
54776
- onToggleModel: handleToggleModel
54777
- }));
54778
- };
54779
-
54780
54790
  var amplitudeClient = amplitude;
54781
54791
 
54782
54792
  Object.defineProperty(exports, 'I18nextProvider', {