@measurequick/measurequick-report-generator 1.5.220 → 1.5.222
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
|
@@ -330,13 +330,13 @@ export async function getReport(payload, _test) {
|
|
|
330
330
|
// Build warning message focused on ambient CO
|
|
331
331
|
var warningMsg, warningMsg2;
|
|
332
332
|
if (ambientReading) {
|
|
333
|
-
warningMsg = "WARNING: " + ambientReading.level + " Ambient CO
|
|
334
|
-
warningMsg2 = "WARNING: " + ambientReading.level + " Ambient CO
|
|
333
|
+
warningMsg = "WARNING: " + ambientReading.level + " Ambient CO " + Math.round(ambientReading.value) + " ppm\nVentilate the area and investigate source.";
|
|
334
|
+
warningMsg2 = "WARNING: " + ambientReading.level + " Ambient CO " + Math.round(ambientReading.value) + " ppm. Ventilate the area and investigate source.";
|
|
335
335
|
} else {
|
|
336
336
|
// Fallback if no ambient reading (use first reading)
|
|
337
337
|
var firstReading = reasons[0];
|
|
338
|
-
warningMsg = "WARNING: " + firstReading.level + " " + firstReading.type + " CO
|
|
339
|
-
warningMsg2 = "WARNING: " + firstReading.level + " " + firstReading.type + " CO
|
|
338
|
+
warningMsg = "WARNING: " + firstReading.level + " " + firstReading.type + " CO " + Math.round(firstReading.value) + " ppm\nVentilate the area and investigate source.";
|
|
339
|
+
warningMsg2 = "WARNING: " + firstReading.level + " " + firstReading.type + " CO " + Math.round(firstReading.value) + " ppm. Ventilate the area and investigate source.";
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
// Set text with color based on severity level
|
|
@@ -669,12 +669,11 @@ export async function getReport(payload, _test) {
|
|
|
669
669
|
|
|
670
670
|
// Special handling for Ambient CO
|
|
671
671
|
if (passFails[i] === "ambient_pass_fail") {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
: null;
|
|
672
|
+
// Use coAmbRaw which is already defined and validated earlier in the function
|
|
673
|
+
const coValue = isFinite(coAmbRaw) ? coAmbRaw : null;
|
|
675
674
|
|
|
676
675
|
// Use CO-specific icon based on actual value
|
|
677
|
-
if (coValue !== null
|
|
676
|
+
if (coValue !== null) {
|
|
678
677
|
icon = getCOIcon(coValue);
|
|
679
678
|
const stateText = getCOStateText(coValue);
|
|
680
679
|
|