@measurequick/measurequick-report-generator 1.4.71 → 1.4.73
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 +1 -1
- package/report-gen-scripts/measurement-details.js +11 -0
- package/util.js +5 -0
package/package.json
CHANGED
|
@@ -147,6 +147,8 @@ export async function getReport(payload) {
|
|
|
147
147
|
else if (!isGoettlInstall && measurement.label == "Cond. Amps" && condDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(condDisplay.amperageIcon);
|
|
148
148
|
else if (!isGoettlInstall && measurement.label == "AHU Volts" && ahuDisplay.voltageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.voltageIcon);
|
|
149
149
|
else if (!isGoettlInstall && measurement.label == "AHU Amps" && ahuDisplay.amperageIcon) form.getButton(`Block${blockNum}-Row${rowNum}-Col4`).setImage(ahuDisplay.amperageIcon);
|
|
150
|
+
|
|
151
|
+
|
|
150
152
|
let units = measurement.units ? `(${measurement.units})` : "";
|
|
151
153
|
let altLabel = "";
|
|
152
154
|
if (payload.meta.report_mode != 'heating' && blockNum == 1 && (rowNum == 4 || rowNum == 5 || rowNum == 6 || rowNum == 9)) altLabel = "c";
|
|
@@ -160,6 +162,15 @@ export async function getReport(payload) {
|
|
|
160
162
|
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
163
|
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
164
|
if (val == null || val == "null") val = "--";
|
|
165
|
+
|
|
166
|
+
if (measurement.value2 && measurement.units2 && measurement.ref2 && measurement.fixTo2){
|
|
167
|
+
//second measurement to show on same line
|
|
168
|
+
let val2 = measurement.value2 ? measurement.value2 : (+test.data[measurement.ref2]);
|
|
169
|
+
if (!val2) val2 = "--";
|
|
170
|
+
else if (measurement.fixTo2 && typeof val2 == 'number') val2 = val2.toFixed(measurement.fixTo2);
|
|
171
|
+
val += " / " + val2;
|
|
172
|
+
}
|
|
173
|
+
|
|
163
174
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col2${altLabel}`).setText(`${val}`);
|
|
164
175
|
if (blockNum != 4) {
|
|
165
176
|
let rangeIcon;
|
package/util.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
export function _base64ToArrayBuffer(base64) {
|
|
4
|
+
if (base64){
|
|
4
5
|
base64 = base64.replace(/^[^,]+,/, '').replace(/\s/g, '');
|
|
5
6
|
var binary_string = window.atob(base64);
|
|
6
7
|
var len = binary_string.length;
|
|
@@ -9,6 +10,10 @@ export function _base64ToArrayBuffer(base64) {
|
|
|
9
10
|
bytes[i] = binary_string.charCodeAt(i);
|
|
10
11
|
}
|
|
11
12
|
return bytes.buffer;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
export function checkCompanyLogo(meta) {
|