@measurequick/measurequick-report-generator 1.5.224 → 1.5.226
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/classic-report.js +27 -0
- package/util.js +20 -0
package/package.json
CHANGED
|
@@ -1634,6 +1634,15 @@ export async function getReport(payload) {
|
|
|
1634
1634
|
testo_size,
|
|
1635
1635
|
testo_size
|
|
1636
1636
|
);
|
|
1637
|
+
} else if (testObj.source["voltage" + src] == "UEi HAC" || testObj.source["voltage" + src] == "UEi DL599") {
|
|
1638
|
+
doc.addImage(
|
|
1639
|
+
base64.iconUei,
|
|
1640
|
+
"PNG",
|
|
1641
|
+
pos_right + testo_offset_x,
|
|
1642
|
+
pos_vert - testo_offset_y,
|
|
1643
|
+
testo_size,
|
|
1644
|
+
testo_size
|
|
1645
|
+
);
|
|
1637
1646
|
}
|
|
1638
1647
|
pos_vert += spacing;
|
|
1639
1648
|
}
|
|
@@ -1688,6 +1697,15 @@ export async function getReport(payload) {
|
|
|
1688
1697
|
testo_size,
|
|
1689
1698
|
testo_size
|
|
1690
1699
|
);
|
|
1700
|
+
} else if (testObj.source["amperage" + src] == "UEi HAC" || testObj.source["amperage" + src] == "UEi DL599") {
|
|
1701
|
+
doc.addImage(
|
|
1702
|
+
base64.iconUei,
|
|
1703
|
+
"PNG",
|
|
1704
|
+
pos_right + testo_offset_x,
|
|
1705
|
+
pos_vert - testo_offset_y,
|
|
1706
|
+
testo_size,
|
|
1707
|
+
testo_size
|
|
1708
|
+
);
|
|
1691
1709
|
}
|
|
1692
1710
|
pos_vert += spacing;
|
|
1693
1711
|
}
|
|
@@ -2661,6 +2679,15 @@ export async function getReport(payload) {
|
|
|
2661
2679
|
testo_size,
|
|
2662
2680
|
testo_size
|
|
2663
2681
|
);
|
|
2682
|
+
} else if (testObj.source.power_ahu == "UEi HAC" || testObj.source.power_ahu == "UEi DL599") {
|
|
2683
|
+
doc.addImage(
|
|
2684
|
+
base64.iconUei,
|
|
2685
|
+
"PNG",
|
|
2686
|
+
pos_right + testo_offset_x,
|
|
2687
|
+
pos_vert - testo_offset_y,
|
|
2688
|
+
testo_size,
|
|
2689
|
+
testo_size
|
|
2690
|
+
);
|
|
2664
2691
|
} else if (
|
|
2665
2692
|
testObj.electrical_capture_type_ahu !== "Power" &&
|
|
2666
2693
|
testObj.data.power_ahu
|
package/util.js
CHANGED
|
@@ -370,6 +370,16 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
370
370
|
vDisplay = (+test.data[`voltage_l1`]).toFixed(1);
|
|
371
371
|
aDisplay = (+test.data[`amperage_l1`]).toFixed(1);
|
|
372
372
|
}
|
|
373
|
+
|
|
374
|
+
// Fallback: If vDisplay/aDisplay not set but data exists, use the data directly
|
|
375
|
+
// This handles cases like Power_HAC mode or other capture types that don't fit standard conditions
|
|
376
|
+
if (!vDisplay && test.data && test.data[`voltage_l1${suffix}`]) {
|
|
377
|
+
vDisplay = (+test.data[`voltage_l1${suffix}`]).toFixed(1);
|
|
378
|
+
}
|
|
379
|
+
if (!aDisplay && test.data && test.data[`amperage_l1${suffix}`]) {
|
|
380
|
+
aDisplay = (+test.data[`amperage_l1${suffix}`]).toFixed(1);
|
|
381
|
+
}
|
|
382
|
+
|
|
373
383
|
// Build the source key with suffix for AHU support
|
|
374
384
|
// Note: for ph_to_gnd cases, src already includes the suffix, so don't add it again
|
|
375
385
|
const suffixAlreadyInSrc = src.includes(suffix) && suffix !== "";
|
|
@@ -384,11 +394,17 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
384
394
|
|
|
385
395
|
// Get voltage source with fallback chain
|
|
386
396
|
let vSource = test.source[vSourceKey];
|
|
397
|
+
// Direct fallback for HAC/DL599 - check voltage_l1 directly for condenser, voltage_l1_ahu for AHU
|
|
398
|
+
if (!vSource && suffix === "") vSource = test.source["voltage_l1"];
|
|
399
|
+
if (!vSource && suffix === "_ahu") vSource = test.source["voltage_l1_ahu"];
|
|
387
400
|
if (!vSource) vSource = test.source[vMultimeterKey];
|
|
388
401
|
if (!vSource) vSource = test.source["voltage_multimeter"];
|
|
389
402
|
|
|
390
403
|
// Get amperage source with fallback chain
|
|
391
404
|
let aSource = test.source[aSourceKey];
|
|
405
|
+
// Direct fallback for HAC/DL599 - check amperage_l1 directly for condenser, amperage_l1_ahu for AHU
|
|
406
|
+
if (!aSource && suffix === "") aSource = test.source["amperage_l1"];
|
|
407
|
+
if (!aSource && suffix === "_ahu") aSource = test.source["amperage_l1_ahu"];
|
|
392
408
|
if (!aSource) aSource = test.source[aMultimeterKey];
|
|
393
409
|
if (!aSource) aSource = test.source["amperage_multimeter"];
|
|
394
410
|
|
|
@@ -403,6 +419,8 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
403
419
|
vIcon = embeddedIcons.iconRedfish510;
|
|
404
420
|
else if (vSource == "Fieldpiece")
|
|
405
421
|
vIcon = embeddedIcons.iconFieldpiece;
|
|
422
|
+
else if (vSource == "UEi HAC" || vSource == "UEi DL599")
|
|
423
|
+
vIcon = embeddedIcons.iconUei;
|
|
406
424
|
}
|
|
407
425
|
if (aDisplay) {
|
|
408
426
|
if (aSource == "ComfortGuard")
|
|
@@ -415,6 +433,8 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
415
433
|
aIcon = embeddedIcons.iconRedfish510;
|
|
416
434
|
else if (aSource == "Fieldpiece")
|
|
417
435
|
aIcon = embeddedIcons.iconFieldpiece;
|
|
436
|
+
else if (aSource == "UEi HAC" || aSource == "UEi DL599")
|
|
437
|
+
aIcon = embeddedIcons.iconUei;
|
|
418
438
|
}
|
|
419
439
|
return {
|
|
420
440
|
voltage: vDisplay,
|