@measurequick/measurequick-report-generator 1.2.158 → 1.2.159
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,6 +141,7 @@ 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);
|
|
144
145
|
if (measurement.label == "Cond. Volts" && condDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.voltageIcon);
|
|
145
146
|
else if (measurement.label == "Cond. Amps" && condDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.amperageIcon);
|
|
146
147
|
else if (measurement.label == "AHU Volts" && ahuDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.voltageIcon);
|
|
@@ -148,18 +149,22 @@ export async function getReport(payload) {
|
|
|
148
149
|
let units = measurement.units ? `(${measurement.units})` : "";
|
|
149
150
|
let altLabel = "";
|
|
150
151
|
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);
|
|
151
153
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col1${altLabel}`).setText(`${measurement.label} ${units}`);
|
|
152
154
|
let val = measurement.value ? measurement.value : (+test.data[measurement.ref]);
|
|
153
155
|
if (!val) val = "--";
|
|
154
156
|
else if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
155
157
|
if ((measurement.label == 'Ambient CO' || measurement.label == 'Return CO' || measurement.label == 'Supply CO') && !measurement.value) val = '0.0';
|
|
156
158
|
//if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
159
|
+
if (measurement.ref == 'c1') console.log('3: ' + val);
|
|
157
160
|
if (typeof val == 'number' || !isNaN(val)) val = val.toLocaleString("en-US");
|
|
158
161
|
else if (!isNaN(parseFloat(val))) val = parseFloat(val).toLocaleString("en-US");
|
|
159
162
|
if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
160
163
|
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;
|
|
161
164
|
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;
|
|
162
165
|
if (val == null || val == "null") val = "--";
|
|
166
|
+
if (measurement.ref == 'c1') {console.log('4: ' + val);
|
|
167
|
+
console.log("==================================");}
|
|
163
168
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col2${altLabel}`).setText(`${val}`);
|
|
164
169
|
if (blockNum != 4) {
|
|
165
170
|
let rangeIcon = util.getRangeIcon(test, measurement.ref, embeddedIcons);
|