mario-core 2.9.404-feedback → 2.9.406-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.
@@ -2171,14 +2171,15 @@ var check_ins = "Check Ins";
2171
2171
  var here_you_can_find_all_the_notes_and_1_1_conversations_logs_the_student_has = "Here you can find all the notes and 1-1 conversations logs the student has.";
2172
2172
  var back_to_notes_and_logs = "Back to Notes and Logs";
2173
2173
  var students_review = "Student's Review";
2174
- var other_note = "Other note";
2174
+ var other_note = "Other notes";
2175
2175
  var students_perceived_usefulness = "Student's Perceived<br/>Usefulness";
2176
2176
  var student_feedback = "Student Feedback";
2177
2177
  var note_category = "Note Category";
2178
2178
  var select_note_category = "Select Note Category";
2179
2179
  var save_note = "Save note";
2180
2180
  var type_the_main_focus_of_this_session = "Type the main focus of this session";
2181
- var please_add_title_note = "Please add title note";
2181
+ var please_add_title_note = "Please add note title";
2182
+ var notes_and_logs = "Notes and Logs";
2182
2183
  var lang_us = {
2183
2184
  dashboard: dashboard,
2184
2185
  user: user,
@@ -4374,7 +4375,8 @@ var lang_us = {
4374
4375
  select_note_category: select_note_category,
4375
4376
  save_note: save_note,
4376
4377
  type_the_main_focus_of_this_session: type_the_main_focus_of_this_session,
4377
- please_add_title_note: please_add_title_note
4378
+ please_add_title_note: please_add_title_note,
4379
+ notes_and_logs: notes_and_logs
4378
4380
  };
4379
4381
 
4380
4382
  var dashboard$1 = "Dashboard";
@@ -6510,15 +6512,15 @@ var select_the_teacher_or_counselor_asking_you_to_check_in_if_you_have_more_than
6510
6512
  var here_you_can_find_all_the_notes_and_1_1_conversations_logs_the_student_has$1 = "Here you can find all the notes and 1-1 conversations logs the student has.";
6511
6513
  var back_to_notes_and_logs$1 = "Back to Notes and Logs";
6512
6514
  var students_review$1 = "Student's Review";
6513
- var other_note$1 = "Other note";
6515
+ var other_note$1 = "Other notes";
6514
6516
  var students_perceived_usefulness$1 = "Student's Perceived<br/>Usefulness";
6515
6517
  var student_feedback$1 = "Student Feedback";
6516
6518
  var note_category$1 = "Note Category";
6517
6519
  var select_note_category$1 = "Select Note Category";
6518
6520
  var save_note$1 = "Save note";
6519
6521
  var type_the_main_focus_of_this_session$1 = "Type the main focus of this session";
6520
- var please_add_title_note$1 = "Please add title note";
6521
- var notes_and_logs = "Notes and Logs";
6522
+ var please_add_title_note$1 = "Please add note title";
6523
+ var notes_and_logs$1 = "Notes and Logs";
6522
6524
  var lang_uk = {
6523
6525
  dashboard: dashboard$1,
6524
6526
  user: user$1,
@@ -8713,7 +8715,7 @@ var lang_uk = {
8713
8715
  save_note: save_note$1,
8714
8716
  type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$1,
8715
8717
  please_add_title_note: please_add_title_note$1,
8716
- notes_and_logs: notes_and_logs
8718
+ notes_and_logs: notes_and_logs$1
8717
8719
  };
8718
8720
 
8719
8721
  var dashboard$2 = "لوحة المعلومات";
@@ -10879,15 +10881,15 @@ var select_the_teacher_or_counselor_asking_you_to_check_in_if_you_have_more_than
10879
10881
  var here_you_can_find_all_the_notes_and_1_1_conversations_logs_the_student_has$2 = "Here you can find all the notes and 1-1 conversations logs the student has.";
10880
10882
  var back_to_notes_and_logs$2 = "Back to Notes and Logs";
10881
10883
  var students_review$2 = "Student's Review";
10882
- var other_note$2 = "Other note";
10884
+ var other_note$2 = "Other notes";
10883
10885
  var students_perceived_usefulness$2 = "Student's Perceived<br/>Usefulness";
10884
10886
  var student_feedback$2 = "Student Feedback";
10885
10887
  var note_category$2 = "Note Category";
10886
10888
  var select_note_category$2 = "Select Note Category";
10887
10889
  var save_note$2 = "Save note";
10888
10890
  var type_the_main_focus_of_this_session$2 = "Type the main focus of this session";
10889
- var please_add_title_note$2 = "Please add title note";
10890
- var notes_and_logs$1 = "Notes and Logs";
10891
+ var please_add_title_note$2 = "Please add note title";
10892
+ var notes_and_logs$2 = "Notes and Logs";
10891
10893
  var lang_ar = {
10892
10894
  dashboard: dashboard$2,
10893
10895
  user: user$2,
@@ -13114,7 +13116,7 @@ var lang_ar = {
13114
13116
  save_note: save_note$2,
13115
13117
  type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$2,
13116
13118
  please_add_title_note: please_add_title_note$2,
13117
- notes_and_logs: notes_and_logs$1
13119
+ notes_and_logs: notes_and_logs$2
13118
13120
  };
13119
13121
 
13120
13122
  var dashboard$3 = "Cuadro de mandos";
@@ -15280,15 +15282,15 @@ var select_the_teacher_or_counselor_asking_you_to_check_in_if_you_have_more_than
15280
15282
  var here_you_can_find_all_the_notes_and_1_1_conversations_logs_the_student_has$3 = "Here you can find all the notes and 1-1 conversations logs the student has.";
15281
15283
  var back_to_notes_and_logs$3 = "Back to Notes and Logs";
15282
15284
  var students_review$3 = "Student's Review";
15283
- var other_note$3 = "Other note";
15285
+ var other_note$3 = "Other notes";
15284
15286
  var students_perceived_usefulness$3 = "Student's Perceived<br/>Usefulness";
15285
15287
  var student_feedback$3 = "Student Feedback";
15286
15288
  var note_category$3 = "Note Category";
15287
15289
  var select_note_category$3 = "Select Note Category";
15288
15290
  var save_note$3 = "Save note";
15289
15291
  var type_the_main_focus_of_this_session$3 = "Type the main focus of this session";
15290
- var please_add_title_note$3 = "Please add title note";
15291
- var notes_and_logs$2 = "Notes and Logs";
15292
+ var please_add_title_note$3 = "Please add note title";
15293
+ var notes_and_logs$3 = "Notes and Logs";
15292
15294
  var lang_es = {
15293
15295
  dashboard: dashboard$3,
15294
15296
  user: user$3,
@@ -17515,7 +17517,7 @@ var lang_es = {
17515
17517
  save_note: save_note$3,
17516
17518
  type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$3,
17517
17519
  please_add_title_note: please_add_title_note$3,
17518
- notes_and_logs: notes_and_logs$2
17520
+ notes_and_logs: notes_and_logs$3
17519
17521
  };
17520
17522
 
17521
17523
  var dashboard$4 = "仪表板";
@@ -19681,15 +19683,15 @@ var select_the_teacher_or_counselor_asking_you_to_check_in_if_you_have_more_than
19681
19683
  var here_you_can_find_all_the_notes_and_1_1_conversations_logs_the_student_has$4 = "Here you can find all the notes and 1-1 conversations logs the student has.";
19682
19684
  var back_to_notes_and_logs$4 = "Back to Notes and Logs";
19683
19685
  var students_review$4 = "Student's Review";
19684
- var other_note$4 = "Other note";
19686
+ var other_note$4 = "Other notes";
19685
19687
  var students_perceived_usefulness$4 = "Student's Perceived<br/>Usefulness";
19686
19688
  var student_feedback$4 = "Student Feedback";
19687
19689
  var note_category$4 = "Note Category";
19688
19690
  var select_note_category$4 = "Select Note Category";
19689
19691
  var save_note$4 = "Save note";
19690
19692
  var type_the_main_focus_of_this_session$4 = "Type the main focus of this session";
19691
- var please_add_title_note$4 = "Please add title note";
19692
- var notes_and_logs$3 = "Notes and Logs";
19693
+ var please_add_title_note$4 = "Please add note title";
19694
+ var notes_and_logs$4 = "Notes and Logs";
19693
19695
  var lang_zh = {
19694
19696
  dashboard: dashboard$4,
19695
19697
  user: user$4,
@@ -21916,7 +21918,7 @@ var lang_zh = {
21916
21918
  save_note: save_note$4,
21917
21919
  type_the_main_focus_of_this_session: type_the_main_focus_of_this_session$4,
21918
21920
  please_add_title_note: please_add_title_note$4,
21919
- notes_and_logs: notes_and_logs$3
21921
+ notes_and_logs: notes_and_logs$4
21920
21922
  };
21921
21923
 
21922
21924
  var TINY_MCE_API_KEY = "htqausuofrnali3nh9ivmlpq6v415o0tv2qikpg39bqf4pnk";
@@ -49581,8 +49583,8 @@ var importClassReflectionCSV$1 = function importClassReflectionCSV(formData) {
49581
49583
  var importStudentByTeacher$1 = function importStudentByTeacher(teacherId, formData) {
49582
49584
  return apiUpload.post(CSV_FILE_TEACHER$1 + "/adminImportStudentByTeacherId/" + teacherId, formData);
49583
49585
  };
49584
- var importUsersCSV$1 = function importUsersCSV(formData) {
49585
- return apiUpload.post(CSV_FILE_TEACHER$1 + "/adminImport", formData);
49586
+ var importChunkFileUsers = function importChunkFileUsers(data) {
49587
+ return api.post(CSV_FILE_TEACHER$1 + "/adminImportChunkUser", data);
49586
49588
  };
49587
49589
  var downloadTemplateFileUser$1 = function downloadTemplateFileUser() {
49588
49590
  return api.get(CSV_FILE_TEACHER$1 + "/download-template-file-user");
@@ -49605,11 +49607,6 @@ var isbButtons = [{
49605
49607
  backgroundColor: "#0abde3",
49606
49608
  type: CSVType$1.AllUser
49607
49609
  }];
49608
- var othersButtons = [{
49609
- text: "import_class_reflection",
49610
- backgroundColor: "#e74c3c",
49611
- type: CSVType$1.ClassReflection
49612
- }];
49613
49610
  var title$5 = "CSV Import";
49614
49611
  var id$1 = "csvupload";
49615
49612
  var initClassReflect$1 = {
@@ -49645,8 +49642,7 @@ var useCSVImportTab = function useCSVImportTab() {
49645
49642
  studentDataFile = _useState5[0],
49646
49643
  setStudentDataFile = _useState5[1];
49647
49644
 
49648
- var domainName = window.location.hostname;
49649
- var isCheckDomainIBS = domainName.includes('isb') || domainName.includes('stage');
49645
+ var isCheckDomainIBS = true;
49650
49646
 
49651
49647
  var _useState6 = useState(0),
49652
49648
  defaultTeacher = _useState6[0],
@@ -49659,7 +49655,7 @@ var useCSVImportTab = function useCSVImportTab() {
49659
49655
  useEffect(function () {
49660
49656
  document.title = title$5;
49661
49657
  }, []);
49662
- var buttons = isCheckDomainIBS ? isbButtons : othersButtons;
49658
+ var buttons = isbButtons ;
49663
49659
 
49664
49660
  var downloadTemplateUser = function downloadTemplateUser() {
49665
49661
  try {
@@ -49749,25 +49745,48 @@ var useCSVImportTab = function useCSVImportTab() {
49749
49745
  });
49750
49746
  var header = parsedData.meta.fields;
49751
49747
  var dataRows = parsedData.data;
49752
- var chunkSize = 20;
49748
+ var chunkSize = 30;
49753
49749
  var chunks = [];
49754
49750
 
49755
49751
  for (var _i = 0; _i < dataRows.length; _i += chunkSize) {
49756
49752
  var chunkData = dataRows.slice(_i, _i + chunkSize);
49757
- var csvChunk = Papa.unparse({
49758
- fields: header != null ? header : [],
49759
- data: chunkData
49753
+ var valuesOnly = chunkData.map(function (row) {
49754
+ return Object.values(row).map(function (v) {
49755
+ return (v != null ? v : "").toString().trim();
49756
+ });
49760
49757
  });
49761
- chunks.push(csvChunk);
49758
+ console.log({
49759
+ valuesOnly: valuesOnly
49760
+ });
49761
+ console.log({
49762
+ chunkData: chunkData
49763
+ });
49764
+
49765
+ if (header) {
49766
+ valuesOnly.unshift(header);
49767
+ }
49768
+
49769
+ console.log({
49770
+ valuesOnly: valuesOnly
49771
+ });
49772
+ chunks.push(valuesOnly);
49762
49773
  }
49763
49774
 
49775
+ console.log({
49776
+ chunks: chunks
49777
+ });
49778
+ console.log({
49779
+ header: header
49780
+ });
49781
+
49764
49782
  var _temp5 = _forTo(chunks, function (i) {
49765
- var blob = new Blob([chunks[i]], {
49766
- type: "text/csv"
49783
+ return Promise.resolve(importChunkFileUsers({
49784
+ chunks: chunks[i]
49785
+ })).then(function () {
49786
+ return Promise.resolve(new Promise(function (res) {
49787
+ return setTimeout(res, 500);
49788
+ })).then(function () {});
49767
49789
  });
49768
- var formData = new FormData();
49769
- formData.append("file", blob, "students_chunk" + (i + 1) + ".csv");
49770
- return Promise.resolve(importUsersCSV$1(formData)).then(function () {});
49771
49790
  });
49772
49791
 
49773
49792
  if (_temp5 && _temp5.then) return _temp5.then(function () {});
@@ -49795,6 +49814,7 @@ var useCSVImportTab = function useCSVImportTab() {
49795
49814
  }, function (err) {
49796
49815
  var _err$response, _err$response$data;
49797
49816
 
49817
+ console.error("❌ Upload failed", err);
49798
49818
  dispatch(setAlert({
49799
49819
  type: "danger",
49800
49820
  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
@@ -49972,7 +49992,6 @@ var CSVImport = function CSVImport() {
49972
49992
  setArrStudent = _useCSVImportTab.setArrStudent,
49973
49993
  buttons = _useCSVImportTab.buttons,
49974
49994
  upload = _useCSVImportTab.upload,
49975
- isCheckDomainIBS = _useCSVImportTab.isCheckDomainIBS,
49976
49995
  downloadTemplateUser = _useCSVImportTab.downloadTemplateUser;
49977
49996
 
49978
49997
  var _useTranslation = useTranslation(),
@@ -49980,7 +49999,7 @@ var CSVImport = function CSVImport() {
49980
49999
 
49981
50000
  return React.createElement("div", {
49982
50001
  className: "animated fadeIn pt-3"
49983
- }, isCheckDomainIBS ? React.createElement(React.Fragment, null, React.createElement(Input, {
50002
+ }, React.createElement(React.Fragment, null, React.createElement(Input, {
49984
50003
  className: "d-none",
49985
50004
  type: "file",
49986
50005
  id: "import-user",
@@ -50088,67 +50107,7 @@ var CSVImport = function CSVImport() {
50088
50107
  }
50089
50108
  });
50090
50109
  })))));
50091
- }))) : React.createElement(React.Fragment, null, React.createElement(Row, null, React.createElement(Col, {
50092
- md: 12,
50093
- className: "mt-2 mb-2 text-left"
50094
- }, React.createElement(Button, {
50095
- role: "button",
50096
- color: "primary",
50097
- onClick: function onClick() {
50098
- return downloadTemplateUser();
50099
- }
50100
- }, React.createElement("p", {
50101
- className: "d-flex align-items-center mb-0"
50102
- }, t("download_template"), " ", React.createElement(AiOutlineDownload, {
50103
- size: 20,
50104
- className: "ml-2"
50105
- })))), React.createElement(Col, {
50106
- md: 6,
50107
- className: "mb-3"
50108
- }, React.createElement(Input, {
50109
- id: "import-user",
50110
- className: "d-none",
50111
- type: "file",
50112
- onChange: function onChange(e) {
50113
- return upload(e.target.files[0]);
50114
- },
50115
- accept: "text/csv"
50116
- }), React.createElement(RequiredLabel$1, {
50117
- text: t("import_users")
50118
- }), React.createElement(UploadCSVButton, {
50119
- key: "import-users",
50120
- htmlFor: 'import-user',
50121
- text: t("import_users"),
50122
- isDisabled: isLoading,
50123
- backgroundColor: "#0abde3",
50124
- onClick: function onClick() {
50125
- setType(CSVType.AllUser);
50126
- }
50127
- })), React.createElement(Col, {
50128
- md: 6,
50129
- className: "mb-3"
50130
- }, React.createElement(Input, {
50131
- className: "d-none",
50132
- type: "file",
50133
- id: id,
50134
- onChange: function onChange(e) {
50135
- return upload(e.target.files[0]);
50136
- },
50137
- accept: "text/csv"
50138
- }), buttons.map(function (button) {
50139
- return React.createElement(React.Fragment, null, React.createElement(RequiredLabel$1, {
50140
- text: t(button.text)
50141
- }), React.createElement(UploadCSVButton, {
50142
- key: button.text,
50143
- htmlFor: id,
50144
- text: t(button.text),
50145
- isDisabled: isLoading,
50146
- backgroundColor: button.backgroundColor,
50147
- onClick: function onClick() {
50148
- return setType(button.type);
50149
- }
50150
- }));
50151
- })))));
50110
+ }))) );
50152
50111
  };
50153
50112
 
50154
50113
  var tabs = [{