@measurequick/measurequick-report-generator 1.2.74 → 1.2.75

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.2.74",
3
+ "version": "1.2.75",
4
4
  "description": "Generates PDF documents for various MeasureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -196,10 +196,12 @@ export async function getReport(payload, _test) { console.log("Vitals Cooling -
196
196
  }
197
197
  } else form.getTextField(`SSR1`).setText("Not yet reviewed");
198
198
 
199
- let systemInfoPageBase64 = await systemInfoPage.getReport(payload);
200
- const systemInfoPageDoc = systemInfoPageBase64 ? await PDFDocument.load(util._base64ToArrayBuffer(systemInfoPageBase64)) : false;
201
- const [_systemInfoPageDoc] = systemInfoPageDoc ? await pdfDoc.copyPages(systemInfoPageDoc, [0]) : false;
202
- if (_systemInfoPageDoc) pdfDoc.insertPage(pdfDoc.getPages().length, _systemInfoPageDoc);
199
+ if (payload.meta.report_type != "FullReport") {
200
+ let systemInfoPageBase64 = await systemInfoPage.getReport(payload);
201
+ const systemInfoPageDoc = systemInfoPageBase64 ? await PDFDocument.load(util._base64ToArrayBuffer(systemInfoPageBase64)) : false;
202
+ const [_systemInfoPageDoc] = systemInfoPageDoc ? await pdfDoc.copyPages(systemInfoPageDoc, [0]) : false;
203
+ if (_systemInfoPageDoc) pdfDoc.insertPage(pdfDoc.getPages().length, _systemInfoPageDoc);
204
+ }
203
205
 
204
206
  // flatten and return as base64
205
207
  form.flatten();
@@ -194,10 +194,12 @@ export async function getReport(payload, _test) { console.log("Vitals Heating -
194
194
  }
195
195
  } else form.getTextField(`SSR1`).setText("Not yet reviewed");
196
196
 
197
- let systemInfoPageBase64 = await systemInfoPage.getReport(payload);
198
- const systemInfoPageDoc = systemInfoPageBase64 ? await PDFDocument.load(util._base64ToArrayBuffer(systemInfoPageBase64)) : false;
199
- const [_systemInfoPageDoc] = systemInfoPageDoc ? await pdfDoc.copyPages(systemInfoPageDoc, [0]) : false;
200
- if (_systemInfoPageDoc) pdfDoc.insertPage(pdfDoc.getPages().length, _systemInfoPageDoc);
197
+ if (payload.meta.report_type != "FullReport") {
198
+ let systemInfoPageBase64 = await systemInfoPage.getReport(payload);
199
+ const systemInfoPageDoc = systemInfoPageBase64 ? await PDFDocument.load(util._base64ToArrayBuffer(systemInfoPageBase64)) : false;
200
+ const [_systemInfoPageDoc] = systemInfoPageDoc ? await pdfDoc.copyPages(systemInfoPageDoc, [0]) : false;
201
+ if (_systemInfoPageDoc) pdfDoc.insertPage(pdfDoc.getPages().length, _systemInfoPageDoc);
202
+ }
201
203
 
202
204
  // flatten and return as base64
203
205
  form.flatten();