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