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