@measurequick/measurequick-report-generator 1.2.159 → 1.2.162
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
|
@@ -141,7 +141,6 @@ export async function getReport(payload) {
|
|
|
141
141
|
let condDisplay = util.getElectricalData(test, "", embeddedIcons);
|
|
142
142
|
let ahuDisplay = util.getElectricalData(test, "_ahu", embeddedIcons);
|
|
143
143
|
if (measurement) {
|
|
144
|
-
if (measurement.ref == 'c1') console.log('1: ' + val);
|
|
145
144
|
if (measurement.label == "Cond. Volts" && condDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.voltageIcon);
|
|
146
145
|
else if (measurement.label == "Cond. Amps" && condDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.amperageIcon);
|
|
147
146
|
else if (measurement.label == "AHU Volts" && ahuDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.voltageIcon);
|
|
@@ -149,22 +148,18 @@ export async function getReport(payload) {
|
|
|
149
148
|
let units = measurement.units ? `(${measurement.units})` : "";
|
|
150
149
|
let altLabel = "";
|
|
151
150
|
if (payload.meta.report_mode != 'heating' && blockNum == 1 && (rowNum == 4 || rowNum == 5 || rowNum == 6 || rowNum == 9)) altLabel = "c";
|
|
152
|
-
if (measurement.ref == 'c1') console.log('2: ' + val);
|
|
153
151
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col1${altLabel}`).setText(`${measurement.label} ${units}`);
|
|
154
152
|
let val = measurement.value ? measurement.value : (+test.data[measurement.ref]);
|
|
155
153
|
if (!val) val = "--";
|
|
156
154
|
else if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
157
155
|
if ((measurement.label == 'Ambient CO' || measurement.label == 'Return CO' || measurement.label == 'Supply CO') && !measurement.value) val = '0.0';
|
|
158
156
|
//if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
159
|
-
if (measurement.ref == 'c1') console.log('3: ' + val);
|
|
160
157
|
if (typeof val == 'number' || !isNaN(val)) val = val.toLocaleString("en-US");
|
|
161
|
-
else if (!isNaN(parseFloat(val))) val = parseFloat(val).toLocaleString("en-US");
|
|
158
|
+
//else if (!isNaN(parseFloat(val))) val = parseFloat(val).toLocaleString("en-US");
|
|
162
159
|
if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
163
160
|
if (measurement.ref == 'co' || measurement.ref == 'o2' || measurement.ref == 'temperature_air' || measurement.ref == 'temperature_stack' || measurement.ref == 'coaf' || measurement.ref == 'excess_air' || measurement.ref == 'efficiency_gcv' || measurement.ref == 'efficiency_ncv' || measurement.ref == 'dew_point') val = measurement.value;
|
|
164
161
|
else if (measurement.ref == 'pressure_fuel' || measurement.ref == 'pressure_manifold' || measurement.ref == 'pressure_static_total_external' || measurement.ref == 'temperature_rise' || measurement.ref == 'temperature_rise_target' || measurement.ref == 'temperature_return' || measurement.ref == 'temperature_supply' || measurement.ref == 'airflow' || measurement.ref == 'gas_input_rated' || measurement.ref == 'gas_input_after' || measurement.ref == 'gas_output') val = measurement.value;
|
|
165
162
|
if (val == null || val == "null") val = "--";
|
|
166
|
-
if (measurement.ref == 'c1') {console.log('4: ' + val);
|
|
167
|
-
console.log("==================================");}
|
|
168
163
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col2${altLabel}`).setText(`${val}`);
|
|
169
164
|
if (blockNum != 4) {
|
|
170
165
|
let rangeIcon = util.getRangeIcon(test, measurement.ref, embeddedIcons);
|