@measurequick/measurequick-report-generator 1.2.159 → 1.2.161
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,26 @@ 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]);
|
|
153
|
+
if (measurement.ref == 'c1') console.log('1: ' + val);
|
|
155
154
|
if (!val) val = "--";
|
|
156
155
|
else if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
156
|
+
if (measurement.ref == 'c1') console.log('2: ' + val);
|
|
157
157
|
if ((measurement.label == 'Ambient CO' || measurement.label == 'Return CO' || measurement.label == 'Supply CO') && !measurement.value) val = '0.0';
|
|
158
158
|
//if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
159
|
-
if (measurement.ref == 'c1') console.log('3: ' + val);
|
|
160
159
|
if (typeof val == 'number' || !isNaN(val)) val = val.toLocaleString("en-US");
|
|
161
160
|
else if (!isNaN(parseFloat(val))) val = parseFloat(val).toLocaleString("en-US");
|
|
161
|
+
if (measurement.ref == 'c1') console.log('3: ' + val);
|
|
162
162
|
if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
163
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;
|
|
164
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;
|
|
165
|
+
if (measurement.ref == 'c1') console.log('4: ' + val);
|
|
165
166
|
if (val == null || val == "null") val = "--";
|
|
166
|
-
|
|
167
|
-
console.log(
|
|
167
|
+
if (measurement.ref == 'c1') {
|
|
168
|
+
console.log('5: ' + val);
|
|
169
|
+
console.log("==================================");
|
|
170
|
+
}
|
|
168
171
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col2${altLabel}`).setText(`${val}`);
|
|
169
172
|
if (blockNum != 4) {
|
|
170
173
|
let rangeIcon = util.getRangeIcon(test, measurement.ref, embeddedIcons);
|