@measurequick/measurequick-report-generator 1.5.140 → 1.5.141
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
|
@@ -412,17 +412,29 @@ export async function getReport(payload, _test) {
|
|
|
412
412
|
pfLabels.splice(3, 1);
|
|
413
413
|
}
|
|
414
414
|
for (let i = 0; i < passFails.length; i++) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
415
|
+
const meas = test.testInfo[passFails[i]];
|
|
416
|
+
|
|
417
|
+
// If no value provided, hide the label (set empty) and skip icon
|
|
418
|
+
if (meas === undefined || meas === null || meas === "") {
|
|
419
|
+
safeSetText(form, `SSR${i + 1}`, "");
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// Choose icon based on value
|
|
424
|
+
let icon;
|
|
425
|
+
if (meas === "Caution") {
|
|
426
|
+
icon = iconRangeYellow;
|
|
427
|
+
} else if (meas === "Pass" || meas === "High" || meas === "Mid") {
|
|
428
|
+
icon = iconRangeGreen;
|
|
429
|
+
} else {
|
|
430
|
+
icon = iconRangeRed;
|
|
431
|
+
}
|
|
432
|
+
if (passFails[i] === "heating_efficiency_pass_fail")
|
|
423
433
|
icon = iconRangeGreen;
|
|
434
|
+
|
|
424
435
|
safeSetImage(form, `ImageSubsystem${i + 1}_af_image`, icon);
|
|
425
|
-
|
|
436
|
+
|
|
437
|
+
const suffix = test.testInfo[passFails[i] + "_override"] ? " *" : "";
|
|
426
438
|
safeSetText(form, `SSR${i + 1}`, pfLabels[i] + suffix);
|
|
427
439
|
}
|
|
428
440
|
} else safeSetText(form, `SSR1`, "Not yet reviewed");
|