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