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