@measurequick/measurequick-report-generator 1.0.13 → 1.0.15

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.
Files changed (2) hide show
  1. package/index.js +8 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -55,7 +55,9 @@ function printBoilerPlate(theme) {
55
55
  doc.setFontSize(6.5);
56
56
  doc.setFontStyle("bolditalic");
57
57
  doc.setTextColor(255, 255, 255);
58
- var disclaimer = `Disclaimer: This report was prepared by your service technician who is solely responsible for its content. This report is provided “as-is” excluding all warranties expressed or implied including without limitation the warranty of merchantability. ©2017-${new Date().getFullYear()} Manifold Cloud Services Ltd.`;
58
+ var disclaimer = `Disclaimer: This report was prepared by your service technician who is solely responsible for its
59
+ content. This report is provided “as-is” excluding all warranties expressed or implied including without limitation
60
+ the warranty of merchantability. ©2017-${new Date().getFullYear()} Manifold Cloud Services Ltd.`;
59
61
  disclaimer = doc.splitTextToSize(disclaimer.toUpperCase(), 8);
60
62
  doc.text(disclaimer, .125, 10.66);
61
63
  }
@@ -89,10 +91,10 @@ function printSingleBodySection(dataPoints, xLeft, xRight, y) {
89
91
  var units;
90
92
  var text;
91
93
  for (let key in dataPoints) {
92
- dataPoint = dataPoints[key];
93
- val = reportData.values[key];
94
- units = Array.isArray(dataPoint.units) ? `${dataPoint.units[0]} / ${dataPoint.units[1]}` : dataPoint.units;
95
- text = dataPoint.hasOwnProperty("secondaryValue") ? `${val} / ${reportData.values[dataPoint.secondaryValue]}` : val;
94
+ dataPoint = dataPoints[key];
95
+ val = reportData.values[key];
96
+ units = Array.isArray(dataPoint.units) ? `${dataPoint.units[0]} / ${dataPoint.units[1]}` : dataPoint.units;
97
+ text = dataPoint.hasOwnProperty("secondaryValue") ? `${val} / ${reportData.values[dataPoint.secondaryValue]}` : val;
96
98
  doc.text(`${dataPoint.label} (${units}):`, xLeft, y);
97
99
  doc.text(val, alignRight(val, xRight, 8), y);
98
100
  doc.addImage(graphics[reportData.rangeIcons[key]], "JPEG", xRight, y, .2, .2);
@@ -112,7 +114,7 @@ function printProfilePicture(picturePlacement, techName, profilePicture) {
112
114
  }
113
115
 
114
116
  function printCompanyLogo(logoPlacement, companyLogo) {
115
- var coords = templates.companyLogoCoordinates[picturePlacement];
117
+ var coords = templates.companyLogoCoordinates[logoPlacement];
116
118
  doc.addImage(companyLogo, "JPEG", coords.x, coords.y, coords.w, coords.h);
117
119
  }
118
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Generates PDF documents for various MeasureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {