@measurequick/measurequick-report-generator 1.2.92 → 1.2.93
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
|
@@ -139,14 +139,17 @@ export async function getReport(payload) {
|
|
|
139
139
|
let ahuDisplay = util.getElectricalData(test, "_ahu", embeddedIcons);
|
|
140
140
|
if (measurement) {
|
|
141
141
|
if (measurement.label == "Cond. Volts" && condDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.voltageIcon);
|
|
142
|
-
if (measurement.label == "Cond. Amps" && condDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.amperageIcon);
|
|
143
|
-
if (measurement.label == "AHU Volts" && ahuDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.voltageIcon);
|
|
144
|
-
if (measurement.label == "AHU Amps" && ahuDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.amperageIcon);
|
|
142
|
+
else if (measurement.label == "Cond. Amps" && condDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.amperageIcon);
|
|
143
|
+
else if (measurement.label == "AHU Volts" && ahuDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.voltageIcon);
|
|
144
|
+
else if (measurement.label == "AHU Amps" && ahuDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.amperageIcon);
|
|
145
145
|
let units = measurement.units ? `(${measurement.units})` : "";
|
|
146
146
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col1`).setText(`${measurement.label} ${units}`);
|
|
147
147
|
let val = measurement.value ? measurement.value : (+test.data[measurement.ref]);
|
|
148
148
|
if (!val) val = "--";
|
|
149
149
|
else if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
150
|
+
if (measurement.label == 'Ambient CO' && !measurement.value) val = '0.0';
|
|
151
|
+
else if (measurement.label == 'Return CO' && !measurement.value) val = '0.0';
|
|
152
|
+
else if (measurement.label == 'Supply CO' && !measurement.value) val = '0.0';
|
|
150
153
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col2`).setText(`${val}`);
|
|
151
154
|
if (blockNum != 4) {
|
|
152
155
|
let rangeIcon = util.getRangeIcon(test, measurement.ref, embeddedIcons);
|