@measurequick/measurequick-report-generator 1.5.203 → 1.5.205
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/.claude/settings.local.json +2 -1
- package/package.json +1 -1
- package/report-gen-scripts/measurement-details.js +14 -9
- package/report-gen-scripts/vitals-cooling-report.js +7 -6
- package/report-gen-scripts/vitals-heating-report-no-combustion.js +7 -6
- package/report-gen-scripts/vitals-heating-report.js +7 -6
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"Bash(done)",
|
|
21
21
|
"Bash(cd /Users/bobby/mQ/packages/mq-hvac/src/pages/acr-modal-subpage/combustion grep -c \"margin-bottom: 0px\" acr-modal-subpage-combustion.html grep -c \"''''mQ''''\" acr-modal-subpage-combustion.html)",
|
|
22
22
|
"Bash(grep:*)",
|
|
23
|
-
"Bash(git checkout:*)"
|
|
23
|
+
"Bash(git checkout:*)",
|
|
24
|
+
"mcp__ide__getDiagnostics"
|
|
24
25
|
]
|
|
25
26
|
}
|
|
26
27
|
}
|
package/package.json
CHANGED
|
@@ -499,7 +499,8 @@ export async function getReport(payload) {
|
|
|
499
499
|
.setText(`${displayLabel} ${units}`);
|
|
500
500
|
|
|
501
501
|
// Use derated value if available for gas_input_rated
|
|
502
|
-
|
|
502
|
+
// Also check for empty string - middleman passes "" when it expects lookup from test.data
|
|
503
|
+
let val = measurement.value !== null && measurement.value !== undefined && measurement.value !== ""
|
|
503
504
|
? measurement.value
|
|
504
505
|
: +test.data[measurement.ref];
|
|
505
506
|
if (
|
|
@@ -509,20 +510,24 @@ export async function getReport(payload) {
|
|
|
509
510
|
val = payload.equipment.gas_input_derated;
|
|
510
511
|
}
|
|
511
512
|
|
|
512
|
-
// Special handling for CO measurements - allow 0 as valid value
|
|
513
|
+
// Special handling for CO measurements - allow 0 as valid value, no decimals
|
|
513
514
|
const isCOMeasurement =
|
|
514
515
|
measurement.label == "Ambient CO" ||
|
|
515
516
|
measurement.label == "Return CO" ||
|
|
516
517
|
measurement.label == "Supply CO";
|
|
517
518
|
|
|
518
|
-
if
|
|
519
|
-
|
|
519
|
+
// For CO measurements: if value is null/undefined, show "--"; if valid, show as integer (no decimals)
|
|
520
|
+
if (isCOMeasurement) {
|
|
521
|
+
if (measurement.value === null || measurement.value === undefined) {
|
|
522
|
+
val = "--";
|
|
523
|
+
} else {
|
|
524
|
+
val = Math.round(Number(val)).toString();
|
|
525
|
+
}
|
|
526
|
+
} else if (!val) {
|
|
527
|
+
val = "--";
|
|
528
|
+
} else if (measurement.fixTo && typeof val == "number") {
|
|
520
529
|
val = val.toFixed(measurement.fixTo);
|
|
521
|
-
|
|
522
|
-
isCOMeasurement &&
|
|
523
|
-
(measurement.value === null || measurement.value === undefined)
|
|
524
|
-
)
|
|
525
|
-
val = "0.0";
|
|
530
|
+
}
|
|
526
531
|
if (typeof val == "number" || !isNaN(val))
|
|
527
532
|
val = val.toLocaleString("en-US");
|
|
528
533
|
if (measurement.fixTo && typeof val == "number")
|
|
@@ -320,8 +320,11 @@ export async function getReport(payload, _test) {
|
|
|
320
320
|
let high = +t.targets[`${targetKeys[i]}_ideal_high`];
|
|
321
321
|
low = mid - low;
|
|
322
322
|
high = mid + high;
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
// For TESP, use 40%-140% of target (low = mid * 0.4, high = mid * 1.4)
|
|
324
|
+
if (targetKeys[i] == "pressure_static_total_external") {
|
|
325
|
+
low = mid * 0.4;
|
|
326
|
+
high = mid * 1.4;
|
|
327
|
+
} else if (targetKeys[i] == "velocity_face_filter1") high = 500;
|
|
325
328
|
let val = t.data[targetKeys[i]];
|
|
326
329
|
if (actual < low && targetKeys[i] != "velocity_face_filter1")
|
|
327
330
|
iconPlacement = "Low";
|
|
@@ -332,10 +335,8 @@ export async function getReport(payload, _test) {
|
|
|
332
335
|
.getButton(`Image${measureLabels[i]}${iconPlacement}_af_image`)
|
|
333
336
|
.setImage(icon);
|
|
334
337
|
let targetZone = "";
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
targetKeys[i] == "velocity_face_filter1"
|
|
338
|
-
)
|
|
338
|
+
// Filter face velocity only shows upper bound
|
|
339
|
+
if (targetKeys[i] == "velocity_face_filter1")
|
|
339
340
|
targetZone = `(< ${high.toFixed(1)})`;
|
|
340
341
|
else if (!isNaN(low) && low != "NaN" && !isNaN(high) && high != "NaN")
|
|
341
342
|
targetZone = `(${low.toFixed(1)} - ${high.toFixed(1)})`;
|
|
@@ -362,8 +362,11 @@ export async function getReport(payload, _test) {
|
|
|
362
362
|
let high = +test.testInfo.targets[`${targetKeys[i]}_ideal_high`];
|
|
363
363
|
low = mid - low;
|
|
364
364
|
high = mid + high;
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
// For TESP, use 40%-140% of target (low = mid * 0.4, high = mid * 1.4)
|
|
366
|
+
if (targetKeys[i] == "pressure_static_total_external") {
|
|
367
|
+
low = mid * 0.4;
|
|
368
|
+
high = mid * 1.4;
|
|
369
|
+
} else if (targetKeys[i] == "velocity_face_filter1") high = 500;
|
|
367
370
|
let val = test.testInfo.data[targetKeys[i]];
|
|
368
371
|
if (targetKeys[i] === "pressure_manifold") {
|
|
369
372
|
val = test.testInfo.data["pressure_manifold_after"]
|
|
@@ -377,10 +380,8 @@ export async function getReport(payload, _test) {
|
|
|
377
380
|
if (icon)
|
|
378
381
|
safeSetImage(form, `Image${measureLabels[i]}${iconPlacement}`, icon);
|
|
379
382
|
let targetZone = "";
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
targetKeys[i] == "velocity_face_filter1"
|
|
383
|
-
)
|
|
383
|
+
// Filter face velocity only shows upper bound
|
|
384
|
+
if (targetKeys[i] == "velocity_face_filter1")
|
|
384
385
|
targetZone = `(< ${high.toFixed(1)})`;
|
|
385
386
|
else if (!isNaN(low) && low != "NaN" && !isNaN(high) && high != "NaN")
|
|
386
387
|
targetZone = `(${low.toFixed(1)} - ${high.toFixed(1)})`;
|
|
@@ -401,8 +401,11 @@ export async function getReport(payload, _test) {
|
|
|
401
401
|
let high = +test.testInfo.targets[`${targetKeys[i]}_ideal_high`];
|
|
402
402
|
low = mid - low;
|
|
403
403
|
high = mid + high;
|
|
404
|
-
|
|
405
|
-
|
|
404
|
+
// For TESP, use 40%-140% of target (low = mid * 0.4, high = mid * 1.4)
|
|
405
|
+
if (targetKeys[i] == "pressure_static_total_external") {
|
|
406
|
+
low = mid * 0.4;
|
|
407
|
+
high = mid * 1.4;
|
|
408
|
+
} else if (targetKeys[i] == "velocity_face_filter1") high = 500;
|
|
406
409
|
|
|
407
410
|
let val = test.testInfo.data[targetKeys[i]];
|
|
408
411
|
if (targetKeys[i] === "pressure_manifold") {
|
|
@@ -418,10 +421,8 @@ export async function getReport(payload, _test) {
|
|
|
418
421
|
if (icon)
|
|
419
422
|
safeSetImage(form, `Image${measureLabels[i]}${iconPlacement}`, icon);
|
|
420
423
|
let targetZone = "";
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
targetKeys[i] == "velocity_face_filter1"
|
|
424
|
-
)
|
|
424
|
+
// Filter face velocity only shows upper bound
|
|
425
|
+
if (targetKeys[i] == "velocity_face_filter1")
|
|
425
426
|
targetZone = `(< ${high.toFixed(1)})`;
|
|
426
427
|
else if (!isNaN(low) && low != "NaN" && !isNaN(high) && high != "NaN")
|
|
427
428
|
targetZone = `(${low.toFixed(1)} - ${high.toFixed(1)})`;
|