mario-core 2.9.419-feedback → 2.9.419-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.
@@ -65,8 +65,8 @@ var gender = "Gender";
65
65
  var grade = "Grade";
66
66
  var grades = "Grades";
67
67
  var current_grade = "Current Grade";
68
- var student_name = "Student name";
69
- var teacher_name = "Teacher name";
68
+ var student_name = "Student Name";
69
+ var teacher_name = "Teacher Name";
70
70
  var start_date = "Start Date";
71
71
  var end_date = "End Date";
72
72
  var tooltip_content_readiness_to_learn_chart = "The represenation of individual student responses to their own feelings of Energy, Focus, Happiness, Safety, and Stress at the time administered. Note that scores are set on a 1-100 scale with the exception of Stress which optimum stress is set at '0' to get a sense of High Stress vs Low Stress.";
@@ -123,8 +123,8 @@ var default_question_for_students_or_teachers = "Default question for students o
123
123
  var is_default_question_general_class = "Is default question general class";
124
124
  var default_question_general_for_students_or_teachers = "Default question general for students or teachers";
125
125
  var before_session = "Before session";
126
- var edit_custom_alert = "Edit custom alert";
127
- var create_custom_alert = "Create custom alert";
126
+ var edit_custom_alert = "Edit Custom Alert";
127
+ var create_custom_alert = "Create Custom Alert";
128
128
  var total_of_custom_alert = "Total Custom Alerts";
129
129
  var number_of_sessions = "Number of sessions";
130
130
  var number_of_students = "Number of students";
@@ -714,9 +714,9 @@ var students_missing_a_weekly_check_in = "Students missing a weekly check in";
714
714
  var student_stress_by_zone = "Student Stress by Zone";
715
715
  var student_distribution = "Student Distribution";
716
716
  var surveys_flags = "Survey's flags";
717
- var yellow_flags = "Yellow flags";
718
- var green_flags = "Green flags";
719
- var red_flags = "Red flags";
717
+ var yellow_flags = "Yellow Flags";
718
+ var green_flags = "Green Flags";
719
+ var red_flags = "Red Flags";
720
720
  var show_by = "Show by";
721
721
  var survey_overview = "Survey Overview";
722
722
  var share_note = "Share Note";
@@ -756,7 +756,7 @@ var you_can_only_select_number_kpis_at_a_time = "You can only select {{number}}
756
756
  var you_can_only_select_number_kpis_at_a_time_To_select_a_new_one_please_switch_off_one_of_the_previous_ones = "You can only select {{number}} KPIs at a time. To select a new one, please switch off one of the previous ones.";
757
757
  var last_check__in = "Last Check in";
758
758
  var how_many_times_a_strategy_has_been_chosen = "How many times a strategy has been chosen";
759
- var these_metrics_come_from_students_check_ins_filter_above_to_change_the_data_set = "These metrics come from students' check ins. Filter above to change the data set";
759
+ var these_metrics_come_from_students_check_ins_filter_above_to_change_the_data_set = "These metrics come from student check-ins. Filter above to change the data set";
760
760
  var not_yet_started = "Not yet started";
761
761
  var in_progress = "In progress";
762
762
  var export_check_ins_to_csv = "Export Check Ins to CSV";
@@ -772,7 +772,7 @@ var image_is_a_required = "Image is a required";
772
772
  var old_iep = "Old IEP";
773
773
  var create_next_years_iep = "Create Next Year's IEP";
774
774
  var write_something_optional = "Write something (Optional)";
775
- var the_effectiveness_of_learning_strategies_by_students_feedback = "The Effectiveness of Learning Strategies by Student's feedback";
775
+ var the_effectiveness_of_learning_strategies_by_students_feedback = "The effectiveness of learning strategies are rated by students";
776
776
  var perceived_usefulness = "Perceived Usefulness";
777
777
  var performance$1 = "Performance";
778
778
  var not_enough_challenge_leading_to_boredom_and_lack_of_interest = "Not enough challenge, leading to boredom and lack of interest.";
@@ -786,7 +786,7 @@ var select_or_input_class_type = "Select or input class type";
786
786
  var send_request = "Send Request";
787
787
  var start_reflection = "Start Reflection";
788
788
  var customize_reflection = "Customize Reflection";
789
- var include_section_you_want_to_appear = "Include section you want to appear";
789
+ var include_section_you_want_to_appear = "Include sections you want to appear";
790
790
  var time_of_day = "Time of Day";
791
791
  var iep_template = "IEP Template";
792
792
  var one_roster = "OneRoster";
@@ -938,9 +938,9 @@ var completed_classwork = "Completed classwork";
938
938
  var asked_for_help_when_needed = "Asked for help when needed";
939
939
  var clear = "Clear ";
940
940
  var missing_reflections = "Missing Reflections";
941
- var total_students_missing_late_assignments = "Total students missing/late assignments";
941
+ var total_students_missing_late_assignments = "Total Students Missing/Late Assignments";
942
942
  var subject_class = "Subject class";
943
- var chart_type = "Chart type";
943
+ var chart_type = "Chart Type";
944
944
  var request_from = "Request from";
945
945
  var are_you_sure_you_want_to_delete_this_item = "Are you sure you want to delete this item?";
946
946
  var yes_delete = "Yes, delete";
@@ -2190,6 +2190,12 @@ var teacher_code = "Teacher code";
2190
2190
  var number_of_conversations = "Number of conversations";
2191
2191
  var number_of_expected_conversations_based_on_the_goal = "Number of expected conversations based on the goal";
2192
2192
  var check_in = "Check-in";
2193
+ var search_for_a_student = "Search for a student";
2194
+ var survey_resulting_in_scheduled_sessions = "Survey resulting in scheduled sessions";
2195
+ var current_class_grade = "Current Class Grade";
2196
+ var these_are_the_answers_from_classroom_teachers = "These are the answers from classroom teachers.";
2197
+ var total_responses = "Total Responses";
2198
+ var readiness_trends = "Readiness Trends";
2193
2199
  var lang_us = {
2194
2200
  dashboard: dashboard,
2195
2201
  user: user,
@@ -4114,7 +4120,7 @@ var lang_us = {
4114
4120
  financial_planning: financial_planning,
4115
4121
  "you_haven't_added_any_plans_yet": "You haven't added any plans yet",
4116
4122
  add_new_plan: add_new_plan,
4117
- "students_shaded_red_have_an_incomplete_check-_in": "Students shaded red have an incomplete check- in",
4123
+ "students_shaded_red_have_an_incomplete_check-_in": "Students shaded red have an incomplete check-in",
4118
4124
  rows_per_page: rows_per_page,
4119
4125
  anonymous_link: anonymous_link,
4120
4126
  select_ratings_of_questions: select_ratings_of_questions,
@@ -4396,7 +4402,13 @@ var lang_us = {
4396
4402
  teacher_code: teacher_code,
4397
4403
  number_of_conversations: number_of_conversations,
4398
4404
  number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal,
4399
- check_in: check_in
4405
+ check_in: check_in,
4406
+ search_for_a_student: search_for_a_student,
4407
+ survey_resulting_in_scheduled_sessions: survey_resulting_in_scheduled_sessions,
4408
+ current_class_grade: current_class_grade,
4409
+ these_are_the_answers_from_classroom_teachers: these_are_the_answers_from_classroom_teachers,
4410
+ total_responses: total_responses,
4411
+ readiness_trends: readiness_trends
4400
4412
  };
4401
4413
 
4402
4414
  var dashboard$1 = "Dashboard";
@@ -4426,8 +4438,8 @@ var gender$1 = "Gender";
4426
4438
  var grade$1 = "Grade";
4427
4439
  var grades$1 = "Grades";
4428
4440
  var current_grade$1 = "Current Grade";
4429
- var student_name$1 = "Student name";
4430
- var teacher_name$1 = "Teacher name";
4441
+ var student_name$1 = "Student Name";
4442
+ var teacher_name$1 = "Teacher Name";
4431
4443
  var start_date$1 = "Start Date";
4432
4444
  var end_date$1 = "End Date";
4433
4445
  var tooltip_content_readiness_to_learn_chart$1 = "The represenation of individual student responses to their own feelings of Energy, Focus, Happiness, Safety, and Stress at the time administered. Note that scores are set on a 1-100 scale with the exception of Stress which optimum stress is set at '0' to get a sense of High Stress vs Low Stress.";
@@ -4486,8 +4498,8 @@ var default_question_for_students_or_teachers$1 = "Default question for students
4486
4498
  var is_default_question_general_class$1 = "Is default question general class";
4487
4499
  var default_question_general_for_students_or_teachers$1 = "Default question general for students or teachers";
4488
4500
  var before_session$1 = "Before session";
4489
- var edit_custom_alert$1 = "Edit custom alert";
4490
- var create_custom_alert$1 = "Create custom alert";
4501
+ var edit_custom_alert$1 = "Edit Custom Alert";
4502
+ var create_custom_alert$1 = "Create Custom Alert";
4491
4503
  var total_of_custom_alert$1 = "Total Custom Alerts";
4492
4504
  var number_of_sessions$1 = "Number of sessions";
4493
4505
  var number_of_students$1 = "Number of students";
@@ -5078,9 +5090,9 @@ var students_missing_a_weekly_check_in$1 = "Students missing a weekly check in";
5078
5090
  var student_stress_by_zone$1 = "Student Stress by Zone";
5079
5091
  var student_distribution$1 = "Student Distribution";
5080
5092
  var surveys_flags$1 = "Survey's flags";
5081
- var yellow_flags$1 = "Yellow flags";
5082
- var green_flags$1 = "Green flags";
5083
- var red_flags$1 = "Red flags";
5093
+ var yellow_flags$1 = "Yellow Flags";
5094
+ var green_flags$1 = "Green Flags";
5095
+ var red_flags$1 = "Red Flags";
5084
5096
  var show_by$1 = "Show by";
5085
5097
  var survey_overview$1 = "Survey Overview";
5086
5098
  var share_note$1 = "Share Note";
@@ -5120,7 +5132,7 @@ var you_can_only_select_number_kpis_at_a_time$1 = "You can only select {{number}
5120
5132
  var you_can_only_select_number_kpis_at_a_time_To_select_a_new_one_please_switch_off_one_of_the_previous_ones$1 = "You can only select {{number}} KPIs at a time. To select a new one, please switch off one of the previous ones.";
5121
5133
  var last_check__in$1 = "Last Check in";
5122
5134
  var how_many_times_a_strategy_has_been_chosen$1 = "How many times a strategy has been chosen";
5123
- var these_metrics_come_from_students_check_ins_filter_above_to_change_the_data_set$1 = "These metrics come from students' check ins. Filter above to change the data set";
5135
+ var these_metrics_come_from_students_check_ins_filter_above_to_change_the_data_set$1 = "These metrics come from student check-ins. Filter above to change the data set";
5124
5136
  var not_yet_started$1 = "Not yet started";
5125
5137
  var in_progress$1 = "In progress";
5126
5138
  var export_check_ins_to_csv$1 = "Export Check Ins to CSV";
@@ -5136,7 +5148,7 @@ var image_is_a_required$1 = "Image is a required";
5136
5148
  var old_iep$1 = "Old IEP";
5137
5149
  var create_next_years_iep$1 = "Create Next Year's IEP";
5138
5150
  var write_something_optional$1 = "Write something (Optional)";
5139
- var the_effectiveness_of_learning_strategies_by_students_feedback$1 = "The Effectiveness of Learning Strategies by Student's feedback";
5151
+ var the_effectiveness_of_learning_strategies_by_students_feedback$1 = "The effectiveness of learning strategies are rated by students";
5140
5152
  var perceived_usefulness$1 = "Perceived Usefulness";
5141
5153
  var performance$2 = "Performance";
5142
5154
  var not_enough_challenge_leading_to_boredom_and_lack_of_interest$1 = "Not enough challenge, leading to boredom and lack of interest.";
@@ -5150,7 +5162,7 @@ var select_or_input_class_type$1 = "Select or input class type";
5150
5162
  var send_request$1 = "Send Request";
5151
5163
  var start_reflection$1 = "Start Reflection";
5152
5164
  var customize_reflection$1 = "Customize Reflection";
5153
- var include_section_you_want_to_appear$1 = "Include section you want to appear";
5165
+ var include_section_you_want_to_appear$1 = "Include sections you want to appear";
5154
5166
  var time_of_day$1 = "Time of Day";
5155
5167
  var iep_template$1 = "IEP Template";
5156
5168
  var one_roster$1 = "OneRoster";
@@ -5302,9 +5314,9 @@ var completed_classwork$1 = "Completed classwork";
5302
5314
  var asked_for_help_when_needed$1 = "Asked for help when needed";
5303
5315
  var clear$1 = "Clear ";
5304
5316
  var missing_reflections$1 = "Missing Reflections";
5305
- var total_students_missing_late_assignments$1 = "Total students missing/late assignments";
5317
+ var total_students_missing_late_assignments$1 = "Total Students Missing/Late Assignments";
5306
5318
  var subject_class$1 = "Subject class";
5307
- var chart_type$1 = "Chart type";
5319
+ var chart_type$1 = "Chart Type";
5308
5320
  var request_from$1 = "Request from";
5309
5321
  var are_you_sure_you_want_to_delete_this_item$1 = "Are you sure you want to delete this item?";
5310
5322
  var yes_delete$1 = "Yes, delete";
@@ -6550,6 +6562,12 @@ var save_new_password$1 = "Save new password";
6550
6562
  var teacher_code$1 = "Teacher code";
6551
6563
  var number_of_conversations$1 = "Number of conversations";
6552
6564
  var number_of_expected_conversations_based_on_the_goal$1 = "Number of expected conversations based on the goal";
6565
+ var search_for_a_student$1 = "Search for a student";
6566
+ var survey_resulting_in_scheduled_sessions$1 = "Survey resulting in scheduled sessions";
6567
+ var current_class_grade$1 = "Current Class Grade";
6568
+ var these_are_the_answers_from_classroom_teachers$1 = "These are the answers from classroom teachers.";
6569
+ var total_responses$1 = "Total Responses";
6570
+ var readiness_trends$1 = "Readiness Trends";
6553
6571
  var lang_uk = {
6554
6572
  dashboard: dashboard$1,
6555
6573
  user: user$1,
@@ -8474,7 +8492,7 @@ var lang_uk = {
8474
8492
  financial_planning: financial_planning$1,
8475
8493
  "you_haven't_added_any_plans_yet": "You haven't added any plans yet",
8476
8494
  add_new_plan: add_new_plan$1,
8477
- "students_shaded_red_have_an_incomplete_check-_in": "Students shaded red have an incomplete check- in",
8495
+ "students_shaded_red_have_an_incomplete_check-_in": "Students shaded red have an incomplete check-in",
8478
8496
  rows_per_page: rows_per_page$1,
8479
8497
  anonymous_link: anonymous_link$1,
8480
8498
  select_ratings_of_questions: select_ratings_of_questions$1,
@@ -8753,7 +8771,13 @@ var lang_uk = {
8753
8771
  save_new_password: save_new_password$1,
8754
8772
  teacher_code: teacher_code$1,
8755
8773
  number_of_conversations: number_of_conversations$1,
8756
- number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$1
8774
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$1,
8775
+ search_for_a_student: search_for_a_student$1,
8776
+ survey_resulting_in_scheduled_sessions: survey_resulting_in_scheduled_sessions$1,
8777
+ current_class_grade: current_class_grade$1,
8778
+ these_are_the_answers_from_classroom_teachers: these_are_the_answers_from_classroom_teachers$1,
8779
+ total_responses: total_responses$1,
8780
+ readiness_trends: readiness_trends$1
8757
8781
  };
8758
8782
 
8759
8783
  var dashboard$2 = "لوحة المعلومات";
@@ -10937,6 +10961,12 @@ var save_new_password$2 = "Save new password";
10937
10961
  var teacher_code$2 = "Teacher code";
10938
10962
  var number_of_conversations$2 = "Number of conversations";
10939
10963
  var number_of_expected_conversations_based_on_the_goal$2 = "Number of expected conversations based on the goal";
10964
+ var search_for_a_student$2 = "Search for a student";
10965
+ var survey_resulting_in_scheduled_sessions$2 = "Survey resulting in scheduled sessions";
10966
+ var current_class_grade$2 = "Current Class Grade";
10967
+ var these_are_the_answers_from_classroom_teachers$2 = "These are the answers from classroom teachers.";
10968
+ var total_responses$2 = "Total Responses";
10969
+ var readiness_trends$2 = "Readiness Trends";
10940
10970
  var lang_ar = {
10941
10971
  dashboard: dashboard$2,
10942
10972
  user: user$2,
@@ -13172,7 +13202,13 @@ var lang_ar = {
13172
13202
  save_new_password: save_new_password$2,
13173
13203
  teacher_code: teacher_code$2,
13174
13204
  number_of_conversations: number_of_conversations$2,
13175
- number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$2
13205
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$2,
13206
+ search_for_a_student: search_for_a_student$2,
13207
+ survey_resulting_in_scheduled_sessions: survey_resulting_in_scheduled_sessions$2,
13208
+ current_class_grade: current_class_grade$2,
13209
+ these_are_the_answers_from_classroom_teachers: these_are_the_answers_from_classroom_teachers$2,
13210
+ total_responses: total_responses$2,
13211
+ readiness_trends: readiness_trends$2
13176
13212
  };
13177
13213
 
13178
13214
  var dashboard$3 = "Cuadro de mandos";
@@ -15356,6 +15392,12 @@ var save_new_password$3 = "Save new password";
15356
15392
  var teacher_code$3 = "Teacher code";
15357
15393
  var number_of_conversations$3 = "Number of conversations";
15358
15394
  var number_of_expected_conversations_based_on_the_goal$3 = "Number of expected conversations based on the goal";
15395
+ var search_for_a_student$3 = "Search for a student";
15396
+ var survey_resulting_in_scheduled_sessions$3 = "Survey resulting in scheduled sessions";
15397
+ var current_class_grade$3 = "Current Class Grade";
15398
+ var these_are_the_answers_from_classroom_teachers$3 = "These are the answers from classroom teachers.";
15399
+ var total_responses$3 = "Total Responses";
15400
+ var readiness_trends$3 = "Readiness Trends";
15359
15401
  var lang_es = {
15360
15402
  dashboard: dashboard$3,
15361
15403
  user: user$3,
@@ -17591,7 +17633,13 @@ var lang_es = {
17591
17633
  save_new_password: save_new_password$3,
17592
17634
  teacher_code: teacher_code$3,
17593
17635
  number_of_conversations: number_of_conversations$3,
17594
- number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$3
17636
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$3,
17637
+ search_for_a_student: search_for_a_student$3,
17638
+ survey_resulting_in_scheduled_sessions: survey_resulting_in_scheduled_sessions$3,
17639
+ current_class_grade: current_class_grade$3,
17640
+ these_are_the_answers_from_classroom_teachers: these_are_the_answers_from_classroom_teachers$3,
17641
+ total_responses: total_responses$3,
17642
+ readiness_trends: readiness_trends$3
17595
17643
  };
17596
17644
 
17597
17645
  var dashboard$4 = "仪表板";
@@ -19775,6 +19823,12 @@ var save_new_password$4 = "Save new password";
19775
19823
  var teacher_code$4 = "Teacher code";
19776
19824
  var number_of_conversations$4 = "Number of conversations";
19777
19825
  var number_of_expected_conversations_based_on_the_goal$4 = "Number of expected conversations based on the goal";
19826
+ var search_for_a_student$4 = "Search for a student";
19827
+ var survey_resulting_in_scheduled_sessions$4 = "Survey resulting in scheduled sessions";
19828
+ var current_class_grade$4 = "Current Class Grade";
19829
+ var these_are_the_answers_from_classroom_teachers$4 = "These are the answers from classroom teachers.";
19830
+ var total_responses$4 = "Total Responses";
19831
+ var readiness_trends$4 = "Readiness Trends";
19778
19832
  var lang_zh = {
19779
19833
  dashboard: dashboard$4,
19780
19834
  user: user$4,
@@ -22010,7 +22064,13 @@ var lang_zh = {
22010
22064
  save_new_password: save_new_password$4,
22011
22065
  teacher_code: teacher_code$4,
22012
22066
  number_of_conversations: number_of_conversations$4,
22013
- number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$4
22067
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal$4,
22068
+ search_for_a_student: search_for_a_student$4,
22069
+ survey_resulting_in_scheduled_sessions: survey_resulting_in_scheduled_sessions$4,
22070
+ current_class_grade: current_class_grade$4,
22071
+ these_are_the_answers_from_classroom_teachers: these_are_the_answers_from_classroom_teachers$4,
22072
+ total_responses: total_responses$4,
22073
+ readiness_trends: readiness_trends$4
22014
22074
  };
22015
22075
 
22016
22076
  var TINY_MCE_API_KEY = "htqausuofrnali3nh9ivmlpq6v415o0tv2qikpg39bqf4pnk";
@@ -39664,7 +39724,7 @@ var BlockLogin = function BlockLogin(_ref) {
39664
39724
 
39665
39725
  var onSuccessGoogle = function onSuccessGoogle(res) {
39666
39726
  if (!!(res !== null && res !== void 0 && res.accessToken)) {
39667
- var _hostName$split, _email$split;
39727
+ var _hostName$split, _email$split, _extensionEmail$split, _extensionEmail$split2;
39668
39728
 
39669
39729
  var _res$profileObj = res.profileObj,
39670
39730
  email = _res$profileObj.email,
@@ -39677,8 +39737,15 @@ var BlockLogin = function BlockLogin(_ref) {
39677
39737
  var hostName = window.location.hostname;
39678
39738
  var subDomain = (_hostName$split = hostName.split(".marioforme.com")) === null || _hostName$split === void 0 ? void 0 : _hostName$split[0];
39679
39739
  var emailDomain = (_email$split = email.split("@")) === null || _email$split === void 0 ? void 0 : _email$split[1];
39740
+ var matchExtension = extensionEmail === null || extensionEmail === void 0 ? void 0 : (_extensionEmail$split = extensionEmail.split(",")) === null || _extensionEmail$split === void 0 ? void 0 : (_extensionEmail$split2 = _extensionEmail$split.map(function (x) {
39741
+ return x.trim();
39742
+ })) === null || _extensionEmail$split2 === void 0 ? void 0 : _extensionEmail$split2.filter(function (x) {
39743
+ return x;
39744
+ }).some(function (ext) {
39745
+ return emailDomain.includes(ext);
39746
+ });
39680
39747
 
39681
- if (!emailDomain.includes(subDomain) && !emailDomain.includes(extensionEmail)) {
39748
+ if (!emailDomain.includes(subDomain) && !matchExtension) {
39682
39749
  alert("The email address you used does not match the login information in the database. Please check that you are using your school assigned email address to log into MARIO for Me. If you have further trouble please notify your school site administrator");
39683
39750
  return;
39684
39751
  }
@@ -41321,14 +41388,7 @@ var BlockCreatePassword = function BlockCreatePassword() {
41321
41388
  className: "" + styles["img-login-rectangle"]
41322
41389
  }), React.createElement("p", {
41323
41390
  className: "" + styles["title-login"]
41324
- }, "You cannot regenerate the password")))), React.createElement(Col, {
41325
- lg: 4,
41326
- md: 4,
41327
- className: "" + styles["img-box"]
41328
- }, React.createElement("img", {
41329
- src: "/images/img-login.png",
41330
- className: "" + styles["img-login"]
41331
- })));
41391
+ }, "You cannot regenerate the password")))));
41332
41392
  });
41333
41393
  };
41334
41394
 
@@ -46318,9 +46378,6 @@ var importUsersCSV = function importUsersCSV(formData) {
46318
46378
  var downloadTemplateFileUser = function downloadTemplateFileUser() {
46319
46379
  return api.get(CSV_FILE_TEACHER + "/download-template-file-user");
46320
46380
  };
46321
- var validateCsvApi = function validateCsvApi(formData, type) {
46322
- return api.post(CSV_FILE_TEACHER + "/validate-csv-template-student/" + type, formData);
46323
- };
46324
46381
 
46325
46382
  var CSVType;
46326
46383
 
@@ -50117,7 +50174,7 @@ var style$2 = {
50117
50174
  color: "#fff",
50118
50175
  fontWeight: 500,
50119
50176
  fontSize: "14px",
50120
- height: "56px",
50177
+ height: "100%",
50121
50178
  justifyContent: "center"
50122
50179
  };
50123
50180
 
@@ -50216,19 +50273,15 @@ var useCSVImportTab = function useCSVImportTab() {
50216
50273
  studentDataFile = _useState5[0],
50217
50274
  setStudentDataFile = _useState5[1];
50218
50275
 
50219
- var _useState6 = useState([]),
50220
- errorsValidate = _useState6[0],
50221
- setErrorsValidate = _useState6[1];
50222
-
50223
50276
  var isCheckDomainIBS = true;
50224
50277
 
50225
- var _useState7 = useState(0),
50226
- defaultTeacher = _useState7[0],
50227
- setDefaultTeacher = _useState7[1];
50278
+ var _useState6 = useState(0),
50279
+ defaultTeacher = _useState6[0],
50280
+ setDefaultTeacher = _useState6[1];
50228
50281
 
50229
- var _useState8 = useState(""),
50230
- fileName = _useState8[0],
50231
- setFileName = _useState8[1];
50282
+ var _useState7 = useState(""),
50283
+ fileName = _useState7[0],
50284
+ setFileName = _useState7[1];
50232
50285
 
50233
50286
  useEffect(function () {
50234
50287
  document.title = title$5;
@@ -50273,10 +50326,10 @@ var useCSVImportTab = function useCSVImportTab() {
50273
50326
 
50274
50327
  var upload = useCallback(function (file) {
50275
50328
  try {
50276
- var _exit3 = false;
50329
+ var _exit2 = false;
50277
50330
 
50278
- var _temp12 = function _temp12(_result) {
50279
- if (_exit3) return _result;
50331
+ var _temp12 = function _temp12(_result2) {
50332
+ if (_exit2) return _result2;
50280
50333
  dispatch(setLoading(false));
50281
50334
  var inputId = document.getElementById(id$1);
50282
50335
  var input = document.getElementById('import-student');
@@ -50290,114 +50343,103 @@ var useCSVImportTab = function useCSVImportTab() {
50290
50343
  dispatch(setLoading(true));
50291
50344
 
50292
50345
  var _temp13 = _catch(function () {
50346
+ function _temp9(_result) {
50347
+ if (_exit2) return _result;
50348
+ dispatch(setAlert({
50349
+ type: "success",
50350
+ message: "Import CSV successfully"
50351
+ }));
50352
+ }
50353
+
50293
50354
  var formData = new FormData();
50294
50355
  formData.append("file", file, file.name);
50295
- var typeOfCsv = type === CSVType$1.AllUser ? CsvImportType.Admin : CsvImportType.Teacher;
50296
- return Promise.resolve(validateCsvApi(formData, typeOfCsv)).then(function (res) {
50297
- var _exit2 = false;
50298
50356
 
50299
- function _temp9(_result2) {
50300
- if (_exit2) return _result2;
50301
- dispatch(setAlert({
50302
- type: "success",
50303
- message: "Import CSV successfully"
50304
- }));
50305
- }
50306
-
50307
- if (res.data && res.data.length > 0) {
50308
- setErrorsValidate(res.data);
50309
- dispatch(setLoading(false));
50310
- _exit3 = true;
50311
- return;
50312
- }
50313
-
50314
- var _temp8 = function () {
50315
- if (type == CSVType$1.AllUser) {
50316
- return Promise.resolve(file.text()).then(function (fileTextRaw) {
50317
- var fileText = fileTextRaw.trim();
50318
- var rows = fileText.split("\n").map(function (row) {
50319
- return row.trim();
50320
- });
50321
- var headerIndex = rows.findIndex(function (row) {
50322
- return row.split(",").includes("First Name");
50323
- });
50357
+ var _temp8 = function () {
50358
+ if (type == CSVType$1.AllUser) {
50359
+ return Promise.resolve(file.text()).then(function (fileTextRaw) {
50360
+ var fileText = fileTextRaw.trim();
50361
+ var rows = fileText.split("\n").map(function (row) {
50362
+ return row.trim();
50363
+ });
50364
+ var headerIndex = rows.findIndex(function (row) {
50365
+ return row.split(",").includes("First Name");
50366
+ });
50324
50367
 
50325
- if (headerIndex === 0) {
50326
- throw new Error("Invalid CSV: Missing header row.");
50327
- }
50368
+ if (headerIndex === 0) {
50369
+ throw new Error("Invalid CSV: Missing header row.");
50370
+ }
50328
50371
 
50329
- fileText = rows.slice(headerIndex).join("\n");
50330
- var parsedData = Papa.parse(fileText, {
50331
- header: true,
50332
- skipEmptyLines: true
50333
- });
50334
- var header = parsedData.meta.fields;
50335
- var dataRows = parsedData.data;
50372
+ fileText = rows.slice(headerIndex).join("\n");
50373
+ var parsedData = Papa.parse(fileText, {
50374
+ header: true,
50375
+ skipEmptyLines: true
50376
+ });
50377
+ var header = parsedData.meta.fields;
50378
+ var dataRows = parsedData.data;
50336
50379
 
50337
- if (!!!dataRows.length) {
50338
- dispatch(setLoading(false));
50339
- dispatch(setAlert({
50340
- type: "danger",
50341
- message: 'The file has no data or some column names are misformed.'
50342
- }));
50343
- _exit3 = true;
50344
- return;
50345
- }
50380
+ if (!!!dataRows.length) {
50381
+ dispatch(setLoading(false));
50382
+ dispatch(setAlert({
50383
+ type: "danger",
50384
+ message: 'The file has no data or some column names are misformed.'
50385
+ }));
50386
+ _exit2 = true;
50387
+ return;
50388
+ }
50346
50389
 
50347
- var chunkSize = 10;
50348
- var chunks = [];
50390
+ var chunkSize = 10;
50391
+ var chunks = [];
50349
50392
 
50350
- for (var _i = 0; _i < dataRows.length; _i += chunkSize) {
50351
- var chunkData = dataRows.slice(_i, _i + chunkSize);
50352
- var valuesOnly = chunkData.map(function (row) {
50353
- return Object.values(row).map(function (v) {
50354
- return (v != null ? v : "").toString().trim();
50355
- });
50393
+ for (var _i = 0; _i < dataRows.length; _i += chunkSize) {
50394
+ var chunkData = dataRows.slice(_i, _i + chunkSize);
50395
+ var valuesOnly = chunkData.map(function (row) {
50396
+ return Object.values(row).map(function (v) {
50397
+ return (v != null ? v : "").toString().trim();
50356
50398
  });
50399
+ });
50357
50400
 
50358
- if (header) {
50359
- valuesOnly.unshift(header);
50360
- }
50361
-
50362
- console.log({
50363
- valuesOnly: valuesOnly
50364
- });
50365
- chunks.push(valuesOnly);
50401
+ if (header) {
50402
+ valuesOnly.unshift(header);
50366
50403
  }
50367
50404
 
50368
- var _temp5 = _forTo(chunks, function (i) {
50369
- return Promise.resolve(importChunkFileUsers({
50370
- chunks: chunks[i]
50371
- })).then(function () {
50372
- return Promise.resolve(new Promise(function (res) {
50373
- return setTimeout(res, 500);
50374
- })).then(function () {});
50375
- });
50405
+ console.log({
50406
+ valuesOnly: valuesOnly
50376
50407
  });
50408
+ chunks.push(valuesOnly);
50409
+ }
50377
50410
 
50378
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
50411
+ var _temp5 = _forTo(chunks, function (i) {
50412
+ return Promise.resolve(importChunkFileUsers({
50413
+ chunks: chunks[i]
50414
+ })).then(function () {
50415
+ return Promise.resolve(new Promise(function (res) {
50416
+ return setTimeout(res, 500);
50417
+ })).then(function () {});
50418
+ });
50379
50419
  });
50380
- } else {
50381
- var _temp14 = function () {
50382
- if (isCheckDomainIBS) {
50383
- var _temp15 = function () {
50384
- if (type == CSVType$1.ClassReflection) {
50385
- return Promise.resolve(importClassReflectionCSV$1(formData)).then(function () {});
50386
- }
50387
- }();
50388
-
50389
- if (_temp15 && _temp15.then) return _temp15.then(function () {});
50390
- } else {
50391
- return Promise.resolve(importCSV$1(formData, type.toString())).then(function () {});
50392
- }
50393
- }();
50394
50420
 
50395
- if (_temp14 && _temp14.then) return _temp14.then(function () {});
50396
- }
50397
- }();
50421
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
50422
+ });
50423
+ } else {
50424
+ var _temp14 = function () {
50425
+ if (isCheckDomainIBS) {
50426
+ var _temp15 = function () {
50427
+ if (type == CSVType$1.ClassReflection) {
50428
+ return Promise.resolve(importClassReflectionCSV$1(formData)).then(function () {});
50429
+ }
50430
+ }();
50398
50431
 
50399
- return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
50400
- });
50432
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
50433
+ } else {
50434
+ return Promise.resolve(importCSV$1(formData, type.toString())).then(function () {});
50435
+ }
50436
+ }();
50437
+
50438
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
50439
+ }
50440
+ }();
50441
+
50442
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
50401
50443
  }, function (err) {
50402
50444
  var _err$response, _err$response$data;
50403
50445
 
@@ -50552,9 +50594,7 @@ var useCSVImportTab = function useCSVImportTab() {
50552
50594
  defaultTeacher: defaultTeacher,
50553
50595
  fileName: fileName,
50554
50596
  onStudentSubmit: onStudentSubmit,
50555
- downloadTemplateUser: downloadTemplateUser,
50556
- errorsValidate: errorsValidate,
50557
- setErrorsValidate: setErrorsValidate
50597
+ downloadTemplateUser: downloadTemplateUser
50558
50598
  };
50559
50599
  };
50560
50600
 
@@ -50581,8 +50621,7 @@ var CSVImport = function CSVImport() {
50581
50621
  setArrStudent = _useCSVImportTab.setArrStudent,
50582
50622
  buttons = _useCSVImportTab.buttons,
50583
50623
  upload = _useCSVImportTab.upload,
50584
- downloadTemplateUser = _useCSVImportTab.downloadTemplateUser,
50585
- errorsValidate = _useCSVImportTab.errorsValidate;
50624
+ downloadTemplateUser = _useCSVImportTab.downloadTemplateUser;
50586
50625
 
50587
50626
  var _useTranslation = useTranslation(),
50588
50627
  t = _useTranslation.t;
@@ -50635,9 +50674,9 @@ var CSVImport = function CSVImport() {
50635
50674
  accept: "text/csv"
50636
50675
  }), React.createElement(Col, {
50637
50676
  md: 6,
50638
- className: "mb-2 d-flex mt-5"
50677
+ className: "mb-2 d-flex align-items-end"
50639
50678
  }, React.createElement(Row, {
50640
- className: "w-100 flex-column"
50679
+ className: "w-100"
50641
50680
  }, React.createElement(Col, {
50642
50681
  md: 12,
50643
50682
  className: ""
@@ -50666,9 +50705,7 @@ var CSVImport = function CSVImport() {
50666
50705
  })))), React.createElement(Col, {
50667
50706
  md: 6,
50668
50707
  className: "mb-2"
50669
- }, React.createElement(Row, {
50670
- className: "flex-column"
50671
- }, React.createElement(Col, {
50708
+ }, React.createElement(Row, null, React.createElement(Col, {
50672
50709
  md: 12,
50673
50710
  className: "mb-2 text-right"
50674
50711
  }, React.createElement(Button, {
@@ -50698,12 +50735,7 @@ var CSVImport = function CSVImport() {
50698
50735
  return setType(button.type);
50699
50736
  }
50700
50737
  });
50701
- })), (errorsValidate === null || errorsValidate === void 0 ? void 0 : errorsValidate.length) > 0 && errorsValidate.map(function (error, index) {
50702
- return React.createElement(ErrorHandler, {
50703
- key: index,
50704
- text: error
50705
- });
50706
- }))));
50738
+ })))));
50707
50739
  }))) );
50708
50740
  };
50709
50741