@measurequick/measurequick-report-generator 1.0.54 → 1.0.55

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.
@@ -8,8 +8,6 @@ let reportData;
8
8
  let currentSnapshot;
9
9
 
10
10
  export function generateReport(reportType, payload) {
11
- console.log("reportType " + reportType);
12
- console.log(payload);
13
11
  try {
14
12
  reportData = JSON.parse(JSON.stringify(payload));
15
13
  let testNumber = 0;
@@ -115,7 +113,6 @@ function printBodyData(currentSnapshot) {
115
113
  }
116
114
 
117
115
  function printBodySection(currentSnapshot, measurementSection, xLeft, xRight, y) {
118
- console.log("David: " + measurementSection + ": " + JSON.stringify(reportData.snapshots[currentSnapshot]));
119
116
  let dataPoints = JSON.parse(reportData.snapshots[currentSnapshot][measurementSection]);
120
117
  let printRangeIcons = true;
121
118
  let units = "";
@@ -147,6 +144,7 @@ function printBodySection(currentSnapshot, measurementSection, xLeft, xRight, y)
147
144
  valueText = `${dataPoint} / ${secondaryDataPoint}`;
148
145
  } else valueText = `${dataPoint}`;
149
146
  if (templateRef.label) doc.text(labelText, xLeft, y);
147
+ if (isNaN(valueText) || !valueText) valueText = "--";
150
148
  doc.text(valueText, alignRight(valueText, xRight, 8), y);
151
149
  if (printRangeIcons) {
152
150
  let rangeIconRef = getRangeIcon(key, valueBeforeEditing, currentSnapshot);
@@ -227,18 +225,16 @@ function printDiagnosticPage() {
227
225
  doc.addPage();
228
226
  printBoilerPlateDiagnostic();
229
227
  printSubsystemReview();
230
- printSystemDiagnostics();
228
+ // printSystemDiagnostics();
231
229
  printCorrectiveActions();
232
230
  }
233
231
 
234
232
  function printSubsystemReview() {
235
233
  let y = 1;
236
234
  let templateRef = templates[`${reportData.meta.reportType}SubsystemReview`];
237
- console.log("templateRef is " + templateRef);
238
235
  let ssr = JSON.parse(reportData.subsystemReview);
239
236
  for (let i = 0; i < Object.keys(ssr).length; i++) {
240
237
  let key = Object.keys(ssr)[i];
241
- console.log("key is " + key);
242
238
  doc.text(templateRef[key], .25, y);
243
239
  doc.text(ssr[key], 3, y);
244
240
  y += .15;
@@ -247,7 +243,6 @@ function printSubsystemReview() {
247
243
 
248
244
  function printSystemDiagnostics() {
249
245
  let y = 1;
250
- console.log("DIAG: " + reportData.systemDiagnostics);
251
246
  let diagnostics = JSON.parse(reportData.systemDiagnostics);
252
247
  for (let i = 0; i < Object.keys(diagnostics).length; i++) {
253
248
  let key = Object.keys(diagnostics)[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "Generates PDF documents for various MeasureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {