mario-education 2.4.31-admin → 2.4.35-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.
@@ -19879,9 +19879,9 @@ var useBehavior = function useBehavior(initialTypeChart) {
19879
19879
  teacherUserId = _useState[0],
19880
19880
  setTeacherUserId = _useState[1];
19881
19881
 
19882
- var _useState2 = useState(initialTypeChart.map(function () {
19882
+ var _useState2 = useState([true].concat(initialTypeChart.map(function () {
19883
19883
  return false;
19884
- })),
19884
+ }).splice(0, initialTypeChart.length - 2))),
19885
19885
  chartIsOpened = _useState2[0],
19886
19886
  setChartIsOpened = _useState2[1];
19887
19887
 
@@ -19895,7 +19895,7 @@ var useBehavior = function useBehavior(initialTypeChart) {
19895
19895
  setChartIsOpened(newStateChart);
19896
19896
  };
19897
19897
 
19898
- var onChangeChart = function onChangeChart(idx, type) {
19898
+ var onChangeChart = function onChangeChart(idx, type, options) {
19899
19899
  switch (type) {
19900
19900
  case TYPECHART.AREA:
19901
19901
  if (typeChartList[idx] === TYPECHART.BAR || typeChartList[idx] === TYPECHART.LINE) {
@@ -19907,7 +19907,7 @@ var useBehavior = function useBehavior(initialTypeChart) {
19907
19907
 
19908
19908
  if (typeChartList[idx] === TYPECHART.BOTH) {
19909
19909
  setTypeChartList(typeChartList.map(function (cur, index) {
19910
- return index === idx ? initialTypeChart[idx] : cur;
19910
+ return index === idx ? options[1].value : cur;
19911
19911
  }));
19912
19912
  }
19913
19913
 
@@ -25727,7 +25727,7 @@ var gradeOptions = function gradeOptions(grades, studentUserId) {
25727
25727
  };
25728
25728
  });
25729
25729
  };
25730
- var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames, usageCountList) {
25730
+ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames, usageCountList, screenWidth) {
25731
25731
  return {
25732
25732
  chart: {
25733
25733
  type: "bar",
@@ -25784,7 +25784,7 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
25784
25784
  show: true,
25785
25785
  align: "left",
25786
25786
  minWidth: 0,
25787
- maxWidth: 120,
25787
+ maxWidth: screenWidth,
25788
25788
  style: {
25789
25789
  colors: [],
25790
25790
  fontSize: "14px",
@@ -26626,9 +26626,6 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
26626
26626
  _ref$isHasLineChart = _ref.isHasLineChart,
26627
26627
  isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
26628
26628
  var newseries = mergeBarChartAndArea(series, isHasLineChart);
26629
- console.log({
26630
- newseries: newseries
26631
- });
26632
26629
  return React.createElement(Chart, {
26633
26630
  options: optionBarChartAndArea(months, activeColumn, newseries),
26634
26631
  series: newseries,
@@ -26660,7 +26657,8 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
26660
26657
  activeColumn = _ref.activeColumn,
26661
26658
  series = _ref.series,
26662
26659
  avg = _ref.avg,
26663
- months = _ref.months;
26660
+ months = _ref.months,
26661
+ isPDF = _ref.isPDF;
26664
26662
  if (!data) return React.createElement("div", {
26665
26663
  className: "flex justify-content-center align-items-center",
26666
26664
  style: {
@@ -26669,7 +26667,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
26669
26667
  }, React.createElement("div", null, "No Data"));
26670
26668
  return React.createElement("div", {
26671
26669
  className: "w-100 h-100 " + styles$1["column-chart-percent"]
26672
- }, React.createElement("div", {
26670
+ }, !isPDF && React.createElement("div", {
26673
26671
  className: "w-full d-flex gap-2 flex-wrap " + styles$1["listItem"]
26674
26672
  }, data.map(function (month, index) {
26675
26673
  return React.createElement("div", {
@@ -26717,7 +26715,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
26717
26715
  months: months,
26718
26716
  activeColumn: activeColumn,
26719
26717
  series: series
26720
- })), React.createElement("div", {
26718
+ })), !isPDF && React.createElement("div", {
26721
26719
  className: "w-100 d-flex gap-2 flex-wrap " + styles$1["listItem"]
26722
26720
  }, data.map(function (month, index) {
26723
26721
  return React.createElement("div", {
@@ -26926,16 +26924,17 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
26926
26924
  });
26927
26925
  var maxData = Math.max.apply(Math, usageCount);
26928
26926
  var serieslearningStrategy = [{
26929
- name: "Usage Point",
26927
+ name: "Perceived Usage",
26930
26928
  data: learningStrategies === null || learningStrategies === void 0 ? void 0 : learningStrategies.map(function (i) {
26931
26929
  return average(i.usagePoint);
26932
26930
  })
26933
26931
  }, {
26934
- name: "Usage Count",
26932
+ name: "Total Number of Times Selected",
26935
26933
  data: learningStrategies === null || learningStrategies === void 0 ? void 0 : learningStrategies.map(function (i) {
26936
26934
  return i.usageCount / maxData * 100;
26937
26935
  })
26938
26936
  }];
26937
+ var screenWidth = (window.innerWidth - 256) / 100 * 30;
26939
26938
  return React.createElement("div", {
26940
26939
  className: "h-100 w-100 " + styles$1["chart-background"]
26941
26940
  }, React.createElement("div", {
@@ -26943,7 +26942,7 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
26943
26942
  }, serieslearningStrategy.some(function (i) {
26944
26943
  return i.data;
26945
26944
  }) ? React.createElement(Chart, {
26946
- options: learningStrategyChartOptions(labelNames, usageCount),
26945
+ options: learningStrategyChartOptions(labelNames, usageCount, screenWidth),
26947
26946
  series: serieslearningStrategy,
26948
26947
  type: "bar",
26949
26948
  width: "100%",
@@ -27162,12 +27161,14 @@ var useDashboard = function useDashboard() {
27162
27161
  };
27163
27162
 
27164
27163
  useEffect(function () {
27165
- setSeriesOneToOne(newSeriesOneToOne);
27166
- setActiveColumnOneToOne(dataConvertedOneToOne.map(function (_i) {
27167
- return true;
27168
- }));
27164
+ setActiveColumnOneToOne([true].concat(dataConvertedOneToOne.map(function (_i) {
27165
+ return false;
27166
+ }).splice(0, dataConvertedOneToOne.length - 2)));
27169
27167
  setAvgOneToOne(newAvgOneToOne === null || newAvgOneToOne === void 0 ? void 0 : newAvgOneToOne.map(function (_, index) {
27170
- return newAvgOneToOne[index];
27168
+ return activeColumnOneToOne[index] ? newAvgOneToOne[index] : 0;
27169
+ }));
27170
+ setSeriesOneToOne(newSeriesOneToOne === null || newSeriesOneToOne === void 0 ? void 0 : newSeriesOneToOne.filter(function (_, idx) {
27171
+ return activeColumnOneToOne[idx];
27171
27172
  }));
27172
27173
  }, [chartOneToOneData.overviewQuestionChoice]);
27173
27174
 
@@ -27203,12 +27204,14 @@ var useDashboard = function useDashboard() {
27203
27204
  };
27204
27205
 
27205
27206
  useEffect(function () {
27206
- setSeriesClassReflection(newSeriesClassReflection);
27207
- setActiveColumnClassReflection(dataConvertedClassReflection.map(function (_i) {
27208
- return true;
27207
+ setSeriesClassReflection(newSeriesClassReflection === null || newSeriesClassReflection === void 0 ? void 0 : newSeriesClassReflection.filter(function (_, idx) {
27208
+ return activeColumnClassReflection[idx];
27209
27209
  }));
27210
+ setActiveColumnClassReflection([true].concat(dataConvertedClassReflection.map(function (_i) {
27211
+ return false;
27212
+ }).splice(0, dataConvertedClassReflection.length - 2)));
27210
27213
  setAvgClassReflection(newAvgClassReflection === null || newAvgClassReflection === void 0 ? void 0 : newAvgClassReflection.map(function (_, index) {
27211
- return newAvgClassReflection[index];
27214
+ return activeColumnClassReflection[index] ? newAvgClassReflection[index] : 0;
27212
27215
  }));
27213
27216
  }, [chartClassReflection.overviewQuestionChoice]);
27214
27217
 
@@ -27244,12 +27247,14 @@ var useDashboard = function useDashboard() {
27244
27247
  };
27245
27248
 
27246
27249
  useEffect(function () {
27247
- setSeriesConference(newSeriesConference);
27248
- setActiveColumnConference(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
27249
- return true;
27250
+ setSeriesConference(newSeriesConference === null || newSeriesConference === void 0 ? void 0 : newSeriesConference.filter(function (_, idx) {
27251
+ return activeColumnConference[idx];
27250
27252
  }));
27253
+ setActiveColumnConference([true].concat(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
27254
+ return false;
27255
+ }).splice(0, dataConvertedConference.length - 2)));
27251
27256
  setAvgConference(newAvgConference === null || newAvgConference === void 0 ? void 0 : newAvgConference.map(function (_, idx) {
27252
- return newAvgConference[idx];
27257
+ return activeColumnConference[idx] ? newAvgConference[idx] : 0;
27253
27258
  }));
27254
27259
  }, [chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice]);
27255
27260
 
@@ -27596,21 +27601,21 @@ var useChartDatas = function useChartDatas() {
27596
27601
  studentId: filter.studentId
27597
27602
  }];
27598
27603
  var chartDashBoards = [{
27599
- id: "high_impact_learning_strategie",
27600
- label: "High Impact Learning Strategie",
27604
+ id: "readiness_to_learn",
27605
+ label: "Readiness to Learn",
27601
27606
  children: function children(_) {
27602
- return React.createElement(TopLearningStrategy$1, {
27603
- data: topLearningStrategies
27607
+ return React.createElement(BubbleChartCustom$1, {
27608
+ data: readinessToLearning
27604
27609
  });
27605
27610
  },
27606
27611
  isShowChangeChart: false,
27607
27612
  options: []
27608
27613
  }, {
27609
- id: "readiness_to_learn",
27610
- label: "Readiness to learn",
27614
+ id: "high_impact_learning_strategie",
27615
+ label: "High Impact Learning Strategies",
27611
27616
  children: function children(_) {
27612
- return React.createElement(BubbleChartCustom$1, {
27613
- data: readinessToLearning
27617
+ return React.createElement(TopLearningStrategy$1, {
27618
+ data: topLearningStrategies
27614
27619
  });
27615
27620
  },
27616
27621
  isShowChangeChart: false,
@@ -27618,7 +27623,7 @@ var useChartDatas = function useChartDatas() {
27618
27623
  }, {
27619
27624
  id: "1_to_1",
27620
27625
  label: "1 To 1",
27621
- children: function children(typeChart) {
27626
+ children: function children(typeChart, isPDF) {
27622
27627
  return React.createElement(ColumnChartAndPercent$1, {
27623
27628
  data: dataConvertedOneToOne,
27624
27629
  id: "1_to_1",
@@ -27627,7 +27632,8 @@ var useChartDatas = function useChartDatas() {
27627
27632
  activeColumn: activeColumnOneToOne,
27628
27633
  series: seriesOneToOne,
27629
27634
  avg: avgOneToOne,
27630
- months: monthsOneToOne
27635
+ months: monthsOneToOne,
27636
+ isPDF: isPDF
27631
27637
  });
27632
27638
  },
27633
27639
  isShowChangeChart: true,
@@ -27641,7 +27647,7 @@ var useChartDatas = function useChartDatas() {
27641
27647
  }, {
27642
27648
  id: "class_reflection",
27643
27649
  label: "Class Reflection",
27644
- children: function children(typeChart) {
27650
+ children: function children(typeChart, isPDF) {
27645
27651
  return React.createElement(ColumnChartAndPercent$1, {
27646
27652
  data: dataConvertedClassReflection,
27647
27653
  typeChart: typeChart,
@@ -27651,7 +27657,8 @@ var useChartDatas = function useChartDatas() {
27651
27657
  activeColumn: activeColumnClassReflection,
27652
27658
  series: seriesClassRefection,
27653
27659
  avg: avgClassReflection,
27654
- months: monthsClassReflection
27660
+ months: monthsClassReflection,
27661
+ isPDF: isPDF
27655
27662
  });
27656
27663
  },
27657
27664
  isShowChangeChart: true,
@@ -27665,7 +27672,7 @@ var useChartDatas = function useChartDatas() {
27665
27672
  }, {
27666
27673
  id: "conference",
27667
27674
  label: "Conference",
27668
- children: function children(typeChart) {
27675
+ children: function children(typeChart, isPDF) {
27669
27676
  return React.createElement(ColumnChartAndPercent$1, {
27670
27677
  data: dataConvertedConference,
27671
27678
  typeChart: typeChart,
@@ -27674,7 +27681,8 @@ var useChartDatas = function useChartDatas() {
27674
27681
  activeColumn: activeColumnConference,
27675
27682
  series: seriesConference,
27676
27683
  avg: avgConference,
27677
- months: monthsConference
27684
+ months: monthsConference,
27685
+ isPDF: isPDF
27678
27686
  });
27679
27687
  },
27680
27688
  isShowChangeChart: true,
@@ -27688,7 +27696,7 @@ var useChartDatas = function useChartDatas() {
27688
27696
  }, {
27689
27697
  id: "safety",
27690
27698
  label: "Safety",
27691
- children: function children(typeChart) {
27699
+ children: function children(typeChart, isPDF) {
27692
27700
  return React.createElement(ColumnChartAndPercent$1, {
27693
27701
  data: dataConvertedSafety,
27694
27702
  typeChart: typeChart,
@@ -27698,7 +27706,8 @@ var useChartDatas = function useChartDatas() {
27698
27706
  activeColumn: activeColumnSafety,
27699
27707
  series: seriesSafety,
27700
27708
  avg: avgSafety,
27701
- months: monthsSafety
27709
+ months: monthsSafety,
27710
+ isPDF: isPDF
27702
27711
  });
27703
27712
  },
27704
27713
  isShowChangeChart: true,
@@ -27711,7 +27720,7 @@ var useChartDatas = function useChartDatas() {
27711
27720
  }]
27712
27721
  }, {
27713
27722
  id: "Student_by_age",
27714
- label: "Student by age",
27723
+ label: "Student by Designation",
27715
27724
  children: function children(_, columnFlex) {
27716
27725
  return React.createElement(StudentByAgeAndGender$1, {
27717
27726
  columnFlex: columnFlex,
@@ -27733,7 +27742,7 @@ var useChartDatas = function useChartDatas() {
27733
27742
  options: []
27734
27743
  }];
27735
27744
  var initialTypeChart = chartDashBoards.map(function (i) {
27736
- return i.options.length > 0 ? i.options[1].value : TYPECHART.BAR;
27745
+ return i.options.length > 0 ? i.options[0].value : TYPECHART.AREA;
27737
27746
  });
27738
27747
  var totalCardData = [{
27739
27748
  icon: "images/icon_chart.png",
@@ -27788,7 +27797,19 @@ var useChartDatas = function useChartDatas() {
27788
27797
  topLearningStrategies: topLearningStrategies,
27789
27798
  chartClassReflection: chartClassReflection,
27790
27799
  chartConference: chartConference,
27791
- safety: safety
27800
+ safety: safety,
27801
+ dataConvertedOneToOne: dataConvertedOneToOne,
27802
+ activeColumnOneToOne: activeColumnOneToOne,
27803
+ avgOneToOne: avgOneToOne,
27804
+ dataConvertedClassReflection: dataConvertedClassReflection,
27805
+ activeColumnClassReflection: activeColumnClassReflection,
27806
+ avgClassReflection: avgClassReflection,
27807
+ dataConvertedConference: dataConvertedConference,
27808
+ activeColumnConference: activeColumnConference,
27809
+ avgConference: avgConference,
27810
+ dataConvertedSafety: dataConvertedSafety,
27811
+ activeColumnSafety: activeColumnSafety,
27812
+ avgSafety: avgSafety
27792
27813
  };
27793
27814
  };
27794
27815
 
@@ -28295,7 +28316,19 @@ var DashboardToPDF = function DashboardToPDF(props) {
28295
28316
  topLearningStrategies = props.topLearningStrategies,
28296
28317
  chartClassReflection = props.chartClassReflection,
28297
28318
  chartConference = props.chartConference,
28298
- safety = props.safety;
28319
+ safety = props.safety,
28320
+ dataConvertedOneToOne = props.dataConvertedOneToOne,
28321
+ activeColumnOneToOne = props.activeColumnOneToOne,
28322
+ avgOneToOne = props.avgOneToOne,
28323
+ dataConvertedClassReflection = props.dataConvertedClassReflection,
28324
+ activeColumnClassReflection = props.activeColumnClassReflection,
28325
+ avgClassReflection = props.avgClassReflection,
28326
+ dataConvertedConference = props.dataConvertedConference,
28327
+ activeColumnConference = props.activeColumnConference,
28328
+ avgConference = props.avgConference,
28329
+ dataConvertedSafety = props.dataConvertedSafety,
28330
+ activeColumnSafety = props.activeColumnSafety,
28331
+ avgSafety = props.avgSafety;
28299
28332
  var dispatch = useDispatch();
28300
28333
  var chartHightImpactLearningStrategie = selectedToPDF.find(function (i) {
28301
28334
  return i.id === "high_impact_learning_strategie";
@@ -28405,71 +28438,87 @@ var DashboardToPDF = function DashboardToPDF(props) {
28405
28438
  var _safety$overviewQuest;
28406
28439
 
28407
28440
  if (safety.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
28408
- var _sortedResultQuestion, _sortedResultQuestion2, _sortedResultQuestion3, _sortedResultQuestion4, _sortedResultQuestion5, _sortedResultQuestion6;
28441
+ var _sortedResultQuestion, _sortedResultQuestion2, _safety$overviewQuest2;
28409
28442
 
28410
28443
  var sortedResultQuestions = safety.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
28411
28444
  return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
28412
28445
  });
28413
28446
  var bestResultQuestion1 = ((_sortedResultQuestion = sortedResultQuestions[0]) === null || _sortedResultQuestion === void 0 ? void 0 : _sortedResultQuestion.questionText.slice(3, (_sortedResultQuestion2 = sortedResultQuestions[0]) === null || _sortedResultQuestion2 === void 0 ? void 0 : _sortedResultQuestion2.questionText.indexOf("</p>"))) || "";
28414
- var bestResultQuestion2 = ((_sortedResultQuestion3 = sortedResultQuestions[1]) === null || _sortedResultQuestion3 === void 0 ? void 0 : _sortedResultQuestion3.questionText.slice(3, (_sortedResultQuestion4 = sortedResultQuestions[1]) === null || _sortedResultQuestion4 === void 0 ? void 0 : _sortedResultQuestion4.questionText.indexOf("</p>"))) || "";
28415
- var bestResultQuestion3 = ((_sortedResultQuestion5 = sortedResultQuestions[2]) === null || _sortedResultQuestion5 === void 0 ? void 0 : _sortedResultQuestion5.questionText.slice(3, (_sortedResultQuestion6 = sortedResultQuestions[2]) === null || _sortedResultQuestion6 === void 0 ? void 0 : _sortedResultQuestion6.questionText.indexOf("</p>"))) || "";
28416
28447
  doc.setFont("Helvetica", "normal", "bold");
28417
28448
  doc.text(safety.overviewQuestionChoice[i].month, left, line + 20);
28418
28449
 
28419
28450
  if (bestResultQuestion1 != "") {
28420
- var _sortedResultQuestion7;
28451
+ var _sortedResultQuestion3;
28421
28452
 
28422
28453
  doc.setFont("Helvetica", "normal", "bold");
28423
28454
  doc.text(bestResultQuestion1, left + 10, line + 30);
28424
28455
  doc.setFont("Helvetica", "normal", "normal");
28425
- doc.text(((_sortedResultQuestion7 = sortedResultQuestions[0]) === null || _sortedResultQuestion7 === void 0 ? void 0 : _sortedResultQuestion7.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 4 + 15, line + 30);
28456
+ doc.text(((_sortedResultQuestion3 = sortedResultQuestions[0]) === null || _sortedResultQuestion3 === void 0 ? void 0 : _sortedResultQuestion3.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 4 + 15, line + 30);
28426
28457
  doc.setDrawColor(0);
28427
28458
  doc.setFillColor(64, 210, 204);
28428
28459
  doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
28429
28460
  }
28430
28461
 
28431
- if (bestResultQuestion2 != "") {
28432
- var _sortedResultQuestion8;
28433
-
28434
- doc.setFont("Helvetica", "normal", "bold");
28435
- doc.text(bestResultQuestion2, left + 10, line + 40);
28436
- doc.setFont("Helvetica", "normal", "normal");
28437
- doc.text(((_sortedResultQuestion8 = sortedResultQuestions[1]) === null || _sortedResultQuestion8 === void 0 ? void 0 : _sortedResultQuestion8.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 4 + 15, line + 40);
28438
- doc.setDrawColor(0);
28439
- doc.setFillColor(120, 182, 226);
28440
- doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
28441
- }
28442
-
28443
- if (bestResultQuestion3 != "") {
28444
- var _sortedResultQuestion9;
28445
-
28446
- doc.setFont("Helvetica", "normal", "bold");
28447
- doc.text(bestResultQuestion3, left + 10, line + 50);
28448
- doc.setFont("Helvetica", "normal", "normal");
28449
- doc.text(((_sortedResultQuestion9 = sortedResultQuestions[2]) === null || _sortedResultQuestion9 === void 0 ? void 0 : _sortedResultQuestion9.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 4 + 15, line + 50);
28450
- doc.setDrawColor(0);
28451
- doc.setFillColor(255, 176, 79);
28452
- doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
28453
- }
28454
-
28455
28462
  if ((bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 5 + 5 + 10 > 100) {
28456
28463
  left = left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 5 + 20;
28457
- } else if ((bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 5 + 5 + 10 > 100) {
28458
- left = left + (bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 5 + 20;
28459
- } else if ((bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 5 + 5 + 10 > 100) {
28460
- left = left + (bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 5 + 20;
28461
28464
  } else {
28462
28465
  left = left + 100;
28463
28466
  }
28464
28467
 
28465
- if (left + 80 > WIDTH_PAPER) {
28468
+ if (left + (safety === null || safety === void 0 ? void 0 : (_safety$overviewQuest2 = safety.overviewQuestionChoice[i + 1]) === null || _safety$overviewQuest2 === void 0 ? void 0 : _safety$overviewQuest2.month.length) * 20 > WIDTH_PAPER) {
28466
28469
  left = 20;
28467
- line += 60;
28470
+ line += 30;
28468
28471
  }
28469
28472
  }
28470
28473
  }
28471
28474
 
28472
- doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 170);
28475
+ doc.setFont("Helvetica", "normal", "normal");
28476
+ left = 20;
28477
+
28478
+ for (var i = 0; i < dataConvertedSafety.length; i++) {
28479
+ if (activeColumnSafety[i]) {
28480
+ doc.setDrawColor(0);
28481
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
28482
+ doc.roundedRect(left, line + 60, 5, 5, 1, 1, "F");
28483
+ doc.setTextColor("#252733");
28484
+ doc.text(dataConvertedSafety[i], left + 7, line + 65);
28485
+ } else {
28486
+ doc.setDrawColor(0);
28487
+ doc.setFillColor("#CCCCCC");
28488
+ doc.roundedRect(left, line + 60, 5, 5, 1, 1, "F");
28489
+ doc.setTextColor("#CCCCCC");
28490
+ doc.text(dataConvertedSafety[i], left + 7, line + 65);
28491
+ }
28492
+
28493
+ left = left + dataConvertedSafety[i].length * 3 + 15;
28494
+ }
28495
+
28496
+ left = 20;
28497
+ doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 70, 420, 140);
28498
+
28499
+ for (var i = 0; i < dataConvertedSafety.length; i++) {
28500
+ if (activeColumnSafety[i]) {
28501
+ doc.setDrawColor(0);
28502
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
28503
+ doc.roundedRect(left, line + 215, 5, 5, 1, 1, "F");
28504
+ doc.setTextColor("#252733");
28505
+ doc.setFont("Helvetica", "normal", "normal");
28506
+ doc.text(dataConvertedSafety[i], left + 7, line + 220);
28507
+ doc.setFont("Helvetica", "normal", "bold");
28508
+ doc.text(avgSafety[i] + "%", left, line + 227);
28509
+ } else {
28510
+ doc.setDrawColor(0);
28511
+ doc.setFillColor("#CCCCCC");
28512
+ doc.roundedRect(left, line + 215, 5, 5, 1, 1, "F");
28513
+ doc.setTextColor("#CCCCCC");
28514
+ doc.setFont("Helvetica", "normal", "normal");
28515
+ doc.text(dataConvertedSafety[i], left + 7, line + 220);
28516
+ doc.setFont("Helvetica", "normal", "bold");
28517
+ doc.text("0.00%", left, line + 227);
28518
+ }
28519
+
28520
+ left = left + dataConvertedSafety[i].length * 3 + 15;
28521
+ }
28473
28522
  });
28474
28523
  });
28475
28524
  }
@@ -28482,7 +28531,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28482
28531
  if (!!chartConferecePDF) {
28483
28532
  var _selectedToPDF4;
28484
28533
 
28485
- var line = 80;
28534
+ var line = 70;
28486
28535
  var left = 20;
28487
28536
  if (selectedToPDF.indexOf(chartConferecePDF) != 0 && ((_selectedToPDF4 = selectedToPDF[selectedToPDF.indexOf(chartConferecePDF) - 1]) === null || _selectedToPDF4 === void 0 ? void 0 : _selectedToPDF4.id) != null) doc.addPage();
28488
28537
  return Promise.resolve(createImageHeader()).then(function () {
@@ -28497,87 +28546,87 @@ var DashboardToPDF = function DashboardToPDF(props) {
28497
28546
  var _chartConference$over;
28498
28547
 
28499
28548
  if (chartConference.overviewQuestionChoice[i].resultQuestion[0].questionId != 0 || chartConference.overviewQuestionChoice[i].resultQuestion[0].questionText != "") {
28500
- var _sortedResultQuestion10, _sortedResultQuestion11, _sortedResultQuestion12, _sortedResultQuestion13, _sortedResultQuestion14, _sortedResultQuestion15;
28549
+ var _sortedResultQuestion4, _sortedResultQuestion5, _sortedResultQuestion6, _sortedResultQuestion7, _sortedResultQuestion8, _sortedResultQuestion9, _chartConference$over2;
28501
28550
 
28502
28551
  var sortedResultQuestions = chartConference.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
28503
28552
  return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
28504
28553
  });
28505
- var resultQuestion1 = ((_sortedResultQuestion10 = sortedResultQuestions[0]) === null || _sortedResultQuestion10 === void 0 ? void 0 : _sortedResultQuestion10.questionText) || "";
28506
- var resultQuestion2 = ((_sortedResultQuestion11 = sortedResultQuestions[1]) === null || _sortedResultQuestion11 === void 0 ? void 0 : _sortedResultQuestion11.questionText) || "";
28507
- var resultQuestion3 = ((_sortedResultQuestion12 = sortedResultQuestions[2]) === null || _sortedResultQuestion12 === void 0 ? void 0 : _sortedResultQuestion12.questionText) || "";
28508
- var resultQuestion4 = ((_sortedResultQuestion13 = sortedResultQuestions[3]) === null || _sortedResultQuestion13 === void 0 ? void 0 : _sortedResultQuestion13.questionText) || "";
28509
- var resultQuestion5 = ((_sortedResultQuestion14 = sortedResultQuestions[4]) === null || _sortedResultQuestion14 === void 0 ? void 0 : _sortedResultQuestion14.questionText) || "";
28510
- var resultQuestion6 = ((_sortedResultQuestion15 = sortedResultQuestions[5]) === null || _sortedResultQuestion15 === void 0 ? void 0 : _sortedResultQuestion15.questionText) || "";
28554
+ var resultQuestion1 = ((_sortedResultQuestion4 = sortedResultQuestions[0]) === null || _sortedResultQuestion4 === void 0 ? void 0 : _sortedResultQuestion4.questionText) || "";
28555
+ var resultQuestion2 = ((_sortedResultQuestion5 = sortedResultQuestions[1]) === null || _sortedResultQuestion5 === void 0 ? void 0 : _sortedResultQuestion5.questionText) || "";
28556
+ var resultQuestion3 = ((_sortedResultQuestion6 = sortedResultQuestions[2]) === null || _sortedResultQuestion6 === void 0 ? void 0 : _sortedResultQuestion6.questionText) || "";
28557
+ var resultQuestion4 = ((_sortedResultQuestion7 = sortedResultQuestions[3]) === null || _sortedResultQuestion7 === void 0 ? void 0 : _sortedResultQuestion7.questionText) || "";
28558
+ var resultQuestion5 = ((_sortedResultQuestion8 = sortedResultQuestions[4]) === null || _sortedResultQuestion8 === void 0 ? void 0 : _sortedResultQuestion8.questionText) || "";
28559
+ var resultQuestion6 = ((_sortedResultQuestion9 = sortedResultQuestions[5]) === null || _sortedResultQuestion9 === void 0 ? void 0 : _sortedResultQuestion9.questionText) || "";
28511
28560
  doc.setFont("Helvetica", "normal", "bold");
28512
28561
  doc.text(chartConference.overviewQuestionChoice[i].month, left, line + 20);
28513
28562
 
28514
28563
  if (resultQuestion1 != "") {
28515
- var _sortedResultQuestion16;
28564
+ var _sortedResultQuestion10;
28516
28565
 
28517
28566
  doc.setFont("Helvetica", "normal", "bold");
28518
28567
  doc.text(resultQuestion1, left + 10, line + 30);
28519
28568
  doc.setFont("Helvetica", "normal", "normal");
28520
- doc.text(((_sortedResultQuestion16 = sortedResultQuestions[0]) === null || _sortedResultQuestion16 === void 0 ? void 0 : _sortedResultQuestion16.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
28569
+ doc.text(((_sortedResultQuestion10 = sortedResultQuestions[0]) === null || _sortedResultQuestion10 === void 0 ? void 0 : _sortedResultQuestion10.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
28521
28570
  doc.setDrawColor(0);
28522
28571
  doc.setFillColor(64, 210, 204);
28523
28572
  doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
28524
28573
  }
28525
28574
 
28526
28575
  if (resultQuestion2 != "") {
28527
- var _sortedResultQuestion17;
28576
+ var _sortedResultQuestion11;
28528
28577
 
28529
28578
  doc.setFont("Helvetica", "normal", "bold");
28530
28579
  doc.text(resultQuestion2, left + 10, line + 40);
28531
28580
  doc.setFont("Helvetica", "normal", "normal");
28532
- doc.text(((_sortedResultQuestion17 = sortedResultQuestions[1]) === null || _sortedResultQuestion17 === void 0 ? void 0 : _sortedResultQuestion17.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
28581
+ doc.text(((_sortedResultQuestion11 = sortedResultQuestions[1]) === null || _sortedResultQuestion11 === void 0 ? void 0 : _sortedResultQuestion11.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
28533
28582
  doc.setDrawColor(0);
28534
28583
  doc.setFillColor(120, 182, 226);
28535
28584
  doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
28536
28585
  }
28537
28586
 
28538
28587
  if (resultQuestion3 != "") {
28539
- var _sortedResultQuestion18;
28588
+ var _sortedResultQuestion12;
28540
28589
 
28541
28590
  doc.setFont("Helvetica", "normal", "bold");
28542
28591
  doc.text(resultQuestion3, left + 10, line + 50);
28543
28592
  doc.setFont("Helvetica", "normal", "normal");
28544
- doc.text(((_sortedResultQuestion18 = sortedResultQuestions[2]) === null || _sortedResultQuestion18 === void 0 ? void 0 : _sortedResultQuestion18.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
28593
+ doc.text(((_sortedResultQuestion12 = sortedResultQuestions[2]) === null || _sortedResultQuestion12 === void 0 ? void 0 : _sortedResultQuestion12.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
28545
28594
  doc.setDrawColor(0);
28546
28595
  doc.setFillColor(255, 176, 79);
28547
28596
  doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
28548
28597
  }
28549
28598
 
28550
28599
  if (resultQuestion4 != "") {
28551
- var _sortedResultQuestion19;
28600
+ var _sortedResultQuestion13;
28552
28601
 
28553
28602
  doc.setFont("Helvetica", "normal", "bold");
28554
28603
  doc.text(resultQuestion4, left + 10, line + 60);
28555
28604
  doc.setFont("Helvetica", "normal", "normal");
28556
- doc.text(((_sortedResultQuestion19 = sortedResultQuestions[2]) === null || _sortedResultQuestion19 === void 0 ? void 0 : _sortedResultQuestion19.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
28605
+ doc.text(((_sortedResultQuestion13 = sortedResultQuestions[2]) === null || _sortedResultQuestion13 === void 0 ? void 0 : _sortedResultQuestion13.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
28557
28606
  doc.setDrawColor(0);
28558
28607
  doc.setFillColor(206, 74, 73);
28559
28608
  doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
28560
28609
  }
28561
28610
 
28562
28611
  if (resultQuestion5 != "") {
28563
- var _sortedResultQuestion20;
28612
+ var _sortedResultQuestion14;
28564
28613
 
28565
28614
  doc.setFont("Helvetica", "normal", "bold");
28566
28615
  doc.text(resultQuestion5, left + 10, line + 70);
28567
28616
  doc.setFont("Helvetica", "normal", "normal");
28568
- doc.text(((_sortedResultQuestion20 = sortedResultQuestions[2]) === null || _sortedResultQuestion20 === void 0 ? void 0 : _sortedResultQuestion20.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
28617
+ doc.text(((_sortedResultQuestion14 = sortedResultQuestions[2]) === null || _sortedResultQuestion14 === void 0 ? void 0 : _sortedResultQuestion14.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
28569
28618
  doc.setDrawColor(0);
28570
28619
  doc.setFillColor(27, 183, 177);
28571
28620
  doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
28572
28621
  }
28573
28622
 
28574
28623
  if (resultQuestion6 != "") {
28575
- var _sortedResultQuestion21;
28624
+ var _sortedResultQuestion15;
28576
28625
 
28577
28626
  doc.setFont("Helvetica", "normal", "bold");
28578
28627
  doc.text(resultQuestion6, left + 10, line + 80);
28579
28628
  doc.setFont("Helvetica", "normal", "normal");
28580
- doc.text(((_sortedResultQuestion21 = sortedResultQuestions[2]) === null || _sortedResultQuestion21 === void 0 ? void 0 : _sortedResultQuestion21.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
28629
+ doc.text(((_sortedResultQuestion15 = sortedResultQuestions[2]) === null || _sortedResultQuestion15 === void 0 ? void 0 : _sortedResultQuestion15.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
28581
28630
  doc.setDrawColor(0);
28582
28631
  doc.setFillColor(75, 146, 206);
28583
28632
  doc.roundedRect(left, line + 75, 5, 5, 1, 1, "F");
@@ -28599,14 +28648,60 @@ var DashboardToPDF = function DashboardToPDF(props) {
28599
28648
  left = left + 100;
28600
28649
  }
28601
28650
 
28602
- if (left + 80 > WIDTH_PAPER) {
28651
+ if (left + (chartConference === null || chartConference === void 0 ? void 0 : (_chartConference$over2 = chartConference.overviewQuestionChoice[i + 1]) === null || _chartConference$over2 === void 0 ? void 0 : _chartConference$over2.month.length) * 20 > WIDTH_PAPER) {
28603
28652
  left = 20;
28604
- line += 90;
28653
+ line += 80;
28605
28654
  }
28606
28655
  }
28607
28656
  }
28608
28657
 
28609
- doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 170);
28658
+ doc.setFont("Helvetica", "normal", "normal");
28659
+ left = 20;
28660
+
28661
+ for (var i = 0; i < dataConvertedConference.length; i++) {
28662
+ if (activeColumnConference[i]) {
28663
+ doc.setDrawColor(0);
28664
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
28665
+ doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
28666
+ doc.setTextColor("#252733");
28667
+ doc.text(dataConvertedConference[i], left + 7, line + 100);
28668
+ } else {
28669
+ doc.setDrawColor(0);
28670
+ doc.setFillColor("#CCCCCC");
28671
+ doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
28672
+ doc.setTextColor("#CCCCCC");
28673
+ doc.text(dataConvertedConference[i], left + 7, line + 100);
28674
+ }
28675
+
28676
+ left = left + dataConvertedConference[i].length * 3 + 15;
28677
+ }
28678
+
28679
+ left = 20;
28680
+ doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 105, 420, 140);
28681
+
28682
+ for (var i = 0; i < dataConvertedConference.length; i++) {
28683
+ if (activeColumnConference[i]) {
28684
+ doc.setDrawColor(0);
28685
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
28686
+ doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
28687
+ doc.setTextColor("#252733");
28688
+ doc.setFont("Helvetica", "normal", "normal");
28689
+ doc.text(dataConvertedConference[i], left + 7, line + 255);
28690
+ doc.setFont("Helvetica", "normal", "bold");
28691
+ doc.text(avgConference[i] + "%", left, line + 262);
28692
+ } else {
28693
+ doc.setDrawColor(0);
28694
+ doc.setFillColor("#CCCCCC");
28695
+ doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
28696
+ doc.setTextColor("#CCCCCC");
28697
+ doc.setFont("Helvetica", "normal", "normal");
28698
+ doc.text(dataConvertedConference[i], left + 7, line + 255);
28699
+ doc.setFont("Helvetica", "normal", "bold");
28700
+ doc.text("0.00%", left, line + 262);
28701
+ }
28702
+
28703
+ left = left + dataConvertedConference[i].length * 3 + 15;
28704
+ }
28610
28705
  });
28611
28706
  });
28612
28707
  }
@@ -28619,7 +28714,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28619
28714
  if (!!chartClassReflectionPDF) {
28620
28715
  var _selectedToPDF5;
28621
28716
 
28622
- var line = 80;
28717
+ var line = 70;
28623
28718
  var left = 20;
28624
28719
  if (selectedToPDF.indexOf(chartClassReflectionPDF) != 0 && ((_selectedToPDF5 = selectedToPDF[selectedToPDF.indexOf(chartClassReflectionPDF) - 1]) === null || _selectedToPDF5 === void 0 ? void 0 : _selectedToPDF5.id) != null) doc.addPage();
28625
28720
  return Promise.resolve(createImageHeader()).then(function () {
@@ -28634,74 +28729,74 @@ var DashboardToPDF = function DashboardToPDF(props) {
28634
28729
  var _chartClassReflection;
28635
28730
 
28636
28731
  if (chartClassReflection.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
28637
- var _sortedResultQuestion22, _sortedResultQuestion23, _sortedResultQuestion24, _sortedResultQuestion25, _sortedResultQuestion26, _sortedResultQuestion27, _sortedResultQuestion28, _sortedResultQuestion29, _sortedResultQuestion30, _sortedResultQuestion31;
28732
+ var _sortedResultQuestion16, _sortedResultQuestion17, _sortedResultQuestion18, _sortedResultQuestion19, _sortedResultQuestion20, _sortedResultQuestion21, _sortedResultQuestion22, _sortedResultQuestion23, _sortedResultQuestion24, _sortedResultQuestion25, _chartClassReflection2;
28638
28733
 
28639
28734
  var sortedResultQuestions = chartClassReflection.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
28640
28735
  return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
28641
28736
  });
28642
- var resultQuestion1 = ((_sortedResultQuestion22 = sortedResultQuestions[0]) === null || _sortedResultQuestion22 === void 0 ? void 0 : _sortedResultQuestion22.questionText.slice(3, (_sortedResultQuestion23 = sortedResultQuestions[0]) === null || _sortedResultQuestion23 === void 0 ? void 0 : _sortedResultQuestion23.questionText.indexOf("</p>"))) || "";
28643
- var resultQuestion2 = ((_sortedResultQuestion24 = sortedResultQuestions[1]) === null || _sortedResultQuestion24 === void 0 ? void 0 : _sortedResultQuestion24.questionText.slice(3, (_sortedResultQuestion25 = sortedResultQuestions[1]) === null || _sortedResultQuestion25 === void 0 ? void 0 : _sortedResultQuestion25.questionText.indexOf("</p>"))) || "";
28644
- var resultQuestion3 = ((_sortedResultQuestion26 = sortedResultQuestions[2]) === null || _sortedResultQuestion26 === void 0 ? void 0 : _sortedResultQuestion26.questionText.slice(3, (_sortedResultQuestion27 = sortedResultQuestions[2]) === null || _sortedResultQuestion27 === void 0 ? void 0 : _sortedResultQuestion27.questionText.indexOf("</p>"))) || "";
28645
- var resultQuestion4 = ((_sortedResultQuestion28 = sortedResultQuestions[3]) === null || _sortedResultQuestion28 === void 0 ? void 0 : _sortedResultQuestion28.questionText.slice(3, (_sortedResultQuestion29 = sortedResultQuestions[3]) === null || _sortedResultQuestion29 === void 0 ? void 0 : _sortedResultQuestion29.questionText.indexOf("</p>"))) || "";
28646
- var resultQuestion5 = ((_sortedResultQuestion30 = sortedResultQuestions[4]) === null || _sortedResultQuestion30 === void 0 ? void 0 : _sortedResultQuestion30.questionText.slice(3, (_sortedResultQuestion31 = sortedResultQuestions[4]) === null || _sortedResultQuestion31 === void 0 ? void 0 : _sortedResultQuestion31.questionText.indexOf("</p>"))) || "";
28737
+ var resultQuestion1 = ((_sortedResultQuestion16 = sortedResultQuestions[0]) === null || _sortedResultQuestion16 === void 0 ? void 0 : _sortedResultQuestion16.questionText.slice(3, (_sortedResultQuestion17 = sortedResultQuestions[0]) === null || _sortedResultQuestion17 === void 0 ? void 0 : _sortedResultQuestion17.questionText.indexOf("</p>"))) || "";
28738
+ var resultQuestion2 = ((_sortedResultQuestion18 = sortedResultQuestions[1]) === null || _sortedResultQuestion18 === void 0 ? void 0 : _sortedResultQuestion18.questionText.slice(3, (_sortedResultQuestion19 = sortedResultQuestions[1]) === null || _sortedResultQuestion19 === void 0 ? void 0 : _sortedResultQuestion19.questionText.indexOf("</p>"))) || "";
28739
+ var resultQuestion3 = ((_sortedResultQuestion20 = sortedResultQuestions[2]) === null || _sortedResultQuestion20 === void 0 ? void 0 : _sortedResultQuestion20.questionText.slice(3, (_sortedResultQuestion21 = sortedResultQuestions[2]) === null || _sortedResultQuestion21 === void 0 ? void 0 : _sortedResultQuestion21.questionText.indexOf("</p>"))) || "";
28740
+ var resultQuestion4 = ((_sortedResultQuestion22 = sortedResultQuestions[3]) === null || _sortedResultQuestion22 === void 0 ? void 0 : _sortedResultQuestion22.questionText.slice(3, (_sortedResultQuestion23 = sortedResultQuestions[3]) === null || _sortedResultQuestion23 === void 0 ? void 0 : _sortedResultQuestion23.questionText.indexOf("</p>"))) || "";
28741
+ var resultQuestion5 = ((_sortedResultQuestion24 = sortedResultQuestions[4]) === null || _sortedResultQuestion24 === void 0 ? void 0 : _sortedResultQuestion24.questionText.slice(3, (_sortedResultQuestion25 = sortedResultQuestions[4]) === null || _sortedResultQuestion25 === void 0 ? void 0 : _sortedResultQuestion25.questionText.indexOf("</p>"))) || "";
28647
28742
  doc.setFont("Helvetica", "normal", "bold");
28648
28743
  doc.text(chartClassReflection.overviewQuestionChoice[i].month, left, line + 20);
28649
28744
 
28650
28745
  if (resultQuestion1 != "") {
28651
- var _sortedResultQuestion32;
28746
+ var _sortedResultQuestion26;
28652
28747
 
28653
28748
  doc.setFont("Helvetica", "normal", "bold");
28654
28749
  doc.text(resultQuestion1, left + 10, line + 30);
28655
28750
  doc.setFont("Helvetica", "normal", "normal");
28656
- doc.text(((_sortedResultQuestion32 = sortedResultQuestions[0]) === null || _sortedResultQuestion32 === void 0 ? void 0 : _sortedResultQuestion32.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 15, line + 30);
28751
+ doc.text(((_sortedResultQuestion26 = sortedResultQuestions[0]) === null || _sortedResultQuestion26 === void 0 ? void 0 : _sortedResultQuestion26.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 15, line + 30);
28657
28752
  doc.setDrawColor(0);
28658
28753
  doc.setFillColor(64, 210, 204);
28659
28754
  doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
28660
28755
  }
28661
28756
 
28662
28757
  if (resultQuestion2 != "") {
28663
- var _sortedResultQuestion33;
28758
+ var _sortedResultQuestion27;
28664
28759
 
28665
28760
  doc.setFont("Helvetica", "normal", "bold");
28666
28761
  doc.text(resultQuestion2, left + 10, line + 40);
28667
28762
  doc.setFont("Helvetica", "normal", "normal");
28668
- doc.text(((_sortedResultQuestion33 = sortedResultQuestions[1]) === null || _sortedResultQuestion33 === void 0 ? void 0 : _sortedResultQuestion33.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 15, line + 40);
28763
+ doc.text(((_sortedResultQuestion27 = sortedResultQuestions[1]) === null || _sortedResultQuestion27 === void 0 ? void 0 : _sortedResultQuestion27.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 15, line + 40);
28669
28764
  doc.setDrawColor(0);
28670
28765
  doc.setFillColor(120, 182, 226);
28671
28766
  doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
28672
28767
  }
28673
28768
 
28674
28769
  if (resultQuestion3 != "") {
28675
- var _sortedResultQuestion34;
28770
+ var _sortedResultQuestion28;
28676
28771
 
28677
28772
  doc.setFont("Helvetica", "normal", "bold");
28678
28773
  doc.text(resultQuestion3, left + 10, line + 50);
28679
28774
  doc.setFont("Helvetica", "normal", "normal");
28680
- doc.text(((_sortedResultQuestion34 = sortedResultQuestions[2]) === null || _sortedResultQuestion34 === void 0 ? void 0 : _sortedResultQuestion34.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 15, line + 50);
28775
+ doc.text(((_sortedResultQuestion28 = sortedResultQuestions[2]) === null || _sortedResultQuestion28 === void 0 ? void 0 : _sortedResultQuestion28.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 15, line + 50);
28681
28776
  doc.setDrawColor(0);
28682
28777
  doc.setFillColor(255, 176, 79);
28683
28778
  doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
28684
28779
  }
28685
28780
 
28686
28781
  if (resultQuestion4 != "") {
28687
- var _sortedResultQuestion35;
28782
+ var _sortedResultQuestion29;
28688
28783
 
28689
28784
  doc.setFont("Helvetica", "normal", "bold");
28690
28785
  doc.text(resultQuestion4, left + 10, line + 60);
28691
28786
  doc.setFont("Helvetica", "normal", "normal");
28692
- doc.text(((_sortedResultQuestion35 = sortedResultQuestions[3]) === null || _sortedResultQuestion35 === void 0 ? void 0 : _sortedResultQuestion35.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 15, line + 60);
28787
+ doc.text(((_sortedResultQuestion29 = sortedResultQuestions[3]) === null || _sortedResultQuestion29 === void 0 ? void 0 : _sortedResultQuestion29.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 15, line + 60);
28693
28788
  doc.setDrawColor(0);
28694
28789
  doc.setFillColor(206, 74, 73);
28695
28790
  doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
28696
28791
  }
28697
28792
 
28698
28793
  if (resultQuestion5 != "") {
28699
- var _sortedResultQuestion36;
28794
+ var _sortedResultQuestion30;
28700
28795
 
28701
28796
  doc.setFont("Helvetica", "normal", "bold");
28702
28797
  doc.text(resultQuestion5, left + 10, line + 70);
28703
28798
  doc.setFont("Helvetica", "normal", "normal");
28704
- doc.text(((_sortedResultQuestion36 = sortedResultQuestions[4]) === null || _sortedResultQuestion36 === void 0 ? void 0 : _sortedResultQuestion36.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 15, line + 70);
28799
+ doc.text(((_sortedResultQuestion30 = sortedResultQuestions[4]) === null || _sortedResultQuestion30 === void 0 ? void 0 : _sortedResultQuestion30.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 15, line + 70);
28705
28800
  doc.setDrawColor(0);
28706
28801
  doc.setFillColor(27, 183, 177);
28707
28802
  doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
@@ -28721,14 +28816,64 @@ var DashboardToPDF = function DashboardToPDF(props) {
28721
28816
  left = left + 80;
28722
28817
  }
28723
28818
 
28724
- if (left + 80 > WIDTH_PAPER) {
28819
+ console.log({
28820
+ left: left
28821
+ });
28822
+
28823
+ if (left + (chartClassReflection === null || chartClassReflection === void 0 ? void 0 : (_chartClassReflection2 = chartClassReflection.overviewQuestionChoice[i + 1]) === null || _chartClassReflection2 === void 0 ? void 0 : _chartClassReflection2.month.length) * 20 > WIDTH_PAPER) {
28725
28824
  left = 20;
28726
- line += 75;
28825
+ line += 55;
28727
28826
  }
28728
28827
  }
28729
28828
  }
28730
28829
 
28731
- doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 170);
28830
+ doc.setFont("Helvetica", "normal", "normal");
28831
+ left = 20;
28832
+
28833
+ for (var i = 0; i < dataConvertedClassReflection.length; i++) {
28834
+ if (activeColumnClassReflection[i]) {
28835
+ doc.setDrawColor(0);
28836
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
28837
+ doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
28838
+ doc.setTextColor("#252733");
28839
+ doc.text(dataConvertedClassReflection[i], left + 7, line + 100);
28840
+ } else {
28841
+ doc.setDrawColor(0);
28842
+ doc.setFillColor("#CCCCCC");
28843
+ doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
28844
+ doc.setTextColor("#CCCCCC");
28845
+ doc.text(dataConvertedClassReflection[i], left + 7, line + 100);
28846
+ }
28847
+
28848
+ left = left + dataConvertedClassReflection[i].length * 3 + 15;
28849
+ }
28850
+
28851
+ left = 20;
28852
+ doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 105, 420, 140);
28853
+
28854
+ for (var i = 0; i < dataConvertedClassReflection.length; i++) {
28855
+ if (activeColumnClassReflection[i]) {
28856
+ doc.setDrawColor(0);
28857
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
28858
+ doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
28859
+ doc.setTextColor("#252733");
28860
+ doc.setFont("Helvetica", "normal", "normal");
28861
+ doc.text(dataConvertedClassReflection[i], left + 7, line + 255);
28862
+ doc.setFont("Helvetica", "normal", "bold");
28863
+ doc.text(avgClassReflection[i] + "%", left, line + 262);
28864
+ } else {
28865
+ doc.setDrawColor(0);
28866
+ doc.setFillColor("#CCCCCC");
28867
+ doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
28868
+ doc.setTextColor("#CCCCCC");
28869
+ doc.setFont("Helvetica", "normal", "normal");
28870
+ doc.text(dataConvertedClassReflection[i], left + 7, line + 255);
28871
+ doc.setFont("Helvetica", "normal", "bold");
28872
+ doc.text("0.00%", left, line + 262);
28873
+ }
28874
+
28875
+ left = left + dataConvertedClassReflection[i].length * 3 + 15;
28876
+ }
28732
28877
  });
28733
28878
  });
28734
28879
  }
@@ -28741,7 +28886,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28741
28886
  if (!!chartOneToOne) {
28742
28887
  var _selectedToPDF6;
28743
28888
 
28744
- var line = 80;
28889
+ var line = 70;
28745
28890
  var left = 20;
28746
28891
  if (selectedToPDF.indexOf(chartOneToOne) != 0 && ((_selectedToPDF6 = selectedToPDF[selectedToPDF.indexOf(chartOneToOne) - 1]) === null || _selectedToPDF6 === void 0 ? void 0 : _selectedToPDF6.id) != null) doc.addPage();
28747
28892
  return Promise.resolve(createImageHeader()).then(function () {
@@ -28756,126 +28901,126 @@ var DashboardToPDF = function DashboardToPDF(props) {
28756
28901
  var _chartOneToOneData$ov;
28757
28902
 
28758
28903
  if (chartOneToOneData.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
28759
- var _sortedResultQuestion37, _sortedResultQuestion38, _sortedResultQuestion39, _sortedResultQuestion40, _sortedResultQuestion41, _sortedResultQuestion42, _sortedResultQuestion43, _sortedResultQuestion44, _sortedResultQuestion45, _sortedResultQuestion46, _sortedResultQuestion47, _sortedResultQuestion48, _sortedResultQuestion49, _sortedResultQuestion50, _sortedResultQuestion51, _sortedResultQuestion52, _sortedResultQuestion53, _sortedResultQuestion54;
28904
+ var _sortedResultQuestion31, _sortedResultQuestion32, _sortedResultQuestion33, _sortedResultQuestion34, _sortedResultQuestion35, _sortedResultQuestion36, _sortedResultQuestion37, _sortedResultQuestion38, _sortedResultQuestion39, _sortedResultQuestion40, _sortedResultQuestion41, _sortedResultQuestion42, _sortedResultQuestion43, _sortedResultQuestion44, _sortedResultQuestion45, _sortedResultQuestion46, _sortedResultQuestion47, _sortedResultQuestion48, _chartOneToOneData$ov2;
28760
28905
 
28761
28906
  var sortedResultQuestions = chartOneToOneData.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
28762
28907
  return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
28763
28908
  });
28764
- var resultQuestion1 = ((_sortedResultQuestion37 = sortedResultQuestions[0]) === null || _sortedResultQuestion37 === void 0 ? void 0 : _sortedResultQuestion37.questionText.slice(3, (_sortedResultQuestion38 = sortedResultQuestions[0]) === null || _sortedResultQuestion38 === void 0 ? void 0 : _sortedResultQuestion38.questionText.indexOf("</p>"))) || "";
28765
- var resultQuestion2 = ((_sortedResultQuestion39 = sortedResultQuestions[1]) === null || _sortedResultQuestion39 === void 0 ? void 0 : _sortedResultQuestion39.questionText.slice(3, (_sortedResultQuestion40 = sortedResultQuestions[1]) === null || _sortedResultQuestion40 === void 0 ? void 0 : _sortedResultQuestion40.questionText.indexOf("</p>"))) || "";
28766
- var resultQuestion3 = ((_sortedResultQuestion41 = sortedResultQuestions[2]) === null || _sortedResultQuestion41 === void 0 ? void 0 : _sortedResultQuestion41.questionText.slice(3, (_sortedResultQuestion42 = sortedResultQuestions[2]) === null || _sortedResultQuestion42 === void 0 ? void 0 : _sortedResultQuestion42.questionText.indexOf("</p>"))) || "";
28767
- var resultQuestion4 = ((_sortedResultQuestion43 = sortedResultQuestions[3]) === null || _sortedResultQuestion43 === void 0 ? void 0 : _sortedResultQuestion43.questionText.slice(3, (_sortedResultQuestion44 = sortedResultQuestions[3]) === null || _sortedResultQuestion44 === void 0 ? void 0 : _sortedResultQuestion44.questionText.indexOf("</p>"))) || "";
28768
- var resultQuestion5 = ((_sortedResultQuestion45 = sortedResultQuestions[4]) === null || _sortedResultQuestion45 === void 0 ? void 0 : _sortedResultQuestion45.questionText.slice(3, (_sortedResultQuestion46 = sortedResultQuestions[4]) === null || _sortedResultQuestion46 === void 0 ? void 0 : _sortedResultQuestion46.questionText.indexOf("</p>"))) || "";
28769
- var resultQuestion6 = ((_sortedResultQuestion47 = sortedResultQuestions[5]) === null || _sortedResultQuestion47 === void 0 ? void 0 : _sortedResultQuestion47.questionText.slice(3, (_sortedResultQuestion48 = sortedResultQuestions[5]) === null || _sortedResultQuestion48 === void 0 ? void 0 : _sortedResultQuestion48.questionText.indexOf("</p>"))) || "";
28770
- var resultQuestion7 = ((_sortedResultQuestion49 = sortedResultQuestions[6]) === null || _sortedResultQuestion49 === void 0 ? void 0 : _sortedResultQuestion49.questionText.slice(3, (_sortedResultQuestion50 = sortedResultQuestions[6]) === null || _sortedResultQuestion50 === void 0 ? void 0 : _sortedResultQuestion50.questionText.indexOf("</p>"))) || "";
28771
- var resultQuestion8 = ((_sortedResultQuestion51 = sortedResultQuestions[7]) === null || _sortedResultQuestion51 === void 0 ? void 0 : _sortedResultQuestion51.questionText.slice(3, (_sortedResultQuestion52 = sortedResultQuestions[7]) === null || _sortedResultQuestion52 === void 0 ? void 0 : _sortedResultQuestion52.questionText.indexOf("</p>"))) || "";
28772
- var resultQuestion9 = ((_sortedResultQuestion53 = sortedResultQuestions[8]) === null || _sortedResultQuestion53 === void 0 ? void 0 : _sortedResultQuestion53.questionText.slice(3, (_sortedResultQuestion54 = sortedResultQuestions[8]) === null || _sortedResultQuestion54 === void 0 ? void 0 : _sortedResultQuestion54.questionText.indexOf("</p>"))) || "";
28909
+ var resultQuestion1 = ((_sortedResultQuestion31 = sortedResultQuestions[0]) === null || _sortedResultQuestion31 === void 0 ? void 0 : _sortedResultQuestion31.questionText.slice(3, (_sortedResultQuestion32 = sortedResultQuestions[0]) === null || _sortedResultQuestion32 === void 0 ? void 0 : _sortedResultQuestion32.questionText.indexOf("</p>"))) || "";
28910
+ var resultQuestion2 = ((_sortedResultQuestion33 = sortedResultQuestions[1]) === null || _sortedResultQuestion33 === void 0 ? void 0 : _sortedResultQuestion33.questionText.slice(3, (_sortedResultQuestion34 = sortedResultQuestions[1]) === null || _sortedResultQuestion34 === void 0 ? void 0 : _sortedResultQuestion34.questionText.indexOf("</p>"))) || "";
28911
+ var resultQuestion3 = ((_sortedResultQuestion35 = sortedResultQuestions[2]) === null || _sortedResultQuestion35 === void 0 ? void 0 : _sortedResultQuestion35.questionText.slice(3, (_sortedResultQuestion36 = sortedResultQuestions[2]) === null || _sortedResultQuestion36 === void 0 ? void 0 : _sortedResultQuestion36.questionText.indexOf("</p>"))) || "";
28912
+ var resultQuestion4 = ((_sortedResultQuestion37 = sortedResultQuestions[3]) === null || _sortedResultQuestion37 === void 0 ? void 0 : _sortedResultQuestion37.questionText.slice(3, (_sortedResultQuestion38 = sortedResultQuestions[3]) === null || _sortedResultQuestion38 === void 0 ? void 0 : _sortedResultQuestion38.questionText.indexOf("</p>"))) || "";
28913
+ var resultQuestion5 = ((_sortedResultQuestion39 = sortedResultQuestions[4]) === null || _sortedResultQuestion39 === void 0 ? void 0 : _sortedResultQuestion39.questionText.slice(3, (_sortedResultQuestion40 = sortedResultQuestions[4]) === null || _sortedResultQuestion40 === void 0 ? void 0 : _sortedResultQuestion40.questionText.indexOf("</p>"))) || "";
28914
+ var resultQuestion6 = ((_sortedResultQuestion41 = sortedResultQuestions[5]) === null || _sortedResultQuestion41 === void 0 ? void 0 : _sortedResultQuestion41.questionText.slice(3, (_sortedResultQuestion42 = sortedResultQuestions[5]) === null || _sortedResultQuestion42 === void 0 ? void 0 : _sortedResultQuestion42.questionText.indexOf("</p>"))) || "";
28915
+ var resultQuestion7 = ((_sortedResultQuestion43 = sortedResultQuestions[6]) === null || _sortedResultQuestion43 === void 0 ? void 0 : _sortedResultQuestion43.questionText.slice(3, (_sortedResultQuestion44 = sortedResultQuestions[6]) === null || _sortedResultQuestion44 === void 0 ? void 0 : _sortedResultQuestion44.questionText.indexOf("</p>"))) || "";
28916
+ var resultQuestion8 = ((_sortedResultQuestion45 = sortedResultQuestions[7]) === null || _sortedResultQuestion45 === void 0 ? void 0 : _sortedResultQuestion45.questionText.slice(3, (_sortedResultQuestion46 = sortedResultQuestions[7]) === null || _sortedResultQuestion46 === void 0 ? void 0 : _sortedResultQuestion46.questionText.indexOf("</p>"))) || "";
28917
+ var resultQuestion9 = ((_sortedResultQuestion47 = sortedResultQuestions[8]) === null || _sortedResultQuestion47 === void 0 ? void 0 : _sortedResultQuestion47.questionText.slice(3, (_sortedResultQuestion48 = sortedResultQuestions[8]) === null || _sortedResultQuestion48 === void 0 ? void 0 : _sortedResultQuestion48.questionText.indexOf("</p>"))) || "";
28773
28918
  doc.setFont("Helvetica", "normal", "bold");
28774
28919
  doc.text(chartOneToOneData.overviewQuestionChoice[i].month, left, line + 20);
28775
28920
 
28776
28921
  if (resultQuestion1 != "") {
28777
- var _sortedResultQuestion55;
28922
+ var _sortedResultQuestion49;
28778
28923
 
28779
28924
  doc.setFont("Helvetica", "normal", "bold");
28780
28925
  doc.text(resultQuestion1, left + 10, line + 30);
28781
28926
  doc.setFont("Helvetica", "normal", "normal");
28782
- doc.text(((_sortedResultQuestion55 = sortedResultQuestions[0]) === null || _sortedResultQuestion55 === void 0 ? void 0 : _sortedResultQuestion55.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
28927
+ doc.text(((_sortedResultQuestion49 = sortedResultQuestions[0]) === null || _sortedResultQuestion49 === void 0 ? void 0 : _sortedResultQuestion49.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
28783
28928
  doc.setDrawColor(0);
28784
28929
  doc.setFillColor(64, 210, 204);
28785
28930
  doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
28786
28931
  }
28787
28932
 
28788
28933
  if (resultQuestion2 != "") {
28789
- var _sortedResultQuestion56;
28934
+ var _sortedResultQuestion50;
28790
28935
 
28791
28936
  doc.setFont("Helvetica", "normal", "bold");
28792
28937
  doc.text(resultQuestion2, left + 10, line + 40);
28793
28938
  doc.setFont("Helvetica", "normal", "normal");
28794
- doc.text(((_sortedResultQuestion56 = sortedResultQuestions[1]) === null || _sortedResultQuestion56 === void 0 ? void 0 : _sortedResultQuestion56.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
28939
+ doc.text(((_sortedResultQuestion50 = sortedResultQuestions[1]) === null || _sortedResultQuestion50 === void 0 ? void 0 : _sortedResultQuestion50.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
28795
28940
  doc.setDrawColor(0);
28796
28941
  doc.setFillColor(120, 182, 226);
28797
28942
  doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
28798
28943
  }
28799
28944
 
28800
28945
  if (resultQuestion3 != "") {
28801
- var _sortedResultQuestion57;
28946
+ var _sortedResultQuestion51;
28802
28947
 
28803
28948
  doc.setFont("Helvetica", "normal", "bold");
28804
28949
  doc.text(resultQuestion3, left + 10, line + 50);
28805
28950
  doc.setFont("Helvetica", "normal", "normal");
28806
- doc.text(((_sortedResultQuestion57 = sortedResultQuestions[2]) === null || _sortedResultQuestion57 === void 0 ? void 0 : _sortedResultQuestion57.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
28951
+ doc.text(((_sortedResultQuestion51 = sortedResultQuestions[2]) === null || _sortedResultQuestion51 === void 0 ? void 0 : _sortedResultQuestion51.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
28807
28952
  doc.setDrawColor(0);
28808
28953
  doc.setFillColor(255, 176, 79);
28809
28954
  doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
28810
28955
  }
28811
28956
 
28812
28957
  if (resultQuestion4 != "") {
28813
- var _sortedResultQuestion58;
28958
+ var _sortedResultQuestion52;
28814
28959
 
28815
28960
  doc.setFont("Helvetica", "normal", "bold");
28816
28961
  doc.text(resultQuestion4, left + 10, line + 60);
28817
28962
  doc.setFont("Helvetica", "normal", "normal");
28818
- doc.text(((_sortedResultQuestion58 = sortedResultQuestions[3]) === null || _sortedResultQuestion58 === void 0 ? void 0 : _sortedResultQuestion58.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
28963
+ doc.text(((_sortedResultQuestion52 = sortedResultQuestions[3]) === null || _sortedResultQuestion52 === void 0 ? void 0 : _sortedResultQuestion52.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
28819
28964
  doc.setDrawColor(0);
28820
28965
  doc.setFillColor(206, 74, 73);
28821
28966
  doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
28822
28967
  }
28823
28968
 
28824
28969
  if (resultQuestion5 != "") {
28825
- var _sortedResultQuestion59;
28970
+ var _sortedResultQuestion53;
28826
28971
 
28827
28972
  doc.setFont("Helvetica", "normal", "bold");
28828
28973
  doc.text(resultQuestion5, left + 10, line + 70);
28829
28974
  doc.setFont("Helvetica", "normal", "normal");
28830
- doc.text(((_sortedResultQuestion59 = sortedResultQuestions[4]) === null || _sortedResultQuestion59 === void 0 ? void 0 : _sortedResultQuestion59.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
28975
+ doc.text(((_sortedResultQuestion53 = sortedResultQuestions[4]) === null || _sortedResultQuestion53 === void 0 ? void 0 : _sortedResultQuestion53.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
28831
28976
  doc.setDrawColor(0);
28832
28977
  doc.setFillColor(27, 183, 177);
28833
28978
  doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
28834
28979
  }
28835
28980
 
28836
28981
  if (resultQuestion6 != "") {
28837
- var _sortedResultQuestion60;
28982
+ var _sortedResultQuestion54;
28838
28983
 
28839
28984
  doc.setFont("Helvetica", "normal", "bold");
28840
28985
  doc.text(resultQuestion6, left + 10, line + 80);
28841
28986
  doc.setFont("Helvetica", "normal", "normal");
28842
- doc.text(((_sortedResultQuestion60 = sortedResultQuestions[5]) === null || _sortedResultQuestion60 === void 0 ? void 0 : _sortedResultQuestion60.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
28987
+ doc.text(((_sortedResultQuestion54 = sortedResultQuestions[5]) === null || _sortedResultQuestion54 === void 0 ? void 0 : _sortedResultQuestion54.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
28843
28988
  doc.setDrawColor(0);
28844
28989
  doc.setFillColor(75, 146, 206);
28845
28990
  doc.roundedRect(left, line + 75, 5, 5, 1, 1, "F");
28846
28991
  }
28847
28992
 
28848
28993
  if (resultQuestion7 != "") {
28849
- var _sortedResultQuestion61;
28994
+ var _sortedResultQuestion55;
28850
28995
 
28851
28996
  doc.setFont("Helvetica", "normal", "bold");
28852
28997
  doc.text(resultQuestion7, left + 10, line + 90);
28853
28998
  doc.setFont("Helvetica", "normal", "normal");
28854
- doc.text(((_sortedResultQuestion61 = sortedResultQuestions[6]) === null || _sortedResultQuestion61 === void 0 ? void 0 : _sortedResultQuestion61.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion7 === null || resultQuestion7 === void 0 ? void 0 : resultQuestion7.length) * 3 + 17, line + 90);
28999
+ doc.text(((_sortedResultQuestion55 = sortedResultQuestions[6]) === null || _sortedResultQuestion55 === void 0 ? void 0 : _sortedResultQuestion55.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion7 === null || resultQuestion7 === void 0 ? void 0 : resultQuestion7.length) * 3 + 17, line + 90);
28855
29000
  doc.setDrawColor(0);
28856
29001
  doc.setFillColor(240, 148, 34);
28857
29002
  doc.roundedRect(left, line + 85, 5, 5, 1, 1, "F");
28858
29003
  }
28859
29004
 
28860
29005
  if (resultQuestion8 != "") {
28861
- var _sortedResultQuestion62;
29006
+ var _sortedResultQuestion56;
28862
29007
 
28863
29008
  doc.setFont("Helvetica", "normal", "bold");
28864
29009
  doc.text(resultQuestion8, left + 10, line + 100);
28865
29010
  doc.setFont("Helvetica", "normal", "normal");
28866
- doc.text(((_sortedResultQuestion62 = sortedResultQuestions[7]) === null || _sortedResultQuestion62 === void 0 ? void 0 : _sortedResultQuestion62.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion8 === null || resultQuestion8 === void 0 ? void 0 : resultQuestion8.length) * 3 + 17, line + 100);
29011
+ doc.text(((_sortedResultQuestion56 = sortedResultQuestions[7]) === null || _sortedResultQuestion56 === void 0 ? void 0 : _sortedResultQuestion56.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion8 === null || resultQuestion8 === void 0 ? void 0 : resultQuestion8.length) * 3 + 17, line + 100);
28867
29012
  doc.setDrawColor(0);
28868
29013
  doc.setFillColor(162, 51, 51);
28869
29014
  doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
28870
29015
  }
28871
29016
 
28872
29017
  if (resultQuestion9 != "") {
28873
- var _sortedResultQuestion63;
29018
+ var _sortedResultQuestion57;
28874
29019
 
28875
29020
  doc.setFont("Helvetica", "normal", "bold");
28876
29021
  doc.text(resultQuestion9, left + 10, line + 110);
28877
29022
  doc.setFont("Helvetica", "normal", "normal");
28878
- doc.text(((_sortedResultQuestion63 = sortedResultQuestions[8]) === null || _sortedResultQuestion63 === void 0 ? void 0 : _sortedResultQuestion63.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion9 === null || resultQuestion9 === void 0 ? void 0 : resultQuestion9.length) * 3 + 17, line + 110);
29023
+ doc.text(((_sortedResultQuestion57 = sortedResultQuestions[8]) === null || _sortedResultQuestion57 === void 0 ? void 0 : _sortedResultQuestion57.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion9 === null || resultQuestion9 === void 0 ? void 0 : resultQuestion9.length) * 3 + 17, line + 110);
28879
29024
  doc.setDrawColor(0);
28880
29025
  doc.setFillColor(11, 153, 148);
28881
29026
  doc.roundedRect(left, line + 105, 5, 5, 1, 1, "F");
@@ -28883,14 +29028,60 @@ var DashboardToPDF = function DashboardToPDF(props) {
28883
29028
 
28884
29029
  left = left + 100;
28885
29030
 
28886
- if (left + 80 > WIDTH_PAPER) {
29031
+ if (left + (chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : (_chartOneToOneData$ov2 = chartOneToOneData.overviewQuestionChoice[i + 1]) === null || _chartOneToOneData$ov2 === void 0 ? void 0 : _chartOneToOneData$ov2.month.length) * 10 > WIDTH_PAPER) {
28887
29032
  left = 20;
28888
29033
  line += 110;
28889
29034
  }
28890
29035
  }
28891
29036
  }
28892
29037
 
28893
- doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 120, 420, 170);
29038
+ doc.setFont("Helvetica", "normal", "normal");
29039
+ left = 20;
29040
+
29041
+ for (var i = 0; i < dataConvertedOneToOne.length; i++) {
29042
+ if (activeColumnOneToOne[i]) {
29043
+ doc.setDrawColor(0);
29044
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
29045
+ doc.roundedRect(left, line + 130, 5, 5, 1, 1, "F");
29046
+ doc.setTextColor("#252733");
29047
+ doc.text(dataConvertedOneToOne[i], left + 7, line + 135);
29048
+ } else {
29049
+ doc.setDrawColor(0);
29050
+ doc.setFillColor("#CCCCCC");
29051
+ doc.roundedRect(left, line + 130, 5, 5, 1, 1, "F");
29052
+ doc.setTextColor("#CCCCCC");
29053
+ doc.text(dataConvertedOneToOne[i], left + 7, line + 135);
29054
+ }
29055
+
29056
+ left = left + dataConvertedOneToOne[i].length * 3 + 15;
29057
+ }
29058
+
29059
+ left = 20;
29060
+ doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 140, 420, 170);
29061
+
29062
+ for (var i = 0; i < dataConvertedOneToOne.length; i++) {
29063
+ if (activeColumnOneToOne[i]) {
29064
+ doc.setDrawColor(0);
29065
+ doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
29066
+ doc.roundedRect(left, line + 315, 5, 5, 1, 1, "F");
29067
+ doc.setTextColor("#252733");
29068
+ doc.setFont("Helvetica", "normal", "normal");
29069
+ doc.text(dataConvertedOneToOne[i], left + 7, line + 320);
29070
+ doc.setFont("Helvetica", "normal", "bold");
29071
+ doc.text(avgOneToOne[i] + "%", left, line + 327);
29072
+ } else {
29073
+ doc.setDrawColor(0);
29074
+ doc.setFillColor("#CCCCCC");
29075
+ doc.roundedRect(left, line + 315, 5, 5, 1, 1, "F");
29076
+ doc.setTextColor("#CCCCCC");
29077
+ doc.setFont("Helvetica", "normal", "normal");
29078
+ doc.text(dataConvertedOneToOne[i], left + 7, line + 320);
29079
+ doc.setFont("Helvetica", "normal", "bold");
29080
+ doc.text("0.00%", left, line + 327);
29081
+ }
29082
+
29083
+ left = left + dataConvertedOneToOne[i].length * 3 + 15;
29084
+ }
28894
29085
  });
28895
29086
  });
28896
29087
  }
@@ -28903,7 +29094,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28903
29094
  if (!!chartReadinessToLearn) {
28904
29095
  var _selectedToPDF7;
28905
29096
 
28906
- var line = 80;
29097
+ var line = 70;
28907
29098
  var left = 20;
28908
29099
  if (selectedToPDF.indexOf(chartReadinessToLearn) != 0 && ((_selectedToPDF7 = selectedToPDF[selectedToPDF.indexOf(chartReadinessToLearn) - 1]) === null || _selectedToPDF7 === void 0 ? void 0 : _selectedToPDF7.id) != null) doc.addPage();
28909
29100
  return Promise.resolve(createImageHeader()).then(function () {
@@ -28932,7 +29123,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28932
29123
  try {
28933
29124
  var imageLogo = document.getElementById("header-logo");
28934
29125
  return Promise.resolve(html2canvas(imageLogo)).then(function (imageLogoCanvas) {
28935
- doc.addImage(imageLogoCanvas.toDataURL("image/png", 1.0), "png", 20, 20, 100, 30);
29126
+ doc.addImage(imageLogoCanvas.toDataURL("image/png", 1.0), "png", 20, 20, 90, 25);
28936
29127
  });
28937
29128
  } catch (e) {
28938
29129
  return Promise.reject(e);
@@ -28944,7 +29135,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28944
29135
 
28945
29136
  var _temp15 = function () {
28946
29137
  if (!!chartHightImpactLearningStrategie) {
28947
- var line = 80;
29138
+ var line = 70;
28948
29139
  var left = 20;
28949
29140
  if (selectedToPDF.indexOf(chartHightImpactLearningStrategie) != 0 && selectedToPDF[selectedToPDF.indexOf(chartHightImpactLearningStrategie) - 1].id != null) doc.addPage();
28950
29141
  return Promise.resolve(createImageHeader()).then(function () {
@@ -28970,7 +29161,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
28970
29161
  doc.text(topLearningStrategies.learningStrategies[j].learningStrategyName, left, line + 20);
28971
29162
  doc.setFont("Helvetica", "normal", "normal");
28972
29163
  doc.text("Usage count: " + topLearningStrategies.learningStrategies[j].usageCount || "0", left, line + 30);
28973
- doc.text("Usage point: " + avgSumUsagePoint, left, line + 40);
29164
+ doc.text("Usage point: " + avgSumUsagePoint.toFixed(2), left, line + 40);
28974
29165
  left = left + (((_topLearningStrategie4 = topLearningStrategies.learningStrategies[j].learningStrategyName) === null || _topLearningStrategie4 === void 0 ? void 0 : _topLearningStrategie4.length) * 4 > 45 ? ((_topLearningStrategie5 = topLearningStrategies.learningStrategies[j].learningStrategyName) === null || _topLearningStrategie5 === void 0 ? void 0 : _topLearningStrategie5.length) * 4 : 60) + 15;
28975
29166
 
28976
29167
  if (left + ((_topLearningStrategie6 = topLearningStrategies.learningStrategies[j + 1]) === null || _topLearningStrategie6 === void 0 ? void 0 : (_topLearningStrategie7 = _topLearningStrategie6.learningStrategyName) === null || _topLearningStrategie7 === void 0 ? void 0 : _topLearningStrategie7.length) * 5 + 15 > WIDTH_PAPER) {
@@ -29014,25 +29205,25 @@ var DashboardToPDF = function DashboardToPDF(props) {
29014
29205
  id: chartOneToOne.id
29015
29206
  }, chartOneToOne.children(typeChartList[initialData.map(function (i) {
29016
29207
  return i.id;
29017
- }).indexOf(chartOneToOne === null || chartOneToOne === void 0 ? void 0 : chartOneToOne.id)]))), !!chartClassReflectionPDF && React.createElement("div", {
29208
+ }).indexOf(chartOneToOne === null || chartOneToOne === void 0 ? void 0 : chartOneToOne.id)], true))), !!chartClassReflectionPDF && React.createElement("div", {
29018
29209
  className: "" + styles$1["chart-to-canvas"]
29019
29210
  }, React.createElement("div", {
29020
29211
  id: chartClassReflectionPDF.id
29021
29212
  }, chartClassReflectionPDF.children(typeChartList[initialData.map(function (i) {
29022
29213
  return i.id;
29023
- }).indexOf(chartClassReflectionPDF === null || chartClassReflectionPDF === void 0 ? void 0 : chartClassReflectionPDF.id)]))), !!chartConferecePDF && React.createElement("div", {
29214
+ }).indexOf(chartClassReflectionPDF === null || chartClassReflectionPDF === void 0 ? void 0 : chartClassReflectionPDF.id)], true))), !!chartConferecePDF && React.createElement("div", {
29024
29215
  className: "" + styles$1["chart-to-canvas"]
29025
29216
  }, React.createElement("div", {
29026
29217
  id: chartConferecePDF.id
29027
29218
  }, chartConferecePDF.children(typeChartList[initialData.map(function (i) {
29028
29219
  return i.id;
29029
- }).indexOf(chartConferecePDF === null || chartConferecePDF === void 0 ? void 0 : chartConferecePDF.id)]))), !!chartSafety && React.createElement("div", {
29220
+ }).indexOf(chartConferecePDF === null || chartConferecePDF === void 0 ? void 0 : chartConferecePDF.id)], true))), !!chartSafety && React.createElement("div", {
29030
29221
  className: "" + styles$1["chart-to-canvas"]
29031
29222
  }, React.createElement("div", {
29032
29223
  id: chartSafety.id
29033
29224
  }, chartSafety.children(typeChartList[initialData.map(function (i) {
29034
29225
  return i.id;
29035
- }).indexOf(chartSafety === null || chartSafety === void 0 ? void 0 : chartSafety.id)]))), !!chartStudentByAge && React.createElement("div", {
29226
+ }).indexOf(chartSafety === null || chartSafety === void 0 ? void 0 : chartSafety.id)], true))), !!chartStudentByAge && React.createElement("div", {
29036
29227
  className: "" + styles$1["chart-to-canvas"]
29037
29228
  }, React.createElement("div", {
29038
29229
  id: chartStudentByAge.id
@@ -29072,7 +29263,19 @@ var Dashboard = function Dashboard() {
29072
29263
  topLearningStrategies = _useChartDatas.topLearningStrategies,
29073
29264
  chartClassReflection = _useChartDatas.chartClassReflection,
29074
29265
  chartConference = _useChartDatas.chartConference,
29075
- safety = _useChartDatas.safety;
29266
+ safety = _useChartDatas.safety,
29267
+ dataConvertedOneToOne = _useChartDatas.dataConvertedOneToOne,
29268
+ activeColumnOneToOne = _useChartDatas.activeColumnOneToOne,
29269
+ avgOneToOne = _useChartDatas.avgOneToOne,
29270
+ dataConvertedClassReflection = _useChartDatas.dataConvertedClassReflection,
29271
+ activeColumnClassReflection = _useChartDatas.activeColumnClassReflection,
29272
+ avgClassReflection = _useChartDatas.avgClassReflection,
29273
+ dataConvertedConference = _useChartDatas.dataConvertedConference,
29274
+ activeColumnConference = _useChartDatas.activeColumnConference,
29275
+ avgConference = _useChartDatas.avgConference,
29276
+ dataConvertedSafety = _useChartDatas.dataConvertedSafety,
29277
+ activeColumnSafety = _useChartDatas.activeColumnSafety,
29278
+ avgSafety = _useChartDatas.avgSafety;
29076
29279
 
29077
29280
  var _useBehavior = useBehavior(initialTypeChart),
29078
29281
  chartIsOpened = _useBehavior.chartIsOpened,
@@ -29131,7 +29334,19 @@ var Dashboard = function Dashboard() {
29131
29334
  topLearningStrategies: topLearningStrategies,
29132
29335
  chartClassReflection: chartClassReflection,
29133
29336
  chartConference: chartConference,
29134
- safety: safety
29337
+ safety: safety,
29338
+ dataConvertedOneToOne: dataConvertedOneToOne,
29339
+ activeColumnOneToOne: activeColumnOneToOne,
29340
+ avgOneToOne: avgOneToOne,
29341
+ dataConvertedClassReflection: dataConvertedClassReflection,
29342
+ activeColumnClassReflection: activeColumnClassReflection,
29343
+ avgClassReflection: avgClassReflection,
29344
+ dataConvertedConference: dataConvertedConference,
29345
+ activeColumnConference: activeColumnConference,
29346
+ avgConference: avgConference,
29347
+ dataConvertedSafety: dataConvertedSafety,
29348
+ activeColumnSafety: activeColumnSafety,
29349
+ avgSafety: avgSafety
29135
29350
  }))), React.createElement("div", {
29136
29351
  className: "d-flex align-items-center justify-content-between"
29137
29352
  }, React.createElement("div", {
@@ -29206,7 +29421,7 @@ var Dashboard = function Dashboard() {
29206
29421
  isShowChangeChart: chartDashBoard.isShowChangeChart,
29207
29422
  typeChart: typeChartList[index],
29208
29423
  onChangeChart: function onChangeChart(type) {
29209
- return _onChangeChart(index, type);
29424
+ return _onChangeChart(index, type, chartDashBoard === null || chartDashBoard === void 0 ? void 0 : chartDashBoard.options);
29210
29425
  },
29211
29426
  isOpen: chartIsOpened[index],
29212
29427
  options: chartDashBoard.options