mario-education 2.4.172-level → 2.4.174-level

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/index.js CHANGED
@@ -29673,6 +29673,12 @@ var useChartDatas = function useChartDatas() {
29673
29673
  handleActiveColumnConference = _useDashboard.handleActiveColumnConference,
29674
29674
  activeColumnConference = _useDashboard.activeColumnConference;
29675
29675
 
29676
+ var schoolName = reactRedux.useSelector(function (state) {
29677
+ var _state$common, _state$common$user;
29678
+
29679
+ return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : (_state$common$user = _state$common.user) === null || _state$common$user === void 0 ? void 0 : _state$common$user.schoolName;
29680
+ });
29681
+
29676
29682
  var _useState = React.useState([]),
29677
29683
  selectedToPrint = _useState[0],
29678
29684
  setSelectedToPrint = _useState[1];
@@ -29872,7 +29878,7 @@ var useChartDatas = function useChartDatas() {
29872
29878
  studentPressure: studentPressure,
29873
29879
  dataOverallReadyToLearn: dataOverallReadyToLearn,
29874
29880
  readinessToLearning: readinessToLearning,
29875
- listTotalTime: listTotalTime
29881
+ schoolName: schoolName
29876
29882
  };
29877
29883
  };
29878
29884
 
@@ -30940,9 +30946,16 @@ var TopLearningStrategy = function TopLearningStrategy(_ref2) {
30940
30946
 
30941
30947
  var data = _ref2.data,
30942
30948
  learningStrategyId = _ref2.learningStrategyId,
30943
- topLearningStrategyId = _ref2.topLearningStrategyId;
30949
+ topLearningStrategyId = _ref2.topLearningStrategyId,
30950
+ width = _ref2.width,
30951
+ isPrint = _ref2.isPrint;
30944
30952
  if (!data) return React__default.createElement(Loading, null);
30945
30953
  var screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
30954
+
30955
+ if (width) {
30956
+ screenWidth = width;
30957
+ }
30958
+
30946
30959
  var isMobileScreen = screenWidth < 576;
30947
30960
  var learningStrategies = (data === null || data === void 0 ? void 0 : (_data$learningStrateg = data.learningStrategies) === null || _data$learningStrateg === void 0 ? void 0 : _data$learningStrateg.sort(function (a, b) {
30948
30961
  return average(b.usagePoint) - average(a.usagePoint);
@@ -31051,8 +31064,8 @@ var TopLearningStrategy = function TopLearningStrategy(_ref2) {
31051
31064
  className: "h-100 w-100 " + styles$1["chart-background"] + " pl-4"
31052
31065
  }, React__default.createElement(reactstrap.Row, {
31053
31066
  className: "d-flex"
31054
- }, React__default.createElement(reactstrap.Col, {
31055
- md: 7
31067
+ }, (!isPrint || isPrint && learningStrategyId) && React__default.createElement(reactstrap.Col, {
31068
+ md: isPrint ? 12 : 7
31056
31069
  }, React__default.createElement("div", {
31057
31070
  className: "" + styles$1["block-header-chart"]
31058
31071
  }, React__default.createElement("div", {
@@ -31081,8 +31094,8 @@ var TopLearningStrategy = function TopLearningStrategy(_ref2) {
31081
31094
  src: "images/chart-top-learning.png"
31082
31095
  }), React__default.createElement("p", {
31083
31096
  className: "" + styles$1["name-chart"]
31084
- }, "Perceived Usefulness"))), React__default.createElement(reactstrap.Col, {
31085
- md: 5,
31097
+ }, "Perceived Usefulness"))), (!isPrint || isPrint && topLearningStrategyId) && React__default.createElement(reactstrap.Col, {
31098
+ md: isPrint ? 12 : 5,
31086
31099
  className: "" + styles$1["box-top-5-most"]
31087
31100
  }, React__default.createElement("div", {
31088
31101
  className: "" + styles$1["block-header-chart"]
@@ -31484,26 +31497,26 @@ var DashboardToPDF = function DashboardToPDF(props) {
31484
31497
 
31485
31498
  var generatePDF = function generatePDF() {
31486
31499
  try {
31487
- var _temp40 = function _temp40() {
31500
+ var _temp46 = function _temp46() {
31488
31501
  dispatch(marioCore.setLoading(false));
31489
31502
  };
31490
31503
 
31491
31504
  dispatch(marioCore.setLoading(true));
31492
31505
 
31493
- var _temp41 = _catch(function () {
31494
- function _temp37() {
31495
- function _temp35() {
31496
- function _temp33() {
31497
- function _temp31() {
31498
- function _temp29() {
31499
- function _temp27() {
31500
- function _temp25() {
31501
- function _temp23() {
31502
- function _temp21() {
31506
+ var _temp47 = _catch(function () {
31507
+ function _temp43() {
31508
+ function _temp41() {
31509
+ function _temp39() {
31510
+ function _temp37() {
31511
+ function _temp35() {
31512
+ function _temp33() {
31513
+ function _temp31() {
31514
+ function _temp29() {
31515
+ function _temp27() {
31503
31516
  doc.save("DashBoard.pdf");
31504
31517
  }
31505
31518
 
31506
- var _temp20 = function () {
31519
+ var _temp26 = function () {
31507
31520
  if (selectedToPDF.includes(topLearningStrategyName)) {
31508
31521
  return Promise.resolve(createImageHeader()).then(function () {
31509
31522
  doc.setFontSize(14);
@@ -31547,10 +31560,10 @@ var DashboardToPDF = function DashboardToPDF(props) {
31547
31560
  }
31548
31561
  }();
31549
31562
 
31550
- return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
31563
+ return _temp26 && _temp26.then ? _temp26.then(_temp27) : _temp27(_temp26);
31551
31564
  }
31552
31565
 
31553
- var _temp22 = function () {
31566
+ var _temp28 = function () {
31554
31567
  if (selectedToPDF.includes(learningProcessName)) {
31555
31568
  return Promise.resolve(createImageHeader()).then(function () {
31556
31569
  doc.setFontSize(14);
@@ -31559,19 +31572,38 @@ var DashboardToPDF = function DashboardToPDF(props) {
31559
31572
  line += 20;
31560
31573
  var chart = document.getElementById("learning_progress");
31561
31574
  return Promise.resolve(html2canvas(chart)).then(function (canvas) {
31562
- function _temp19() {
31575
+ function _temp25() {
31576
+ function _temp23() {
31577
+ doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, chartWidth, chartHeight);
31578
+ chartCount++;
31579
+
31580
+ if (chartCount < selectedToPDF.length) {
31581
+ doc.addPage();
31582
+ line = 80;
31583
+ left = 20;
31584
+ }
31585
+ }
31586
+
31563
31587
  left = 20;
31564
31588
  line += questions.length * 10;
31565
31589
  var chartWidth = 420;
31566
31590
  var chartHeight = chart && chart.clientWidth ? chartWidth * chart.clientHeight / chart.clientWidth : heightChart;
31567
- doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, chartWidth, chartHeight);
31568
- chartCount++;
31569
31591
 
31570
- if (chartCount < selectedToPDF.length) {
31571
- doc.addPage();
31572
- line = 80;
31573
- left = 20;
31574
- }
31592
+ var _temp22 = function () {
31593
+ if (line + chartHeight + 20 > HEIGHT_PAPER) {
31594
+ doc.addPage();
31595
+ return Promise.resolve(createImageHeader()).then(function () {
31596
+ line = 80;
31597
+ left = 20;
31598
+ doc.setFontSize(14);
31599
+ doc.setFont("Helvetica", "normal", "bold");
31600
+ doc.text(t(learningProcessName), left, line);
31601
+ line += 10;
31602
+ });
31603
+ }
31604
+ }();
31605
+
31606
+ return _temp22 && _temp22.then ? _temp22.then(_temp23) : _temp23(_temp22);
31575
31607
  }
31576
31608
 
31577
31609
  var lineOptionPrecess = line;
@@ -31581,67 +31613,71 @@ var DashboardToPDF = function DashboardToPDF(props) {
31581
31613
  });
31582
31614
  var COLORS = ["#73C8E5", "#F9F871", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"];
31583
31615
 
31584
- var _temp18 = _forTo(monthsConference, function (index) {
31585
- var _line = line;
31586
- doc.setFontSize(12);
31587
- doc.setFont("Helvetica", "normal", "bold");
31588
- doc.text(monthsConference[index], left, _line);
31589
- doc.setFontSize(8);
31616
+ var _temp24 = function () {
31617
+ if (seriesConference !== null && seriesConference !== void 0 && seriesConference.length) {
31618
+ return _forTo(monthsConference, function (index) {
31619
+ var _line = line;
31620
+ doc.setFontSize(12);
31621
+ doc.setFont("Helvetica", "normal", "bold");
31622
+ doc.text(monthsConference[index], left, _line);
31623
+ doc.setFontSize(8);
31590
31624
 
31591
- for (var indexResult = 0; indexResult < (seriesConference === null || seriesConference === void 0 ? void 0 : seriesConference.length); indexResult++) {
31592
- var avg = seriesConference[indexResult].data[index];
31625
+ for (var indexResult = 0; indexResult < (seriesConference === null || seriesConference === void 0 ? void 0 : seriesConference.length); indexResult++) {
31626
+ var avg = seriesConference[indexResult].data[index];
31593
31627
 
31594
- if (avg != 0) {
31595
- var questionText = questions[indexResult];
31628
+ if (avg != 0) {
31629
+ var questionText = questions[indexResult];
31596
31630
 
31597
- if (questionText != "") {
31598
- doc.setDrawColor(0);
31599
- doc.setFillColor(COLORS[indexResult]);
31600
- doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31601
- doc.setFont("Helvetica", "normal", "bold");
31602
- doc.text(questionText + ":", left + 8, _line + 10);
31603
- doc.setFont("Helvetica", "normal", "normal");
31604
- doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31605
- }
31631
+ if (questionText != "") {
31632
+ doc.setDrawColor(0);
31633
+ doc.setFillColor(COLORS[indexResult]);
31634
+ doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31635
+ doc.setFont("Helvetica", "normal", "bold");
31636
+ doc.text(questionText + ":", left + 8, _line + 10);
31637
+ doc.setFont("Helvetica", "normal", "normal");
31638
+ doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31639
+ }
31606
31640
 
31607
- _line += 10;
31641
+ _line += 10;
31608
31642
 
31609
- if (_line > lineOptionPrecess) {
31610
- lineOptionPrecess = _line;
31643
+ if (_line > lineOptionPrecess) {
31644
+ lineOptionPrecess = _line;
31645
+ }
31646
+ }
31611
31647
  }
31612
- }
31613
- }
31614
31648
 
31615
- left += 100;
31649
+ left += 100;
31616
31650
 
31617
- if (left + 105 > WIDTH_PAPER) {
31618
- left = 20;
31619
- line = lineOptionPrecess + 25;
31620
- }
31621
-
31622
- var _temp17 = function () {
31623
- if (line + 150 > HEIGHT_PAPER) {
31624
- doc.addPage();
31625
- return Promise.resolve(createImageHeader()).then(function () {
31626
- line = 80;
31651
+ if (left + 105 > WIDTH_PAPER) {
31627
31652
  left = 20;
31628
- });
31629
- }
31630
- }();
31653
+ line = lineOptionPrecess + 20;
31654
+ }
31631
31655
 
31632
- if (_temp17 && _temp17.then) return _temp17.then(function () {});
31633
- });
31656
+ var _temp21 = function () {
31657
+ if (line + 150 > HEIGHT_PAPER) {
31658
+ doc.addPage();
31659
+ return Promise.resolve(createImageHeader()).then(function () {
31660
+ line = 80;
31661
+ left = 20;
31662
+ });
31663
+ }
31664
+ }();
31665
+
31666
+ if (_temp21 && _temp21.then) return _temp21.then(function () {});
31667
+ });
31668
+ }
31669
+ }();
31634
31670
 
31635
- return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
31671
+ return _temp24 && _temp24.then ? _temp24.then(_temp25) : _temp25(_temp24);
31636
31672
  });
31637
31673
  });
31638
31674
  }
31639
31675
  }();
31640
31676
 
31641
- return _temp22 && _temp22.then ? _temp22.then(_temp23) : _temp23(_temp22);
31677
+ return _temp28 && _temp28.then ? _temp28.then(_temp29) : _temp29(_temp28);
31642
31678
  }
31643
31679
 
31644
- var _temp24 = function () {
31680
+ var _temp30 = function () {
31645
31681
  if (selectedToPDF.includes(successIndicatorsName)) {
31646
31682
  return Promise.resolve(createImageHeader()).then(function () {
31647
31683
  doc.setFontSize(14);
@@ -31650,19 +31686,38 @@ var DashboardToPDF = function DashboardToPDF(props) {
31650
31686
  line += 40;
31651
31687
  var chart = document.getElementById("success_indicators");
31652
31688
  return Promise.resolve(html2canvas(chart)).then(function (canvas) {
31653
- function _temp16() {
31689
+ function _temp20() {
31690
+ function _temp18() {
31691
+ doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, chartWidth, chartHeight);
31692
+ chartCount++;
31693
+
31694
+ if (chartCount < selectedToPDF.length) {
31695
+ doc.addPage();
31696
+ line = 80;
31697
+ left = 20;
31698
+ }
31699
+ }
31700
+
31654
31701
  left = 20;
31655
31702
  line += questions.length * 10;
31656
31703
  var chartWidth = 420;
31657
31704
  var chartHeight = chart && chart.clientWidth ? chartWidth * chart.clientHeight / chart.clientWidth : heightChart;
31658
- doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, chartWidth, chartHeight);
31659
- chartCount++;
31660
31705
 
31661
- if (chartCount < selectedToPDF.length) {
31662
- doc.addPage();
31663
- line = 80;
31664
- left = 20;
31665
- }
31706
+ var _temp17 = function () {
31707
+ if (line + chartHeight + 20 > HEIGHT_PAPER) {
31708
+ doc.addPage();
31709
+ return Promise.resolve(createImageHeader()).then(function () {
31710
+ line = 80;
31711
+ left = 20;
31712
+ doc.setFontSize(14);
31713
+ doc.setFont("Helvetica", "normal", "bold");
31714
+ doc.text(t(successIndicatorsName), left, line);
31715
+ line += 10;
31716
+ });
31717
+ }
31718
+ }();
31719
+
31720
+ return _temp17 && _temp17.then ? _temp17.then(_temp18) : _temp18(_temp17);
31666
31721
  }
31667
31722
 
31668
31723
  var lineOptionCheckIn = line;
@@ -31671,75 +31726,74 @@ var DashboardToPDF = function DashboardToPDF(props) {
31671
31726
  return r.name;
31672
31727
  });
31673
31728
  var COLORS = ["#73C8E5", "#FFB04F", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"];
31674
- var indexCheckIn = 0;
31675
-
31676
- var _temp15 = _for(function () {
31677
- return indexCheckIn < monthsOneToOne.length;
31678
- }, function () {
31679
- return indexCheckIn++;
31680
- }, function () {
31681
- var _line = line;
31682
- doc.setFontSize(12);
31683
- doc.setFont("Helvetica", "normal", "bold");
31684
- doc.text(monthsOneToOne[indexCheckIn], left, _line);
31685
- doc.setFontSize(8);
31686
-
31687
- for (var indexResult = 0; indexResult < (successIndicatorsData === null || successIndicatorsData === void 0 ? void 0 : successIndicatorsData.length); indexResult++) {
31688
- var avg = successIndicatorsData[indexResult].data[indexCheckIn];
31689
31729
 
31690
- if (avg != 0) {
31691
- var questionText = questions[indexResult];
31692
-
31693
- if (questionText != "") {
31694
- doc.setDrawColor(0);
31695
- doc.setFillColor(COLORS[indexResult]);
31696
- doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31697
- doc.setFont("Helvetica", "normal", "bold");
31698
- doc.text(questionText + ":", left + 8, _line + 10);
31699
- doc.setFont("Helvetica", "normal", "normal");
31700
- doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31730
+ var _temp19 = function () {
31731
+ if (successIndicatorsData !== null && successIndicatorsData !== void 0 && successIndicatorsData.length) {
31732
+ return _forTo(monthsOneToOne, function (indexCheckIn) {
31733
+ var _line = line;
31734
+ doc.setFontSize(12);
31735
+ doc.setFont("Helvetica", "normal", "bold");
31736
+ doc.text(monthsOneToOne[indexCheckIn], left, _line);
31737
+ doc.setFontSize(8);
31738
+
31739
+ for (var indexResult = 0; indexResult < (successIndicatorsData === null || successIndicatorsData === void 0 ? void 0 : successIndicatorsData.length); indexResult++) {
31740
+ var avg = successIndicatorsData[indexResult].data[indexCheckIn];
31741
+
31742
+ if (avg != 0) {
31743
+ var questionText = questions[indexResult];
31744
+
31745
+ if (questionText != "") {
31746
+ doc.setDrawColor(0);
31747
+ doc.setFillColor(COLORS[indexResult]);
31748
+ doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31749
+ doc.setFont("Helvetica", "normal", "bold");
31750
+ doc.text(questionText + ":", left + 8, _line + 10);
31751
+ doc.setFont("Helvetica", "normal", "normal");
31752
+ doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31753
+ }
31754
+
31755
+ _line += 10;
31756
+
31757
+ if (_line > lineOptionCheckIn) {
31758
+ lineOptionCheckIn = _line;
31759
+ }
31760
+ }
31701
31761
  }
31702
31762
 
31703
- _line += 10;
31763
+ left += 100;
31704
31764
 
31705
- if (_line > lineOptionCheckIn) {
31706
- lineOptionCheckIn = _line;
31765
+ if (left + 105 > WIDTH_PAPER) {
31766
+ left = 20;
31767
+ line = lineOptionCheckIn + 20;
31707
31768
  }
31708
- }
31709
- }
31710
31769
 
31711
- left += 100;
31770
+ var _temp16 = function () {
31771
+ if (line + 150 > HEIGHT_PAPER) {
31772
+ doc.addPage();
31773
+ return Promise.resolve(createImageHeader()).then(function () {
31774
+ line = 80;
31775
+ left = 20;
31776
+ });
31777
+ }
31778
+ }();
31712
31779
 
31713
- if (left + 105 > WIDTH_PAPER) {
31714
- left = 20;
31715
- line = lineOptionCheckIn + 25;
31780
+ if (_temp16 && _temp16.then) return _temp16.then(function () {});
31781
+ });
31716
31782
  }
31783
+ }();
31717
31784
 
31718
- var _temp14 = function () {
31719
- if (line + 150 > HEIGHT_PAPER) {
31720
- doc.addPage();
31721
- return Promise.resolve(createImageHeader()).then(function () {
31722
- line = 80;
31723
- left = 20;
31724
- });
31725
- }
31726
- }();
31727
-
31728
- if (_temp14 && _temp14.then) return _temp14.then(function () {});
31729
- });
31730
-
31731
- return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
31785
+ return _temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19);
31732
31786
  });
31733
31787
  });
31734
31788
  }
31735
31789
  }();
31736
31790
 
31737
- return _temp24 && _temp24.then ? _temp24.then(_temp25) : _temp25(_temp24);
31791
+ return _temp30 && _temp30.then ? _temp30.then(_temp31) : _temp31(_temp30);
31738
31792
  }
31739
31793
 
31740
- var _temp26 = function () {
31794
+ var _temp32 = function () {
31741
31795
  if (selectedToPDF.includes(studentStressByZone)) {
31742
- var _temp42 = function _temp42() {
31796
+ var _temp48 = function _temp48() {
31743
31797
  doc.setFontSize(14);
31744
31798
  doc.setFont("Helvetica", "normal", "bold");
31745
31799
  doc.text(t(studentStressByZone), left, line <= 85 ? 70 : line);
@@ -31765,22 +31819,22 @@ var DashboardToPDF = function DashboardToPDF(props) {
31765
31819
  doc.addPage();
31766
31820
  }
31767
31821
 
31768
- var _temp43 = function () {
31822
+ var _temp49 = function () {
31769
31823
  if (line <= 85) {
31770
31824
  return Promise.resolve(createImageHeader()).then(function () {});
31771
31825
  }
31772
31826
  }();
31773
31827
 
31774
- return _temp43 && _temp43.then ? _temp43.then(_temp42) : _temp42(_temp43);
31828
+ return _temp49 && _temp49.then ? _temp49.then(_temp48) : _temp48(_temp49);
31775
31829
  }
31776
31830
  }();
31777
31831
 
31778
- return _temp26 && _temp26.then ? _temp26.then(_temp27) : _temp27(_temp26);
31832
+ return _temp32 && _temp32.then ? _temp32.then(_temp33) : _temp33(_temp32);
31779
31833
  }
31780
31834
 
31781
- var _temp28 = function () {
31835
+ var _temp34 = function () {
31782
31836
  if (selectedToPDF.includes(studentDistribution)) {
31783
- var _temp44 = function _temp44() {
31837
+ var _temp50 = function _temp50() {
31784
31838
  doc.setFontSize(14);
31785
31839
  doc.setFont("Helvetica", "normal", "bold");
31786
31840
  doc.text(t(studentDistribution), left, line <= 85 ? 70 : line);
@@ -31807,20 +31861,20 @@ var DashboardToPDF = function DashboardToPDF(props) {
31807
31861
  doc.addPage();
31808
31862
  }
31809
31863
 
31810
- var _temp45 = function () {
31864
+ var _temp51 = function () {
31811
31865
  if (line <= 85) {
31812
31866
  return Promise.resolve(createImageHeader()).then(function () {});
31813
31867
  }
31814
31868
  }();
31815
31869
 
31816
- return _temp45 && _temp45.then ? _temp45.then(_temp44) : _temp44(_temp45);
31870
+ return _temp51 && _temp51.then ? _temp51.then(_temp50) : _temp50(_temp51);
31817
31871
  }
31818
31872
  }();
31819
31873
 
31820
- return _temp28 && _temp28.then ? _temp28.then(_temp29) : _temp29(_temp28);
31874
+ return _temp34 && _temp34.then ? _temp34.then(_temp35) : _temp35(_temp34);
31821
31875
  }
31822
31876
 
31823
- var _temp30 = function () {
31877
+ var _temp36 = function () {
31824
31878
  if (selectedToPDF.includes(overallReadinessToLearn)) {
31825
31879
  return Promise.resolve(createImageHeader()).then(function () {
31826
31880
  doc.setFontSize(14);
@@ -31839,10 +31893,10 @@ var DashboardToPDF = function DashboardToPDF(props) {
31839
31893
  }
31840
31894
  }();
31841
31895
 
31842
- return _temp30 && _temp30.then ? _temp30.then(_temp31) : _temp31(_temp30);
31896
+ return _temp36 && _temp36.then ? _temp36.then(_temp37) : _temp37(_temp36);
31843
31897
  }
31844
31898
 
31845
- var _temp32 = function () {
31899
+ var _temp38 = function () {
31846
31900
  if (selectedToPDF.includes(preparednessChartName)) {
31847
31901
  return Promise.resolve(createImageHeader()).then(function () {
31848
31902
  doc.setFontSize(14);
@@ -31851,19 +31905,38 @@ var DashboardToPDF = function DashboardToPDF(props) {
31851
31905
  line += 20;
31852
31906
  var chart = document.getElementById("preparedness");
31853
31907
  return Promise.resolve(html2canvas(chart)).then(function (canvas) {
31854
- function _temp9() {
31908
+ function _temp11() {
31909
+ function _temp9() {
31910
+ doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, chartWidth, chartHeight);
31911
+ chartCount++;
31912
+
31913
+ if (chartCount < selectedToPDF.length) {
31914
+ doc.addPage();
31915
+ line = 80;
31916
+ left = 20;
31917
+ }
31918
+ }
31919
+
31855
31920
  left = 20;
31856
31921
  line += questions.length * 10;
31857
31922
  var chartWidth = 420;
31858
31923
  var chartHeight = chart && chart.clientWidth ? chartWidth * chart.clientHeight / chart.clientWidth : heightChart;
31859
- doc.addImage(canvas.toDataURL("image/png"), 10, line + 20, chartWidth, chartHeight);
31860
- chartCount++;
31861
31924
 
31862
- if (chartCount < selectedToPDF.length) {
31863
- doc.addPage();
31864
- line = 80;
31865
- left = 20;
31866
- }
31925
+ var _temp8 = function () {
31926
+ if (line + chartHeight + 20 > HEIGHT_PAPER) {
31927
+ doc.addPage();
31928
+ return Promise.resolve(createImageHeader()).then(function () {
31929
+ line = 80;
31930
+ left = 20;
31931
+ doc.setFontSize(14);
31932
+ doc.setFont("Helvetica", "normal", "bold");
31933
+ doc.text("Readiness To Learn", left, line);
31934
+ line += 10;
31935
+ });
31936
+ }
31937
+ }();
31938
+
31939
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
31867
31940
  }
31868
31941
 
31869
31942
  line += 20;
@@ -31872,74 +31945,73 @@ var DashboardToPDF = function DashboardToPDF(props) {
31872
31945
  var questions = preparednessData.map(function (r) {
31873
31946
  return r.name;
31874
31947
  });
31875
- var indexCheckIn = 0;
31876
-
31877
- var _temp8 = _for(function () {
31878
- return indexCheckIn < monthsOneToOne.length;
31879
- }, function () {
31880
- return indexCheckIn++;
31881
- }, function () {
31882
- var _line = line;
31883
- doc.setFontSize(12);
31884
- doc.setFont("Helvetica", "normal", "bold");
31885
- doc.text(monthsOneToOne[indexCheckIn], left, _line);
31886
- doc.setFontSize(8);
31887
- var COLORS = ["#169490", "#316CD9", "#FFB04F"];
31888
31948
 
31889
- for (var indexResult = 0; indexResult < (preparednessData === null || preparednessData === void 0 ? void 0 : preparednessData.length); indexResult++) {
31890
- var avg = preparednessData[indexResult].data[indexCheckIn];
31949
+ var _temp10 = function () {
31950
+ if (preparednessData !== null && preparednessData !== void 0 && preparednessData.length) {
31951
+ return _forTo(monthsOneToOne, function (indexCheckIn) {
31952
+ var _line = line;
31953
+ doc.setFontSize(12);
31954
+ doc.setFont("Helvetica", "normal", "bold");
31955
+ doc.text(monthsOneToOne[indexCheckIn], left, _line);
31956
+ doc.setFontSize(8);
31957
+ var COLORS = ["#169490", "#316CD9", "#FFB04F"];
31891
31958
 
31892
- if (avg != 0) {
31893
- var questionText = questions[indexResult];
31959
+ for (var indexResult = 0; indexResult < (preparednessData === null || preparednessData === void 0 ? void 0 : preparednessData.length); indexResult++) {
31960
+ var avg = preparednessData[indexResult].data[indexCheckIn];
31894
31961
 
31895
- if (questionText != "") {
31896
- doc.setDrawColor(0);
31897
- doc.setFillColor(COLORS[indexResult]);
31898
- doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31899
- doc.setFont("Helvetica", "normal", "bold");
31900
- doc.text(questionText + ":", left + 8, _line + 10);
31901
- doc.setFont("Helvetica", "normal", "normal");
31902
- doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31903
- }
31962
+ if (avg != 0) {
31963
+ var questionText = questions[indexResult];
31964
+
31965
+ if (questionText != "") {
31966
+ doc.setDrawColor(0);
31967
+ doc.setFillColor(COLORS[indexResult]);
31968
+ doc.roundedRect(left, _line + 5, 5, 5, 1, 1, "F");
31969
+ doc.setFont("Helvetica", "normal", "bold");
31970
+ doc.text(questionText + ":", left + 8, _line + 10);
31971
+ doc.setFont("Helvetica", "normal", "normal");
31972
+ doc.text((avg === null || avg === void 0 ? void 0 : avg.toFixed(2)) + "%", left + (questionText === null || questionText === void 0 ? void 0 : questionText.length) * 2.5 + 20.5, _line + 10);
31973
+ }
31904
31974
 
31905
- _line += 10;
31975
+ _line += 10;
31906
31976
 
31907
- if (_line > lineOptionCheckIn) {
31908
- lineOptionCheckIn = _line;
31977
+ if (_line > lineOptionCheckIn) {
31978
+ lineOptionCheckIn = _line;
31979
+ }
31980
+ }
31909
31981
  }
31910
- }
31911
- }
31912
31982
 
31913
- left += 100;
31983
+ left += 100;
31914
31984
 
31915
- if (left + 105 > WIDTH_PAPER) {
31916
- left = 20;
31917
- line = lineOptionCheckIn + 25;
31918
- }
31919
-
31920
- var _temp7 = function () {
31921
- if (line + 150 > HEIGHT_PAPER) {
31922
- doc.addPage();
31923
- return Promise.resolve(createImageHeader()).then(function () {
31924
- line = 80;
31985
+ if (left + 105 > WIDTH_PAPER) {
31925
31986
  left = 20;
31926
- });
31927
- }
31928
- }();
31987
+ line = lineOptionCheckIn + 20;
31988
+ }
31929
31989
 
31930
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
31931
- });
31990
+ var _temp7 = function () {
31991
+ if (line + 150 > HEIGHT_PAPER) {
31992
+ doc.addPage();
31993
+ return Promise.resolve(createImageHeader()).then(function () {
31994
+ line = 80;
31995
+ left = 20;
31996
+ });
31997
+ }
31998
+ }();
31999
+
32000
+ if (_temp7 && _temp7.then) return _temp7.then(function () {});
32001
+ });
32002
+ }
32003
+ }();
31932
32004
 
31933
- return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
32005
+ return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
31934
32006
  });
31935
32007
  });
31936
32008
  }
31937
32009
  }();
31938
32010
 
31939
- return _temp32 && _temp32.then ? _temp32.then(_temp33) : _temp33(_temp32);
32011
+ return _temp38 && _temp38.then ? _temp38.then(_temp39) : _temp39(_temp38);
31940
32012
  }
31941
32013
 
31942
- var _temp34 = function () {
32014
+ var _temp40 = function () {
31943
32015
  if (selectedToPDF.includes(averageStudentStressName)) {
31944
32016
  return Promise.resolve(createImageHeader()).then(function () {
31945
32017
  doc.setFontSize(14);
@@ -32009,7 +32081,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32009
32081
 
32010
32082
  if (left + 105 > WIDTH_PAPER) {
32011
32083
  left = 20;
32012
- line = lineOptionCheckIn + 25;
32084
+ line = lineOptionCheckIn + 20;
32013
32085
  }
32014
32086
 
32015
32087
  var _temp4 = function () {
@@ -32031,7 +32103,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32031
32103
  }
32032
32104
  }();
32033
32105
 
32034
- return _temp34 && _temp34.then ? _temp34.then(_temp35) : _temp35(_temp34);
32106
+ return _temp40 && _temp40.then ? _temp40.then(_temp41) : _temp41(_temp40);
32035
32107
  }
32036
32108
 
32037
32109
  var doc = new jsPDF({
@@ -32070,7 +32142,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32070
32142
  var line = 85;
32071
32143
  var left = 20;
32072
32144
 
32073
- var _temp36 = function () {
32145
+ var _temp42 = function () {
32074
32146
  if (selectedToPDF.includes(averageStudentSafetyName)) {
32075
32147
  return Promise.resolve(createImageHeader()).then(function () {
32076
32148
  doc.setFontSize(14);
@@ -32139,7 +32211,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32139
32211
 
32140
32212
  if (left + 105 > WIDTH_PAPER) {
32141
32213
  left = 20;
32142
- line = lineOptionCheckIn + 25;
32214
+ line = lineOptionCheckIn + 20;
32143
32215
  }
32144
32216
 
32145
32217
  var _temp = function () {
@@ -32161,7 +32233,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32161
32233
  }
32162
32234
  }();
32163
32235
 
32164
- return _temp36 && _temp36.then ? _temp36.then(_temp37) : _temp37(_temp36);
32236
+ return _temp42 && _temp42.then ? _temp42.then(_temp43) : _temp43(_temp42);
32165
32237
  }, function (err) {
32166
32238
  console.log(err);
32167
32239
  dispatch(marioCore.setAlert({
@@ -32170,7 +32242,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32170
32242
  }));
32171
32243
  });
32172
32244
 
32173
- return Promise.resolve(_temp41 && _temp41.then ? _temp41.then(_temp40) : _temp40(_temp41));
32245
+ return Promise.resolve(_temp47 && _temp47.then ? _temp47.then(_temp46) : _temp46(_temp47));
32174
32246
  } catch (e) {
32175
32247
  return Promise.reject(e);
32176
32248
  }
@@ -32179,11 +32251,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32179
32251
  return React__default.createElement("div", null, React__default.createElement("div", {
32180
32252
  className: "" + styles$1["chart-to-canvas"]
32181
32253
  }, React__default.createElement("div", {
32182
- id: "safety",
32183
- style: {
32184
- display: "block",
32185
- width: "45%"
32186
- }
32254
+ id: "safety"
32187
32255
  }, React__default.createElement(GenerateChartData, {
32188
32256
  colors: ["#0F9655"],
32189
32257
  typeChart: TYPECHART.AREA,
@@ -32192,13 +32260,10 @@ var DashboardToPDF = function DashboardToPDF(props) {
32192
32260
  months: monthsOneToOne,
32193
32261
  dayOfWeek: dayOfWeekOneToOne,
32194
32262
  avgQuestionLastMonth: avgQuestionLastMonth,
32195
- timeOfDay: timeOfDay
32263
+ timeOfDay: timeOfDay,
32264
+ isPrint: true
32196
32265
  })), React__default.createElement("div", {
32197
- id: "stress",
32198
- style: {
32199
- display: "block",
32200
- width: "45%"
32201
- }
32266
+ id: "stress"
32202
32267
  }, React__default.createElement(GenerateChartData, {
32203
32268
  colors: ["#C44140"],
32204
32269
  typeChart: TYPECHART.LINE,
@@ -32207,13 +32272,10 @@ var DashboardToPDF = function DashboardToPDF(props) {
32207
32272
  months: monthsOneToOne,
32208
32273
  dayOfWeek: dayOfWeekOneToOne,
32209
32274
  avgQuestionLastMonth: avgQuestionLastMonth,
32210
- timeOfDay: timeOfDay
32275
+ timeOfDay: timeOfDay,
32276
+ isPrint: true
32211
32277
  })), React__default.createElement("div", {
32212
- id: "preparedness",
32213
- style: {
32214
- display: "block",
32215
- width: "45%"
32216
- }
32278
+ id: "preparedness"
32217
32279
  }, React__default.createElement(GenerateChartData, {
32218
32280
  colors: ["#169490", "#316CD9", "#FFB04F"],
32219
32281
  typeChart: TYPECHART.LINE,
@@ -32225,11 +32287,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32225
32287
  timeOfDay: timeOfDay,
32226
32288
  isPrint: true
32227
32289
  })), React__default.createElement("div", {
32228
- id: "success_indicators",
32229
- style: {
32230
- display: "block",
32231
- width: "45%"
32232
- }
32290
+ id: "success_indicators"
32233
32291
  }, React__default.createElement(GenerateChartData, {
32234
32292
  typeChart: TYPECHART.AREA,
32235
32293
  activeColumn: activeColumnSuccessIndicators,
@@ -32241,11 +32299,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
32241
32299
  colors: ["#73C8E5", "#FFB04F", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"],
32242
32300
  isPrint: true
32243
32301
  })), React__default.createElement("div", {
32244
- id: overallReadinessToLearn,
32245
- style: {
32246
- display: "block",
32247
- width: "45%"
32248
- }
32302
+ id: overallReadinessToLearn
32249
32303
  }, React__default.createElement(GenerateChartData, {
32250
32304
  isPrint: true,
32251
32305
  colors: ["#D9EEE4", "#FAF0F0"],
@@ -32260,24 +32314,20 @@ var DashboardToPDF = function DashboardToPDF(props) {
32260
32314
  width: 320,
32261
32315
  height: 320
32262
32316
  })), React__default.createElement("div", {
32263
- id: studentDistribution,
32264
- style: {
32265
- display: "block",
32266
- width: "45%"
32267
- }
32317
+ id: studentDistribution
32268
32318
  }, React__default.createElement(BubbleChartCustom$1, {
32269
32319
  data: readinessToLearning,
32270
32320
  isPrint: true
32271
32321
  })), React__default.createElement("div", {
32272
- id: "student_stress_by_zone"
32273
- }, React__default.createElement(StudentPressureChart, {
32274
- studentPressure: studentPressure
32275
- })), React__default.createElement("div", {
32276
- id: "learning_progress",
32322
+ id: "student_stress_by_zone",
32277
32323
  style: {
32278
- display: "block",
32279
- width: "45%"
32324
+ width: "1280px"
32280
32325
  }
32326
+ }, React__default.createElement(StudentPressureChart, {
32327
+ studentPressure: studentPressure,
32328
+ width: 1280
32329
+ })), React__default.createElement("div", {
32330
+ id: "learning_progress"
32281
32331
  }, React__default.createElement(GenerateChartData, {
32282
32332
  colors: ["#73C8E5", "#F9F871", "#D7B0DE", "#E56362", "#5A7F05", "#D3D3D3"],
32283
32333
  typeChart: TYPECHART.AREA,
@@ -32288,17 +32338,16 @@ var DashboardToPDF = function DashboardToPDF(props) {
32288
32338
  avgQuestionLastMonth: avgConferenceLastMonth,
32289
32339
  timeOfDay: timeOfDay,
32290
32340
  isPrint: true
32291
- })), React__default.createElement("div", {
32292
- style: {
32293
- display: "block",
32294
- width: "75%"
32295
- }
32296
- }, React__default.createElement(TopLearningStrategy$1, {
32341
+ })), React__default.createElement("div", null, React__default.createElement(TopLearningStrategy$1, {
32297
32342
  data: topLearningStrategiesData,
32298
- learningStrategyId: topLearningStrategyName
32343
+ learningStrategyId: topLearningStrategyName,
32344
+ width: 800,
32345
+ isPrint: true
32299
32346
  })), React__default.createElement("div", null, React__default.createElement(TopLearningStrategy$1, {
32300
32347
  data: topLearningStrategiesData,
32301
- topLearningStrategyId: topMostUsedStrategiesName
32348
+ topLearningStrategyId: topMostUsedStrategiesName,
32349
+ width: 800,
32350
+ isPrint: true
32302
32351
  }))), React__default.createElement("div", {
32303
32352
  className: "" + styles$1["image-logo"],
32304
32353
  id: "header-logo"
@@ -32476,7 +32525,7 @@ var Dashboard = function Dashboard() {
32476
32525
  studentPressure = _useChartDatas.studentPressure,
32477
32526
  dataOverallReadyToLearn = _useChartDatas.dataOverallReadyToLearn,
32478
32527
  readinessToLearning = _useChartDatas.readinessToLearning,
32479
- listTotalTime = _useChartDatas.listTotalTime;
32528
+ schoolName = _useChartDatas.schoolName;
32480
32529
 
32481
32530
  var _useBehavior = useBehavior(),
32482
32531
  chartIsOpened = _useBehavior.chartIsOpened,
@@ -32567,7 +32616,7 @@ var Dashboard = function Dashboard() {
32567
32616
  readinessToLearning: readinessToLearning,
32568
32617
  studentPressure: studentPressure,
32569
32618
  dataOverallReadyToLearn: dataOverallReadyToLearn,
32570
- schoolName: listTotalTime.schoolName
32619
+ schoolName: schoolName
32571
32620
  }))), React__default.createElement("div", {
32572
32621
  className: "d-flex align-items-center justify-content-between"
32573
32622
  }, React__default.createElement("div", {