mario-education 2.4.27-admin → 2.4.28-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 +8 -6
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/DashboardToPDF.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByAgeAndGender.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/utils.d.ts +1 -4
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useChartDatas.d.ts +8 -2
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useDashboard.d.ts +29 -1
- package/dist/MarioFramework.Education/ClientApp/src/utils/type.d.ts +4 -0
- package/dist/index.css +252 -133
- package/dist/index.js +1224 -87
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1224 -87
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -1
package/dist/index.modern.js
CHANGED
|
@@ -18,6 +18,8 @@ import { FaCheck, FaTimes, FaRegEdit } from 'react-icons/fa';
|
|
|
18
18
|
import { Editor } from '@tinymce/tinymce-react';
|
|
19
19
|
import Chart from 'react-apexcharts';
|
|
20
20
|
import { FiChevronDown, FiChevronUp } from 'react-icons/fi';
|
|
21
|
+
import jsPDF from 'jspdf';
|
|
22
|
+
import html2canvas from 'html2canvas';
|
|
21
23
|
|
|
22
24
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
23
25
|
|
|
@@ -1146,7 +1148,7 @@ var ConferenceRubricList = function ConferenceRubricList() {
|
|
|
1146
1148
|
}))));
|
|
1147
1149
|
};
|
|
1148
1150
|
|
|
1149
|
-
var styles = {"test":"_3ybTi","body-question-right":"_1H0W8","body-question":"_b-AXV","badge-icon":"_1fgfO","input-color-picker":"_2YR4l","question-list-session-template":"_114IY","delete-column-question-list-sesstion-template":"_qE7J0","conference-rubric-skill-column":"_2BV3o","conference-rubric-additional-row":"_1P4F2","conference-rubric-row-test":"_1SRmg","emotional-response":"_ZDINp","star-rating":"_Kzkzd","list-teacher-compare":"_Q0sF1","teacher-item":"_gu_yD","teacher-item-selected":"_33tYy","btn-filter":"_2VZin","block-filter-component":"_1d6uY","select-filter-component":"_1XSIo","hidden":"_3o8gR","box-select":"_3ru37","radio-btn":"_1tQvL","box-select-label":"_3VNX5"};
|
|
1151
|
+
var styles = {"test":"_3ybTi","body-question-right":"_1H0W8","body-question":"_b-AXV","badge-icon":"_1fgfO","input-color-picker":"_2YR4l","question-list-session-template":"_114IY","delete-column-question-list-sesstion-template":"_qE7J0","conference-rubric-skill-column":"_2BV3o","conference-rubric-additional-row":"_1P4F2","conference-rubric-row-test":"_1SRmg","emotional-response":"_ZDINp","star-rating":"_Kzkzd","list-teacher-compare":"_Q0sF1","teacher-item":"_gu_yD","teacher-item-selected":"_33tYy","btn-filter":"_2VZin","color-filter":"_2M0vR","block-filter-component":"_1d6uY","select-filter-component":"_1XSIo","hidden":"_3o8gR","box-select":"_3ru37","radio-btn":"_1tQvL","box-select-label":"_3VNX5"};
|
|
1150
1152
|
|
|
1151
1153
|
var ToggleInput = function ToggleInput(_ref) {
|
|
1152
1154
|
var value = _ref.value,
|
|
@@ -1529,6 +1531,48 @@ function _objectDestructuringEmpty(obj) {
|
|
|
1529
1531
|
if (obj == null) throw new TypeError("Cannot destructure undefined");
|
|
1530
1532
|
}
|
|
1531
1533
|
|
|
1534
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1535
|
+
if (!o) return;
|
|
1536
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1537
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1538
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1539
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1540
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
function _arrayLikeToArray(arr, len) {
|
|
1544
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1545
|
+
|
|
1546
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1547
|
+
|
|
1548
|
+
return arr2;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
1552
|
+
var it;
|
|
1553
|
+
|
|
1554
|
+
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
|
|
1555
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1556
|
+
if (it) o = it;
|
|
1557
|
+
var i = 0;
|
|
1558
|
+
return function () {
|
|
1559
|
+
if (i >= o.length) return {
|
|
1560
|
+
done: true
|
|
1561
|
+
};
|
|
1562
|
+
return {
|
|
1563
|
+
done: false,
|
|
1564
|
+
value: o[i++]
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
it = o[Symbol.iterator]();
|
|
1573
|
+
return it.next.bind(it);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1532
1576
|
var RubricItemColumnOrder;
|
|
1533
1577
|
|
|
1534
1578
|
(function (RubricItemColumnOrder) {
|
|
@@ -19672,7 +19716,7 @@ var TYPECHART;
|
|
|
19672
19716
|
TYPECHART[TYPECHART["BOTH"] = 3] = "BOTH";
|
|
19673
19717
|
})(TYPECHART || (TYPECHART = {}));
|
|
19674
19718
|
|
|
19675
|
-
var styles$1 = {"dashboard-card":"_1Jgr2","quantity-table":"_3Thdy","size-icon":"_1WLBo","block-dashboard":"_10Pgm","size-arrow":"_3jPb_","color-down":"_1c43y","color-up":"_F1afY","box-filter":"_1kqUQ","title-card":"_10hbz","value-card":"_2rmw_","deviant-card":"_1tdQu","filter-card":"_2BvFN","box-skill-item":"_2TBTW","numerical-order":"_3XXJp","backoround-top-skill":"_LCuWQ","color-filter":"_3x9D7","btn-filter":"_2In63","block-collapse":"_1Vhg_","form-date-picker":"_6yLxd","bock-filter-left":"_h74SO","bock-filter-right":"_3e2pi","form-filter-right":"_ntUB6","form-filter-left":"_1DlZ4","bock-filter-wrap":"_1tYDM","title-card-box":"_3hSow","box-item":"_1yuC9","image-no-data":"_2PMoX","image-grade":"_3ZX0b","chart-data":"_2asi-","apexcharts-datalabels":"_muT01","apexcharts-pie-label":"_35BzZ","image-custom":"_3pkbc","image-special-need":"_16MpB","title-dashboard":"_CHu-i","box-chart":"_3Y-Dd","block-filter-right":"_1YJnk","shadow-lg":"_2eMbe","chart-header-wrapper":"_6ZvFg","devide-component":"_24CNV","header-chart":"_2vtSi","header-left":"_IpsVf","icon-chart":"_gzxWe","header-right":"_37IcR","header-title":"_2G6Wz","button-export":"_3xpNv","button-content":"_3H5Ly","button-icon":"_J_n-D","icon-config":"_3AALV","headẻ-chart":"_g5-bn","btn-show-chart":"_2htKu","checkbox-chart":"_1qXAT","column-chart-percent":"_3NgrB","chart-background":"_32fu3","custom-marker":"_DmMzw","mark-custom":"_1eUXn","item-legend":"_3hrrC","label-legend-custom":"_Q-iiW","mark-legend":"_cD4ey","
|
|
19719
|
+
var styles$1 = {"dashboard-card":"_1Jgr2","quantity-table":"_3Thdy","label-chart":"_24PRg","size-icon":"_1WLBo","block-dashboard":"_10Pgm","size-arrow":"_3jPb_","color-down":"_1c43y","color-up":"_F1afY","box-filter":"_1kqUQ","title-card":"_10hbz","value-card":"_2rmw_","deviant-card":"_1tdQu","filter-card":"_2BvFN","box-skill-item":"_2TBTW","numerical-order":"_3XXJp","backoround-top-skill":"_LCuWQ","color-filter":"_3x9D7","btn-filter":"_2In63","block-collapse":"_1Vhg_","form-date-picker":"_6yLxd","bock-filter-left":"_h74SO","bock-filter-right":"_3e2pi","form-filter-right":"_ntUB6","form-filter-left":"_1DlZ4","bock-filter-wrap":"_1tYDM","title-card-box":"_3hSow","box-item":"_1yuC9","image-no-data":"_2PMoX","image-grade":"_3ZX0b","chart-data":"_2asi-","apexcharts-datalabels":"_muT01","apexcharts-pie-label":"_35BzZ","image-custom":"_3pkbc","image-special-need":"_16MpB","title-dashboard":"_CHu-i","box-chart":"_3Y-Dd","block-filter-right":"_1YJnk","shadow-lg":"_2eMbe","chart-header-wrapper":"_6ZvFg","devide-component":"_24CNV","header-chart":"_2vtSi","header-left":"_IpsVf","icon-chart":"_gzxWe","header-right":"_37IcR","header-title":"_2G6Wz","button-export":"_3xpNv","button-content":"_3H5Ly","button-icon":"_J_n-D","icon-config":"_3AALV","headẻ-chart":"_g5-bn","btn-show-chart":"_2htKu","checkbox-chart":"_1qXAT","column-chart-percent":"_3NgrB","chart-background":"_32fu3","custom-marker":"_DmMzw","mark-custom":"_1eUXn","item-legend":"_3hrrC","label-legend-custom":"_Q-iiW","mark-legend":"_cD4ey","percent":"_2HWhv","listItem":"_2Hdbu","item":"_3RJ2T","student-by-age":"_38ikt","total-student":"_1TnWs","pie-chart":"_3BTJi","options-gender":"_1Ws0m","legend":"_2HnO_","text-lengend":"_2BFJw","student-by-grade":"_2az-l","bubble-chart-custom":"_2j8fp","x-axis-custom-wrap":"_1BN5z","axis-content":"_1rYav","legend-wrap":"_3-zAs","list-percent":"_1PPhv","percent-item":"_1rjWR","chart-custom":"_f-Ti4","chart-buddle":"_TPa6x","title-grade":"_1hZ_V","title-modal":"_3L9WC","header-desc-modal":"_1TFtP","form-checkbox":"_37aqf","checkbox-content":"_1iabV","btn-export":"_1eQAg","title-chart":"_pFFg9","image-logo":"_1eqkj","chart-to-canvas":"_2IQ8b"};
|
|
19676
19720
|
|
|
19677
19721
|
var CheckboxCustom = function CheckboxCustom(_ref) {
|
|
19678
19722
|
var _ref$background = _ref.background,
|
|
@@ -25706,7 +25750,17 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
|
|
|
25706
25750
|
},
|
|
25707
25751
|
colors: ["#86BD74", "#9DD889"],
|
|
25708
25752
|
xaxis: {
|
|
25709
|
-
categories: labelNames
|
|
25753
|
+
categories: labelNames,
|
|
25754
|
+
labels: {
|
|
25755
|
+
show: true,
|
|
25756
|
+
style: {
|
|
25757
|
+
colors: ["#808080"],
|
|
25758
|
+
fontSize: "14px",
|
|
25759
|
+
fontFamily: "Roboto",
|
|
25760
|
+
fontWeight: 400,
|
|
25761
|
+
cssClass: "apexcharts-yaxis-label"
|
|
25762
|
+
}
|
|
25763
|
+
}
|
|
25710
25764
|
},
|
|
25711
25765
|
tooltip: {
|
|
25712
25766
|
x: {
|
|
@@ -25732,8 +25786,8 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
|
|
|
25732
25786
|
maxWidth: 120,
|
|
25733
25787
|
style: {
|
|
25734
25788
|
colors: [],
|
|
25735
|
-
fontSize: "
|
|
25736
|
-
fontFamily: "
|
|
25789
|
+
fontSize: "14px",
|
|
25790
|
+
fontFamily: "Roboto",
|
|
25737
25791
|
fontWeight: 400,
|
|
25738
25792
|
cssClass: "apexcharts-yaxis-label"
|
|
25739
25793
|
},
|
|
@@ -25894,7 +25948,8 @@ var studentByAgeOptions = function studentByAgeOptions(series) {
|
|
|
25894
25948
|
position: "top",
|
|
25895
25949
|
horizontalAlign: "left",
|
|
25896
25950
|
fontSize: "14px",
|
|
25897
|
-
offsetY:
|
|
25951
|
+
offsetY: 0,
|
|
25952
|
+
fontFamily: "Roboto"
|
|
25898
25953
|
}
|
|
25899
25954
|
};
|
|
25900
25955
|
};
|
|
@@ -25941,9 +25996,6 @@ var pieChartOptions = {
|
|
|
25941
25996
|
}
|
|
25942
25997
|
}
|
|
25943
25998
|
},
|
|
25944
|
-
chart: {
|
|
25945
|
-
offsetY: 20
|
|
25946
|
-
},
|
|
25947
25999
|
dataLabels: {
|
|
25948
26000
|
enabled: false
|
|
25949
26001
|
},
|
|
@@ -26045,8 +26097,7 @@ var readinesToLearnoptions = function readinesToLearnoptions(seriesName) {
|
|
|
26045
26097
|
height: 450,
|
|
26046
26098
|
toolbar: {
|
|
26047
26099
|
show: false
|
|
26048
|
-
}
|
|
26049
|
-
offsetY: -20
|
|
26100
|
+
}
|
|
26050
26101
|
},
|
|
26051
26102
|
dataLabels: {
|
|
26052
26103
|
enabled: false
|
|
@@ -26131,7 +26182,12 @@ var optionColumnChartAndPercents = function optionColumnChartAndPercents(months,
|
|
|
26131
26182
|
height: 350,
|
|
26132
26183
|
stacked: false,
|
|
26133
26184
|
toolbar: {
|
|
26134
|
-
show: false
|
|
26185
|
+
show: false,
|
|
26186
|
+
"export": {
|
|
26187
|
+
png: {
|
|
26188
|
+
filename: "test"
|
|
26189
|
+
}
|
|
26190
|
+
}
|
|
26135
26191
|
}
|
|
26136
26192
|
},
|
|
26137
26193
|
plotOptions: {
|
|
@@ -26290,7 +26346,7 @@ var optionLineChart = function optionLineChart(months, activeData) {
|
|
|
26290
26346
|
}
|
|
26291
26347
|
};
|
|
26292
26348
|
};
|
|
26293
|
-
var optionBarChartAndArea = function optionBarChartAndArea(months, activeData) {
|
|
26349
|
+
var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, newseries) {
|
|
26294
26350
|
return {
|
|
26295
26351
|
chart: {
|
|
26296
26352
|
height: 350,
|
|
@@ -26301,6 +26357,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData) {
|
|
|
26301
26357
|
},
|
|
26302
26358
|
plotOptions: {
|
|
26303
26359
|
bar: {
|
|
26360
|
+
columnWidth: "50%",
|
|
26304
26361
|
borderRadius: 5
|
|
26305
26362
|
}
|
|
26306
26363
|
},
|
|
@@ -26308,18 +26365,30 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData) {
|
|
|
26308
26365
|
enabled: false
|
|
26309
26366
|
},
|
|
26310
26367
|
fill: {
|
|
26311
|
-
opacity: 0.
|
|
26368
|
+
opacity: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26369
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == 'area') {
|
|
26370
|
+
return 0.2;
|
|
26371
|
+
}
|
|
26372
|
+
|
|
26373
|
+
return 0.6;
|
|
26374
|
+
})
|
|
26312
26375
|
},
|
|
26313
26376
|
colors: COLOR_CHART_AND_PERCENTS.filter(function (_, index) {
|
|
26314
26377
|
return activeData[index];
|
|
26315
26378
|
}),
|
|
26316
26379
|
stroke: {
|
|
26317
26380
|
curve: "smooth",
|
|
26318
|
-
show:
|
|
26381
|
+
show: true,
|
|
26319
26382
|
colors: COLOR_CHART_AND_PERCENTS.filter(function (_, index) {
|
|
26320
26383
|
return activeData[index];
|
|
26321
26384
|
}),
|
|
26322
|
-
width:
|
|
26385
|
+
width: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26386
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == 'area') {
|
|
26387
|
+
return 2;
|
|
26388
|
+
}
|
|
26389
|
+
|
|
26390
|
+
return 0;
|
|
26391
|
+
}),
|
|
26323
26392
|
dashArray: 0
|
|
26324
26393
|
},
|
|
26325
26394
|
xaxis: {
|
|
@@ -26556,9 +26625,11 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
|
|
|
26556
26625
|
_ref$isHasLineChart = _ref.isHasLineChart,
|
|
26557
26626
|
isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
|
|
26558
26627
|
var newseries = mergeBarChartAndArea(series, isHasLineChart);
|
|
26628
|
+
console.log({
|
|
26629
|
+
newseries: newseries
|
|
26630
|
+
});
|
|
26559
26631
|
return React.createElement(Chart, {
|
|
26560
|
-
options: optionBarChartAndArea(months, activeColumn),
|
|
26561
|
-
type: "line",
|
|
26632
|
+
options: optionBarChartAndArea(months, activeColumn, newseries),
|
|
26562
26633
|
series: newseries,
|
|
26563
26634
|
width: "100%",
|
|
26564
26635
|
height: 450
|
|
@@ -26583,61 +26654,23 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26583
26654
|
_ref$typeChart = _ref.typeChart,
|
|
26584
26655
|
typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart,
|
|
26585
26656
|
_ref$isHasLineChart = _ref.isHasLineChart,
|
|
26586
|
-
isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart
|
|
26657
|
+
isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart,
|
|
26658
|
+
onActiveColumn = _ref.onActiveColumn,
|
|
26659
|
+
activeColumn = _ref.activeColumn,
|
|
26660
|
+
series = _ref.series,
|
|
26661
|
+
avg = _ref.avg,
|
|
26662
|
+
months = _ref.months;
|
|
26587
26663
|
if (!data) return React.createElement("div", {
|
|
26588
26664
|
className: "flex justify-content-center align-items-center",
|
|
26589
26665
|
style: {
|
|
26590
26666
|
height: 450
|
|
26591
26667
|
}
|
|
26592
26668
|
}, React.createElement("div", null, "No Data"));
|
|
26593
|
-
|
|
26594
|
-
var _useState = useState([]),
|
|
26595
|
-
activeColumn = _useState[0],
|
|
26596
|
-
setActiveColumn = _useState[1];
|
|
26597
|
-
|
|
26598
|
-
var _useState2 = useState([]),
|
|
26599
|
-
series = _useState2[0],
|
|
26600
|
-
setSeries = _useState2[1];
|
|
26601
|
-
|
|
26602
|
-
var _useState3 = useState(INITIAL_AVG),
|
|
26603
|
-
avg = _useState3[0],
|
|
26604
|
-
setAvg = _useState3[1];
|
|
26605
|
-
|
|
26606
|
-
var months = data.map(function (i) {
|
|
26607
|
-
return (i === null || i === void 0 ? void 0 : i.month) || "";
|
|
26608
|
-
});
|
|
26609
|
-
var dataCharts = convertDataToDataChart(data);
|
|
26610
|
-
var newSeries = convertToSeriesColumnChartAndPercent(dataCharts, data);
|
|
26611
|
-
var newAvg = convertToAvg(dataCharts, data, months);
|
|
26612
|
-
|
|
26613
|
-
var onActiveColumn = function onActiveColumn(index) {
|
|
26614
|
-
var newActiveColumn = [].concat(activeColumn);
|
|
26615
|
-
newActiveColumn[index] = !newActiveColumn[index];
|
|
26616
|
-
setActiveColumn(newActiveColumn);
|
|
26617
|
-
setSeries(newSeries.filter(function (_, idx) {
|
|
26618
|
-
return newActiveColumn[idx];
|
|
26619
|
-
}));
|
|
26620
|
-
setAvg(newAvg.map(function (_, index) {
|
|
26621
|
-
return newActiveColumn[index] ? newAvg[index] : 0;
|
|
26622
|
-
}));
|
|
26623
|
-
};
|
|
26624
|
-
|
|
26625
|
-
useEffect(function () {
|
|
26626
|
-
if (!!data && data !== null && data !== void 0 && data.length) {
|
|
26627
|
-
setSeries(newSeries);
|
|
26628
|
-
setActiveColumn(dataCharts.map(function (_i) {
|
|
26629
|
-
return true;
|
|
26630
|
-
}));
|
|
26631
|
-
setAvg(newAvg.map(function (_, index) {
|
|
26632
|
-
return newAvg[index];
|
|
26633
|
-
}));
|
|
26634
|
-
}
|
|
26635
|
-
}, [data]);
|
|
26636
26669
|
return React.createElement("div", {
|
|
26637
26670
|
className: "w-100 h-100 " + styles$1["column-chart-percent"]
|
|
26638
26671
|
}, React.createElement("div", {
|
|
26639
26672
|
className: "w-full d-flex gap-2 flex-wrap " + styles$1["listItem"]
|
|
26640
|
-
},
|
|
26673
|
+
}, data.map(function (month, index) {
|
|
26641
26674
|
return React.createElement("div", {
|
|
26642
26675
|
className: "pr-4 d-flex",
|
|
26643
26676
|
key: index
|
|
@@ -26660,7 +26693,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26660
26693
|
onClick: function onClick() {
|
|
26661
26694
|
return onActiveColumn(index);
|
|
26662
26695
|
}
|
|
26663
|
-
},
|
|
26696
|
+
}, month));
|
|
26664
26697
|
})), React.createElement("div", {
|
|
26665
26698
|
className: "w-100",
|
|
26666
26699
|
style: {
|
|
@@ -26685,7 +26718,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26685
26718
|
series: series
|
|
26686
26719
|
})), React.createElement("div", {
|
|
26687
26720
|
className: "w-100 d-flex gap-2 flex-wrap " + styles$1["listItem"]
|
|
26688
|
-
},
|
|
26721
|
+
}, data.map(function (month, index) {
|
|
26689
26722
|
return React.createElement("div", {
|
|
26690
26723
|
className: "" + styles$1["item-legend"],
|
|
26691
26724
|
key: index
|
|
@@ -26698,7 +26731,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26698
26731
|
}
|
|
26699
26732
|
}), React.createElement("label", {
|
|
26700
26733
|
className: "" + styles$1["label-legend-custom"]
|
|
26701
|
-
},
|
|
26734
|
+
}, month)), React.createElement("div", {
|
|
26702
26735
|
className: "" + styles$1["percent"]
|
|
26703
26736
|
}, React.createElement("label", {
|
|
26704
26737
|
className: "m-0"
|
|
@@ -26799,15 +26832,17 @@ var StudentByAge = function StudentByAge(_ref) {
|
|
|
26799
26832
|
|
|
26800
26833
|
var StudentByAgeAndGender = function StudentByAgeAndGender(_ref) {
|
|
26801
26834
|
var studentByAgeData = _ref.studentByAgeData,
|
|
26802
|
-
studentByGenderData = _ref.studentByGenderData
|
|
26835
|
+
studentByGenderData = _ref.studentByGenderData,
|
|
26836
|
+
columnFlex = _ref.columnFlex;
|
|
26803
26837
|
return React.createElement(Row, {
|
|
26804
|
-
className: "d-flex"
|
|
26838
|
+
className: "d-flex " + (columnFlex && "flex-column")
|
|
26805
26839
|
}, React.createElement(Col, {
|
|
26806
26840
|
md: 6
|
|
26807
26841
|
}, React.createElement(StudentByAge, {
|
|
26808
26842
|
data: studentByAgeData
|
|
26809
26843
|
})), React.createElement(Col, {
|
|
26810
|
-
md: 6
|
|
26844
|
+
md: 6,
|
|
26845
|
+
className: "mt-5"
|
|
26811
26846
|
}, React.createElement(CustomPieChart, {
|
|
26812
26847
|
data: studentByGenderData
|
|
26813
26848
|
})));
|
|
@@ -26992,6 +27027,8 @@ var DEFAULT_START_DATE = moment().startOf("year").valueOf();
|
|
|
26992
27027
|
var DEFAULT_END_DATE = moment().endOf("day").valueOf();
|
|
26993
27028
|
|
|
26994
27029
|
var useDashboard = function useDashboard() {
|
|
27030
|
+
var _chartConference$over, _safety$overviewQuest;
|
|
27031
|
+
|
|
26995
27032
|
var dispatch = useDispatch();
|
|
26996
27033
|
|
|
26997
27034
|
var _useState = useState({
|
|
@@ -27092,6 +27129,215 @@ var useDashboard = function useDashboard() {
|
|
|
27092
27129
|
setFilter(_extends({}, filter, (_extends2 = {}, _extends2[event.target.name] = event.target.value, _extends2)));
|
|
27093
27130
|
};
|
|
27094
27131
|
|
|
27132
|
+
var _useState20 = useState([]),
|
|
27133
|
+
activeColumnOneToOne = _useState20[0],
|
|
27134
|
+
setActiveColumnOneToOne = _useState20[1];
|
|
27135
|
+
|
|
27136
|
+
var _useState21 = useState([]),
|
|
27137
|
+
seriesOneToOne = _useState21[0],
|
|
27138
|
+
setSeriesOneToOne = _useState21[1];
|
|
27139
|
+
|
|
27140
|
+
var _useState22 = useState(INITIAL_AVG),
|
|
27141
|
+
avgOneToOne = _useState22[0],
|
|
27142
|
+
setAvgOneToOne = _useState22[1];
|
|
27143
|
+
|
|
27144
|
+
var monthsOneToOne = chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice.map(function (i) {
|
|
27145
|
+
return (i === null || i === void 0 ? void 0 : i.month) || "";
|
|
27146
|
+
});
|
|
27147
|
+
var dataConvertedOneToOne = convertDataToDataChart(chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice);
|
|
27148
|
+
var newSeriesOneToOne = convertToSeriesColumnChartAndPercent(dataConvertedOneToOne, chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice);
|
|
27149
|
+
var newAvgOneToOne = convertToAvg(dataConvertedOneToOne, chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : chartOneToOneData.overviewQuestionChoice, monthsOneToOne);
|
|
27150
|
+
|
|
27151
|
+
var handleActiveColumnOneToOne = function handleActiveColumnOneToOne(index) {
|
|
27152
|
+
var newActiveColumn = [].concat(activeColumnOneToOne);
|
|
27153
|
+
newActiveColumn[index] = !newActiveColumn[index];
|
|
27154
|
+
setActiveColumnOneToOne(newActiveColumn);
|
|
27155
|
+
setSeriesOneToOne(newSeriesOneToOne === null || newSeriesOneToOne === void 0 ? void 0 : newSeriesOneToOne.filter(function (_, idx) {
|
|
27156
|
+
return newActiveColumn[idx];
|
|
27157
|
+
}));
|
|
27158
|
+
setAvgOneToOne(newAvgOneToOne === null || newAvgOneToOne === void 0 ? void 0 : newAvgOneToOne.map(function (_, idx) {
|
|
27159
|
+
return newActiveColumn[idx] ? newAvgOneToOne[idx] : 0;
|
|
27160
|
+
}));
|
|
27161
|
+
};
|
|
27162
|
+
|
|
27163
|
+
useEffect(function () {
|
|
27164
|
+
setSeriesOneToOne(newSeriesOneToOne);
|
|
27165
|
+
setActiveColumnOneToOne(dataConvertedOneToOne.map(function (_i) {
|
|
27166
|
+
return true;
|
|
27167
|
+
}));
|
|
27168
|
+
setAvgOneToOne(newAvgOneToOne === null || newAvgOneToOne === void 0 ? void 0 : newAvgOneToOne.map(function (_, index) {
|
|
27169
|
+
return newAvgOneToOne[index];
|
|
27170
|
+
}));
|
|
27171
|
+
}, [chartOneToOneData.overviewQuestionChoice]);
|
|
27172
|
+
|
|
27173
|
+
var _useState23 = useState([]),
|
|
27174
|
+
activeColumnClassReflection = _useState23[0],
|
|
27175
|
+
setActiveColumnClassReflection = _useState23[1];
|
|
27176
|
+
|
|
27177
|
+
var _useState24 = useState([]),
|
|
27178
|
+
seriesClassRefection = _useState24[0],
|
|
27179
|
+
setSeriesClassReflection = _useState24[1];
|
|
27180
|
+
|
|
27181
|
+
var _useState25 = useState(INITIAL_AVG),
|
|
27182
|
+
avgClassReflection = _useState25[0],
|
|
27183
|
+
setAvgClassReflection = _useState25[1];
|
|
27184
|
+
|
|
27185
|
+
var monthsClassReflection = chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice.map(function (i) {
|
|
27186
|
+
return (i === null || i === void 0 ? void 0 : i.month) || "";
|
|
27187
|
+
});
|
|
27188
|
+
var dataConvertedClassReflection = convertDataToDataChart(chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice);
|
|
27189
|
+
var newSeriesClassReflection = convertToSeriesColumnChartAndPercent(dataConvertedClassReflection, chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice);
|
|
27190
|
+
var newAvgClassReflection = convertToAvg(dataConvertedClassReflection, chartClassReflection === null || chartClassReflection === void 0 ? void 0 : chartClassReflection.overviewQuestionChoice, monthsClassReflection);
|
|
27191
|
+
|
|
27192
|
+
var handleActiveColumnClassReflection = function handleActiveColumnClassReflection(index) {
|
|
27193
|
+
var newActiveColumn = [].concat(activeColumnClassReflection);
|
|
27194
|
+
newActiveColumn[index] = !newActiveColumn[index];
|
|
27195
|
+
setActiveColumnClassReflection(newActiveColumn);
|
|
27196
|
+
setSeriesClassReflection(newSeriesClassReflection === null || newSeriesClassReflection === void 0 ? void 0 : newSeriesClassReflection.filter(function (_, idx) {
|
|
27197
|
+
return newActiveColumn[idx];
|
|
27198
|
+
}));
|
|
27199
|
+
setAvgClassReflection(newAvgClassReflection === null || newAvgClassReflection === void 0 ? void 0 : newAvgClassReflection.map(function (_, idx) {
|
|
27200
|
+
return newActiveColumn[idx] ? newAvgOneToOne[idx] : 0;
|
|
27201
|
+
}));
|
|
27202
|
+
};
|
|
27203
|
+
|
|
27204
|
+
useEffect(function () {
|
|
27205
|
+
setSeriesClassReflection(newSeriesClassReflection);
|
|
27206
|
+
setActiveColumnClassReflection(dataConvertedClassReflection.map(function (_i) {
|
|
27207
|
+
return true;
|
|
27208
|
+
}));
|
|
27209
|
+
setAvgClassReflection(newAvgClassReflection === null || newAvgClassReflection === void 0 ? void 0 : newAvgClassReflection.map(function (_, index) {
|
|
27210
|
+
return newAvgClassReflection[index];
|
|
27211
|
+
}));
|
|
27212
|
+
}, [chartClassReflection.overviewQuestionChoice]);
|
|
27213
|
+
|
|
27214
|
+
var _useState26 = useState([]),
|
|
27215
|
+
activeColumnConference = _useState26[0],
|
|
27216
|
+
setActiveColumnConference = _useState26[1];
|
|
27217
|
+
|
|
27218
|
+
var _useState27 = useState([]),
|
|
27219
|
+
seriesConference = _useState27[0],
|
|
27220
|
+
setSeriesConference = _useState27[1];
|
|
27221
|
+
|
|
27222
|
+
var _useState28 = useState(INITIAL_AVG),
|
|
27223
|
+
avgConference = _useState28[0],
|
|
27224
|
+
setAvgConference = _useState28[1];
|
|
27225
|
+
|
|
27226
|
+
var monthsConference = chartConference === null || chartConference === void 0 ? void 0 : (_chartConference$over = chartConference.overviewQuestionChoice) === null || _chartConference$over === void 0 ? void 0 : _chartConference$over.map(function (i) {
|
|
27227
|
+
return (i === null || i === void 0 ? void 0 : i.month) || "";
|
|
27228
|
+
});
|
|
27229
|
+
var dataConvertedConference = convertDataToDataChart(chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice);
|
|
27230
|
+
var newSeriesConference = convertToSeriesColumnChartAndPercent(dataConvertedConference, chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice);
|
|
27231
|
+
var newAvgConference = convertToAvg(dataConvertedConference, chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice, monthsConference);
|
|
27232
|
+
|
|
27233
|
+
var handleActiveColumnConference = function handleActiveColumnConference(index) {
|
|
27234
|
+
var newActiveColumn = [].concat(activeColumnConference);
|
|
27235
|
+
newActiveColumn[index] = !newActiveColumn[index];
|
|
27236
|
+
setActiveColumnConference(newActiveColumn);
|
|
27237
|
+
setSeriesConference(newSeriesConference === null || newSeriesConference === void 0 ? void 0 : newSeriesConference.filter(function (_, idx) {
|
|
27238
|
+
return newActiveColumn[idx];
|
|
27239
|
+
}));
|
|
27240
|
+
setAvgConference(newAvgConference === null || newAvgConference === void 0 ? void 0 : newAvgConference.map(function (_, idx) {
|
|
27241
|
+
return newActiveColumn[idx] ? newAvgConference[idx] : 0;
|
|
27242
|
+
}));
|
|
27243
|
+
};
|
|
27244
|
+
|
|
27245
|
+
useEffect(function () {
|
|
27246
|
+
setSeriesConference(newSeriesConference);
|
|
27247
|
+
setActiveColumnConference(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
|
|
27248
|
+
return true;
|
|
27249
|
+
}));
|
|
27250
|
+
setAvgConference(newAvgConference === null || newAvgConference === void 0 ? void 0 : newAvgConference.map(function (_, idx) {
|
|
27251
|
+
return newAvgConference[idx];
|
|
27252
|
+
}));
|
|
27253
|
+
}, [chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice]);
|
|
27254
|
+
|
|
27255
|
+
var _useState29 = useState([]),
|
|
27256
|
+
activeColumnSafety = _useState29[0],
|
|
27257
|
+
setActiveColumnSafety = _useState29[1];
|
|
27258
|
+
|
|
27259
|
+
var _useState30 = useState([]),
|
|
27260
|
+
seriesSafety = _useState30[0],
|
|
27261
|
+
setSeriesSafety = _useState30[1];
|
|
27262
|
+
|
|
27263
|
+
var _useState31 = useState(INITIAL_AVG),
|
|
27264
|
+
avgSafety = _useState31[0],
|
|
27265
|
+
setAvgSafety = _useState31[1];
|
|
27266
|
+
|
|
27267
|
+
var monthsSafety = safety === null || safety === void 0 ? void 0 : (_safety$overviewQuest = safety.overviewQuestionChoice) === null || _safety$overviewQuest === void 0 ? void 0 : _safety$overviewQuest.map(function (i) {
|
|
27268
|
+
return (i === null || i === void 0 ? void 0 : i.month) || "";
|
|
27269
|
+
});
|
|
27270
|
+
var dataConvertedSafety = convertDataToDataChart(safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice);
|
|
27271
|
+
var newSeriesSafety = convertToSeriesColumnChartAndPercent(dataConvertedSafety, safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice);
|
|
27272
|
+
var newAvgSafety = convertToAvg(dataConvertedSafety, safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice, monthsSafety);
|
|
27273
|
+
|
|
27274
|
+
var handleActiveColumnSafety = function handleActiveColumnSafety(index) {
|
|
27275
|
+
var newActiveColumn = [].concat(activeColumnSafety);
|
|
27276
|
+
newActiveColumn[index] = !newActiveColumn[index];
|
|
27277
|
+
setActiveColumnSafety(newActiveColumn);
|
|
27278
|
+
setSeriesSafety(newSeriesSafety === null || newSeriesSafety === void 0 ? void 0 : newSeriesSafety.filter(function (_, idx) {
|
|
27279
|
+
return newActiveColumn[idx];
|
|
27280
|
+
}));
|
|
27281
|
+
setAvgSafety(newAvgSafety === null || newAvgSafety === void 0 ? void 0 : newAvgSafety.map(function (_, idx) {
|
|
27282
|
+
return newActiveColumn[idx] ? newAvgSafety[idx] : 0;
|
|
27283
|
+
}));
|
|
27284
|
+
};
|
|
27285
|
+
|
|
27286
|
+
useEffect(function () {
|
|
27287
|
+
setSeriesSafety(newSeriesSafety);
|
|
27288
|
+
setActiveColumnSafety(dataConvertedSafety === null || dataConvertedSafety === void 0 ? void 0 : dataConvertedSafety.map(function (_i) {
|
|
27289
|
+
return true;
|
|
27290
|
+
}));
|
|
27291
|
+
setAvgSafety(newAvgSafety === null || newAvgSafety === void 0 ? void 0 : newAvgSafety.map(function (_, idx) {
|
|
27292
|
+
return newAvgSafety[idx];
|
|
27293
|
+
}));
|
|
27294
|
+
}, [safety === null || safety === void 0 ? void 0 : safety.overviewQuestionChoice]);
|
|
27295
|
+
|
|
27296
|
+
var _useState32 = useState([]),
|
|
27297
|
+
selectedToPrint = _useState32[0],
|
|
27298
|
+
setSelectedToPrint = _useState32[1];
|
|
27299
|
+
|
|
27300
|
+
var handleSelectToPrint = function handleSelectToPrint(checked, data, chartType) {
|
|
27301
|
+
var updateSelectToPrint = [].concat(selectedToPrint);
|
|
27302
|
+
var foundItem = updateSelectToPrint === null || updateSelectToPrint === void 0 ? void 0 : updateSelectToPrint.find(function (e) {
|
|
27303
|
+
return e.identification == data.id;
|
|
27304
|
+
});
|
|
27305
|
+
|
|
27306
|
+
if (checked) {
|
|
27307
|
+
if (!!data.id && !foundItem) {
|
|
27308
|
+
updateSelectToPrint.push({
|
|
27309
|
+
id: data.id,
|
|
27310
|
+
identification: data.id,
|
|
27311
|
+
label: data.label,
|
|
27312
|
+
children: data.children,
|
|
27313
|
+
chartType: chartType
|
|
27314
|
+
});
|
|
27315
|
+
}
|
|
27316
|
+
|
|
27317
|
+
if (!!data && foundItem && foundItem.id == null) {
|
|
27318
|
+
var itemIndex = updateSelectToPrint.indexOf(foundItem);
|
|
27319
|
+
updateSelectToPrint[itemIndex].id = data.id;
|
|
27320
|
+
updateSelectToPrint[itemIndex].children = data.children;
|
|
27321
|
+
}
|
|
27322
|
+
} else {
|
|
27323
|
+
var _itemIndex = updateSelectToPrint.indexOf(foundItem);
|
|
27324
|
+
|
|
27325
|
+
updateSelectToPrint[_itemIndex].id = null;
|
|
27326
|
+
updateSelectToPrint[_itemIndex].children = null;
|
|
27327
|
+
}
|
|
27328
|
+
|
|
27329
|
+
setSelectedToPrint(updateSelectToPrint);
|
|
27330
|
+
};
|
|
27331
|
+
|
|
27332
|
+
var checkSelectedItem = function checkSelectedItem(id) {
|
|
27333
|
+
for (var _iterator = _createForOfIteratorHelperLoose(selectedToPrint), _step; !(_step = _iterator()).done;) {
|
|
27334
|
+
var item = _step.value;
|
|
27335
|
+
if (item.id === id) return true;
|
|
27336
|
+
}
|
|
27337
|
+
|
|
27338
|
+
return false;
|
|
27339
|
+
};
|
|
27340
|
+
|
|
27095
27341
|
var callApi = useCallback(function (apiCaller, setData, defaultData, type) {
|
|
27096
27342
|
try {
|
|
27097
27343
|
var _temp2 = _catch(function () {
|
|
@@ -27244,20 +27490,45 @@ var useDashboard = function useDashboard() {
|
|
|
27244
27490
|
setGenderOfStudent: setGenderOfStudent,
|
|
27245
27491
|
handleFilterStudent: handleFilterStudent,
|
|
27246
27492
|
handleFilterTeacher: handleFilterTeacher,
|
|
27247
|
-
|
|
27493
|
+
handleSelectToPrint: handleSelectToPrint,
|
|
27494
|
+
checkSelectedItem: checkSelectedItem,
|
|
27495
|
+
selectedToPrint: selectedToPrint,
|
|
27496
|
+
setSelectedToPrint: setSelectedToPrint,
|
|
27497
|
+
onChangeFilters: onChangeFilters,
|
|
27498
|
+
handleActiveColumnOneToOne: handleActiveColumnOneToOne,
|
|
27499
|
+
seriesOneToOne: seriesOneToOne,
|
|
27500
|
+
avgOneToOne: avgOneToOne,
|
|
27501
|
+
dataConvertedOneToOne: dataConvertedOneToOne,
|
|
27502
|
+
monthsOneToOne: monthsOneToOne,
|
|
27503
|
+
activeColumnOneToOne: activeColumnOneToOne,
|
|
27504
|
+
handleActiveColumnClassReflection: handleActiveColumnClassReflection,
|
|
27505
|
+
seriesClassRefection: seriesClassRefection,
|
|
27506
|
+
avgClassReflection: avgClassReflection,
|
|
27507
|
+
dataConvertedClassReflection: dataConvertedClassReflection,
|
|
27508
|
+
monthsClassReflection: monthsClassReflection,
|
|
27509
|
+
activeColumnClassReflection: activeColumnClassReflection,
|
|
27510
|
+
handleActiveColumnConference: handleActiveColumnConference,
|
|
27511
|
+
seriesConference: seriesConference,
|
|
27512
|
+
avgConference: avgConference,
|
|
27513
|
+
dataConvertedConference: dataConvertedConference,
|
|
27514
|
+
monthsConference: monthsConference,
|
|
27515
|
+
activeColumnConference: activeColumnConference,
|
|
27516
|
+
handleActiveColumnSafety: handleActiveColumnSafety,
|
|
27517
|
+
seriesSafety: seriesSafety,
|
|
27518
|
+
avgSafety: avgSafety,
|
|
27519
|
+
dataConvertedSafety: dataConvertedSafety,
|
|
27520
|
+
monthsSafety: monthsSafety,
|
|
27521
|
+
activeColumnSafety: activeColumnSafety
|
|
27248
27522
|
};
|
|
27249
27523
|
};
|
|
27250
27524
|
|
|
27251
27525
|
var useChartDatas = function useChartDatas() {
|
|
27252
27526
|
var _useDashboard = useDashboard(),
|
|
27253
27527
|
topLearningStrategies = _useDashboard.topLearningStrategies,
|
|
27254
|
-
chartOneToOneData = _useDashboard.chartOneToOneData,
|
|
27255
27528
|
readinessToLearning = _useDashboard.readinessToLearning,
|
|
27256
|
-
chartClassReflection = _useDashboard.chartClassReflection,
|
|
27257
27529
|
studentByAge = _useDashboard.studentByAge,
|
|
27258
27530
|
studentByGender = _useDashboard.studentByGender,
|
|
27259
27531
|
studentByGrade = _useDashboard.studentByGrade,
|
|
27260
|
-
chartConference = _useDashboard.chartConference,
|
|
27261
27532
|
handleChangeFilters = _useDashboard.handleChangeFilters,
|
|
27262
27533
|
bandScore = _useDashboard.bandScore,
|
|
27263
27534
|
user = _useDashboard.user,
|
|
@@ -27265,9 +27536,32 @@ var useChartDatas = function useChartDatas() {
|
|
|
27265
27536
|
handleFilterStudent = _useDashboard.handleFilterStudent,
|
|
27266
27537
|
handleFilterTeacher = _useDashboard.handleFilterTeacher,
|
|
27267
27538
|
filter = _useDashboard.filter,
|
|
27268
|
-
safety = _useDashboard.safety,
|
|
27269
27539
|
listTotalTime = _useDashboard.listTotalTime,
|
|
27270
|
-
onChangeFilters = _useDashboard.onChangeFilters
|
|
27540
|
+
onChangeFilters = _useDashboard.onChangeFilters,
|
|
27541
|
+
handleActiveColumnOneToOne = _useDashboard.handleActiveColumnOneToOne,
|
|
27542
|
+
seriesOneToOne = _useDashboard.seriesOneToOne,
|
|
27543
|
+
avgOneToOne = _useDashboard.avgOneToOne,
|
|
27544
|
+
monthsOneToOne = _useDashboard.monthsOneToOne,
|
|
27545
|
+
dataConvertedOneToOne = _useDashboard.dataConvertedOneToOne,
|
|
27546
|
+
activeColumnOneToOne = _useDashboard.activeColumnOneToOne,
|
|
27547
|
+
handleActiveColumnClassReflection = _useDashboard.handleActiveColumnClassReflection,
|
|
27548
|
+
seriesClassRefection = _useDashboard.seriesClassRefection,
|
|
27549
|
+
avgClassReflection = _useDashboard.avgClassReflection,
|
|
27550
|
+
monthsClassReflection = _useDashboard.monthsClassReflection,
|
|
27551
|
+
dataConvertedClassReflection = _useDashboard.dataConvertedClassReflection,
|
|
27552
|
+
activeColumnClassReflection = _useDashboard.activeColumnClassReflection,
|
|
27553
|
+
handleActiveColumnConference = _useDashboard.handleActiveColumnConference,
|
|
27554
|
+
seriesConference = _useDashboard.seriesConference,
|
|
27555
|
+
avgConference = _useDashboard.avgConference,
|
|
27556
|
+
monthsConference = _useDashboard.monthsConference,
|
|
27557
|
+
dataConvertedConference = _useDashboard.dataConvertedConference,
|
|
27558
|
+
activeColumnConference = _useDashboard.activeColumnConference,
|
|
27559
|
+
handleActiveColumnSafety = _useDashboard.handleActiveColumnSafety,
|
|
27560
|
+
seriesSafety = _useDashboard.seriesSafety,
|
|
27561
|
+
avgSafety = _useDashboard.avgSafety,
|
|
27562
|
+
monthsSafety = _useDashboard.monthsSafety,
|
|
27563
|
+
dataConvertedSafety = _useDashboard.dataConvertedSafety,
|
|
27564
|
+
activeColumnSafety = _useDashboard.activeColumnSafety;
|
|
27271
27565
|
|
|
27272
27566
|
var LIST_FILTERS_LEFT = [{
|
|
27273
27567
|
name: FILTER_NAME.Calendar,
|
|
@@ -27318,7 +27612,7 @@ var useChartDatas = function useChartDatas() {
|
|
|
27318
27612
|
isShowChangeChart: false,
|
|
27319
27613
|
options: []
|
|
27320
27614
|
}, {
|
|
27321
|
-
id: "
|
|
27615
|
+
id: "readiness_to_learn",
|
|
27322
27616
|
label: "Readiness to learn",
|
|
27323
27617
|
children: function children(_) {
|
|
27324
27618
|
return React.createElement(BubbleChartCustom$1, {
|
|
@@ -27332,9 +27626,14 @@ var useChartDatas = function useChartDatas() {
|
|
|
27332
27626
|
label: "1 To 1",
|
|
27333
27627
|
children: function children(typeChart) {
|
|
27334
27628
|
return React.createElement(ColumnChartAndPercent$1, {
|
|
27335
|
-
data:
|
|
27629
|
+
data: dataConvertedOneToOne,
|
|
27336
27630
|
id: "1_to_1",
|
|
27337
|
-
typeChart: typeChart
|
|
27631
|
+
typeChart: typeChart,
|
|
27632
|
+
onActiveColumn: handleActiveColumnOneToOne,
|
|
27633
|
+
activeColumn: activeColumnOneToOne,
|
|
27634
|
+
series: seriesOneToOne,
|
|
27635
|
+
avg: avgOneToOne,
|
|
27636
|
+
months: monthsOneToOne
|
|
27338
27637
|
});
|
|
27339
27638
|
},
|
|
27340
27639
|
isShowChangeChart: true,
|
|
@@ -27350,10 +27649,15 @@ var useChartDatas = function useChartDatas() {
|
|
|
27350
27649
|
label: "Class Reflection",
|
|
27351
27650
|
children: function children(typeChart) {
|
|
27352
27651
|
return React.createElement(ColumnChartAndPercent$1, {
|
|
27353
|
-
data:
|
|
27652
|
+
data: dataConvertedClassReflection,
|
|
27354
27653
|
typeChart: typeChart,
|
|
27355
27654
|
id: "class_reflection",
|
|
27356
|
-
isHasLineChart: true
|
|
27655
|
+
isHasLineChart: true,
|
|
27656
|
+
onActiveColumn: handleActiveColumnClassReflection,
|
|
27657
|
+
activeColumn: activeColumnClassReflection,
|
|
27658
|
+
series: seriesClassRefection,
|
|
27659
|
+
avg: avgClassReflection,
|
|
27660
|
+
months: monthsClassReflection
|
|
27357
27661
|
});
|
|
27358
27662
|
},
|
|
27359
27663
|
isShowChangeChart: true,
|
|
@@ -27369,9 +27673,14 @@ var useChartDatas = function useChartDatas() {
|
|
|
27369
27673
|
label: "Conference",
|
|
27370
27674
|
children: function children(typeChart) {
|
|
27371
27675
|
return React.createElement(ColumnChartAndPercent$1, {
|
|
27372
|
-
data:
|
|
27676
|
+
data: dataConvertedConference,
|
|
27373
27677
|
typeChart: typeChart,
|
|
27374
|
-
id: "conference"
|
|
27678
|
+
id: "conference",
|
|
27679
|
+
onActiveColumn: handleActiveColumnConference,
|
|
27680
|
+
activeColumn: activeColumnConference,
|
|
27681
|
+
series: seriesConference,
|
|
27682
|
+
avg: avgConference,
|
|
27683
|
+
months: monthsConference
|
|
27375
27684
|
});
|
|
27376
27685
|
},
|
|
27377
27686
|
isShowChangeChart: true,
|
|
@@ -27387,10 +27696,15 @@ var useChartDatas = function useChartDatas() {
|
|
|
27387
27696
|
label: "Safety",
|
|
27388
27697
|
children: function children(typeChart) {
|
|
27389
27698
|
return React.createElement(ColumnChartAndPercent$1, {
|
|
27390
|
-
data:
|
|
27699
|
+
data: dataConvertedSafety,
|
|
27391
27700
|
typeChart: typeChart,
|
|
27392
27701
|
id: "safety",
|
|
27393
|
-
isHasLineChart: true
|
|
27702
|
+
isHasLineChart: true,
|
|
27703
|
+
onActiveColumn: handleActiveColumnSafety,
|
|
27704
|
+
activeColumn: activeColumnSafety,
|
|
27705
|
+
series: seriesSafety,
|
|
27706
|
+
avg: avgSafety,
|
|
27707
|
+
months: monthsSafety
|
|
27394
27708
|
});
|
|
27395
27709
|
},
|
|
27396
27710
|
isShowChangeChart: true,
|
|
@@ -27404,8 +27718,9 @@ var useChartDatas = function useChartDatas() {
|
|
|
27404
27718
|
}, {
|
|
27405
27719
|
id: "Student_by_age",
|
|
27406
27720
|
label: "Student by age",
|
|
27407
|
-
children: function children(_) {
|
|
27721
|
+
children: function children(_, columnFlex) {
|
|
27408
27722
|
return React.createElement(StudentByAgeAndGender$1, {
|
|
27723
|
+
columnFlex: columnFlex,
|
|
27409
27724
|
studentByAgeData: studentByAge,
|
|
27410
27725
|
studentByGenderData: studentByGender
|
|
27411
27726
|
});
|
|
@@ -27966,6 +28281,778 @@ var TotalCard = function TotalCard(_ref) {
|
|
|
27966
28281
|
}, value)));
|
|
27967
28282
|
};
|
|
27968
28283
|
|
|
28284
|
+
var headerLogo = "../images/logoV1-2.png";
|
|
28285
|
+
|
|
28286
|
+
var DashboardToPDF = function DashboardToPDF(props) {
|
|
28287
|
+
var selectedToPDF = props.selectedToPDF,
|
|
28288
|
+
initialData = props.initialData,
|
|
28289
|
+
typeChartList = props.typeChartList;
|
|
28290
|
+
var dispatch = useDispatch();
|
|
28291
|
+
|
|
28292
|
+
var _useDashboard = useDashboard(),
|
|
28293
|
+
chartOneToOneData = _useDashboard.chartOneToOneData,
|
|
28294
|
+
topLearningStrategies = _useDashboard.topLearningStrategies,
|
|
28295
|
+
chartClassReflection = _useDashboard.chartClassReflection,
|
|
28296
|
+
chartConference = _useDashboard.chartConference,
|
|
28297
|
+
safety = _useDashboard.safety;
|
|
28298
|
+
|
|
28299
|
+
var chartHightImpactLearningStrategie = selectedToPDF.find(function (i) {
|
|
28300
|
+
return i.id === "high_impact_learning_strategie";
|
|
28301
|
+
});
|
|
28302
|
+
var chartReadinessToLearn = selectedToPDF.find(function (i) {
|
|
28303
|
+
return i.id === "readiness_to_learn";
|
|
28304
|
+
});
|
|
28305
|
+
var chartOneToOne = selectedToPDF.find(function (i) {
|
|
28306
|
+
return i.id === "1_to_1";
|
|
28307
|
+
});
|
|
28308
|
+
var chartClassReflectionPDF = selectedToPDF.find(function (i) {
|
|
28309
|
+
return i.id === "class_reflection";
|
|
28310
|
+
});
|
|
28311
|
+
var chartConferecePDF = selectedToPDF.find(function (i) {
|
|
28312
|
+
return i.id === "conference";
|
|
28313
|
+
});
|
|
28314
|
+
var chartSafety = selectedToPDF.find(function (i) {
|
|
28315
|
+
return i.id === "safety";
|
|
28316
|
+
});
|
|
28317
|
+
var chartStudentByAge = selectedToPDF.find(function (i) {
|
|
28318
|
+
return i.id === "Student_by_age";
|
|
28319
|
+
});
|
|
28320
|
+
var chartStudentByGrade = selectedToPDF.find(function (i) {
|
|
28321
|
+
return i.id === "student_by_grade";
|
|
28322
|
+
});
|
|
28323
|
+
|
|
28324
|
+
var generatePDF = function generatePDF() {
|
|
28325
|
+
try {
|
|
28326
|
+
var _temp19 = function _temp19() {
|
|
28327
|
+
dispatch(setLoading(false));
|
|
28328
|
+
};
|
|
28329
|
+
|
|
28330
|
+
dispatch(setLoading(true));
|
|
28331
|
+
|
|
28332
|
+
var _temp20 = _catch(function () {
|
|
28333
|
+
function _temp16() {
|
|
28334
|
+
function _temp14() {
|
|
28335
|
+
function _temp12() {
|
|
28336
|
+
function _temp10() {
|
|
28337
|
+
function _temp8() {
|
|
28338
|
+
function _temp6() {
|
|
28339
|
+
function _temp4() {
|
|
28340
|
+
function _temp2() {
|
|
28341
|
+
doc.save("DashBoard.pdf");
|
|
28342
|
+
}
|
|
28343
|
+
|
|
28344
|
+
var _temp = function () {
|
|
28345
|
+
if (!!chartStudentByGrade) {
|
|
28346
|
+
var _selectedToPDF;
|
|
28347
|
+
|
|
28348
|
+
var line = 80;
|
|
28349
|
+
var left = 20;
|
|
28350
|
+
if (selectedToPDF.indexOf(chartStudentByGrade) != 0 && ((_selectedToPDF = selectedToPDF[selectedToPDF.indexOf(chartStudentByGrade) - 1]) === null || _selectedToPDF === void 0 ? void 0 : _selectedToPDF.id) != null) doc.addPage();
|
|
28351
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28352
|
+
doc.setFontSize(14);
|
|
28353
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28354
|
+
doc.text(chartStudentByGrade.label, left, line);
|
|
28355
|
+
var chart = document.getElementById("student_by_grade");
|
|
28356
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28357
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 140);
|
|
28358
|
+
});
|
|
28359
|
+
});
|
|
28360
|
+
}
|
|
28361
|
+
}();
|
|
28362
|
+
|
|
28363
|
+
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
28364
|
+
}
|
|
28365
|
+
|
|
28366
|
+
var _temp3 = function () {
|
|
28367
|
+
if (!!chartStudentByAge) {
|
|
28368
|
+
var _selectedToPDF2;
|
|
28369
|
+
|
|
28370
|
+
var line = 80;
|
|
28371
|
+
var left = 20;
|
|
28372
|
+
if (selectedToPDF.indexOf(chartStudentByAge) != 0 && ((_selectedToPDF2 = selectedToPDF[selectedToPDF.indexOf(chartStudentByAge) - 1]) === null || _selectedToPDF2 === void 0 ? void 0 : _selectedToPDF2.id) != null) doc.addPage();
|
|
28373
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28374
|
+
doc.setFontSize(14);
|
|
28375
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28376
|
+
doc.text(chartStudentByAge.label, left, line);
|
|
28377
|
+
var chart = document.getElementById("Student_by_age");
|
|
28378
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28379
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 20, line + 20, 800, 450);
|
|
28380
|
+
});
|
|
28381
|
+
});
|
|
28382
|
+
}
|
|
28383
|
+
}();
|
|
28384
|
+
|
|
28385
|
+
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
28386
|
+
}
|
|
28387
|
+
|
|
28388
|
+
var _temp5 = function () {
|
|
28389
|
+
if (!!chartSafety) {
|
|
28390
|
+
var _selectedToPDF3;
|
|
28391
|
+
|
|
28392
|
+
var line = 80;
|
|
28393
|
+
var left = 20;
|
|
28394
|
+
if (selectedToPDF.indexOf(chartSafety) != 0 && ((_selectedToPDF3 = selectedToPDF[selectedToPDF.indexOf(chartSafety) - 1]) === null || _selectedToPDF3 === void 0 ? void 0 : _selectedToPDF3.id) != null) doc.addPage();
|
|
28395
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28396
|
+
doc.setFontSize(14);
|
|
28397
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28398
|
+
doc.text(chartSafety.label, left, line);
|
|
28399
|
+
var chart = document.getElementById("safety");
|
|
28400
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28401
|
+
doc.setFontSize(8);
|
|
28402
|
+
|
|
28403
|
+
for (var i = 0; i < ((_safety$overviewQuest = safety.overviewQuestionChoice) === null || _safety$overviewQuest === void 0 ? void 0 : _safety$overviewQuest.length); i++) {
|
|
28404
|
+
var _safety$overviewQuest;
|
|
28405
|
+
|
|
28406
|
+
if (safety.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
|
|
28407
|
+
var _sortedResultQuestion, _sortedResultQuestion2, _sortedResultQuestion3, _sortedResultQuestion4, _sortedResultQuestion5, _sortedResultQuestion6;
|
|
28408
|
+
|
|
28409
|
+
var sortedResultQuestions = safety.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28410
|
+
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28411
|
+
});
|
|
28412
|
+
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>"))) || "";
|
|
28413
|
+
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>"))) || "";
|
|
28414
|
+
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>"))) || "";
|
|
28415
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28416
|
+
doc.text(safety.overviewQuestionChoice[i].month, left, line + 20);
|
|
28417
|
+
|
|
28418
|
+
if (bestResultQuestion1 != "") {
|
|
28419
|
+
var _sortedResultQuestion7;
|
|
28420
|
+
|
|
28421
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28422
|
+
doc.text(bestResultQuestion1, left + 10, line + 30);
|
|
28423
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28424
|
+
doc.text(((_sortedResultQuestion7 = sortedResultQuestions[0]) === null || _sortedResultQuestion7 === void 0 ? void 0 : _sortedResultQuestion7.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 4 + 15, line + 30);
|
|
28425
|
+
doc.setDrawColor(0);
|
|
28426
|
+
doc.setFillColor(64, 210, 204);
|
|
28427
|
+
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28428
|
+
}
|
|
28429
|
+
|
|
28430
|
+
if (bestResultQuestion2 != "") {
|
|
28431
|
+
var _sortedResultQuestion8;
|
|
28432
|
+
|
|
28433
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28434
|
+
doc.text(bestResultQuestion2, left + 10, line + 40);
|
|
28435
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28436
|
+
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);
|
|
28437
|
+
doc.setDrawColor(0);
|
|
28438
|
+
doc.setFillColor(120, 182, 226);
|
|
28439
|
+
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28440
|
+
}
|
|
28441
|
+
|
|
28442
|
+
if (bestResultQuestion3 != "") {
|
|
28443
|
+
var _sortedResultQuestion9;
|
|
28444
|
+
|
|
28445
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28446
|
+
doc.text(bestResultQuestion3, left + 10, line + 50);
|
|
28447
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28448
|
+
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);
|
|
28449
|
+
doc.setDrawColor(0);
|
|
28450
|
+
doc.setFillColor(255, 176, 79);
|
|
28451
|
+
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28452
|
+
}
|
|
28453
|
+
|
|
28454
|
+
if ((bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 5 + 5 + 10 > 100) {
|
|
28455
|
+
left = left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 5 + 20;
|
|
28456
|
+
} else if ((bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 5 + 5 + 10 > 100) {
|
|
28457
|
+
left = left + (bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 5 + 20;
|
|
28458
|
+
} else if ((bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 5 + 5 + 10 > 100) {
|
|
28459
|
+
left = left + (bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 5 + 20;
|
|
28460
|
+
} else {
|
|
28461
|
+
left = left + 100;
|
|
28462
|
+
}
|
|
28463
|
+
|
|
28464
|
+
if (left + 80 > WIDTH_PAPER) {
|
|
28465
|
+
left = 20;
|
|
28466
|
+
line += 60;
|
|
28467
|
+
}
|
|
28468
|
+
}
|
|
28469
|
+
}
|
|
28470
|
+
|
|
28471
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 170);
|
|
28472
|
+
});
|
|
28473
|
+
});
|
|
28474
|
+
}
|
|
28475
|
+
}();
|
|
28476
|
+
|
|
28477
|
+
return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
|
|
28478
|
+
}
|
|
28479
|
+
|
|
28480
|
+
var _temp7 = function () {
|
|
28481
|
+
if (!!chartConferecePDF) {
|
|
28482
|
+
var _selectedToPDF4;
|
|
28483
|
+
|
|
28484
|
+
var line = 80;
|
|
28485
|
+
var left = 20;
|
|
28486
|
+
if (selectedToPDF.indexOf(chartConferecePDF) != 0 && ((_selectedToPDF4 = selectedToPDF[selectedToPDF.indexOf(chartConferecePDF) - 1]) === null || _selectedToPDF4 === void 0 ? void 0 : _selectedToPDF4.id) != null) doc.addPage();
|
|
28487
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28488
|
+
doc.setFontSize(14);
|
|
28489
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28490
|
+
doc.text(chartConferecePDF.label, left, line);
|
|
28491
|
+
var chart = document.getElementById("conference");
|
|
28492
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28493
|
+
doc.setFontSize(8);
|
|
28494
|
+
|
|
28495
|
+
for (var i = 0; i < ((_chartConference$over = chartConference.overviewQuestionChoice) === null || _chartConference$over === void 0 ? void 0 : _chartConference$over.length); i++) {
|
|
28496
|
+
var _chartConference$over;
|
|
28497
|
+
|
|
28498
|
+
if (chartConference.overviewQuestionChoice[i].resultQuestion[0].questionId != 0 || chartConference.overviewQuestionChoice[i].resultQuestion[0].questionText != "") {
|
|
28499
|
+
var _sortedResultQuestion10, _sortedResultQuestion11, _sortedResultQuestion12, _sortedResultQuestion13, _sortedResultQuestion14, _sortedResultQuestion15;
|
|
28500
|
+
|
|
28501
|
+
var sortedResultQuestions = chartConference.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28502
|
+
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28503
|
+
});
|
|
28504
|
+
var resultQuestion1 = ((_sortedResultQuestion10 = sortedResultQuestions[0]) === null || _sortedResultQuestion10 === void 0 ? void 0 : _sortedResultQuestion10.questionText) || "";
|
|
28505
|
+
var resultQuestion2 = ((_sortedResultQuestion11 = sortedResultQuestions[1]) === null || _sortedResultQuestion11 === void 0 ? void 0 : _sortedResultQuestion11.questionText) || "";
|
|
28506
|
+
var resultQuestion3 = ((_sortedResultQuestion12 = sortedResultQuestions[2]) === null || _sortedResultQuestion12 === void 0 ? void 0 : _sortedResultQuestion12.questionText) || "";
|
|
28507
|
+
var resultQuestion4 = ((_sortedResultQuestion13 = sortedResultQuestions[3]) === null || _sortedResultQuestion13 === void 0 ? void 0 : _sortedResultQuestion13.questionText) || "";
|
|
28508
|
+
var resultQuestion5 = ((_sortedResultQuestion14 = sortedResultQuestions[4]) === null || _sortedResultQuestion14 === void 0 ? void 0 : _sortedResultQuestion14.questionText) || "";
|
|
28509
|
+
var resultQuestion6 = ((_sortedResultQuestion15 = sortedResultQuestions[5]) === null || _sortedResultQuestion15 === void 0 ? void 0 : _sortedResultQuestion15.questionText) || "";
|
|
28510
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28511
|
+
doc.text(chartConference.overviewQuestionChoice[i].month, left, line + 20);
|
|
28512
|
+
|
|
28513
|
+
if (resultQuestion1 != "") {
|
|
28514
|
+
var _sortedResultQuestion16;
|
|
28515
|
+
|
|
28516
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28517
|
+
doc.text(resultQuestion1, left + 10, line + 30);
|
|
28518
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28519
|
+
doc.text(((_sortedResultQuestion16 = sortedResultQuestions[0]) === null || _sortedResultQuestion16 === void 0 ? void 0 : _sortedResultQuestion16.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
|
|
28520
|
+
doc.setDrawColor(0);
|
|
28521
|
+
doc.setFillColor(64, 210, 204);
|
|
28522
|
+
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28523
|
+
}
|
|
28524
|
+
|
|
28525
|
+
if (resultQuestion2 != "") {
|
|
28526
|
+
var _sortedResultQuestion17;
|
|
28527
|
+
|
|
28528
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28529
|
+
doc.text(resultQuestion2, left + 10, line + 40);
|
|
28530
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28531
|
+
doc.text(((_sortedResultQuestion17 = sortedResultQuestions[1]) === null || _sortedResultQuestion17 === void 0 ? void 0 : _sortedResultQuestion17.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
|
|
28532
|
+
doc.setDrawColor(0);
|
|
28533
|
+
doc.setFillColor(120, 182, 226);
|
|
28534
|
+
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28535
|
+
}
|
|
28536
|
+
|
|
28537
|
+
if (resultQuestion3 != "") {
|
|
28538
|
+
var _sortedResultQuestion18;
|
|
28539
|
+
|
|
28540
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28541
|
+
doc.text(resultQuestion3, left + 10, line + 50);
|
|
28542
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28543
|
+
doc.text(((_sortedResultQuestion18 = sortedResultQuestions[2]) === null || _sortedResultQuestion18 === void 0 ? void 0 : _sortedResultQuestion18.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
|
|
28544
|
+
doc.setDrawColor(0);
|
|
28545
|
+
doc.setFillColor(255, 176, 79);
|
|
28546
|
+
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28547
|
+
}
|
|
28548
|
+
|
|
28549
|
+
if (resultQuestion4 != "") {
|
|
28550
|
+
var _sortedResultQuestion19;
|
|
28551
|
+
|
|
28552
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28553
|
+
doc.text(resultQuestion4, left + 10, line + 60);
|
|
28554
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28555
|
+
doc.text(((_sortedResultQuestion19 = sortedResultQuestions[2]) === null || _sortedResultQuestion19 === void 0 ? void 0 : _sortedResultQuestion19.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
|
|
28556
|
+
doc.setDrawColor(0);
|
|
28557
|
+
doc.setFillColor(206, 74, 73);
|
|
28558
|
+
doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
|
|
28559
|
+
}
|
|
28560
|
+
|
|
28561
|
+
if (resultQuestion5 != "") {
|
|
28562
|
+
var _sortedResultQuestion20;
|
|
28563
|
+
|
|
28564
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28565
|
+
doc.text(resultQuestion5, left + 10, line + 70);
|
|
28566
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28567
|
+
doc.text(((_sortedResultQuestion20 = sortedResultQuestions[2]) === null || _sortedResultQuestion20 === void 0 ? void 0 : _sortedResultQuestion20.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
|
|
28568
|
+
doc.setDrawColor(0);
|
|
28569
|
+
doc.setFillColor(27, 183, 177);
|
|
28570
|
+
doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
|
|
28571
|
+
}
|
|
28572
|
+
|
|
28573
|
+
if (resultQuestion6 != "") {
|
|
28574
|
+
var _sortedResultQuestion21;
|
|
28575
|
+
|
|
28576
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28577
|
+
doc.text(resultQuestion6, left + 10, line + 80);
|
|
28578
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28579
|
+
doc.text(((_sortedResultQuestion21 = sortedResultQuestions[2]) === null || _sortedResultQuestion21 === void 0 ? void 0 : _sortedResultQuestion21.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
|
|
28580
|
+
doc.setDrawColor(0);
|
|
28581
|
+
doc.setFillColor(75, 146, 206);
|
|
28582
|
+
doc.roundedRect(left, line + 75, 5, 5, 1, 1, "F");
|
|
28583
|
+
}
|
|
28584
|
+
|
|
28585
|
+
if ((resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 5 + 5 + 10 > 100) {
|
|
28586
|
+
left = left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 5 + 20;
|
|
28587
|
+
} else if ((resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 5 + 5 + 10 > 100) {
|
|
28588
|
+
left = left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 5 + 20;
|
|
28589
|
+
} else if ((resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 5 + 5 + 10 > 100) {
|
|
28590
|
+
left = left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 5 + 20;
|
|
28591
|
+
} else if ((resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 5 + 5 + 10 > 100) {
|
|
28592
|
+
left = left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 5 + 20;
|
|
28593
|
+
} else if ((resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 5 + 5 + 10 > 100) {
|
|
28594
|
+
left = left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 5 + 20;
|
|
28595
|
+
} else if ((resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 5 + 5 + 10 > 100) {
|
|
28596
|
+
left = left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 5 + 20;
|
|
28597
|
+
} else {
|
|
28598
|
+
left = left + 100;
|
|
28599
|
+
}
|
|
28600
|
+
|
|
28601
|
+
if (left + 80 > WIDTH_PAPER) {
|
|
28602
|
+
left = 20;
|
|
28603
|
+
line += 90;
|
|
28604
|
+
}
|
|
28605
|
+
}
|
|
28606
|
+
}
|
|
28607
|
+
|
|
28608
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 170);
|
|
28609
|
+
});
|
|
28610
|
+
});
|
|
28611
|
+
}
|
|
28612
|
+
}();
|
|
28613
|
+
|
|
28614
|
+
return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
|
|
28615
|
+
}
|
|
28616
|
+
|
|
28617
|
+
var _temp9 = function () {
|
|
28618
|
+
if (!!chartClassReflectionPDF) {
|
|
28619
|
+
var _selectedToPDF5;
|
|
28620
|
+
|
|
28621
|
+
var line = 80;
|
|
28622
|
+
var left = 20;
|
|
28623
|
+
if (selectedToPDF.indexOf(chartClassReflectionPDF) != 0 && ((_selectedToPDF5 = selectedToPDF[selectedToPDF.indexOf(chartClassReflectionPDF) - 1]) === null || _selectedToPDF5 === void 0 ? void 0 : _selectedToPDF5.id) != null) doc.addPage();
|
|
28624
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28625
|
+
doc.setFontSize(14);
|
|
28626
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28627
|
+
doc.text(chartClassReflectionPDF.label, left, line);
|
|
28628
|
+
var chart = document.getElementById("class_reflection");
|
|
28629
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28630
|
+
doc.setFontSize(8);
|
|
28631
|
+
|
|
28632
|
+
for (var i = 0; i < ((_chartClassReflection = chartClassReflection.overviewQuestionChoice) === null || _chartClassReflection === void 0 ? void 0 : _chartClassReflection.length); i++) {
|
|
28633
|
+
var _chartClassReflection;
|
|
28634
|
+
|
|
28635
|
+
if (chartClassReflection.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
|
|
28636
|
+
var _sortedResultQuestion22, _sortedResultQuestion23, _sortedResultQuestion24, _sortedResultQuestion25, _sortedResultQuestion26, _sortedResultQuestion27, _sortedResultQuestion28, _sortedResultQuestion29, _sortedResultQuestion30, _sortedResultQuestion31;
|
|
28637
|
+
|
|
28638
|
+
var sortedResultQuestions = chartClassReflection.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28639
|
+
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28640
|
+
});
|
|
28641
|
+
var resultQuestion1 = ((_sortedResultQuestion22 = sortedResultQuestions[0]) === null || _sortedResultQuestion22 === void 0 ? void 0 : _sortedResultQuestion22.questionText.slice(3, (_sortedResultQuestion23 = sortedResultQuestions[0]) === null || _sortedResultQuestion23 === void 0 ? void 0 : _sortedResultQuestion23.questionText.indexOf("</p>"))) || "";
|
|
28642
|
+
var resultQuestion2 = ((_sortedResultQuestion24 = sortedResultQuestions[1]) === null || _sortedResultQuestion24 === void 0 ? void 0 : _sortedResultQuestion24.questionText.slice(3, (_sortedResultQuestion25 = sortedResultQuestions[1]) === null || _sortedResultQuestion25 === void 0 ? void 0 : _sortedResultQuestion25.questionText.indexOf("</p>"))) || "";
|
|
28643
|
+
var resultQuestion3 = ((_sortedResultQuestion26 = sortedResultQuestions[2]) === null || _sortedResultQuestion26 === void 0 ? void 0 : _sortedResultQuestion26.questionText.slice(3, (_sortedResultQuestion27 = sortedResultQuestions[2]) === null || _sortedResultQuestion27 === void 0 ? void 0 : _sortedResultQuestion27.questionText.indexOf("</p>"))) || "";
|
|
28644
|
+
var resultQuestion4 = ((_sortedResultQuestion28 = sortedResultQuestions[3]) === null || _sortedResultQuestion28 === void 0 ? void 0 : _sortedResultQuestion28.questionText.slice(3, (_sortedResultQuestion29 = sortedResultQuestions[3]) === null || _sortedResultQuestion29 === void 0 ? void 0 : _sortedResultQuestion29.questionText.indexOf("</p>"))) || "";
|
|
28645
|
+
var resultQuestion5 = ((_sortedResultQuestion30 = sortedResultQuestions[4]) === null || _sortedResultQuestion30 === void 0 ? void 0 : _sortedResultQuestion30.questionText.slice(3, (_sortedResultQuestion31 = sortedResultQuestions[4]) === null || _sortedResultQuestion31 === void 0 ? void 0 : _sortedResultQuestion31.questionText.indexOf("</p>"))) || "";
|
|
28646
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28647
|
+
doc.text(chartClassReflection.overviewQuestionChoice[i].month, left, line + 20);
|
|
28648
|
+
|
|
28649
|
+
if (resultQuestion1 != "") {
|
|
28650
|
+
var _sortedResultQuestion32;
|
|
28651
|
+
|
|
28652
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28653
|
+
doc.text(resultQuestion1, left + 10, line + 30);
|
|
28654
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28655
|
+
doc.text(((_sortedResultQuestion32 = sortedResultQuestions[0]) === null || _sortedResultQuestion32 === void 0 ? void 0 : _sortedResultQuestion32.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 15, line + 30);
|
|
28656
|
+
doc.setDrawColor(0);
|
|
28657
|
+
doc.setFillColor(64, 210, 204);
|
|
28658
|
+
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28659
|
+
}
|
|
28660
|
+
|
|
28661
|
+
if (resultQuestion2 != "") {
|
|
28662
|
+
var _sortedResultQuestion33;
|
|
28663
|
+
|
|
28664
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28665
|
+
doc.text(resultQuestion2, left + 10, line + 40);
|
|
28666
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28667
|
+
doc.text(((_sortedResultQuestion33 = sortedResultQuestions[1]) === null || _sortedResultQuestion33 === void 0 ? void 0 : _sortedResultQuestion33.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 15, line + 40);
|
|
28668
|
+
doc.setDrawColor(0);
|
|
28669
|
+
doc.setFillColor(120, 182, 226);
|
|
28670
|
+
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28671
|
+
}
|
|
28672
|
+
|
|
28673
|
+
if (resultQuestion3 != "") {
|
|
28674
|
+
var _sortedResultQuestion34;
|
|
28675
|
+
|
|
28676
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28677
|
+
doc.text(resultQuestion3, left + 10, line + 50);
|
|
28678
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28679
|
+
doc.text(((_sortedResultQuestion34 = sortedResultQuestions[2]) === null || _sortedResultQuestion34 === void 0 ? void 0 : _sortedResultQuestion34.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 15, line + 50);
|
|
28680
|
+
doc.setDrawColor(0);
|
|
28681
|
+
doc.setFillColor(255, 176, 79);
|
|
28682
|
+
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28683
|
+
}
|
|
28684
|
+
|
|
28685
|
+
if (resultQuestion4 != "") {
|
|
28686
|
+
var _sortedResultQuestion35;
|
|
28687
|
+
|
|
28688
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28689
|
+
doc.text(resultQuestion4, left + 10, line + 60);
|
|
28690
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28691
|
+
doc.text(((_sortedResultQuestion35 = sortedResultQuestions[3]) === null || _sortedResultQuestion35 === void 0 ? void 0 : _sortedResultQuestion35.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 15, line + 60);
|
|
28692
|
+
doc.setDrawColor(0);
|
|
28693
|
+
doc.setFillColor(206, 74, 73);
|
|
28694
|
+
doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
|
|
28695
|
+
}
|
|
28696
|
+
|
|
28697
|
+
if (resultQuestion5 != "") {
|
|
28698
|
+
var _sortedResultQuestion36;
|
|
28699
|
+
|
|
28700
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28701
|
+
doc.text(resultQuestion5, left + 10, line + 70);
|
|
28702
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28703
|
+
doc.text(((_sortedResultQuestion36 = sortedResultQuestions[4]) === null || _sortedResultQuestion36 === void 0 ? void 0 : _sortedResultQuestion36.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 15, line + 70);
|
|
28704
|
+
doc.setDrawColor(0);
|
|
28705
|
+
doc.setFillColor(27, 183, 177);
|
|
28706
|
+
doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
|
|
28707
|
+
}
|
|
28708
|
+
|
|
28709
|
+
if ((resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 5 + 5 + 10 > 80) {
|
|
28710
|
+
left = left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 5 + 15;
|
|
28711
|
+
} else if ((resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 5 + 5 + 10 > 80) {
|
|
28712
|
+
left = left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 5 + 15;
|
|
28713
|
+
} else if ((resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 5 + 5 + 10 > 80) {
|
|
28714
|
+
left = left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 5 + 15;
|
|
28715
|
+
} else if ((resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 5 + 5 + 10 > 80) {
|
|
28716
|
+
left = left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 5 + 15;
|
|
28717
|
+
} else if ((resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 5 + 5 + 10 > 80) {
|
|
28718
|
+
left = left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 5 + 15;
|
|
28719
|
+
} else {
|
|
28720
|
+
left = left + 80;
|
|
28721
|
+
}
|
|
28722
|
+
|
|
28723
|
+
if (left + 80 > WIDTH_PAPER) {
|
|
28724
|
+
left = 20;
|
|
28725
|
+
line += 75;
|
|
28726
|
+
}
|
|
28727
|
+
}
|
|
28728
|
+
}
|
|
28729
|
+
|
|
28730
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 170);
|
|
28731
|
+
});
|
|
28732
|
+
});
|
|
28733
|
+
}
|
|
28734
|
+
}();
|
|
28735
|
+
|
|
28736
|
+
return _temp9 && _temp9.then ? _temp9.then(_temp10) : _temp10(_temp9);
|
|
28737
|
+
}
|
|
28738
|
+
|
|
28739
|
+
var _temp11 = function () {
|
|
28740
|
+
if (!!chartOneToOne) {
|
|
28741
|
+
var _selectedToPDF6;
|
|
28742
|
+
|
|
28743
|
+
var line = 80;
|
|
28744
|
+
var left = 20;
|
|
28745
|
+
if (selectedToPDF.indexOf(chartOneToOne) != 0 && ((_selectedToPDF6 = selectedToPDF[selectedToPDF.indexOf(chartOneToOne) - 1]) === null || _selectedToPDF6 === void 0 ? void 0 : _selectedToPDF6.id) != null) doc.addPage();
|
|
28746
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28747
|
+
doc.setFontSize(14);
|
|
28748
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28749
|
+
doc.text(chartOneToOne.label, left, line);
|
|
28750
|
+
var chart = document.getElementById("1_to_1");
|
|
28751
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28752
|
+
doc.setFontSize(8);
|
|
28753
|
+
|
|
28754
|
+
for (var i = 0; i < ((_chartOneToOneData$ov = chartOneToOneData.overviewQuestionChoice) === null || _chartOneToOneData$ov === void 0 ? void 0 : _chartOneToOneData$ov.length); i++) {
|
|
28755
|
+
var _chartOneToOneData$ov;
|
|
28756
|
+
|
|
28757
|
+
if (chartOneToOneData.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
|
|
28758
|
+
var _sortedResultQuestion37, _sortedResultQuestion38, _sortedResultQuestion39, _sortedResultQuestion40, _sortedResultQuestion41, _sortedResultQuestion42, _sortedResultQuestion43, _sortedResultQuestion44, _sortedResultQuestion45, _sortedResultQuestion46, _sortedResultQuestion47, _sortedResultQuestion48, _sortedResultQuestion49, _sortedResultQuestion50, _sortedResultQuestion51, _sortedResultQuestion52, _sortedResultQuestion53, _sortedResultQuestion54;
|
|
28759
|
+
|
|
28760
|
+
var sortedResultQuestions = chartOneToOneData.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28761
|
+
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28762
|
+
});
|
|
28763
|
+
var resultQuestion1 = ((_sortedResultQuestion37 = sortedResultQuestions[0]) === null || _sortedResultQuestion37 === void 0 ? void 0 : _sortedResultQuestion37.questionText.slice(3, (_sortedResultQuestion38 = sortedResultQuestions[0]) === null || _sortedResultQuestion38 === void 0 ? void 0 : _sortedResultQuestion38.questionText.indexOf("</p>"))) || "";
|
|
28764
|
+
var resultQuestion2 = ((_sortedResultQuestion39 = sortedResultQuestions[1]) === null || _sortedResultQuestion39 === void 0 ? void 0 : _sortedResultQuestion39.questionText.slice(3, (_sortedResultQuestion40 = sortedResultQuestions[1]) === null || _sortedResultQuestion40 === void 0 ? void 0 : _sortedResultQuestion40.questionText.indexOf("</p>"))) || "";
|
|
28765
|
+
var resultQuestion3 = ((_sortedResultQuestion41 = sortedResultQuestions[2]) === null || _sortedResultQuestion41 === void 0 ? void 0 : _sortedResultQuestion41.questionText.slice(3, (_sortedResultQuestion42 = sortedResultQuestions[2]) === null || _sortedResultQuestion42 === void 0 ? void 0 : _sortedResultQuestion42.questionText.indexOf("</p>"))) || "";
|
|
28766
|
+
var resultQuestion4 = ((_sortedResultQuestion43 = sortedResultQuestions[3]) === null || _sortedResultQuestion43 === void 0 ? void 0 : _sortedResultQuestion43.questionText.slice(3, (_sortedResultQuestion44 = sortedResultQuestions[3]) === null || _sortedResultQuestion44 === void 0 ? void 0 : _sortedResultQuestion44.questionText.indexOf("</p>"))) || "";
|
|
28767
|
+
var resultQuestion5 = ((_sortedResultQuestion45 = sortedResultQuestions[4]) === null || _sortedResultQuestion45 === void 0 ? void 0 : _sortedResultQuestion45.questionText.slice(3, (_sortedResultQuestion46 = sortedResultQuestions[4]) === null || _sortedResultQuestion46 === void 0 ? void 0 : _sortedResultQuestion46.questionText.indexOf("</p>"))) || "";
|
|
28768
|
+
var resultQuestion6 = ((_sortedResultQuestion47 = sortedResultQuestions[5]) === null || _sortedResultQuestion47 === void 0 ? void 0 : _sortedResultQuestion47.questionText.slice(3, (_sortedResultQuestion48 = sortedResultQuestions[5]) === null || _sortedResultQuestion48 === void 0 ? void 0 : _sortedResultQuestion48.questionText.indexOf("</p>"))) || "";
|
|
28769
|
+
var resultQuestion7 = ((_sortedResultQuestion49 = sortedResultQuestions[6]) === null || _sortedResultQuestion49 === void 0 ? void 0 : _sortedResultQuestion49.questionText.slice(3, (_sortedResultQuestion50 = sortedResultQuestions[6]) === null || _sortedResultQuestion50 === void 0 ? void 0 : _sortedResultQuestion50.questionText.indexOf("</p>"))) || "";
|
|
28770
|
+
var resultQuestion8 = ((_sortedResultQuestion51 = sortedResultQuestions[7]) === null || _sortedResultQuestion51 === void 0 ? void 0 : _sortedResultQuestion51.questionText.slice(3, (_sortedResultQuestion52 = sortedResultQuestions[7]) === null || _sortedResultQuestion52 === void 0 ? void 0 : _sortedResultQuestion52.questionText.indexOf("</p>"))) || "";
|
|
28771
|
+
var resultQuestion9 = ((_sortedResultQuestion53 = sortedResultQuestions[8]) === null || _sortedResultQuestion53 === void 0 ? void 0 : _sortedResultQuestion53.questionText.slice(3, (_sortedResultQuestion54 = sortedResultQuestions[8]) === null || _sortedResultQuestion54 === void 0 ? void 0 : _sortedResultQuestion54.questionText.indexOf("</p>"))) || "";
|
|
28772
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28773
|
+
doc.text(chartOneToOneData.overviewQuestionChoice[i].month, left, line + 20);
|
|
28774
|
+
|
|
28775
|
+
if (resultQuestion1 != "") {
|
|
28776
|
+
var _sortedResultQuestion55;
|
|
28777
|
+
|
|
28778
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28779
|
+
doc.text(resultQuestion1, left + 10, line + 30);
|
|
28780
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28781
|
+
doc.text(((_sortedResultQuestion55 = sortedResultQuestions[0]) === null || _sortedResultQuestion55 === void 0 ? void 0 : _sortedResultQuestion55.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
|
|
28782
|
+
doc.setDrawColor(0);
|
|
28783
|
+
doc.setFillColor(64, 210, 204);
|
|
28784
|
+
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28785
|
+
}
|
|
28786
|
+
|
|
28787
|
+
if (resultQuestion2 != "") {
|
|
28788
|
+
var _sortedResultQuestion56;
|
|
28789
|
+
|
|
28790
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28791
|
+
doc.text(resultQuestion2, left + 10, line + 40);
|
|
28792
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28793
|
+
doc.text(((_sortedResultQuestion56 = sortedResultQuestions[1]) === null || _sortedResultQuestion56 === void 0 ? void 0 : _sortedResultQuestion56.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
|
|
28794
|
+
doc.setDrawColor(0);
|
|
28795
|
+
doc.setFillColor(120, 182, 226);
|
|
28796
|
+
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28797
|
+
}
|
|
28798
|
+
|
|
28799
|
+
if (resultQuestion3 != "") {
|
|
28800
|
+
var _sortedResultQuestion57;
|
|
28801
|
+
|
|
28802
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28803
|
+
doc.text(resultQuestion3, left + 10, line + 50);
|
|
28804
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28805
|
+
doc.text(((_sortedResultQuestion57 = sortedResultQuestions[2]) === null || _sortedResultQuestion57 === void 0 ? void 0 : _sortedResultQuestion57.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
|
|
28806
|
+
doc.setDrawColor(0);
|
|
28807
|
+
doc.setFillColor(255, 176, 79);
|
|
28808
|
+
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28809
|
+
}
|
|
28810
|
+
|
|
28811
|
+
if (resultQuestion4 != "") {
|
|
28812
|
+
var _sortedResultQuestion58;
|
|
28813
|
+
|
|
28814
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28815
|
+
doc.text(resultQuestion4, left + 10, line + 60);
|
|
28816
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28817
|
+
doc.text(((_sortedResultQuestion58 = sortedResultQuestions[3]) === null || _sortedResultQuestion58 === void 0 ? void 0 : _sortedResultQuestion58.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
|
|
28818
|
+
doc.setDrawColor(0);
|
|
28819
|
+
doc.setFillColor(206, 74, 73);
|
|
28820
|
+
doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
|
|
28821
|
+
}
|
|
28822
|
+
|
|
28823
|
+
if (resultQuestion5 != "") {
|
|
28824
|
+
var _sortedResultQuestion59;
|
|
28825
|
+
|
|
28826
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28827
|
+
doc.text(resultQuestion5, left + 10, line + 70);
|
|
28828
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28829
|
+
doc.text(((_sortedResultQuestion59 = sortedResultQuestions[4]) === null || _sortedResultQuestion59 === void 0 ? void 0 : _sortedResultQuestion59.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
|
|
28830
|
+
doc.setDrawColor(0);
|
|
28831
|
+
doc.setFillColor(27, 183, 177);
|
|
28832
|
+
doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
|
|
28833
|
+
}
|
|
28834
|
+
|
|
28835
|
+
if (resultQuestion6 != "") {
|
|
28836
|
+
var _sortedResultQuestion60;
|
|
28837
|
+
|
|
28838
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28839
|
+
doc.text(resultQuestion6, left + 10, line + 80);
|
|
28840
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28841
|
+
doc.text(((_sortedResultQuestion60 = sortedResultQuestions[5]) === null || _sortedResultQuestion60 === void 0 ? void 0 : _sortedResultQuestion60.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
|
|
28842
|
+
doc.setDrawColor(0);
|
|
28843
|
+
doc.setFillColor(75, 146, 206);
|
|
28844
|
+
doc.roundedRect(left, line + 75, 5, 5, 1, 1, "F");
|
|
28845
|
+
}
|
|
28846
|
+
|
|
28847
|
+
if (resultQuestion7 != "") {
|
|
28848
|
+
var _sortedResultQuestion61;
|
|
28849
|
+
|
|
28850
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28851
|
+
doc.text(resultQuestion7, left + 10, line + 90);
|
|
28852
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28853
|
+
doc.text(((_sortedResultQuestion61 = sortedResultQuestions[6]) === null || _sortedResultQuestion61 === void 0 ? void 0 : _sortedResultQuestion61.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion7 === null || resultQuestion7 === void 0 ? void 0 : resultQuestion7.length) * 3 + 17, line + 90);
|
|
28854
|
+
doc.setDrawColor(0);
|
|
28855
|
+
doc.setFillColor(240, 148, 34);
|
|
28856
|
+
doc.roundedRect(left, line + 85, 5, 5, 1, 1, "F");
|
|
28857
|
+
}
|
|
28858
|
+
|
|
28859
|
+
if (resultQuestion8 != "") {
|
|
28860
|
+
var _sortedResultQuestion62;
|
|
28861
|
+
|
|
28862
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28863
|
+
doc.text(resultQuestion8, left + 10, line + 100);
|
|
28864
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28865
|
+
doc.text(((_sortedResultQuestion62 = sortedResultQuestions[7]) === null || _sortedResultQuestion62 === void 0 ? void 0 : _sortedResultQuestion62.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion8 === null || resultQuestion8 === void 0 ? void 0 : resultQuestion8.length) * 3 + 17, line + 100);
|
|
28866
|
+
doc.setDrawColor(0);
|
|
28867
|
+
doc.setFillColor(162, 51, 51);
|
|
28868
|
+
doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
|
|
28869
|
+
}
|
|
28870
|
+
|
|
28871
|
+
if (resultQuestion9 != "") {
|
|
28872
|
+
var _sortedResultQuestion63;
|
|
28873
|
+
|
|
28874
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28875
|
+
doc.text(resultQuestion9, left + 10, line + 110);
|
|
28876
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28877
|
+
doc.text(((_sortedResultQuestion63 = sortedResultQuestions[8]) === null || _sortedResultQuestion63 === void 0 ? void 0 : _sortedResultQuestion63.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion9 === null || resultQuestion9 === void 0 ? void 0 : resultQuestion9.length) * 3 + 17, line + 110);
|
|
28878
|
+
doc.setDrawColor(0);
|
|
28879
|
+
doc.setFillColor(11, 153, 148);
|
|
28880
|
+
doc.roundedRect(left, line + 105, 5, 5, 1, 1, "F");
|
|
28881
|
+
}
|
|
28882
|
+
|
|
28883
|
+
left = left + 100;
|
|
28884
|
+
|
|
28885
|
+
if (left + 80 > WIDTH_PAPER) {
|
|
28886
|
+
left = 20;
|
|
28887
|
+
line += 110;
|
|
28888
|
+
}
|
|
28889
|
+
}
|
|
28890
|
+
}
|
|
28891
|
+
|
|
28892
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 25, 420, 170);
|
|
28893
|
+
});
|
|
28894
|
+
});
|
|
28895
|
+
}
|
|
28896
|
+
}();
|
|
28897
|
+
|
|
28898
|
+
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
28899
|
+
}
|
|
28900
|
+
|
|
28901
|
+
var _temp13 = function () {
|
|
28902
|
+
if (!!chartReadinessToLearn) {
|
|
28903
|
+
var _selectedToPDF7;
|
|
28904
|
+
|
|
28905
|
+
var line = 80;
|
|
28906
|
+
var left = 20;
|
|
28907
|
+
if (selectedToPDF.indexOf(chartReadinessToLearn) != 0 && ((_selectedToPDF7 = selectedToPDF[selectedToPDF.indexOf(chartReadinessToLearn) - 1]) === null || _selectedToPDF7 === void 0 ? void 0 : _selectedToPDF7.id) != null) doc.addPage();
|
|
28908
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28909
|
+
doc.setFontSize(14);
|
|
28910
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28911
|
+
doc.text(chartReadinessToLearn.label, left, line);
|
|
28912
|
+
var chart = document.getElementById("readiness_to_learn");
|
|
28913
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28914
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 30, 420, 150);
|
|
28915
|
+
});
|
|
28916
|
+
});
|
|
28917
|
+
}
|
|
28918
|
+
}();
|
|
28919
|
+
|
|
28920
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
|
28921
|
+
}
|
|
28922
|
+
|
|
28923
|
+
var doc = new jsPDF({
|
|
28924
|
+
orientation: "p",
|
|
28925
|
+
unit: "px",
|
|
28926
|
+
format: "a4"
|
|
28927
|
+
});
|
|
28928
|
+
var WIDTH_PAPER = doc.internal.pageSize.width;
|
|
28929
|
+
|
|
28930
|
+
var createImageHeader = function createImageHeader() {
|
|
28931
|
+
try {
|
|
28932
|
+
var imageLogo = document.getElementById("header-logo");
|
|
28933
|
+
return Promise.resolve(html2canvas(imageLogo)).then(function (imageLogoCanvas) {
|
|
28934
|
+
doc.addImage(imageLogoCanvas.toDataURL("image/png", 1.0), "png", 20, 20, 100, 30);
|
|
28935
|
+
});
|
|
28936
|
+
} catch (e) {
|
|
28937
|
+
return Promise.reject(e);
|
|
28938
|
+
}
|
|
28939
|
+
};
|
|
28940
|
+
|
|
28941
|
+
var line = 80;
|
|
28942
|
+
var left = 20;
|
|
28943
|
+
|
|
28944
|
+
var _temp15 = function () {
|
|
28945
|
+
if (!!chartHightImpactLearningStrategie) {
|
|
28946
|
+
var line = 80;
|
|
28947
|
+
var left = 20;
|
|
28948
|
+
if (selectedToPDF.indexOf(chartHightImpactLearningStrategie) != 0 && selectedToPDF[selectedToPDF.indexOf(chartHightImpactLearningStrategie) - 1].id != null) doc.addPage();
|
|
28949
|
+
return Promise.resolve(createImageHeader()).then(function () {
|
|
28950
|
+
doc.setFontSize(14);
|
|
28951
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28952
|
+
doc.text(chartHightImpactLearningStrategie.label, left, line);
|
|
28953
|
+
var chart = document.getElementById("high_impact_learning_strategie");
|
|
28954
|
+
return Promise.resolve(html2canvas(chart)).then(function (canvas) {
|
|
28955
|
+
doc.setFontSize(8);
|
|
28956
|
+
|
|
28957
|
+
for (var j = 0; j < ((_topLearningStrategie = topLearningStrategies.learningStrategies) === null || _topLearningStrategie === void 0 ? void 0 : _topLearningStrategie.length); j++) {
|
|
28958
|
+
var _topLearningStrategie, _topLearningStrategie2, _topLearningStrategie3;
|
|
28959
|
+
|
|
28960
|
+
var sumUsagePoint = topLearningStrategies.learningStrategies[j].usagePoint.reduce(function (partialSum, a) {
|
|
28961
|
+
return partialSum + a;
|
|
28962
|
+
}, 0);
|
|
28963
|
+
var avgSumUsagePoint = sumUsagePoint / ((_topLearningStrategie2 = topLearningStrategies.learningStrategies[j].usagePoint) === null || _topLearningStrategie2 === void 0 ? void 0 : _topLearningStrategie2.length) || 0;
|
|
28964
|
+
|
|
28965
|
+
if (topLearningStrategies.learningStrategies[j].usageCount != 0 || ((_topLearningStrategie3 = topLearningStrategies.learningStrategies[j].usagePoint) === null || _topLearningStrategie3 === void 0 ? void 0 : _topLearningStrategie3.length) > 0) {
|
|
28966
|
+
var _topLearningStrategie4, _topLearningStrategie5, _topLearningStrategie6, _topLearningStrategie7;
|
|
28967
|
+
|
|
28968
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
28969
|
+
doc.text(topLearningStrategies.learningStrategies[j].learningStrategyName, left, line + 20);
|
|
28970
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
28971
|
+
doc.text("Usage count: " + topLearningStrategies.learningStrategies[j].usageCount || "0", left, line + 30);
|
|
28972
|
+
doc.text("Usage point: " + avgSumUsagePoint, left, line + 40);
|
|
28973
|
+
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;
|
|
28974
|
+
|
|
28975
|
+
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) {
|
|
28976
|
+
line += 40;
|
|
28977
|
+
left = 20;
|
|
28978
|
+
}
|
|
28979
|
+
}
|
|
28980
|
+
}
|
|
28981
|
+
|
|
28982
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 40, 420, 130);
|
|
28983
|
+
});
|
|
28984
|
+
});
|
|
28985
|
+
}
|
|
28986
|
+
}();
|
|
28987
|
+
|
|
28988
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
|
28989
|
+
}, function () {
|
|
28990
|
+
dispatch(setAlert({
|
|
28991
|
+
type: "danger",
|
|
28992
|
+
message: "Can't print"
|
|
28993
|
+
}));
|
|
28994
|
+
});
|
|
28995
|
+
|
|
28996
|
+
return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(_temp19) : _temp19(_temp20));
|
|
28997
|
+
} catch (e) {
|
|
28998
|
+
return Promise.reject(e);
|
|
28999
|
+
}
|
|
29000
|
+
};
|
|
29001
|
+
|
|
29002
|
+
return React.createElement("div", null, !!chartHightImpactLearningStrategie && React.createElement("div", {
|
|
29003
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29004
|
+
}, React.createElement("div", {
|
|
29005
|
+
id: chartHightImpactLearningStrategie.id
|
|
29006
|
+
}, chartHightImpactLearningStrategie.children())), !!chartReadinessToLearn && React.createElement("div", {
|
|
29007
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29008
|
+
}, React.createElement("div", {
|
|
29009
|
+
id: chartReadinessToLearn.id
|
|
29010
|
+
}, chartReadinessToLearn.children())), !!chartOneToOne && React.createElement("div", {
|
|
29011
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29012
|
+
}, React.createElement("div", {
|
|
29013
|
+
id: chartOneToOne.id
|
|
29014
|
+
}, chartOneToOne.children(typeChartList[initialData.map(function (i) {
|
|
29015
|
+
return i.id;
|
|
29016
|
+
}).indexOf(chartOneToOne === null || chartOneToOne === void 0 ? void 0 : chartOneToOne.id)]))), !!chartClassReflectionPDF && React.createElement("div", {
|
|
29017
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29018
|
+
}, React.createElement("div", {
|
|
29019
|
+
id: chartClassReflectionPDF.id
|
|
29020
|
+
}, chartClassReflectionPDF.children(typeChartList[initialData.map(function (i) {
|
|
29021
|
+
return i.id;
|
|
29022
|
+
}).indexOf(chartClassReflectionPDF === null || chartClassReflectionPDF === void 0 ? void 0 : chartClassReflectionPDF.id)]))), !!chartConferecePDF && React.createElement("div", {
|
|
29023
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29024
|
+
}, React.createElement("div", {
|
|
29025
|
+
id: chartConferecePDF.id
|
|
29026
|
+
}, chartConferecePDF.children(typeChartList[initialData.map(function (i) {
|
|
29027
|
+
return i.id;
|
|
29028
|
+
}).indexOf(chartConferecePDF === null || chartConferecePDF === void 0 ? void 0 : chartConferecePDF.id)]))), !!chartSafety && React.createElement("div", {
|
|
29029
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29030
|
+
}, React.createElement("div", {
|
|
29031
|
+
id: chartSafety.id
|
|
29032
|
+
}, chartSafety.children(typeChartList[initialData.map(function (i) {
|
|
29033
|
+
return i.id;
|
|
29034
|
+
}).indexOf(chartSafety === null || chartSafety === void 0 ? void 0 : chartSafety.id)]))), !!chartStudentByAge && React.createElement("div", {
|
|
29035
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29036
|
+
}, React.createElement("div", {
|
|
29037
|
+
id: chartStudentByAge.id
|
|
29038
|
+
}, chartStudentByAge.children(null, true))), !!chartStudentByGrade && React.createElement("div", {
|
|
29039
|
+
className: "" + styles$1["chart-to-canvas"]
|
|
29040
|
+
}, React.createElement("div", {
|
|
29041
|
+
id: chartStudentByGrade.id
|
|
29042
|
+
}, chartStudentByGrade.children())), React.createElement("div", {
|
|
29043
|
+
className: "" + styles$1["image-logo"],
|
|
29044
|
+
id: "header-logo"
|
|
29045
|
+
}, React.createElement("img", {
|
|
29046
|
+
src: headerLogo,
|
|
29047
|
+
alt: ""
|
|
29048
|
+
})), React.createElement(Button, {
|
|
29049
|
+
color: "success",
|
|
29050
|
+
onClick: function onClick() {
|
|
29051
|
+
selectedToPDF.length > 0 && generatePDF();
|
|
29052
|
+
}
|
|
29053
|
+
}, "Export"));
|
|
29054
|
+
};
|
|
29055
|
+
|
|
27969
29056
|
var Dashboard = function Dashboard() {
|
|
27970
29057
|
var _useChartDatas = useChartDatas(),
|
|
27971
29058
|
chartDashBoards = _useChartDatas.chartDashBoards,
|
|
@@ -27985,9 +29072,58 @@ var Dashboard = function Dashboard() {
|
|
|
27985
29072
|
teacherUserId = _useBehavior.teacherUserId,
|
|
27986
29073
|
changeCurrentTeacherUserId = _useBehavior.changeCurrentTeacherUserId;
|
|
27987
29074
|
|
|
29075
|
+
var _useDashboard = useDashboard(),
|
|
29076
|
+
handleSelectToPrint = _useDashboard.handleSelectToPrint,
|
|
29077
|
+
checkSelectedItem = _useDashboard.checkSelectedItem,
|
|
29078
|
+
selectedToPrint = _useDashboard.selectedToPrint,
|
|
29079
|
+
setSelectedToPrint = _useDashboard.setSelectedToPrint;
|
|
29080
|
+
|
|
29081
|
+
var _useState = useState(false),
|
|
29082
|
+
modal = _useState[0],
|
|
29083
|
+
setModal = _useState[1];
|
|
29084
|
+
|
|
29085
|
+
var toggle = function toggle() {
|
|
29086
|
+
setSelectedToPrint([]);
|
|
29087
|
+
setModal(!modal);
|
|
29088
|
+
};
|
|
29089
|
+
|
|
27988
29090
|
return React.createElement("div", {
|
|
27989
29091
|
className: "" + styles$1["block-dashboard"]
|
|
27990
|
-
}, React.createElement(
|
|
29092
|
+
}, React.createElement(Modal, {
|
|
29093
|
+
isOpen: modal,
|
|
29094
|
+
toggle: toggle,
|
|
29095
|
+
style: {
|
|
29096
|
+
overflow: "hidden"
|
|
29097
|
+
},
|
|
29098
|
+
centered: true
|
|
29099
|
+
}, React.createElement(ModalHeader, null, React.createElement("p", {
|
|
29100
|
+
className: "" + styles$1["title-modal"]
|
|
29101
|
+
}, "Export to PDF"), React.createElement("p", {
|
|
29102
|
+
className: "" + styles$1["header-desc-modal"]
|
|
29103
|
+
}, "The data is taken from the home screen."), React.createElement("p", {
|
|
29104
|
+
className: "" + styles$1["header-desc-modal"]
|
|
29105
|
+
}, "Make sure everything is set correctly before exporting.")), React.createElement(ModalBody, null, chartDashBoards === null || chartDashBoards === void 0 ? void 0 : chartDashBoards.map(function (item, index) {
|
|
29106
|
+
return React.createElement(FormGroup, {
|
|
29107
|
+
check: true,
|
|
29108
|
+
className: "" + styles$1["form-checkbox"]
|
|
29109
|
+
}, React.createElement(Input, {
|
|
29110
|
+
type: "checkbox",
|
|
29111
|
+
checked: checkSelectedItem(item.id),
|
|
29112
|
+
onChange: function onChange(event) {
|
|
29113
|
+
return handleSelectToPrint(event.target.checked, item, typeChartList[index]);
|
|
29114
|
+
}
|
|
29115
|
+
}), React.createElement(Label, {
|
|
29116
|
+
check: true,
|
|
29117
|
+
className: "" + styles$1["checkbox-content"]
|
|
29118
|
+
}, item.label));
|
|
29119
|
+
})), React.createElement(ModalFooter, null, React.createElement(Button, {
|
|
29120
|
+
color: "light",
|
|
29121
|
+
onClick: toggle
|
|
29122
|
+
}, "Cancel"), React.createElement(DashboardToPDF, {
|
|
29123
|
+
selectedToPDF: selectedToPrint,
|
|
29124
|
+
initialData: chartDashBoards,
|
|
29125
|
+
typeChartList: typeChartList
|
|
29126
|
+
}))), React.createElement("div", {
|
|
27991
29127
|
className: "d-flex align-items-center justify-content-between"
|
|
27992
29128
|
}, React.createElement("div", {
|
|
27993
29129
|
className: "d-flex align-items-center mx-3"
|
|
@@ -27998,7 +29134,8 @@ var Dashboard = function Dashboard() {
|
|
|
27998
29134
|
src: "images/waving-hand.png",
|
|
27999
29135
|
alt: ""
|
|
28000
29136
|
})), React.createElement("button", {
|
|
28001
|
-
className: styles$1["button-export"] + " d-flex align-items-center border-0 p-0"
|
|
29137
|
+
className: styles$1["button-export"] + " d-flex align-items-center border-0 p-0",
|
|
29138
|
+
onClick: toggle
|
|
28002
29139
|
}, React.createElement("div", {
|
|
28003
29140
|
className: "" + styles$1["button-icon"]
|
|
28004
29141
|
}, React.createElement("img", {
|