@measurequick/measurequick-report-generator 1.4.14 → 1.4.16
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
|
@@ -143,22 +143,19 @@ export async function getReport(payload) { // DAVID TODO
|
|
|
143
143
|
if (val == null || val == "null") val = "--";
|
|
144
144
|
form.getTextField(`Block${blockNum}-Row${rowNum}-Col1`).setText(`${measurement.label}`);
|
|
145
145
|
if (blockNum == 5) {
|
|
146
|
-
let
|
|
147
|
-
let
|
|
148
|
-
if (payload.meta.report_mode == 'cooling')
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
form.getButton(`SSR${i + 1}`).setImage(icon);
|
|
160
|
-
}
|
|
161
|
-
} else form.getTextField(`Block${blockNum}-Row${rowNum}-Col2`).setText(`${val}`);
|
|
146
|
+
let c = 0;
|
|
147
|
+
let passFails = ["ambient_pass_fail", "control_system_pass_fail", "electrical_system_pass_fail", "air_distribution_system_pass_fail", "air_filtration_system_pass_fail", "indoor_equipment_pass_fail", "venting_system_pass_fail", "fuel_delivery_system_pass_fail", "heat_exchanger_pass_fail", "safety_system_pass_fail", "heating_operation_pass_fail", "combustion_pass_fail", "heating_efficiency_pass_fail"];
|
|
148
|
+
if (payload.meta.report_mode == 'cooling') passFails = ["electrical_system_pass_fail", "air_distribution_system_pass_fail", "air_filtration_system_pass_fail", "condensate_drain_system_pass_fail", "refrigerant_charge_pass_fail", "outdoor_equipment_pass_fail", "indoor_equipment_pass_fail", "cooling_capacity_pass_fail", "cooling_electrical_efficiency_pass_fail"];
|
|
149
|
+
let meas = test[passFails[c]];
|
|
150
|
+
let icon = meas == "Pass" || meas == "High" || meas == "Mid" ? embeddedIcons.iconRangeGreen : embeddedIcons.iconRangeRed;
|
|
151
|
+
if (passFails[i] == 'heating_efficiency_pass_fail') icon = embeddedIcons.iconRangeGreen;
|
|
152
|
+
let suffix = test[passFails[i] + '_override'] ? ' *' : '';
|
|
153
|
+
if (meas == "Caution" || suffix == ' *') icon = embeddedIcons.iconRangeYellow;
|
|
154
|
+
form.getButton(`SSR${c + 1}`).setImage(icon);
|
|
155
|
+
c++;
|
|
156
|
+
} else if (val == true || val == 'true') form.getButton(`Block${blockNum}-Row${rowNum}-Col2-Icon`).setImage(embeddedIcons.iconRangeGreen);
|
|
157
|
+
else if (val == false || val == 'false') form.getButton(`Block${blockNum}-Row${rowNum}-Col2-Icon`).setImage(embeddedIcons.iconRangeRed);
|
|
158
|
+
else form.getTextField(`Block${blockNum}-Row${rowNum}-Col2`).setText(`${val}`);
|
|
162
159
|
} else break;
|
|
163
160
|
}
|
|
164
161
|
}
|