@measurequick/measurequick-report-generator 1.2.122 → 1.2.124
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
|
@@ -148,11 +148,11 @@ export async function getReport(payload) {
|
|
|
148
148
|
if (!val) val = "--";
|
|
149
149
|
else if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
150
150
|
if ((measurement.label == 'Ambient CO' || measurement.label == 'Return CO' || measurement.label == 'Supply CO') && !measurement.value) val = '0.0';
|
|
151
|
-
if (
|
|
152
|
-
|
|
151
|
+
if (measurement.ref != 'gas_input_rated' && measurement.ref != 'gas_input_after') {
|
|
152
|
+
if (typeof val == 'number' || !isNaN(val)) val = val.toLocaleString("en-US");
|
|
153
|
+
else if (!isNaN(parseFloat(val))) val = parseFloat(val).toLocaleString("en-US");
|
|
154
|
+
}
|
|
153
155
|
if (measurement.fixTo && typeof val == 'number') val = val.toFixed(measurement.fixTo);
|
|
154
|
-
// gas_input_rated
|
|
155
|
-
// gas_input_after
|
|
156
156
|
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;
|
|
157
157
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col2`).setText(`${val}`);
|
|
158
158
|
if (blockNum != 4) {
|
|
@@ -178,20 +178,17 @@ export async function getReport(payload, _test) {
|
|
|
178
178
|
} else if (test.testInfo.data.coaf > 400) specialCasePlacement = "High";
|
|
179
179
|
form.getButton(`ImageCOaf${specialCasePlacement}`).setImage(specialCaseIcon);
|
|
180
180
|
|
|
181
|
-
specialCaseIcon = iconRangeRed;
|
|
182
181
|
specialCasePlacement = "Low";
|
|
183
|
-
if (test.testInfo.data.efficiency_gcv >= 90)
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
} else if (test.testInfo.data.efficiency_gcv >= 80) specialCasePlacement = "Mid";
|
|
187
|
-
form.getButton(`ImageEfficiency${specialCasePlacement}`).setImage(specialCaseIcon);
|
|
182
|
+
if (test.testInfo.data.efficiency_gcv >= 90) specialCasePlacement = "High";
|
|
183
|
+
else if (test.testInfo.data.efficiency_gcv >= 80) specialCasePlacement = "Mid";
|
|
184
|
+
form.getButton(`ImageEfficiency${specialCasePlacement}`).setImage(iconRangeGreen);
|
|
188
185
|
|
|
189
186
|
// print pass fail measures
|
|
190
187
|
if (test.testInfo.subsystem_review_complete) {
|
|
191
188
|
let passFails = ["ambient_co_pass_fail", "control_system_pass_fail", "electrical_system_pass_fail", "air_distribution_system_pass_fail", "air_filtration_system_pass_fail", "condensate_drain_system_pass_fail", "indoor_equipment_pass_fail", "venting_system_pass_fail", "fuel_delivery_system_pass_fail", "make_up_air_system_pass_fail", "heat_exchanger_pass_fail", "safety_system_pass_fail", "heating_operation_pass_fail", "combustion_safety_pass_fail", "combustion_efficiency_pass_fail"];
|
|
192
189
|
let pfLabels = ["Ambient CO", "Control system (thermostat)", "Electrical system", "Air distribution system", "Air filtration system", "Condensate drain system", "Indoor equipment", "Venting system", "Fuel delivery system", "Make up air (CAZ)", "Heat exchanger", "Safety system", "Heating operation", "Combustion Safety", "Combustion efficiency"];
|
|
193
190
|
for (let i = 1; i <= passFails.length; i++) {
|
|
194
|
-
let meas = test[passFails[i - 1]];
|
|
191
|
+
let meas = test.testInfo[passFails[i - 1]];
|
|
195
192
|
let icon = meas == "Pass" || meas == "High" || meas == "Mid" ? iconRangeGreen : iconRangeRed;
|
|
196
193
|
form.getButton(`ImageSubsystem${i}_af_image`).setImage(icon);
|
|
197
194
|
form.getTextField(`SSR${i}`).setText(pfLabels[i-1]);
|