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