@measurequick/measurequick-report-generator 1.5.19 → 1.5.20
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 +69 -19
package/package.json
CHANGED
|
@@ -172,9 +172,15 @@ export async function getReport(payload, _test) {
|
|
|
172
172
|
if (test.ductScreeningAirflow){
|
|
173
173
|
form.getTextField('FanAirflow').setText(`${test.ductScreeningAirflow.toString()} SCFM`);
|
|
174
174
|
}
|
|
175
|
+
else {
|
|
176
|
+
form.getTextField('FanAirflow').setText('--');
|
|
177
|
+
}
|
|
175
178
|
if (test.ductScreeningAirflowTarget){
|
|
176
179
|
form.getTextField('FanAirflowTarget').setText(`${test.ductScreeningAirflowTarget.toString()}`);
|
|
177
180
|
}
|
|
181
|
+
else {
|
|
182
|
+
form.getTextField('FanAirflowTarget').setText('--');
|
|
183
|
+
}
|
|
178
184
|
|
|
179
185
|
//Add logic here for which image
|
|
180
186
|
if (test["ductScreeningAirflowResult"]){
|
|
@@ -194,9 +200,15 @@ export async function getReport(payload, _test) {
|
|
|
194
200
|
if (test.ductScreeningTESP){
|
|
195
201
|
form.getTextField('TotalExternalStaticPressure').setText(`${test.ductScreeningTESP.toString()} inH2O`);
|
|
196
202
|
}
|
|
203
|
+
else {
|
|
204
|
+
form.getTextField('TotalExternalStaticPressure').setText('--');
|
|
205
|
+
}
|
|
197
206
|
if (test.ductScreeningTESPTarget){
|
|
198
207
|
form.getTextField('TotalExternalStaticPressureTarget').setText(`${test.ductScreeningTESPTarget.toString()}`);
|
|
199
208
|
}
|
|
209
|
+
else {
|
|
210
|
+
form.getTextField('TotalExternalStaticPressureTarget').setText('--');
|
|
211
|
+
}
|
|
200
212
|
//Add logic here for which image
|
|
201
213
|
meas = "";
|
|
202
214
|
if (test["ductScreeningTESPResult"]){
|
|
@@ -211,8 +223,14 @@ export async function getReport(payload, _test) {
|
|
|
211
223
|
//Filter Pressure Drop
|
|
212
224
|
if (test["ductScreeningPressureDrop"+filter_pressure_drop])
|
|
213
225
|
form.getTextField('FilterPressureDrop').setText(test['ductScreeningPressureDrop'+filter_pressure_drop].toString() + ' inH2O');
|
|
226
|
+
else {
|
|
227
|
+
form.getTextField('FilterPressureDrop').setText('--');
|
|
228
|
+
}
|
|
214
229
|
if (test['ductScreeningPressureDrop'+filter_pressure_drop+'Target'])
|
|
215
230
|
form.getTextField('FilterPressureDropTarget').setText(test['ductScreeningPressureDrop'+filter_pressure_drop+'Target'].toString());
|
|
231
|
+
else {
|
|
232
|
+
form.getTextField('FilterPressureDropTarget').setText('--');
|
|
233
|
+
}
|
|
216
234
|
//Add logic here for which image
|
|
217
235
|
meas = "";
|
|
218
236
|
if (test["ductScreeningPressureDrop"+filter_pressure_drop+"Result"]){
|
|
@@ -228,8 +246,14 @@ export async function getReport(payload, _test) {
|
|
|
228
246
|
if (test.ductScreeningTestPoint3){
|
|
229
247
|
if (test["ductScreeningPressureDrop"+coil_pressure_drop] || test["ductScreeningPressureDrop"+coil_pressure_drop]===0)
|
|
230
248
|
form.getTextField('IndoorCoilPressureDrop').setText(test["ductScreeningPressureDrop"+coil_pressure_drop].toString() + ' inH2O');
|
|
249
|
+
else {
|
|
250
|
+
form.getTextField('IndoorCoilPressureDrop').setText('--');
|
|
251
|
+
}
|
|
231
252
|
if (test["ductScreeningPressureDrop"+coil_pressure_drop+'Target'])
|
|
232
253
|
form.getTextField('IndoorCoilPressureDropTarget').setText(test["ductScreeningPressureDrop"+coil_pressure_drop+'Target'].toString());
|
|
254
|
+
else {
|
|
255
|
+
form.getTextField('IndoorCoilPressureDropTarget').setText('--');
|
|
256
|
+
}
|
|
233
257
|
//Add logic here for which image
|
|
234
258
|
meas = "";
|
|
235
259
|
if (test["ductScreeningPressureDrop"+coil_pressure_drop+"Result"]){
|
|
@@ -248,8 +272,12 @@ export async function getReport(payload, _test) {
|
|
|
248
272
|
//Return Duct Pressure
|
|
249
273
|
if (test["ductScreeningPressureDrop"+return_pressure_drop])
|
|
250
274
|
form.getTextField('ReturnDuctPressure').setText(test["ductScreeningPressureDrop"+return_pressure_drop].toString() + ' inH2O');
|
|
275
|
+
else
|
|
276
|
+
form.getTextField('ReturnDuctPressure').setText('--');
|
|
251
277
|
if (test["ductScreeningPressureDrop"+return_pressure_drop+'Target'])
|
|
252
278
|
form.getTextField('ReturnDuctPressureTarget').setText(test["ductScreeningPressureDrop"+return_pressure_drop+'Target'].toString());
|
|
279
|
+
else
|
|
280
|
+
form.getTextField('ReturnDuctPressureTarget').setText('--');
|
|
253
281
|
//Add logic here for which image
|
|
254
282
|
meas = "";
|
|
255
283
|
if (test["ductScreeningPressureDrop"+return_pressure_drop+"Result"]){
|
|
@@ -264,8 +292,14 @@ export async function getReport(payload, _test) {
|
|
|
264
292
|
//Supply Duct Pressure
|
|
265
293
|
if (test["ductScreeningPressureDrop"+supply_pressure])
|
|
266
294
|
form.getTextField('SupplyDuctPressure').setText(test["ductScreeningPressureDrop"+supply_pressure].toString() + ' inH2O');
|
|
295
|
+
else {
|
|
296
|
+
form.getTextField('SupplyDuctPressure').setText('--');
|
|
297
|
+
}
|
|
267
298
|
if (test["ductScreeningPressureDrop"+supply_pressure+'Target'])
|
|
268
299
|
form.getTextField('SupplyDuctPressureTarget').setText(test["ductScreeningPressureDrop"+supply_pressure+'Target'].toString());
|
|
300
|
+
else {
|
|
301
|
+
form.getTextField('SupplyDuctPressureTarget').setText('--');
|
|
302
|
+
}
|
|
269
303
|
//Add logic here for which image
|
|
270
304
|
meas = "";
|
|
271
305
|
if (test["ductScreeningPressureDrop"+supply_pressure+"Result"]){
|
|
@@ -278,34 +312,41 @@ export async function getReport(payload, _test) {
|
|
|
278
312
|
form.getButton('ImageSupplyDuctPressure'+meas).setImage(icon);
|
|
279
313
|
|
|
280
314
|
//Additional Supporting Data
|
|
315
|
+
let position = 1;
|
|
281
316
|
if (test.ductScreeningType){
|
|
282
|
-
let value = test.ductScreeningType === 1 ? 'Duct Analysis' : test.ductScreeningType === 2 ? 'Duct Analysis w/Fan Table' : 'Duct System Screening';
|
|
283
|
-
form.getTextField('
|
|
284
|
-
form.getTextField('
|
|
317
|
+
let value = test.ductScreeningType === 1 ? 'Duct System Analysis' : test.ductScreeningType === 2 ? 'Duct Analysis w/Fan Table' : 'Duct System Screening';
|
|
318
|
+
form.getTextField('AdditionalSupportingDataLabel'+position).setText(`Test Type:`);
|
|
319
|
+
form.getTextField('AdditionalSupportingDataValue'+position).setText(value);
|
|
320
|
+
position++;
|
|
285
321
|
}
|
|
286
322
|
//form.getButton('ImageAdditionalSupportingData1').setImage(icon);
|
|
287
323
|
if (test.ductScreeningSystemType){
|
|
288
|
-
form.getTextField('
|
|
289
|
-
form.getTextField('
|
|
324
|
+
form.getTextField('AdditionalSupportingDataLabel'+position).setText(`System Type:`);
|
|
325
|
+
form.getTextField('AdditionalSupportingDataValue'+position).setText(test.ductScreeningSystemType);
|
|
326
|
+
position++;
|
|
290
327
|
}
|
|
291
328
|
//form.getButton('ImageAdditionalSupportingData2').setImage(icon);
|
|
292
329
|
if (test.ductScreeningFilterLocation){
|
|
293
|
-
form.getTextField('
|
|
294
|
-
form.getTextField('
|
|
330
|
+
form.getTextField('AdditionalSupportingDataLabel'+position).setText(`Filter Location:`);
|
|
331
|
+
form.getTextField('AdditionalSupportingDataValue'+position).setText(test.ductScreeningFilterLocation);
|
|
332
|
+
position++;
|
|
295
333
|
}
|
|
296
334
|
//form.getButton('ImageAdditionalSupportingData3').setImage(icon);
|
|
297
335
|
if (test.tonnage_nominal){
|
|
298
|
-
form.getTextField('
|
|
299
|
-
form.getTextField('
|
|
336
|
+
form.getTextField('AdditionalSupportingDataLabel'+position).setText(`Nominal Tonnage:`);
|
|
337
|
+
form.getTextField('AdditionalSupportingDataValue'+position).setText(test.tonnage_nominal + ' tons');
|
|
338
|
+
position++;
|
|
300
339
|
}
|
|
301
340
|
//form.getButton('ImageAdditionalSupportingData4').setImage(icon);
|
|
302
341
|
if (test.ductScreeningType!==3&&test.airflow_rated){
|
|
303
|
-
form.getTextField('
|
|
304
|
-
form.getTextField('
|
|
342
|
+
form.getTextField('AdditionalSupportingDataLabel'+position).setText(`Airflow (Rated):`);
|
|
343
|
+
form.getTextField('AdditionalSupportingDataValue'+position).setText(test.airflow_rated + ' SCFM');
|
|
344
|
+
position++;
|
|
305
345
|
} else if (test.ductScreeningType!==3&&test.airflow_nominal&&test.tonnage_nominal){
|
|
306
346
|
let value = test.tonnage_nominal * test.airflow_nominal;
|
|
307
|
-
form.getTextField('
|
|
308
|
-
form.getTextField('
|
|
347
|
+
form.getTextField('AdditionalSupportingDataLabel'+position).setText(`Airflow (Nominal):`);
|
|
348
|
+
form.getTextField('AdditionalSupportingDataValue'+position).setText(value + ' SCFM');
|
|
349
|
+
position++;
|
|
309
350
|
}
|
|
310
351
|
//form.getButton('ImageAdditionalSupportingData5').setImage(icon);
|
|
311
352
|
form.getTextField('AdditionalSupportingDataLabel6').setText(``);
|
|
@@ -325,22 +366,22 @@ export async function getReport(payload, _test) {
|
|
|
325
366
|
|
|
326
367
|
let recommendations = '';
|
|
327
368
|
if (test.ductScreeningTESPResult!==0 && test.ductScreeningTESPResultText){
|
|
328
|
-
recommendations += (test.ductScreeningTESPResultText + '\n');
|
|
369
|
+
recommendations += ("• " + test.ductScreeningTESPResultText + '\n');
|
|
329
370
|
}
|
|
330
371
|
if (test.ductScreeningAirflowResult!==0 && test.ductScreeningAirflowResultText){
|
|
331
|
-
recommendations += (test.
|
|
372
|
+
recommendations += ("• " + test.ductScreeningAirflowResultText + '\n');
|
|
332
373
|
}
|
|
333
374
|
if (test.ductScreeningPressureDrop1Result!==0 && test.ductScreeningPressureDrop1ResultText){
|
|
334
|
-
recommendations += (test.ductScreeningPressureDrop1ResultText + '\n');
|
|
375
|
+
recommendations += ("• " + test.ductScreeningPressureDrop1ResultText + '\n');
|
|
335
376
|
}
|
|
336
377
|
if (test.ductScreeningPressureDrop2Result!==0 && test.ductScreeningPressureDrop2ResultText){
|
|
337
|
-
recommendations += (test.ductScreeningPressureDrop2ResultText + '\n');
|
|
378
|
+
recommendations += ("• " + test.ductScreeningPressureDrop2ResultText + '\n');
|
|
338
379
|
}
|
|
339
380
|
if (test.ductScreeningPressureDrop3Result!==0 && test.ductScreeningPressureDrop3ResultText){
|
|
340
|
-
recommendations += (test.ductScreeningPressureDrop3ResultText + '\n');
|
|
381
|
+
recommendations += ("• " + test.ductScreeningPressureDrop3ResultText + '\n');
|
|
341
382
|
}
|
|
342
383
|
if (test.ductScreeningPressureDrop4Result!==0 && test.ductScreeningPressureDrop4ResultText){
|
|
343
|
-
recommendations += (test.ductScreeningPressureDrop4ResultText + '\n');
|
|
384
|
+
recommendations += ("• " + test.ductScreeningPressureDrop4ResultText + '\n');
|
|
344
385
|
}
|
|
345
386
|
if (!recommendations) {
|
|
346
387
|
recommendations = 'No recommendations. System passed all diagnostics!';
|
|
@@ -352,8 +393,13 @@ export async function getReport(payload, _test) {
|
|
|
352
393
|
else form.getTextField('FanAirflowPassFail').setText('N/A');
|
|
353
394
|
if (test.ductScreeningTESPResult||test.ductScreeningTESPResult===0)
|
|
354
395
|
form.getTextField('StaticPressurePassFail').setText(getPassFailText(test.ductScreeningTESPResult));
|
|
396
|
+
else
|
|
397
|
+
form.getTextField('StaticPressurePassFail').setText('--');
|
|
355
398
|
if (test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']||test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']===0)
|
|
356
399
|
form.getTextField('AirFilterPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']));
|
|
400
|
+
else {
|
|
401
|
+
form.getTextField('AirFilterPassFail').setText('--');
|
|
402
|
+
}
|
|
357
403
|
if (test.ductScreeningTestPoint3||test.ductScreeningTestPoint3===0){
|
|
358
404
|
if (test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']||test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']===0)
|
|
359
405
|
form.getTextField('CoilPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']));
|
|
@@ -362,8 +408,12 @@ export async function getReport(payload, _test) {
|
|
|
362
408
|
}
|
|
363
409
|
if (test['ductScreeningPressureDrop'+supply_pressure+'Result']||test['ductScreeningPressureDrop'+supply_pressure+'Result']===0)
|
|
364
410
|
form.getTextField('SupplyDuctPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+supply_pressure+'Result']));
|
|
411
|
+
else
|
|
412
|
+
form.getTextField('SupplyDuctPassFail').setText('--');
|
|
365
413
|
if (test['ductScreeningPressureDrop'+return_pressure_drop+'Result']||test['ductScreeningPressureDrop'+return_pressure_drop+'Result']===0)
|
|
366
414
|
form.getTextField('ReturnDuctPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+return_pressure_drop+'Result']));
|
|
415
|
+
else
|
|
416
|
+
form.getTextField('ReturnDuctPassFail').setText('--');
|
|
367
417
|
if (test.ductScreeningResult){
|
|
368
418
|
if (test.ductScreeningResult === 'PASS'){
|
|
369
419
|
form.getTextField('TestResultBreakdownPage').setText('PASS');
|