mario-teacher-student-client 3.0.0-admin → 3.0.2-admin

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
@@ -5486,7 +5486,7 @@ var UpComing = function UpComing() {
5486
5486
  onClick: function onClick() {
5487
5487
  handleSort("Name");
5488
5488
  }
5489
- }, isTeacher ? "student_name" : "teacher_name", filters.sortBy === "Name" ? filters.sortOrder === "DESC" ? React__default.createElement(ArrowDownwardIcon, {
5489
+ }, isTeacher ? t("student_name") : t("teacher_name"), filters.sortBy === "Name" ? filters.sortOrder === "DESC" ? React__default.createElement(ArrowDownwardIcon, {
5490
5490
  color: "disabled",
5491
5491
  style: {
5492
5492
  marginLeft: "5px"
@@ -30816,332 +30816,406 @@ var OverviewToPDF = function OverviewToPDF(props) {
30816
30816
  doc.setFontSize(14);
30817
30817
  doc.setFont("Helvetica", "normal", "bold");
30818
30818
  doc.text("Student Information", left, 70);
30819
- doc.setFontSize(10);
30820
- doc.setFont("Helvetica", "normal", "bold");
30821
- doc.text(t("student_name") + ":", left, 100);
30822
- doc.text(t("grade") + ":", left, 115);
30823
- doc.text(t("email") + ":", left, 130);
30824
- doc.text(t("phone_number") + ":", left, 145);
30825
- doc.text(t("address") + ":", left, 160);
30826
- doc.text(t("mtss") + ":", left, 175);
30827
- doc.text(t("total_1_to_1") + ":", left + 200, 100);
30828
- doc.text(t("total_1_to_1_time") + ":", left + 200, 115);
30829
- doc.text(t("total_conferences") + ":", left + 200, 130);
30830
- doc.text(t("total_conferences_time") + ":", left + 200, 145);
30831
- doc.text(t("total_class_reflection_check_ins") + ":", left + 200, 160);
30832
- doc.setFont("Helvetica", "normal", "normal");
30833
- doc.text(partnerInformation.name, left + 60, 100);
30834
- doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.gradeLevel) || "", left + 30, 115);
30835
- doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.email) || "", left + 30, 130);
30836
- doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.phoneNumber) || "", left + 70, 145);
30837
- doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.address) || "", left + 40, 160);
30838
- doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.mtss) || "", left + 30, 175);
30839
- doc.text("" + informationDashboard.totalOneToOne, left + 200 + 47, 100);
30840
- doc.text("" + informationDashboard.totalTimeOneToOne, left + 200 + 67, 115);
30841
- doc.text("" + informationDashboard.totalConference, left + 200 + 70, 130);
30842
- doc.text("" + informationDashboard.totalTimeConference, left + 200 + 92, 145);
30843
- doc.text("" + informationDashboard.avgClassReflection, left + 200 + 124, 160);
30844
- doc.setFontSize(14);
30845
- doc.setFont("Helvetica", "normal", "bold");
30846
- doc.text(t("top_learning_strategies"), left, 240);
30847
- var chartLearningStrategies = document.getElementById("learning_strategies");
30848
- return Promise.resolve(html2canvas(chartLearningStrategies)).then(function (chartLearningStrategiesCanvas) {
30849
- doc.setFontSize(8);
30850
- doc.setDrawColor(0);
30851
- doc.setFillColor("#00B8B2");
30852
- doc.roundedRect(120, 375, 5, 5, 1, 1, "F");
30853
- doc.setFont("Helvetica", "normal", "normal");
30854
- doc.text(t("perceived_usage"), 127, 380);
30855
- doc.setFillColor("#006E60");
30856
- doc.roundedRect(200, 375, 5, 5, 1, 1, "F");
30819
+ var studentAvatar = document.getElementById("student_avatar");
30820
+ return Promise.resolve(html2canvas(studentAvatar)).then(function (studentAvatarCanvas) {
30821
+ doc.addImage(studentAvatarCanvas.toDataURL("image/png"), "png", left + 115, 53, 25, 25);
30822
+ doc.setFontSize(10);
30823
+ doc.setFont("Helvetica", "normal", "bold");
30824
+ doc.text(t("student_name") + ":", left, 100);
30825
+ doc.text(t("grade") + ":", left, 115);
30826
+ doc.text(t("email") + ":", left, 130);
30827
+ doc.text(t("phone_number") + ":", left, 145);
30828
+ doc.text(t("address") + ":", left, 160);
30829
+ doc.text(t("mtss") + ":", left, 175);
30830
+ doc.text(t("total_1_to_1") + ":", left + 200, 100);
30831
+ doc.text(t("total_1_to_1_time") + ":", left + 200, 115);
30832
+ doc.text(t("total_conferences") + ":", left + 200, 130);
30833
+ doc.text(t("total_conferences_time") + ":", left + 200, 145);
30834
+ doc.text(t("total_class_reflection_check_ins") + ":", left + 200, 160);
30857
30835
  doc.setFont("Helvetica", "normal", "normal");
30858
- doc.text(t("total_number_of_times_seleted"), 207, 380);
30859
- doc.addImage(chartLearningStrategiesCanvas.toDataURL("image/png", 1.0), 20, 245, 400, 130);
30836
+ doc.text(partnerInformation.name, left + 60, 100);
30837
+ doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.gradeLevel) || "", left + 30, 115);
30838
+ doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.email) || "", left + 30, 130);
30839
+ doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.phoneNumber) || "", left + 70, 145);
30840
+ doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.address) || "", left + 40, 160);
30841
+ doc.text((partnerInformation === null || partnerInformation === void 0 ? void 0 : partnerInformation.mtss) || "", left + 30, 175);
30842
+ doc.text("" + informationDashboard.totalOneToOne, left + 200 + 47, 100);
30843
+ doc.text("" + informationDashboard.totalTimeOneToOne, left + 200 + 67, 115);
30844
+ doc.text("" + informationDashboard.totalConference, left + 200 + 70, 130);
30845
+ doc.text("" + informationDashboard.totalTimeConference, left + 200 + 92, 145);
30846
+ doc.text("" + informationDashboard.avgClassReflection, left + 200 + 124, 160);
30860
30847
  doc.setFontSize(14);
30861
30848
  doc.setFont("Helvetica", "normal", "bold");
30862
- doc.text(t("Readiness To Learn"), left, 420);
30863
- var chartReadinessToLearn = document.getElementById("readiness_to_learn");
30864
- return Promise.resolve(html2canvas(chartReadinessToLearn)).then(function (chartReadinessToLearnCanvas) {
30865
- doc.addImage(chartReadinessToLearnCanvas.toDataURL("image/png"), 20, 425, 400, 130);
30849
+ doc.text(t("top_learning_strategies"), left, 240);
30850
+ var chartLearningStrategies = document.getElementById("learning_strategies");
30851
+ return Promise.resolve(html2canvas(chartLearningStrategies)).then(function (chartLearningStrategiesCanvas) {
30866
30852
  doc.setFontSize(8);
30867
- doc.setFillColor("#7ACAFF");
30868
- doc.roundedRect(100, 555, 5, 5, 1, 1, "F");
30869
- doc.setFont("Helvetica", "normal", "normal");
30870
- doc.text(t("energy"), 107, 560);
30871
- doc.setFillColor("#7AFFD1");
30872
- doc.roundedRect(150, 555, 5, 5, 1, 1, "F");
30873
- doc.setFont("Helvetica", "normal", "normal");
30874
- doc.text(t("focus"), 157, 560);
30875
- doc.setFillColor("#FFE77D");
30876
- doc.roundedRect(200, 555, 5, 5, 1, 1, "F");
30877
- doc.setFont("Helvetica", "normal", "normal");
30878
- doc.text(t("happiness"), 207, 560);
30879
- doc.setFillColor("#FF8B9E");
30880
- doc.roundedRect(250, 555, 5, 5, 1, 1, "F");
30853
+ doc.setDrawColor(0);
30854
+ doc.setFillColor("#00B8B2");
30855
+ doc.roundedRect(120, 375, 5, 5, 1, 1, "F");
30881
30856
  doc.setFont("Helvetica", "normal", "normal");
30882
- doc.text(t("safety"), 257, 560);
30883
- doc.setFillColor("#B7A3FF");
30884
- doc.roundedRect(300, 555, 5, 5, 1, 1, "F");
30857
+ doc.text(t("perceived_usage"), 127, 380);
30858
+ doc.setFillColor("#006E60");
30859
+ doc.roundedRect(200, 375, 5, 5, 1, 1, "F");
30885
30860
  doc.setFont("Helvetica", "normal", "normal");
30886
- doc.text(t("stress"), 307, 560);
30887
- doc.addPage();
30888
- return Promise.resolve(createImageHeader()).then(function () {
30889
- doc.setFontSize(14);
30890
- doc.setFont("Helvetica", "normal", "bold");
30891
- doc.text(t("one_to_one"), left, 70);
30892
- var chartOneToOne = document.getElementById("one_to_one");
30893
- return Promise.resolve(html2canvas(chartOneToOne)).then(function (chartOneToOneCanvas) {
30894
- function _temp17() {
30895
- function _temp15() {
30896
- for (var i = 0; i < dataConvertedOneToOne.length; i++) {
30897
- if (activeColumnOneToOne[i]) {
30898
- var _dataConvertedOneToOn;
30899
-
30900
- doc.setDrawColor(0);
30901
- doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30902
- doc.roundedRect(left, line, 5, 5, 1, 1, "F");
30903
- doc.setTextColor("#252733");
30904
- doc.text(dataConvertedOneToOne[i], left + 7, line + 5);
30905
- left = left + dataConvertedOneToOne[i].length * 3 + 15;
30906
-
30907
- if (left + ((_dataConvertedOneToOn = dataConvertedOneToOne[i + 1]) === null || _dataConvertedOneToOn === void 0 ? void 0 : _dataConvertedOneToOn.length) * 3 + 15 > WIDTH_PAPER) {
30908
- left = 20;
30909
- line += 10;
30861
+ doc.text(t("total_number_of_times_seleted"), 207, 380);
30862
+ doc.addImage(chartLearningStrategiesCanvas.toDataURL("image/png", 1.0), 20, 245, 400, 130);
30863
+ doc.setFontSize(14);
30864
+ doc.setFont("Helvetica", "normal", "bold");
30865
+ doc.text(t("Readiness To Learn"), left, 420);
30866
+ var chartReadinessToLearn = document.getElementById("readiness_to_learn");
30867
+ return Promise.resolve(html2canvas(chartReadinessToLearn)).then(function (chartReadinessToLearnCanvas) {
30868
+ doc.addImage(chartReadinessToLearnCanvas.toDataURL("image/png"), 20, 425, 400, 130);
30869
+ doc.setFontSize(8);
30870
+ doc.setFillColor("#7ACAFF");
30871
+ doc.roundedRect(100, 555, 5, 5, 1, 1, "F");
30872
+ doc.setFont("Helvetica", "normal", "normal");
30873
+ doc.text(t("energy"), 107, 560);
30874
+ doc.setFillColor("#7AFFD1");
30875
+ doc.roundedRect(150, 555, 5, 5, 1, 1, "F");
30876
+ doc.setFont("Helvetica", "normal", "normal");
30877
+ doc.text(t("focus"), 157, 560);
30878
+ doc.setFillColor("#FFE77D");
30879
+ doc.roundedRect(200, 555, 5, 5, 1, 1, "F");
30880
+ doc.setFont("Helvetica", "normal", "normal");
30881
+ doc.text(t("happiness"), 207, 560);
30882
+ doc.setFillColor("#FF8B9E");
30883
+ doc.roundedRect(250, 555, 5, 5, 1, 1, "F");
30884
+ doc.setFont("Helvetica", "normal", "normal");
30885
+ doc.text(t("safety"), 257, 560);
30886
+ doc.setFillColor("#B7A3FF");
30887
+ doc.roundedRect(300, 555, 5, 5, 1, 1, "F");
30888
+ doc.setFont("Helvetica", "normal", "normal");
30889
+ doc.text(t("stress"), 307, 560);
30890
+ doc.addPage();
30891
+ return Promise.resolve(createImageHeader()).then(function () {
30892
+ doc.setFontSize(14);
30893
+ doc.setFont("Helvetica", "normal", "bold");
30894
+ doc.text(t("one_to_one"), left, 70);
30895
+ var chartOneToOne = document.getElementById("one_to_one");
30896
+ return Promise.resolve(html2canvas(chartOneToOne)).then(function (chartOneToOneCanvas) {
30897
+ function _temp17() {
30898
+ function _temp15() {
30899
+ for (var i = 0; i < dataConvertedOneToOne.length; i++) {
30900
+ if (activeColumnOneToOne[i]) {
30901
+ var _dataConvertedOneToOn;
30902
+
30903
+ doc.setDrawColor(0);
30904
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30905
+ doc.roundedRect(left, line, 5, 5, 1, 1, "F");
30906
+ doc.setTextColor("#252733");
30907
+ doc.text(dataConvertedOneToOne[i], left + 7, line + 5);
30908
+ left = left + dataConvertedOneToOne[i].length * 3 + 15;
30909
+
30910
+ if (left + ((_dataConvertedOneToOn = dataConvertedOneToOne[i + 1]) === null || _dataConvertedOneToOn === void 0 ? void 0 : _dataConvertedOneToOn.length) * 3 + 15 > WIDTH_PAPER) {
30911
+ left = 20;
30912
+ line += 10;
30913
+ }
30910
30914
  }
30911
30915
  }
30912
- }
30913
30916
 
30914
- left = 20;
30915
- doc.addImage(chartOneToOneCanvas.toDataURL("image/png"), 20, line + 20, 400, 130);
30916
- var lineOptionPercent = line + 150;
30917
-
30918
- for (var i = 0; i < dataConvertedOneToOne.length; i++) {
30919
- if (avgOneToOne[i] != 0) {
30920
- var _dataConvertedOneToOn2;
30921
-
30922
- doc.setDrawColor(0);
30923
- doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30924
- doc.roundedRect(left, lineOptionPercent, 5, 5, 1, 1, "F");
30925
- doc.setTextColor("#252733");
30926
- doc.setFont("Helvetica", "normal", "normal");
30927
- doc.text(dataConvertedOneToOne[i], left + 7, lineOptionPercent + 5);
30928
- doc.setFont("Helvetica", "normal", "bold");
30929
- doc.text(avgOneToOne[i].toFixed(2) + "%", left, lineOptionPercent + 12);
30930
- left = left + dataConvertedOneToOne[i].length * 3 + 15;
30917
+ left = 20;
30918
+ doc.addImage(chartOneToOneCanvas.toDataURL("image/png"), 20, line + 20, 400, 130);
30919
+ var lineOptionPercent = line + 150;
30931
30920
 
30932
- if (left + ((_dataConvertedOneToOn2 = dataConvertedOneToOne[i + 1]) === null || _dataConvertedOneToOn2 === void 0 ? void 0 : _dataConvertedOneToOn2.length) * 3 + 15 > WIDTH_PAPER) {
30933
- left = 20;
30934
- lineOptionPercent += 17;
30935
- }
30936
- }
30937
- }
30921
+ for (var i = 0; i < dataConvertedOneToOne.length; i++) {
30922
+ if (avgOneToOne[i] != 0) {
30923
+ var _dataConvertedOneToOn2;
30938
30924
 
30939
- doc.addPage();
30940
- return Promise.resolve(createImageHeader()).then(function () {
30941
- line = 85;
30942
- left = 20;
30943
- var lineOptionClassReflection = line;
30944
- doc.setFontSize(14);
30945
- doc.setTextColor("#000");
30946
- doc.setFont("Helvetica", "normal", "bold");
30947
- doc.text(t("class_reflection"), left, 70);
30948
- var chartClassReflection = document.getElementById("class_reflection");
30949
- return Promise.resolve(html2canvas(chartClassReflection)).then(function (chartClassReflectionCanvas) {
30950
- function _temp13() {
30925
+ doc.setDrawColor(0);
30926
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30927
+ doc.roundedRect(left, lineOptionPercent, 5, 5, 1, 1, "F");
30928
+ doc.setTextColor("#252733");
30951
30929
  doc.setFont("Helvetica", "normal", "normal");
30952
- left = 20;
30953
- line = lineOptionClassReflection + 30;
30954
-
30955
- for (var i = 0; i < dataConvertedClassReflection.length; i++) {
30956
- if (activeColumnClassReflection[i]) {
30957
- var _dataConvertedClassRe;
30958
-
30959
- doc.setDrawColor(0);
30960
- doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30961
- doc.roundedRect(left, line, 5, 5, 1, 1, "F");
30962
- doc.setTextColor("#252733");
30963
- doc.text(dataConvertedClassReflection[i], left + 7, line + 5);
30964
- left = left + dataConvertedClassReflection[i].length * 3 + 15;
30965
-
30966
- if (left + ((_dataConvertedClassRe = dataConvertedClassReflection[i + 1]) === null || _dataConvertedClassRe === void 0 ? void 0 : _dataConvertedClassRe.length) * 3 + 15 > WIDTH_PAPER) {
30967
- left = 20;
30968
- line += 10;
30969
- }
30970
- }
30930
+ doc.text(dataConvertedOneToOne[i], left + 7, lineOptionPercent + 5);
30931
+ doc.setFont("Helvetica", "normal", "bold");
30932
+ doc.text(avgOneToOne[i].toFixed(2) + "%", left, lineOptionPercent + 12);
30933
+ left = left + dataConvertedOneToOne[i].length * 3 + 15;
30934
+
30935
+ if (left + ((_dataConvertedOneToOn2 = dataConvertedOneToOne[i + 1]) === null || _dataConvertedOneToOn2 === void 0 ? void 0 : _dataConvertedOneToOn2.length) * 3 + 15 > WIDTH_PAPER) {
30936
+ left = 20;
30937
+ lineOptionPercent += 17;
30971
30938
  }
30939
+ }
30940
+ }
30972
30941
 
30973
- left = 20;
30974
- doc.addImage(chartClassReflectionCanvas.toDataURL("image/png"), 20, line + 20, 400, 130);
30942
+ doc.addPage();
30943
+ return Promise.resolve(createImageHeader()).then(function () {
30944
+ line = 85;
30945
+ left = 20;
30946
+ var lineOptionClassReflection = line;
30947
+ doc.setFontSize(14);
30948
+ doc.setTextColor("#000");
30949
+ doc.setFont("Helvetica", "normal", "bold");
30950
+ doc.text(t("class_reflection"), left, 70);
30951
+ var chartClassReflection = document.getElementById("class_reflection");
30952
+ return Promise.resolve(html2canvas(chartClassReflection)).then(function (chartClassReflectionCanvas) {
30953
+ function _temp13() {
30954
+ doc.setFont("Helvetica", "normal", "normal");
30955
+ left = 20;
30956
+ line = lineOptionClassReflection + 30;
30975
30957
 
30976
- for (var i = 0; i < dataConvertedClassReflection.length; i++) {
30977
- if (avgClassReflection[i] != 0) {
30978
- var _dataConvertedClassRe2;
30958
+ for (var i = 0; i < dataConvertedClassReflection.length; i++) {
30959
+ if (activeColumnClassReflection[i]) {
30960
+ var _dataConvertedClassRe;
30979
30961
 
30980
- doc.setDrawColor(0);
30981
- doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30982
- doc.roundedRect(left, line + 150, 5, 5, 1, 1, "F");
30983
- doc.setTextColor("#252733");
30984
- doc.setFont("Helvetica", "normal", "normal");
30985
- doc.text(dataConvertedClassReflection[i], left + 7, line + 155);
30986
- doc.setFont("Helvetica", "normal", "bold");
30987
- doc.text("" + avgClassReflection[i].toFixed(2) + (dataConvertedClassReflection[i].toLowerCase().includes("grade") ? "" : "%"), left, line + 162);
30988
- left = left + dataConvertedClassReflection[i].length * 3 + 15;
30962
+ doc.setDrawColor(0);
30963
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30964
+ doc.roundedRect(left, line, 5, 5, 1, 1, "F");
30965
+ doc.setTextColor("#252733");
30966
+ doc.text(dataConvertedClassReflection[i], left + 7, line + 5);
30967
+ left = left + dataConvertedClassReflection[i].length * 3 + 15;
30989
30968
 
30990
- if (left + ((_dataConvertedClassRe2 = dataConvertedClassReflection[i + 1]) === null || _dataConvertedClassRe2 === void 0 ? void 0 : _dataConvertedClassRe2.length) * 3 + 15 > WIDTH_PAPER) {
30991
- left = 20;
30992
- line += 17;
30969
+ if (left + ((_dataConvertedClassRe = dataConvertedClassReflection[i + 1]) === null || _dataConvertedClassRe === void 0 ? void 0 : _dataConvertedClassRe.length) * 3 + 15 > WIDTH_PAPER) {
30970
+ left = 20;
30971
+ line += 10;
30972
+ }
30993
30973
  }
30994
30974
  }
30995
- }
30996
30975
 
30997
- doc.addPage();
30998
- return Promise.resolve(createImageHeader()).then(function () {
30999
30976
  left = 20;
31000
- line = 85;
31001
- var lineOptionConference = line;
31002
- doc.setFontSize(14);
31003
- doc.setFont("Helvetica", "normal", "bold");
31004
- doc.setTextColor("#000");
31005
- doc.text(t("conference"), left, 70);
31006
- var chartConference = document.getElementById("conference");
31007
- return Promise.resolve(html2canvas(chartConference)).then(function (chartConferenceCanvas) {
31008
- function _temp11() {
31009
- function _temp9() {
31010
- function _temp7() {
31011
- doc.setFontSize(14);
31012
- doc.setFont("Helvetica", "normal", "bold");
31013
- doc.setTextColor("#000");
31014
- doc.text("Learning Progress", left, line);
31015
- var chartLearningProgress = document.getElementById("learning_progress");
31016
- return Promise.resolve(html2canvas(chartLearningProgress)).then(function (chartLearningProgressCanvas) {
31017
- doc.addImage(chartLearningProgressCanvas.toDataURL("image/png"), left, line + 15, 400, 130);
31018
- doc.save("Overview.pdf");
31019
- });
31020
- }
30977
+ doc.addImage(chartClassReflectionCanvas.toDataURL("image/png"), 20, line + 20, 400, 130);
30978
+
30979
+ for (var i = 0; i < dataConvertedClassReflection.length; i++) {
30980
+ if (avgClassReflection[i] != 0) {
30981
+ var _dataConvertedClassRe2;
30982
+
30983
+ doc.setDrawColor(0);
30984
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
30985
+ doc.roundedRect(left, line + 150, 5, 5, 1, 1, "F");
30986
+ doc.setTextColor("#252733");
30987
+ doc.setFont("Helvetica", "normal", "normal");
30988
+ doc.text(dataConvertedClassReflection[i], left + 7, line + 155);
30989
+ doc.setFont("Helvetica", "normal", "bold");
30990
+ doc.text("" + avgClassReflection[i].toFixed(2) + (dataConvertedClassReflection[i].toLowerCase().includes("grade") ? "" : "%"), left, line + 162);
30991
+ left = left + dataConvertedClassReflection[i].length * 3 + 15;
31021
30992
 
31022
- doc.setFont("Helvetica", "normal", "normal");
30993
+ if (left + ((_dataConvertedClassRe2 = dataConvertedClassReflection[i + 1]) === null || _dataConvertedClassRe2 === void 0 ? void 0 : _dataConvertedClassRe2.length) * 3 + 15 > WIDTH_PAPER) {
31023
30994
  left = 20;
31024
- line = lineOptionConference + 30;
30995
+ line += 17;
30996
+ }
30997
+ }
30998
+ }
31025
30999
 
31026
- for (var i = 0; i < dataConvertedConference.length; i++) {
31027
- if (activeColumnConference[i]) {
31028
- var _dataConvertedConfere;
31000
+ doc.addPage();
31001
+ return Promise.resolve(createImageHeader()).then(function () {
31002
+ left = 20;
31003
+ line = 85;
31004
+ var lineOptionConference = line;
31005
+ doc.setFontSize(14);
31006
+ doc.setFont("Helvetica", "normal", "bold");
31007
+ doc.setTextColor("#000");
31008
+ doc.text(t("conference"), left, 70);
31009
+ var chartConference = document.getElementById("conference");
31010
+ return Promise.resolve(html2canvas(chartConference)).then(function (chartConferenceCanvas) {
31011
+ function _temp11() {
31012
+ function _temp9() {
31013
+ function _temp7() {
31014
+ doc.setFontSize(14);
31015
+ doc.setFont("Helvetica", "normal", "bold");
31016
+ doc.setTextColor("#000");
31017
+ doc.text("Learning Progress", left, line);
31018
+ var chartLearningProgress = document.getElementById("learning_progress");
31019
+ return Promise.resolve(html2canvas(chartLearningProgress)).then(function (chartLearningProgressCanvas) {
31020
+ doc.addImage(chartLearningProgressCanvas.toDataURL("image/png"), left, line + 15, 400, 130);
31021
+ doc.save("Overview.pdf");
31022
+ });
31023
+ }
31029
31024
 
31030
- doc.setDrawColor(0);
31031
- doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
31032
- doc.roundedRect(left, line, 5, 5, 1, 1, "F");
31033
- doc.setTextColor("#252733");
31034
- doc.text(dataConvertedConference[i], left + 7, line + 5);
31035
- left = left + dataConvertedConference[i].length * 3 + 15;
31025
+ doc.setFont("Helvetica", "normal", "normal");
31026
+ left = 20;
31027
+ line = lineOptionConference + 30;
31028
+
31029
+ for (var i = 0; i < dataConvertedConference.length; i++) {
31030
+ if (activeColumnConference[i]) {
31031
+ var _dataConvertedConfere;
31032
+
31033
+ doc.setDrawColor(0);
31034
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
31035
+ doc.roundedRect(left, line, 5, 5, 1, 1, "F");
31036
+ doc.setTextColor("#252733");
31037
+ doc.text(dataConvertedConference[i], left + 7, line + 5);
31038
+ left = left + dataConvertedConference[i].length * 3 + 15;
31039
+
31040
+ if (left + ((_dataConvertedConfere = dataConvertedConference[i + 1]) === null || _dataConvertedConfere === void 0 ? void 0 : _dataConvertedConfere.length) * 3 + 15 > WIDTH_PAPER) {
31041
+ left = 20;
31042
+ line += 10;
31043
+ }
31044
+ }
31045
+ }
31036
31046
 
31037
- if (left + ((_dataConvertedConfere = dataConvertedConference[i + 1]) === null || _dataConvertedConfere === void 0 ? void 0 : _dataConvertedConfere.length) * 3 + 15 > WIDTH_PAPER) {
31038
- left = 20;
31039
- line += 10;
31047
+ left = 20;
31048
+ doc.addImage(chartConferenceCanvas.toDataURL("image/png"), 20, line + 10, 400, 130);
31049
+
31050
+ for (var i = 0; i < dataConvertedConference.length; i++) {
31051
+ if (avgConference[i] != 0) {
31052
+ var _dataConvertedConfere2;
31053
+
31054
+ doc.setDrawColor(0);
31055
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
31056
+ doc.roundedRect(left, line + 150, 5, 5, 1, 1, "F");
31057
+ doc.setTextColor("#252733");
31058
+ doc.setFont("Helvetica", "normal", "normal");
31059
+ doc.text(dataConvertedConference[i], left + 7, line + 155);
31060
+ doc.setFont("Helvetica", "normal", "bold");
31061
+ doc.text((avgConference[i] * 100).toFixed(2) + "%", left, line + 162);
31062
+ left = left + dataConvertedConference[i].length * 3 + 15;
31063
+
31064
+ if (left + ((_dataConvertedConfere2 = dataConvertedConference[i + 1]) === null || _dataConvertedConfere2 === void 0 ? void 0 : _dataConvertedConfere2.length) * 3 + 15 > WIDTH_PAPER) {
31065
+ left = 20;
31066
+ line += 17;
31067
+ }
31040
31068
  }
31041
31069
  }
31070
+
31071
+ left = 20;
31072
+ line += 200;
31073
+
31074
+ var _temp6 = function () {
31075
+ if (line + 150 > HEIGHT_PAPER) {
31076
+ doc.addPage();
31077
+ return Promise.resolve(createImageHeader()).then(function () {
31078
+ left = 20;
31079
+ line = 70;
31080
+ });
31081
+ }
31082
+ }();
31083
+
31084
+ return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
31042
31085
  }
31043
31086
 
31044
- left = 20;
31045
- doc.addImage(chartConferenceCanvas.toDataURL("image/png"), 20, line + 10, 400, 130);
31087
+ var _temp8 = function () {
31088
+ if (line + 200 > HEIGHT_PAPER) {
31089
+ doc.addPage();
31090
+ return Promise.resolve(createImageHeader()).then(function () {
31091
+ line = 85;
31092
+ });
31093
+ }
31094
+ }();
31046
31095
 
31047
- for (var i = 0; i < dataConvertedConference.length; i++) {
31048
- if (avgConference[i] != 0) {
31049
- var _dataConvertedConfere2;
31096
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
31097
+ }
31098
+
31099
+ doc.setFontSize(8);
31100
+ var i = 0;
31101
+
31102
+ var _temp10 = _for(function () {
31103
+ var _chartDataConference$;
31104
+
31105
+ return i < ((_chartDataConference$ = chartDataConference.overviewQuestionChoice) === null || _chartDataConference$ === void 0 ? void 0 : _chartDataConference$.length);
31106
+ }, function () {
31107
+ return i++;
31108
+ }, function () {
31109
+ var _chartDataConference$2, _chartDataConference$3, _chartDataConference$4, _chartDataConference$5;
31110
+
31111
+ var LINE = line;
31112
+ var arrResultQuestions = chartDataConference.overviewQuestionChoice[i].resultQuestion;
31113
+ doc.setFontSize(12);
31114
+ doc.setFont("Helvetica", "normal", "bold");
31115
+ doc.text(chartDataConference.overviewQuestionChoice[i].month, left, LINE);
31116
+ doc.setFontSize(8);
31117
+
31118
+ for (var j = 0; j < (arrResultQuestions === null || arrResultQuestions === void 0 ? void 0 : arrResultQuestions.length); j++) {
31119
+ var _arrResultQuestions$j, _arrResultQuestions$j2, _arrResultQuestions$j3, _arrResultQuestions$j4, _arrResultQuestions$j5;
31120
+
31121
+ var resultQuestion = (_arrResultQuestions$j = arrResultQuestions[j]) !== null && _arrResultQuestions$j !== void 0 && _arrResultQuestions$j.questionText.includes("<p>") ? (_arrResultQuestions$j2 = arrResultQuestions[j]) === null || _arrResultQuestions$j2 === void 0 ? void 0 : _arrResultQuestions$j2.questionText.slice(3, (_arrResultQuestions$j3 = arrResultQuestions[j]) === null || _arrResultQuestions$j3 === void 0 ? void 0 : _arrResultQuestions$j3.questionText.indexOf("</p>")) : ((_arrResultQuestions$j4 = arrResultQuestions[j]) === null || _arrResultQuestions$j4 === void 0 ? void 0 : _arrResultQuestions$j4.questionText) || "";
31122
+
31123
+ if (resultQuestion != "" && ((_arrResultQuestions$j5 = arrResultQuestions[j]) === null || _arrResultQuestions$j5 === void 0 ? void 0 : _arrResultQuestions$j5.avgOfStudentChoice) != 0) {
31124
+ var _arrResultQuestions$j6, _arrResultQuestions$j7;
31050
31125
 
31051
- doc.setDrawColor(0);
31052
- doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
31053
- doc.roundedRect(left, line + 150, 5, 5, 1, 1, "F");
31054
- doc.setTextColor("#252733");
31055
- doc.setFont("Helvetica", "normal", "normal");
31056
- doc.text(dataConvertedConference[i], left + 7, line + 155);
31057
31126
  doc.setFont("Helvetica", "normal", "bold");
31058
- doc.text((avgConference[i] * 100).toFixed(2) + "%", left, line + 162);
31059
- left = left + dataConvertedConference[i].length * 3 + 15;
31127
+ doc.text(resultQuestion + ":", left + 5, LINE + 10);
31128
+ doc.setFont("Helvetica", "normal", "normal");
31129
+ doc.text(((_arrResultQuestions$j6 = arrResultQuestions[j]) === null || _arrResultQuestions$j6 === void 0 ? void 0 : (_arrResultQuestions$j7 = _arrResultQuestions$j6.avgOfStudentChoice) === null || _arrResultQuestions$j7 === void 0 ? void 0 : _arrResultQuestions$j7.toFixed(1)) * 100 + "%", left + (resultQuestion === null || resultQuestion === void 0 ? void 0 : resultQuestion.length) * 3 + 12, LINE + 10);
31130
+ LINE += 11;
31060
31131
 
31061
- if (left + ((_dataConvertedConfere2 = dataConvertedConference[i + 1]) === null || _dataConvertedConfere2 === void 0 ? void 0 : _dataConvertedConfere2.length) * 3 + 15 > WIDTH_PAPER) {
31062
- left = 20;
31063
- line += 17;
31132
+ if (LINE > lineOptionConference) {
31133
+ lineOptionConference = LINE;
31064
31134
  }
31065
31135
  }
31066
31136
  }
31067
31137
 
31068
- left = 20;
31069
- line += 200;
31138
+ left += 100;
31139
+
31140
+ if (left + 105 > WIDTH_PAPER && (((_chartDataConference$2 = chartDataConference.overviewQuestionChoice[i + 1]) === null || _chartDataConference$2 === void 0 ? void 0 : (_chartDataConference$3 = _chartDataConference$2.resultQuestion[0]) === null || _chartDataConference$3 === void 0 ? void 0 : _chartDataConference$3.questionId) != 0 || ((_chartDataConference$4 = chartDataConference.overviewQuestionChoice[i + 1]) === null || _chartDataConference$4 === void 0 ? void 0 : (_chartDataConference$5 = _chartDataConference$4.resultQuestion[0]) === null || _chartDataConference$5 === void 0 ? void 0 : _chartDataConference$5.questionText) != "")) {
31141
+ ;
31142
+ left = 20, line = lineOptionConference + 20;
31143
+ } else {
31144
+ LINE = line;
31145
+ }
31070
31146
 
31071
- var _temp6 = function () {
31072
- if (line + 150 > HEIGHT_PAPER) {
31147
+ var _temp5 = function () {
31148
+ if (line + 100 > HEIGHT_PAPER) {
31073
31149
  doc.addPage();
31074
31150
  return Promise.resolve(createImageHeader()).then(function () {
31151
+ line = 85;
31075
31152
  left = 20;
31076
- line = 70;
31077
31153
  });
31078
31154
  }
31079
31155
  }();
31080
31156
 
31081
- return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
31082
- }
31083
-
31084
- var _temp8 = function () {
31085
- if (line + 200 > HEIGHT_PAPER) {
31086
- doc.addPage();
31087
- return Promise.resolve(createImageHeader()).then(function () {
31088
- line = 85;
31089
- });
31090
- }
31091
- }();
31157
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
31158
+ });
31092
31159
 
31093
- return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
31094
- }
31160
+ return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
31161
+ });
31162
+ });
31163
+ }
31095
31164
 
31096
- doc.setFontSize(8);
31097
- var i = 0;
31165
+ doc.setFontSize(8);
31166
+ var i = 0;
31098
31167
 
31099
- var _temp10 = _for(function () {
31100
- var _chartDataConference$;
31168
+ var _temp12 = _for(function () {
31169
+ var _chartDataClassReflec;
31101
31170
 
31102
- return i < ((_chartDataConference$ = chartDataConference.overviewQuestionChoice) === null || _chartDataConference$ === void 0 ? void 0 : _chartDataConference$.length);
31103
- }, function () {
31104
- return i++;
31105
- }, function () {
31106
- var _chartDataConference$2, _chartDataConference$3, _chartDataConference$4, _chartDataConference$5;
31171
+ return i < ((_chartDataClassReflec = chartDataClassReflection.overviewQuestionChoice) === null || _chartDataClassReflec === void 0 ? void 0 : _chartDataClassReflec.length);
31172
+ }, function () {
31173
+ return i++;
31174
+ }, function () {
31175
+ var LINE = line;
31107
31176
 
31108
- var LINE = line;
31109
- var arrResultQuestions = chartDataConference.overviewQuestionChoice[i].resultQuestion;
31177
+ var _temp4 = function () {
31178
+ if (chartDataClassReflection.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
31179
+ var arrResultQuestions = chartDataClassReflection.overviewQuestionChoice[i].resultQuestion;
31110
31180
  doc.setFontSize(12);
31111
31181
  doc.setFont("Helvetica", "normal", "bold");
31112
- doc.text(chartDataConference.overviewQuestionChoice[i].month, left, LINE);
31182
+ doc.text(chartDataClassReflection.overviewQuestionChoice[i].month, left, LINE);
31113
31183
  doc.setFontSize(8);
31114
31184
 
31115
31185
  for (var j = 0; j < (arrResultQuestions === null || arrResultQuestions === void 0 ? void 0 : arrResultQuestions.length); j++) {
31116
- var _arrResultQuestions$j, _arrResultQuestions$j2, _arrResultQuestions$j3, _arrResultQuestions$j4, _arrResultQuestions$j5;
31186
+ var _arrResultQuestions$j8;
31117
31187
 
31118
- var resultQuestion = (_arrResultQuestions$j = arrResultQuestions[j]) !== null && _arrResultQuestions$j !== void 0 && _arrResultQuestions$j.questionText.includes("<p>") ? (_arrResultQuestions$j2 = arrResultQuestions[j]) === null || _arrResultQuestions$j2 === void 0 ? void 0 : _arrResultQuestions$j2.questionText.slice(3, (_arrResultQuestions$j3 = arrResultQuestions[j]) === null || _arrResultQuestions$j3 === void 0 ? void 0 : _arrResultQuestions$j3.questionText.indexOf("</p>")) : ((_arrResultQuestions$j4 = arrResultQuestions[j]) === null || _arrResultQuestions$j4 === void 0 ? void 0 : _arrResultQuestions$j4.questionText) || "";
31188
+ if (((_arrResultQuestions$j8 = arrResultQuestions[j]) === null || _arrResultQuestions$j8 === void 0 ? void 0 : _arrResultQuestions$j8.avgOfStudentChoice) != 0) {
31189
+ var _arrResultQuestions$j9, _arrResultQuestions$j10, _arrResultQuestions$j11, _arrResultQuestions$j12;
31119
31190
 
31120
- if (resultQuestion != "" && ((_arrResultQuestions$j5 = arrResultQuestions[j]) === null || _arrResultQuestions$j5 === void 0 ? void 0 : _arrResultQuestions$j5.avgOfStudentChoice) != 0) {
31121
- var _arrResultQuestions$j6, _arrResultQuestions$j7;
31191
+ var resultQuestion = (_arrResultQuestions$j9 = arrResultQuestions[j]) !== null && _arrResultQuestions$j9 !== void 0 && _arrResultQuestions$j9.questionText.includes("<p>") ? (_arrResultQuestions$j10 = arrResultQuestions[j]) === null || _arrResultQuestions$j10 === void 0 ? void 0 : _arrResultQuestions$j10.questionText.slice(3, (_arrResultQuestions$j11 = arrResultQuestions[j]) === null || _arrResultQuestions$j11 === void 0 ? void 0 : _arrResultQuestions$j11.questionText.indexOf("</p>")) : ((_arrResultQuestions$j12 = arrResultQuestions[j]) === null || _arrResultQuestions$j12 === void 0 ? void 0 : _arrResultQuestions$j12.questionText) || "";
31122
31192
 
31123
- doc.setFont("Helvetica", "normal", "bold");
31124
- doc.text(resultQuestion + ":", left + 5, LINE + 10);
31125
- doc.setFont("Helvetica", "normal", "normal");
31126
- doc.text(((_arrResultQuestions$j6 = arrResultQuestions[j]) === null || _arrResultQuestions$j6 === void 0 ? void 0 : (_arrResultQuestions$j7 = _arrResultQuestions$j6.avgOfStudentChoice) === null || _arrResultQuestions$j7 === void 0 ? void 0 : _arrResultQuestions$j7.toFixed(1)) * 100 + "%", left + (resultQuestion === null || resultQuestion === void 0 ? void 0 : resultQuestion.length) * 3 + 12, LINE + 10);
31127
- LINE += 11;
31193
+ if (resultQuestion != "") {
31194
+ var _arrResultQuestions$j13, _arrResultQuestions$j14;
31128
31195
 
31129
- if (LINE > lineOptionConference) {
31130
- lineOptionConference = LINE;
31196
+ doc.setFont("Helvetica", "normal", "bold");
31197
+ doc.text((resultQuestion.toLowerCase().includes("how productive") ? "Productive" : resultQuestion) + ":", left + 5, LINE + 10);
31198
+ doc.setFont("Helvetica", "normal", "normal");
31199
+ doc.text("" + ((_arrResultQuestions$j13 = arrResultQuestions[j]) === null || _arrResultQuestions$j13 === void 0 ? void 0 : (_arrResultQuestions$j14 = _arrResultQuestions$j13.avgOfStudentChoice) === null || _arrResultQuestions$j14 === void 0 ? void 0 : _arrResultQuestions$j14.toFixed(1)) + (resultQuestion.toLowerCase().includes("grade") ? "" : "%"), left + 12 + (resultQuestion.toLowerCase().includes("how productive") ? 32 : (resultQuestion === null || resultQuestion === void 0 ? void 0 : resultQuestion.length) * 3), LINE + 10);
31200
+ LINE += 10;
31201
+
31202
+ if (LINE > lineOptionClassReflection) {
31203
+ lineOptionClassReflection = LINE;
31204
+ }
31131
31205
  }
31132
31206
  }
31133
31207
  }
31134
31208
 
31135
31209
  left += 100;
31136
31210
 
31137
- if (left + 105 > WIDTH_PAPER && (((_chartDataConference$2 = chartDataConference.overviewQuestionChoice[i + 1]) === null || _chartDataConference$2 === void 0 ? void 0 : (_chartDataConference$3 = _chartDataConference$2.resultQuestion[0]) === null || _chartDataConference$3 === void 0 ? void 0 : _chartDataConference$3.questionId) != 0 || ((_chartDataConference$4 = chartDataConference.overviewQuestionChoice[i + 1]) === null || _chartDataConference$4 === void 0 ? void 0 : (_chartDataConference$5 = _chartDataConference$4.resultQuestion[0]) === null || _chartDataConference$5 === void 0 ? void 0 : _chartDataConference$5.questionText) != "")) {
31211
+ if (left + 105 > WIDTH_PAPER && chartDataClassReflection.overviewQuestionChoice[i + 1].resultQuestion[0].questionId != 0) {
31138
31212
  ;
31139
- left = 20, line = lineOptionConference + 20;
31213
+ left = 20, line = lineOptionClassReflection + 20;
31140
31214
  } else {
31141
31215
  LINE = line;
31142
31216
  }
31143
31217
 
31144
- var _temp5 = function () {
31218
+ var _temp22 = function () {
31145
31219
  if (line + 100 > HEIGHT_PAPER) {
31146
31220
  doc.addPage();
31147
31221
  return Promise.resolve(createImageHeader()).then(function () {
@@ -31151,177 +31225,107 @@ var OverviewToPDF = function OverviewToPDF(props) {
31151
31225
  }
31152
31226
  }();
31153
31227
 
31154
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
31155
- });
31156
-
31157
- return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
31158
- });
31159
- });
31160
- }
31161
-
31162
- doc.setFontSize(8);
31163
- var i = 0;
31164
-
31165
- var _temp12 = _for(function () {
31166
- var _chartDataClassReflec;
31167
-
31168
- return i < ((_chartDataClassReflec = chartDataClassReflection.overviewQuestionChoice) === null || _chartDataClassReflec === void 0 ? void 0 : _chartDataClassReflec.length);
31169
- }, function () {
31170
- return i++;
31171
- }, function () {
31172
- var LINE = line;
31173
-
31174
- var _temp4 = function () {
31175
- if (chartDataClassReflection.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
31176
- var arrResultQuestions = chartDataClassReflection.overviewQuestionChoice[i].resultQuestion;
31177
- doc.setFontSize(12);
31178
- doc.setFont("Helvetica", "normal", "bold");
31179
- doc.text(chartDataClassReflection.overviewQuestionChoice[i].month, left, LINE);
31180
- doc.setFontSize(8);
31181
-
31182
- for (var j = 0; j < (arrResultQuestions === null || arrResultQuestions === void 0 ? void 0 : arrResultQuestions.length); j++) {
31183
- var _arrResultQuestions$j8;
31184
-
31185
- if (((_arrResultQuestions$j8 = arrResultQuestions[j]) === null || _arrResultQuestions$j8 === void 0 ? void 0 : _arrResultQuestions$j8.avgOfStudentChoice) != 0) {
31186
- var _arrResultQuestions$j9, _arrResultQuestions$j10, _arrResultQuestions$j11, _arrResultQuestions$j12;
31187
-
31188
- var resultQuestion = (_arrResultQuestions$j9 = arrResultQuestions[j]) !== null && _arrResultQuestions$j9 !== void 0 && _arrResultQuestions$j9.questionText.includes("<p>") ? (_arrResultQuestions$j10 = arrResultQuestions[j]) === null || _arrResultQuestions$j10 === void 0 ? void 0 : _arrResultQuestions$j10.questionText.slice(3, (_arrResultQuestions$j11 = arrResultQuestions[j]) === null || _arrResultQuestions$j11 === void 0 ? void 0 : _arrResultQuestions$j11.questionText.indexOf("</p>")) : ((_arrResultQuestions$j12 = arrResultQuestions[j]) === null || _arrResultQuestions$j12 === void 0 ? void 0 : _arrResultQuestions$j12.questionText) || "";
31189
-
31190
- if (resultQuestion != "") {
31191
- var _arrResultQuestions$j13, _arrResultQuestions$j14;
31192
-
31193
- doc.setFont("Helvetica", "normal", "bold");
31194
- doc.text((resultQuestion.toLowerCase().includes("how productive") ? "Productive" : resultQuestion) + ":", left + 5, LINE + 10);
31195
- doc.setFont("Helvetica", "normal", "normal");
31196
- doc.text("" + ((_arrResultQuestions$j13 = arrResultQuestions[j]) === null || _arrResultQuestions$j13 === void 0 ? void 0 : (_arrResultQuestions$j14 = _arrResultQuestions$j13.avgOfStudentChoice) === null || _arrResultQuestions$j14 === void 0 ? void 0 : _arrResultQuestions$j14.toFixed(1)) + (resultQuestion.toLowerCase().includes("grade") ? "" : "%"), left + 12 + (resultQuestion.toLowerCase().includes("how productive") ? 32 : (resultQuestion === null || resultQuestion === void 0 ? void 0 : resultQuestion.length) * 3), LINE + 10);
31197
- LINE += 10;
31198
-
31199
- if (LINE > lineOptionClassReflection) {
31200
- lineOptionClassReflection = LINE;
31201
- }
31202
- }
31203
- }
31228
+ if (_temp22 && _temp22.then) return _temp22.then(function () {});
31204
31229
  }
31230
+ }();
31205
31231
 
31206
- left += 100;
31207
-
31208
- if (left + 105 > WIDTH_PAPER && chartDataClassReflection.overviewQuestionChoice[i + 1].resultQuestion[0].questionId != 0) {
31209
- ;
31210
- left = 20, line = lineOptionClassReflection + 20;
31211
- } else {
31212
- LINE = line;
31213
- }
31232
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
31233
+ });
31214
31234
 
31215
- var _temp22 = function () {
31216
- if (line + 100 > HEIGHT_PAPER) {
31217
- doc.addPage();
31218
- return Promise.resolve(createImageHeader()).then(function () {
31219
- line = 85;
31220
- left = 20;
31221
- });
31222
- }
31223
- }();
31235
+ return _temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12);
31236
+ });
31237
+ });
31238
+ }
31224
31239
 
31225
- if (_temp22 && _temp22.then) return _temp22.then(function () {});
31226
- }
31227
- }();
31240
+ doc.setFont("Helvetica", "normal", "normal");
31241
+ left = 20;
31242
+ line = lineOptionOneToOne + 30;
31228
31243
 
31229
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
31244
+ var _temp14 = function () {
31245
+ if (line + 200 > HEIGHT_PAPER) {
31246
+ doc.addPage();
31247
+ return Promise.resolve(createImageHeader()).then(function () {
31248
+ line = 80;
31230
31249
  });
31250
+ }
31251
+ }();
31231
31252
 
31232
- return _temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12);
31233
- });
31234
- });
31253
+ return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
31235
31254
  }
31236
31255
 
31237
- doc.setFont("Helvetica", "normal", "normal");
31238
31256
  left = 20;
31239
- line = lineOptionOneToOne + 30;
31240
-
31241
- var _temp14 = function () {
31242
- if (line + 200 > HEIGHT_PAPER) {
31243
- doc.addPage();
31244
- return Promise.resolve(createImageHeader()).then(function () {
31245
- line = 80;
31246
- });
31247
- }
31248
- }();
31257
+ var lineOptionOneToOne = line;
31258
+ var i = 0;
31249
31259
 
31250
- return _temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14);
31251
- }
31260
+ var _temp16 = _for(function () {
31261
+ var _chartOneToOneData$ov;
31252
31262
 
31253
- left = 20;
31254
- var lineOptionOneToOne = line;
31255
- var i = 0;
31263
+ return i < ((_chartOneToOneData$ov = chartOneToOneData.overviewQuestionChoice) === null || _chartOneToOneData$ov === void 0 ? void 0 : _chartOneToOneData$ov.length);
31264
+ }, function () {
31265
+ return i++;
31266
+ }, function () {
31267
+ var LINE = line;
31256
31268
 
31257
- var _temp16 = _for(function () {
31258
- var _chartOneToOneData$ov;
31259
-
31260
- return i < ((_chartOneToOneData$ov = chartOneToOneData.overviewQuestionChoice) === null || _chartOneToOneData$ov === void 0 ? void 0 : _chartOneToOneData$ov.length);
31261
- }, function () {
31262
- return i++;
31263
- }, function () {
31264
- var LINE = line;
31265
-
31266
- var _temp2 = function () {
31267
- if (chartOneToOneData.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
31268
- var arrResultQuestions = chartOneToOneData.overviewQuestionChoice[i].resultQuestion;
31269
- doc.setFontSize(12);
31270
- doc.setFont("Helvetica", "normal", "bold");
31271
- doc.text(chartOneToOneData.overviewQuestionChoice[i].month, left, LINE);
31272
- doc.setFontSize(8);
31269
+ var _temp2 = function () {
31270
+ if (chartOneToOneData.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
31271
+ var arrResultQuestions = chartOneToOneData.overviewQuestionChoice[i].resultQuestion;
31272
+ doc.setFontSize(12);
31273
+ doc.setFont("Helvetica", "normal", "bold");
31274
+ doc.text(chartOneToOneData.overviewQuestionChoice[i].month, left, LINE);
31275
+ doc.setFontSize(8);
31273
31276
 
31274
- for (var j = 0; j < (arrResultQuestions === null || arrResultQuestions === void 0 ? void 0 : arrResultQuestions.length); j++) {
31275
- var _arrResultQuestions$j15;
31277
+ for (var j = 0; j < (arrResultQuestions === null || arrResultQuestions === void 0 ? void 0 : arrResultQuestions.length); j++) {
31278
+ var _arrResultQuestions$j15;
31276
31279
 
31277
- if (((_arrResultQuestions$j15 = arrResultQuestions[j]) === null || _arrResultQuestions$j15 === void 0 ? void 0 : _arrResultQuestions$j15.avgOfStudentChoice) != 0) {
31278
- var _arrResultQuestions$j16, _arrResultQuestions$j17;
31280
+ if (((_arrResultQuestions$j15 = arrResultQuestions[j]) === null || _arrResultQuestions$j15 === void 0 ? void 0 : _arrResultQuestions$j15.avgOfStudentChoice) != 0) {
31281
+ var _arrResultQuestions$j16, _arrResultQuestions$j17;
31279
31282
 
31280
- var resultQuestion = ((_arrResultQuestions$j16 = arrResultQuestions[j]) === null || _arrResultQuestions$j16 === void 0 ? void 0 : _arrResultQuestions$j16.questionText.slice(3, (_arrResultQuestions$j17 = arrResultQuestions[j]) === null || _arrResultQuestions$j17 === void 0 ? void 0 : _arrResultQuestions$j17.questionText.indexOf("</p>"))) || "";
31283
+ var resultQuestion = ((_arrResultQuestions$j16 = arrResultQuestions[j]) === null || _arrResultQuestions$j16 === void 0 ? void 0 : _arrResultQuestions$j16.questionText.slice(3, (_arrResultQuestions$j17 = arrResultQuestions[j]) === null || _arrResultQuestions$j17 === void 0 ? void 0 : _arrResultQuestions$j17.questionText.indexOf("</p>"))) || "";
31281
31284
 
31282
- if (resultQuestion != "") {
31283
- var _arrResultQuestions$j18, _arrResultQuestions$j19;
31285
+ if (resultQuestion != "") {
31286
+ var _arrResultQuestions$j18, _arrResultQuestions$j19;
31284
31287
 
31285
- doc.setFont("Helvetica", "normal", "bold");
31286
- doc.text(resultQuestion + ":", left + 5, LINE + 10);
31287
- doc.setFont("Helvetica", "normal", "normal");
31288
- doc.text(((_arrResultQuestions$j18 = arrResultQuestions[j]) === null || _arrResultQuestions$j18 === void 0 ? void 0 : (_arrResultQuestions$j19 = _arrResultQuestions$j18.avgOfStudentChoice) === null || _arrResultQuestions$j19 === void 0 ? void 0 : _arrResultQuestions$j19.toFixed(1)) + "%", left + (resultQuestion === null || resultQuestion === void 0 ? void 0 : resultQuestion.length) * 2.5 + 17, LINE + 10);
31289
- LINE += 10;
31288
+ doc.setFont("Helvetica", "normal", "bold");
31289
+ doc.text(resultQuestion + ":", left + 5, LINE + 10);
31290
+ doc.setFont("Helvetica", "normal", "normal");
31291
+ doc.text(((_arrResultQuestions$j18 = arrResultQuestions[j]) === null || _arrResultQuestions$j18 === void 0 ? void 0 : (_arrResultQuestions$j19 = _arrResultQuestions$j18.avgOfStudentChoice) === null || _arrResultQuestions$j19 === void 0 ? void 0 : _arrResultQuestions$j19.toFixed(1)) + "%", left + (resultQuestion === null || resultQuestion === void 0 ? void 0 : resultQuestion.length) * 2.5 + 17, LINE + 10);
31292
+ LINE += 10;
31290
31293
 
31291
- if (LINE > lineOptionOneToOne) {
31292
- lineOptionOneToOne = LINE;
31294
+ if (LINE > lineOptionOneToOne) {
31295
+ lineOptionOneToOne = LINE;
31296
+ }
31293
31297
  }
31294
31298
  }
31295
31299
  }
31296
- }
31297
-
31298
- left += 100;
31299
31300
 
31300
- if (left + 105 > WIDTH_PAPER) {
31301
- ;
31302
- left = 20, line = lineOptionOneToOne + 20;
31303
- } else {
31304
- LINE = line;
31305
- }
31301
+ left += 100;
31306
31302
 
31307
- var _temp23 = function () {
31308
- if (line + 150 > HEIGHT_PAPER) {
31309
- doc.addPage();
31310
- return Promise.resolve(createImageHeader()).then(function () {
31311
- line = 85;
31312
- left = 20;
31313
- });
31303
+ if (left + 105 > WIDTH_PAPER) {
31304
+ ;
31305
+ left = 20, line = lineOptionOneToOne + 20;
31306
+ } else {
31307
+ LINE = line;
31314
31308
  }
31315
- }();
31316
31309
 
31317
- if (_temp23 && _temp23.then) return _temp23.then(function () {});
31318
- }
31319
- }();
31310
+ var _temp23 = function () {
31311
+ if (line + 150 > HEIGHT_PAPER) {
31312
+ doc.addPage();
31313
+ return Promise.resolve(createImageHeader()).then(function () {
31314
+ line = 85;
31315
+ left = 20;
31316
+ });
31317
+ }
31318
+ }();
31320
31319
 
31321
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
31322
- });
31320
+ if (_temp23 && _temp23.then) return _temp23.then(function () {});
31321
+ }
31322
+ }();
31323
31323
 
31324
- return _temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16);
31324
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
31325
+ });
31326
+
31327
+ return _temp16 && _temp16.then ? _temp16.then(_temp17) : _temp17(_temp16);
31328
+ });
31325
31329
  });
31326
31330
  });
31327
31331
  });
@@ -47959,151 +47963,6 @@ var ChangePassword = function ChangePassword() {
47959
47963
  });
47960
47964
  };
47961
47965
 
47962
- var useStageDebug = function useStageDebug(userId, year, month) {
47963
- var dispatch = reactRedux.useDispatch();
47964
- var history = reactRouterDom.useHistory();
47965
-
47966
- var _useState = React.useState(),
47967
- dataEvent = _useState[0],
47968
- setDataEvent = _useState[1];
47969
-
47970
- var getDataEvent = React.useCallback(function () {
47971
- try {
47972
- var _temp2 = _catch(function () {
47973
- return Promise.resolve(getEventCalendar(userId, year, month)).then(function (res) {
47974
- setDataEvent(res.data);
47975
- });
47976
- }, function (err) {
47977
- var _err$response, _err$response$data;
47978
-
47979
- dispatch(marioCore.setAlert({
47980
- type: "danger",
47981
- 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
47982
- }));
47983
- });
47984
-
47985
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
47986
- } catch (e) {
47987
- return Promise.reject(e);
47988
- }
47989
- }, []);
47990
-
47991
- var initPage = function initPage() {
47992
- try {
47993
- var _temp5 = function _temp5() {
47994
- return Promise.resolve(getDataEvent()).then(function () {});
47995
- };
47996
-
47997
- var _temp6 = function () {
47998
- if (!!userId) return Promise.resolve(checkAuthentication()).then(function () {});
47999
- }();
48000
-
48001
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp5) : _temp5(_temp6));
48002
- } catch (e) {
48003
- return Promise.reject(e);
48004
- }
48005
- };
48006
-
48007
- var checkAuthentication = function checkAuthentication() {
48008
- try {
48009
- var _temp8 = _catch(function () {
48010
- return Promise.resolve(marioCore.firstCheckToken()).then(function (tokenStatus) {
48011
- tokenStatus ? loadInfo() : resetAuth();
48012
- });
48013
- }, function () {
48014
- resetAuth();
48015
- });
48016
-
48017
- return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
48018
- } catch (e) {
48019
- return Promise.reject(e);
48020
- }
48021
- };
48022
-
48023
- var loadInfo = function loadInfo() {
48024
- try {
48025
- var _temp12 = _catch(function () {
48026
- return Promise.resolve(marioCore.getInfo()).then(function (info) {
48027
- var _info$data;
48028
-
48029
- function _temp10() {
48030
- dispatch(marioCore.setUser(userData));
48031
- }
48032
-
48033
- if (!info) {
48034
- resetAuth();
48035
- }
48036
-
48037
- var roles = (_info$data = info.data) === null || _info$data === void 0 ? void 0 : _info$data.roles;
48038
- var userData = info.data;
48039
- var isTeacher = roles.includes("Teacher");
48040
- var isStudent = roles.includes("Student");
48041
-
48042
- var _temp9 = function () {
48043
- if (isTeacher || isStudent) {
48044
- return Promise.resolve(getStudentSimpleProfile()).then(function (profileRes) {
48045
- var _profileRes$data7;
48046
-
48047
- if (isStudent) {
48048
- var _profileRes$data, _profileRes$data2, _profileRes$data3, _profileRes$data4, _profileRes$data5;
48049
-
48050
- userData.studentId = (_profileRes$data = profileRes.data) === null || _profileRes$data === void 0 ? void 0 : _profileRes$data.id;
48051
- userData.mainTeacherId = (_profileRes$data2 = profileRes.data) === null || _profileRes$data2 === void 0 ? void 0 : _profileRes$data2.mainTeacherId;
48052
- userData.mainTeacherName = (_profileRes$data3 = profileRes.data) === null || _profileRes$data3 === void 0 ? void 0 : _profileRes$data3.mainTeacherName;
48053
- userData.mainTeacherUserId = (_profileRes$data4 = profileRes.data) === null || _profileRes$data4 === void 0 ? void 0 : _profileRes$data4.mainTeacherUserId;
48054
- userData.mainTeacherProfileImageFileName = (_profileRes$data5 = profileRes.data) === null || _profileRes$data5 === void 0 ? void 0 : _profileRes$data5.mainTeacherProfileImageFileName;
48055
- } else {
48056
- var _profileRes$data6;
48057
-
48058
- userData.teacherId = (_profileRes$data6 = profileRes.data) === null || _profileRes$data6 === void 0 ? void 0 : _profileRes$data6.id;
48059
- }
48060
-
48061
- userData.name = (_profileRes$data7 = profileRes.data) === null || _profileRes$data7 === void 0 ? void 0 : _profileRes$data7.name;
48062
- });
48063
- }
48064
- }();
48065
-
48066
- return _temp9 && _temp9.then ? _temp9.then(_temp10) : _temp10(_temp9);
48067
- });
48068
- }, function () {
48069
- resetAuth();
48070
- });
48071
-
48072
- return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
48073
- } catch (e) {
48074
- return Promise.reject(e);
48075
- }
48076
- };
48077
-
48078
- var resetAuth = function resetAuth() {
48079
- localStorage.removeItem(marioCore.ACCESS_TOKEN);
48080
- history.push("/");
48081
- };
48082
-
48083
- React.useEffect(function () {
48084
- initPage();
48085
- }, []);
48086
- return {
48087
- dataEvent: dataEvent
48088
- };
48089
- };
48090
-
48091
- var StageDebugPage = function StageDebugPage() {
48092
- var currentYear = parseInt(moment().format("YYYY"));
48093
- var currentMonth = parseInt(moment().format("MM"));
48094
- var user = reactRedux.useSelector(function (state) {
48095
- return state.common.user;
48096
- });
48097
-
48098
- var _useStageDebug = useStageDebug(user, currentYear, currentMonth),
48099
- dataEvent = _useStageDebug.dataEvent;
48100
-
48101
- return React__default.createElement(CurrentFullCalendar, {
48102
- eventList: dataEvent === null || dataEvent === void 0 ? void 0 : dataEvent.calendarEvents,
48103
- isTeacher: true
48104
- });
48105
- };
48106
-
48107
47966
  var LearningPlan$1 = function LearningPlan() {
48108
47967
  var _useState = React.useState(''),
48109
47968
  value = _useState[0],
@@ -52956,7 +52815,7 @@ var AddNote = function AddNote() {
52956
52815
  })), React__default.createElement("div", {
52957
52816
  className: "" + styles$z["input-note"]
52958
52817
  }, React__default.createElement(InputComponent, {
52959
- name: "type_a_note",
52818
+ name: t("type_a_note"),
52960
52819
  placeholder: t("type_a_note"),
52961
52820
  valueText: note,
52962
52821
  onChange: function onChange(e) {
@@ -57774,7 +57633,7 @@ var DoneList = function DoneList() {
57774
57633
 
57775
57634
  var tabs$2 = [{
57776
57635
  path: "/action-point/to-do",
57777
- title: "To-do",
57636
+ title: "To do",
57778
57637
  component: TodoList
57779
57638
  }, {
57780
57639
  path: "/action-point/done",
@@ -71732,7 +71591,6 @@ exports.ResultReflection = ResultReflection;
71732
71591
  exports.SessionDetail = SessionDetail;
71733
71592
  exports.SessionResultComponent = SessionResultComponent;
71734
71593
  exports.SettingPage = SettingPage;
71735
- exports.StageDebugPage = StageDebugPage;
71736
71594
  exports.StartReflection = StartReflection;
71737
71595
  exports.StudentDetail = StudentDetail;
71738
71596
  exports.StudentReflection = StudentReflection;