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