@measurequick/measurequick-report-generator 1.1.62 → 1.1.63
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
|
@@ -46,7 +46,10 @@ export async function getReport(payload) { console.log("payload");console.log(pa
|
|
|
46
46
|
|
|
47
47
|
let form = formPg1;
|
|
48
48
|
|
|
49
|
-
for (let t = 0; t < payload.
|
|
49
|
+
for (let t = 0; t < payload.tests.length; t++) {
|
|
50
|
+
let testSection = "test_in";
|
|
51
|
+
if ((t == 0 && payload.tests.length == 1) || t == 1) testSection = "test_out";
|
|
52
|
+
let test = payload.tests[t].testInfo;
|
|
50
53
|
if (t == 1) form = formPg2;
|
|
51
54
|
let date = new Date();
|
|
52
55
|
if (payload.meta.cName && payload.meta.address && payload.meta.city && payload.meta.state && payload.meta.zip) {
|
|
@@ -70,11 +73,10 @@ export async function getReport(payload) { console.log("payload");console.log(pa
|
|
|
70
73
|
if (mapImagePg2 && t == 1) form.getButton('Map Image').setImage(mapImagePg2);
|
|
71
74
|
form.getTextField('Information Text').setText("What Are Your System Vitals?\nJust like your health vitals, temperature, pulse, blood pressure etc, your A/C system vitals show the overall health of your air conditioning system. These vitals account for both the refrigerant and air delivery side of the system. System targets that are out of range are typically related to a system diagnostic listed below. Correcting the diagnostic faults, if possible, should put the system vitals back in the normal range.");
|
|
72
75
|
|
|
73
|
-
let test = payload.project.tests.length > 1 ? payload.project.tests[t].testInfo : payload.test;
|
|
74
76
|
for (let blockNum = 1; blockNum < 5; blockNum++) {
|
|
75
|
-
form.getTextField(`Block${blockNum}-Title`).setText(payload.measurements[`title${blockNum}`]);
|
|
77
|
+
form.getTextField(`Block${blockNum}-Title`).setText(payload.measurements[testSection][`title${blockNum}`]);
|
|
76
78
|
for (let rowNum = 1; rowNum < 14; rowNum++) {
|
|
77
|
-
let measurement = payload.measurements[`block${blockNum}`][rowNum-1];
|
|
79
|
+
let measurement = payload.measurements[testSection][`block${blockNum}`][rowNum-1];
|
|
78
80
|
if (measurement) {
|
|
79
81
|
let units = measurement.units ? `(${measurement.units})` : "";
|
|
80
82
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col1`).setText(`${measurement.label} ${units}`);
|