@measurequick/measurequick-report-generator 1.5.230 → 1.5.232
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 +1 -1
- package/report-gen-scripts/measurement-details.js +22 -4
- package/util.js +55 -10
package/package.json
CHANGED
|
@@ -450,38 +450,56 @@ export async function getReport(payload) {
|
|
|
450
450
|
let condDisplay = util.getElectricalData(test, "", embeddedIcons);
|
|
451
451
|
let ahuDisplay = util.getElectricalData(test, "_ahu", embeddedIcons);
|
|
452
452
|
if (measurement) {
|
|
453
|
+
// Debug log for V/A icon checking
|
|
454
|
+
if (measurement.label == "Cond. Volts" || measurement.label == "Cond. Amps" ||
|
|
455
|
+
measurement.label == "AHU Volts" || measurement.label == "AHU Amps") {
|
|
456
|
+
console.log("[measurement-details] Checking label:", measurement.label);
|
|
457
|
+
console.log("[measurement-details] isGoettlInstall:", isGoettlInstall);
|
|
458
|
+
console.log("[measurement-details] condDisplay.voltageIcon:", !!condDisplay.voltageIcon);
|
|
459
|
+
console.log("[measurement-details] condDisplay.amperageIcon:", !!condDisplay.amperageIcon);
|
|
460
|
+
console.log("[measurement-details] ahuDisplay.voltageIcon:", !!ahuDisplay.voltageIcon);
|
|
461
|
+
console.log("[measurement-details] ahuDisplay.amperageIcon:", !!ahuDisplay.amperageIcon);
|
|
462
|
+
}
|
|
453
463
|
if (
|
|
454
464
|
!isGoettlInstall &&
|
|
455
465
|
measurement.label == "Cond. Volts" &&
|
|
456
466
|
condDisplay.voltageIcon
|
|
457
|
-
)
|
|
467
|
+
) {
|
|
468
|
+
console.log("[measurement-details] Setting Cond. Volts icon!");
|
|
458
469
|
form
|
|
459
470
|
.getButton(`Block${blockNum}-Row${rowNum}-Col4`)
|
|
460
471
|
.setImage(condDisplay.voltageIcon);
|
|
472
|
+
}
|
|
461
473
|
else if (
|
|
462
474
|
!isGoettlInstall &&
|
|
463
475
|
measurement.label == "Cond. Amps" &&
|
|
464
476
|
condDisplay.amperageIcon
|
|
465
|
-
)
|
|
477
|
+
) {
|
|
478
|
+
console.log("[measurement-details] Setting Cond. Amps icon!");
|
|
466
479
|
form
|
|
467
480
|
.getButton(`Block${blockNum}-Row${rowNum}-Col4`)
|
|
468
481
|
.setImage(condDisplay.amperageIcon);
|
|
482
|
+
}
|
|
469
483
|
else if (
|
|
470
484
|
!isGoettlInstall &&
|
|
471
485
|
measurement.label == "AHU Volts" &&
|
|
472
486
|
ahuDisplay.voltageIcon
|
|
473
|
-
)
|
|
487
|
+
) {
|
|
488
|
+
console.log("[measurement-details] Setting AHU Volts icon!");
|
|
474
489
|
form
|
|
475
490
|
.getButton(`Block${blockNum}-Row${rowNum}-Col4`)
|
|
476
491
|
.setImage(ahuDisplay.voltageIcon);
|
|
492
|
+
}
|
|
477
493
|
else if (
|
|
478
494
|
!isGoettlInstall &&
|
|
479
495
|
measurement.label == "AHU Amps" &&
|
|
480
496
|
ahuDisplay.amperageIcon
|
|
481
|
-
)
|
|
497
|
+
) {
|
|
498
|
+
console.log("[measurement-details] Setting AHU Amps icon!");
|
|
482
499
|
form
|
|
483
500
|
.getButton(`Block${blockNum}-Row${rowNum}-Col4`)
|
|
484
501
|
.setImage(ahuDisplay.amperageIcon);
|
|
502
|
+
}
|
|
485
503
|
|
|
486
504
|
let units = measurement.units ? `(${measurement.units})` : "";
|
|
487
505
|
let altLabel = "";
|
package/util.js
CHANGED
|
@@ -294,6 +294,12 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
294
294
|
if (!test.source) test.source = {};
|
|
295
295
|
if (!test.data) test.data = {};
|
|
296
296
|
|
|
297
|
+
// Debug logging to help diagnose icon issues
|
|
298
|
+
console.log("[getElectricalData] suffix:", suffix);
|
|
299
|
+
console.log("[getElectricalData] test.source:", JSON.stringify(test.source));
|
|
300
|
+
console.log("[getElectricalData] test.source.voltage_l1:", test.source.voltage_l1);
|
|
301
|
+
console.log("[getElectricalData] test.source.voltage_l1_ahu:", test.source.voltage_l1_ahu);
|
|
302
|
+
|
|
297
303
|
let voltage = test.data[`voltage_nominal${suffix}`];
|
|
298
304
|
let phase = test.data[`phase${suffix}`];
|
|
299
305
|
let src = "_l1";
|
|
@@ -390,6 +396,10 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
390
396
|
const vSourceKey = suffixAlreadyInSrc ? "voltage" + src : "voltage" + src + suffix;
|
|
391
397
|
const aSourceKey = suffixAlreadyInSrc ? "amperage" + src : "amperage" + src + suffix;
|
|
392
398
|
|
|
399
|
+
console.log("[getElectricalData] src:", src, "suffix:", suffix);
|
|
400
|
+
console.log("[getElectricalData] suffixAlreadyInSrc:", suffixAlreadyInSrc);
|
|
401
|
+
console.log("[getElectricalData] vSourceKey:", vSourceKey, "aSourceKey:", aSourceKey);
|
|
402
|
+
|
|
393
403
|
// Build fallback source keys for multimeter sources (used when L1/L2/L3 sources aren't set)
|
|
394
404
|
// For condenser (suffix=""), check voltage_multimeter_condenser then voltage_multimeter
|
|
395
405
|
// For AHU (suffix="_ahu"), check voltage_multimeter_ahu then voltage_multimeter
|
|
@@ -398,22 +408,52 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
398
408
|
|
|
399
409
|
// Get voltage source with fallback chain
|
|
400
410
|
let vSource = test.source[vSourceKey];
|
|
411
|
+
console.log("[getElectricalData] vSource from vSourceKey:", vSource);
|
|
401
412
|
// Direct fallback for HAC/DL599 - check voltage_l1 directly for condenser, voltage_l1_ahu for AHU
|
|
402
|
-
if (!vSource && suffix === "")
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
413
|
+
if (!vSource && suffix === "") {
|
|
414
|
+
vSource = test.source["voltage_l1"];
|
|
415
|
+
console.log("[getElectricalData] vSource fallback voltage_l1:", vSource);
|
|
416
|
+
}
|
|
417
|
+
if (!vSource && suffix === "_ahu") {
|
|
418
|
+
vSource = test.source["voltage_l1_ahu"];
|
|
419
|
+
console.log("[getElectricalData] vSource fallback voltage_l1_ahu:", vSource);
|
|
420
|
+
}
|
|
421
|
+
if (!vSource) {
|
|
422
|
+
vSource = test.source[vMultimeterKey];
|
|
423
|
+
console.log("[getElectricalData] vSource fallback", vMultimeterKey + ":", vSource);
|
|
424
|
+
}
|
|
425
|
+
if (!vSource) {
|
|
426
|
+
vSource = test.source["voltage_multimeter"];
|
|
427
|
+
console.log("[getElectricalData] vSource fallback voltage_multimeter:", vSource);
|
|
428
|
+
}
|
|
429
|
+
console.log("[getElectricalData] FINAL vSource:", vSource);
|
|
406
430
|
|
|
407
431
|
// Get amperage source with fallback chain
|
|
408
432
|
let aSource = test.source[aSourceKey];
|
|
433
|
+
console.log("[getElectricalData] aSource from aSourceKey:", aSource);
|
|
409
434
|
// Direct fallback for HAC/DL599 - check amperage_l1 directly for condenser, amperage_l1_ahu for AHU
|
|
410
|
-
if (!aSource && suffix === "")
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
435
|
+
if (!aSource && suffix === "") {
|
|
436
|
+
aSource = test.source["amperage_l1"];
|
|
437
|
+
console.log("[getElectricalData] aSource fallback amperage_l1:", aSource);
|
|
438
|
+
}
|
|
439
|
+
if (!aSource && suffix === "_ahu") {
|
|
440
|
+
aSource = test.source["amperage_l1_ahu"];
|
|
441
|
+
console.log("[getElectricalData] aSource fallback amperage_l1_ahu:", aSource);
|
|
442
|
+
}
|
|
443
|
+
if (!aSource) {
|
|
444
|
+
aSource = test.source[aMultimeterKey];
|
|
445
|
+
console.log("[getElectricalData] aSource fallback", aMultimeterKey + ":", aSource);
|
|
446
|
+
}
|
|
447
|
+
if (!aSource) {
|
|
448
|
+
aSource = test.source["amperage_multimeter"];
|
|
449
|
+
console.log("[getElectricalData] aSource fallback amperage_multimeter:", aSource);
|
|
450
|
+
}
|
|
451
|
+
console.log("[getElectricalData] FINAL aSource:", aSource);
|
|
414
452
|
|
|
415
453
|
// Set icons based on source - don't require vDisplay/aDisplay to be set
|
|
416
454
|
// This ensures icons show up even if the display value logic doesn't match
|
|
455
|
+
console.log("[getElectricalData] Setting icons - vSource:", vSource, "aSource:", aSource);
|
|
456
|
+
console.log("[getElectricalData] embeddedIcons.iconUei exists:", !!embeddedIcons.iconUei);
|
|
417
457
|
if (vSource == "ComfortGuard")
|
|
418
458
|
vIcon = embeddedIcons.iconSensi;
|
|
419
459
|
else if (vSource == "iDVM550" || vSource == "iDVM-550")
|
|
@@ -424,8 +464,10 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
424
464
|
vIcon = embeddedIcons.iconRedfish510;
|
|
425
465
|
else if (vSource == "Fieldpiece")
|
|
426
466
|
vIcon = embeddedIcons.iconFieldpiece;
|
|
427
|
-
else if (vSource == "UEi HAC" || vSource == "UEi DL599" || vSource == "UEi HUB")
|
|
467
|
+
else if (vSource == "UEi HAC" || vSource == "UEi DL599" || vSource == "UEi HUB") {
|
|
428
468
|
vIcon = embeddedIcons.iconUei;
|
|
469
|
+
console.log("[getElectricalData] MATCHED UEi for voltage! vIcon set:", !!vIcon);
|
|
470
|
+
}
|
|
429
471
|
|
|
430
472
|
if (aSource == "ComfortGuard")
|
|
431
473
|
aIcon = embeddedIcons.iconSensi;
|
|
@@ -437,8 +479,11 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
437
479
|
aIcon = embeddedIcons.iconRedfish510;
|
|
438
480
|
else if (aSource == "Fieldpiece")
|
|
439
481
|
aIcon = embeddedIcons.iconFieldpiece;
|
|
440
|
-
else if (aSource == "UEi HAC" || aSource == "UEi DL599" || aSource == "UEi HUB")
|
|
482
|
+
else if (aSource == "UEi HAC" || aSource == "UEi DL599" || aSource == "UEi HUB") {
|
|
441
483
|
aIcon = embeddedIcons.iconUei;
|
|
484
|
+
console.log("[getElectricalData] MATCHED UEi for amperage! aIcon set:", !!aIcon);
|
|
485
|
+
}
|
|
486
|
+
console.log("[getElectricalData] Final icons - vIcon:", !!vIcon, "aIcon:", !!aIcon);
|
|
442
487
|
return {
|
|
443
488
|
voltage: vDisplay,
|
|
444
489
|
amperage: aDisplay,
|