@measurequick/measurequick-report-generator 1.5.204 → 1.5.206
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
|
@@ -1595,7 +1595,7 @@ export async function getReport(payload) {
|
|
|
1595
1595
|
testo_size,
|
|
1596
1596
|
testo_size
|
|
1597
1597
|
);
|
|
1598
|
-
} else if (testObj.source["voltage" + src] == "iDVM550") {
|
|
1598
|
+
} else if (testObj.source["voltage" + src] == "iDVM550" || testObj.source["voltage" + src] == "iDVM-550") {
|
|
1599
1599
|
doc.addImage(
|
|
1600
1600
|
base64.iconRedfish550,
|
|
1601
1601
|
"PNG",
|
|
@@ -1649,7 +1649,7 @@ export async function getReport(payload) {
|
|
|
1649
1649
|
testo_size,
|
|
1650
1650
|
testo_size
|
|
1651
1651
|
);
|
|
1652
|
-
} else if (testObj.source["amperage" + src] == "iDVM550") {
|
|
1652
|
+
} else if (testObj.source["amperage" + src] == "iDVM550" || testObj.source["amperage" + src] == "iDVM-550") {
|
|
1653
1653
|
doc.addImage(
|
|
1654
1654
|
base64.iconRedfish550,
|
|
1655
1655
|
"PNG",
|
|
@@ -1704,7 +1704,7 @@ export async function getReport(payload) {
|
|
|
1704
1704
|
testo_size,
|
|
1705
1705
|
testo_size
|
|
1706
1706
|
);
|
|
1707
|
-
} else if (testObj.source.power_factor == "iDVM550") {
|
|
1707
|
+
} else if (testObj.source.power_factor == "iDVM550" || testObj.source.power_factor == "iDVM-550") {
|
|
1708
1708
|
doc.addImage(
|
|
1709
1709
|
base64.iconRedfish550,
|
|
1710
1710
|
"PNG",
|
|
@@ -1751,7 +1751,7 @@ export async function getReport(payload) {
|
|
|
1751
1751
|
testo_size,
|
|
1752
1752
|
testo_size
|
|
1753
1753
|
);
|
|
1754
|
-
} else if (testObj.source.power_condenser == "iDVM550") {
|
|
1754
|
+
} else if (testObj.source.power_condenser == "iDVM550" || testObj.source.power_condenser == "iDVM-550") {
|
|
1755
1755
|
doc.addImage(
|
|
1756
1756
|
base64.iconRedfish550,
|
|
1757
1757
|
"PNG",
|
|
@@ -2421,7 +2421,7 @@ export async function getReport(payload) {
|
|
|
2421
2421
|
text = vd;
|
|
2422
2422
|
position = alignRight(text, pos_right, 8);
|
|
2423
2423
|
doc.text(text, position, pos_vert); //page width,page height
|
|
2424
|
-
if (testObj.source.voltage_l1_ahu == "iDVM550") {
|
|
2424
|
+
if (testObj.source.voltage_l1_ahu == "iDVM550" || testObj.source.voltage_l1_ahu == "iDVM-550") {
|
|
2425
2425
|
doc.addImage(
|
|
2426
2426
|
base64.iconRedfish550,
|
|
2427
2427
|
"PNG",
|
|
@@ -2475,7 +2475,7 @@ export async function getReport(payload) {
|
|
|
2475
2475
|
text = ad;
|
|
2476
2476
|
position = alignRight(text, pos_right, 8);
|
|
2477
2477
|
doc.text(text, position, pos_vert); //page width,page height
|
|
2478
|
-
if (testObj.source.amperage_l1_ahu == "iDVM550") {
|
|
2478
|
+
if (testObj.source.amperage_l1_ahu == "iDVM550" || testObj.source.amperage_l1_ahu == "iDVM-550") {
|
|
2479
2479
|
doc.addImage(
|
|
2480
2480
|
base64.iconRedfish550,
|
|
2481
2481
|
"PNG",
|
|
@@ -2530,7 +2530,7 @@ export async function getReport(payload) {
|
|
|
2530
2530
|
: "--";
|
|
2531
2531
|
position = alignRight(text, pos_right, 8);
|
|
2532
2532
|
doc.text(text, position, pos_vert); //page width,page height
|
|
2533
|
-
if (testObj.source.power_factor_ahu == "iDVM550") {
|
|
2533
|
+
if (testObj.source.power_factor_ahu == "iDVM550" || testObj.source.power_factor_ahu == "iDVM-550") {
|
|
2534
2534
|
doc.addImage(
|
|
2535
2535
|
base64.iconRedfish550,
|
|
2536
2536
|
"PNG",
|
|
@@ -2586,7 +2586,7 @@ export async function getReport(payload) {
|
|
|
2586
2586
|
testo_size,
|
|
2587
2587
|
testo_size
|
|
2588
2588
|
);
|
|
2589
|
-
} else if (testObj.source.power_ahu == "iDVM550") {
|
|
2589
|
+
} else if (testObj.source.power_ahu == "iDVM550" || testObj.source.power_ahu == "iDVM-550") {
|
|
2590
2590
|
doc.addImage(
|
|
2591
2591
|
base64.iconRedfish550,
|
|
2592
2592
|
"PNG",
|
|
@@ -7135,6 +7135,7 @@ function drawManufacturerIcon(field) {
|
|
|
7135
7135
|
case "iDVM510":
|
|
7136
7136
|
return base64.iconRedfish510;
|
|
7137
7137
|
case "iDVM550":
|
|
7138
|
+
case "iDVM-550":
|
|
7138
7139
|
return base64.iconRedfish550;
|
|
7139
7140
|
case "VOLT-100":
|
|
7140
7141
|
return base64.iconVolt100;
|
|
@@ -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")
|
package/util.js
CHANGED
|
@@ -209,6 +209,7 @@ export function getToolIcon(test, ref, embeddedIcons) {
|
|
|
209
209
|
toolIcon = embeddedIcons.iconRedfish510;
|
|
210
210
|
break;
|
|
211
211
|
case "iDVM550":
|
|
212
|
+
case "iDVM-550":
|
|
212
213
|
toolIcon = embeddedIcons.iconRedfish550;
|
|
213
214
|
break;
|
|
214
215
|
case "VOLT-100":
|
|
@@ -354,7 +355,7 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
354
355
|
if (vDisplay) {
|
|
355
356
|
if (test.source["voltage" + src] == "ComfortGuard")
|
|
356
357
|
vIcon = embeddedIcons.iconSensi;
|
|
357
|
-
else if (test.source["voltage" + src] == "iDVM550")
|
|
358
|
+
else if (test.source["voltage" + src] == "iDVM550" || test.source["voltage" + src] == "iDVM-550")
|
|
358
359
|
vIcon = embeddedIcons.iconRedfish550;
|
|
359
360
|
else if (test.source["voltage" + src] == "VOLT-100")
|
|
360
361
|
vIcon = embeddedIcons.iconVolt100;
|
|
@@ -366,7 +367,7 @@ export function getElectricalData(test, suffix, embeddedIcons) {
|
|
|
366
367
|
if (aDisplay) {
|
|
367
368
|
if (test.source["amperage" + src] == "ComfortGuard")
|
|
368
369
|
aIcon = embeddedIcons.iconSensi;
|
|
369
|
-
else if (test.source["amperage" + src] == "iDVM550")
|
|
370
|
+
else if (test.source["amperage" + src] == "iDVM550" || test.source["amperage" + src] == "iDVM-550")
|
|
370
371
|
aIcon = embeddedIcons.iconRedfish550;
|
|
371
372
|
else if (test.source["amperage" + src] == "VOLT-100")
|
|
372
373
|
aIcon = embeddedIcons.iconVolt100;
|