@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
|
@@ -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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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();
|