@measurequick/measurequick-report-generator 1.5.13 → 1.5.14
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/nci-report.js +47 -31
package/package.json
CHANGED
|
@@ -42,6 +42,8 @@ export async function getReport(payload, _test) {
|
|
|
42
42
|
supply_pressure = 4,
|
|
43
43
|
test = payload&&payload.test ? payload.test : {};
|
|
44
44
|
|
|
45
|
+
console.log('test.ductScreeningType',test.ductScreeningType);
|
|
46
|
+
|
|
45
47
|
if (test.ductScreeningSystemType === 'Package Draw Through' && test.ductScreeningFilterLocation === 'Grille'){
|
|
46
48
|
filter_pressure_drop = 1,
|
|
47
49
|
return_pressure_drop = 2,
|
|
@@ -160,22 +162,28 @@ export async function getReport(payload, _test) {
|
|
|
160
162
|
//Not used//form.getTextField('TestResultOrange').setText(`PASS`);
|
|
161
163
|
|
|
162
164
|
//Airflow
|
|
163
|
-
if (test.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
meas =
|
|
173
|
-
|
|
174
|
-
|
|
165
|
+
if (test.ductScreeningType!==3){
|
|
166
|
+
if (test.ductScreeningAirflow){
|
|
167
|
+
form.getTextField('FanAirflow').setText(`${test.ductScreeningAirflow.toString()}`);
|
|
168
|
+
}
|
|
169
|
+
if (test.ductScreeningAirflowTarget){
|
|
170
|
+
form.getTextField('FanAirflowTarget').setText(`${test.ductScreeningAirflowTarget.toString()}`);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
//Add logic here for which image
|
|
174
|
+
let meas = ""; //Low , High
|
|
175
|
+
if (test["ductScreeningAirflowResult"]){
|
|
176
|
+
meas = test["ductScreeningAirflowResult"]===-1 ? 'Low' : 'High';
|
|
177
|
+
} else if (test["ductScreeningAirflowResult"]===0){
|
|
178
|
+
meas = 'Mid';
|
|
179
|
+
}
|
|
180
|
+
let icon = (meas == "Mid" ? iconRangeGreen : iconRangeRed);
|
|
181
|
+
if (meas)
|
|
182
|
+
form.getButton('ImageFanAirflow'+meas).setImage(icon);
|
|
183
|
+
} else {
|
|
184
|
+
form.getTextField('FanAirflow').setText('N/A');
|
|
185
|
+
form.getTextField('FanAirflowTarget').setText('N/A');
|
|
175
186
|
}
|
|
176
|
-
let icon = (meas == "Mid" ? iconRangeGreen : iconRangeRed);
|
|
177
|
-
if (meas)
|
|
178
|
-
form.getButton('ImageFanAirflow'+meas).setImage(icon);
|
|
179
187
|
|
|
180
188
|
//TESP
|
|
181
189
|
if (test.ductScreeningTESP){
|
|
@@ -212,20 +220,25 @@ export async function getReport(payload, _test) {
|
|
|
212
220
|
form.getButton('ImageFilterPressureDrop'+meas).setImage(icon);
|
|
213
221
|
|
|
214
222
|
//Coil Pressure Drop
|
|
215
|
-
if (test
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
if (test.ductScreeningTestPoint3){
|
|
224
|
+
if (test["ductScreeningPressureDrop"+coil_pressure_drop])
|
|
225
|
+
form.getTextField('IndoorCoilPressureDrop').setText(test["ductScreeningPressureDrop"+coil_pressure_drop].toString());
|
|
226
|
+
if (test["ductScreeningPressureDrop"+coil_pressure_drop+'Target'])
|
|
227
|
+
form.getTextField('IndoorCoilPressureDropTarget').setText(test["ductScreeningPressureDrop"+coil_pressure_drop+'Target'].toString());
|
|
228
|
+
//Add logic here for which image
|
|
229
|
+
meas = "";
|
|
230
|
+
if (test["ductScreeningPressureDrop"+coil_pressure_drop+"Result"]){
|
|
231
|
+
meas = test["ductScreeningPressureDrop"+coil_pressure_drop+"Result"]===-1 ? 'Low' : 'High';
|
|
232
|
+
} else if (test["ductScreeningPressureDrop"+coil_pressure_drop+"Result"]===0){
|
|
233
|
+
meas = 'Mid';
|
|
234
|
+
}
|
|
235
|
+
icon = (meas == "Mid" ? iconRangeGreen : iconRangeRed);
|
|
236
|
+
if (meas)
|
|
237
|
+
form.getButton('ImageIndoorCoilPressureDrop'+meas).setImage(icon);
|
|
238
|
+
} else {
|
|
239
|
+
form.getTextField('IndoorCoilPressureDrop').setText('N/A');
|
|
240
|
+
form.getTextField('IndoorCoilPressureDropTarget').setText('N/A');
|
|
225
241
|
}
|
|
226
|
-
icon = (meas == "Mid" ? iconRangeGreen : iconRangeRed);
|
|
227
|
-
if (meas)
|
|
228
|
-
form.getButton('ImageIndoorCoilPressureDrop'+meas).setImage(icon);
|
|
229
242
|
|
|
230
243
|
//Return Duct Pressure
|
|
231
244
|
if (test["ductScreeningPressureDrop"+return_pressure_drop])
|
|
@@ -291,14 +304,17 @@ export async function getReport(payload, _test) {
|
|
|
291
304
|
//form.getButton('ImageAdditionalSupportingData9').setImage(icon);
|
|
292
305
|
|
|
293
306
|
form.getTextField('Recommendations').setText(`This is sample text to see how it looks\nand a test of a line break\n\nand two line breaks...`);
|
|
294
|
-
if (test.ductScreeningAirflowResult||test.ductScreeningAirflowResult===0)
|
|
307
|
+
if (test.ductScreeningType!==3 && (test.ductScreeningAirflowResult||test.ductScreeningAirflowResult===0))
|
|
295
308
|
form.getTextField('FanAirflowPassFail').setText(getPassFailText(test.ductScreeningAirflowResult));
|
|
309
|
+
else form.getTextField('FanAirflowPassFail').setText('N/A');
|
|
296
310
|
if (test.ductScreeningTESPResult||test.ductScreeningTESPResult===0)
|
|
297
311
|
form.getTextField('StaticPressurePassFail').setText(getPassFailText(test.ductScreeningTESPResult));
|
|
298
312
|
if (test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']||test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']===0)
|
|
299
313
|
form.getTextField('AirFilterPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']));
|
|
300
|
-
if (test
|
|
301
|
-
|
|
314
|
+
if (test.ductScreeningTestPoint3){
|
|
315
|
+
if (test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']||test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']===0)
|
|
316
|
+
form.getTextField('CoilPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']));
|
|
317
|
+
} else form.getTextField('CoilPassFail').setText('N/A');
|
|
302
318
|
if (test['ductScreeningPressureDrop'+supply_pressure+'Result']||test['ductScreeningPressureDrop'+supply_pressure+'Result']===0)
|
|
303
319
|
form.getTextField('SupplyDuctPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+supply_pressure+'Result']));
|
|
304
320
|
if (test['ductScreeningPressureDrop'+return_pressure_drop+'Result']||test['ductScreeningPressureDrop'+return_pressure_drop+'Result']===0)
|