@measurequick/measurequick-report-generator 1.5.102 → 1.5.104
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
|
@@ -1,117 +1,661 @@
|
|
|
1
|
-
import { PDFDocument } from
|
|
2
|
-
import * as base64 from
|
|
3
|
-
import * as pdf from
|
|
4
|
-
import * as util from
|
|
1
|
+
import { PDFDocument } from "pdf-lib";
|
|
2
|
+
import * as base64 from "../base-64/icons.js";
|
|
3
|
+
import * as pdf from "../base-64/nci-report-contractor.js";
|
|
4
|
+
import * as util from "../util.js";
|
|
5
5
|
|
|
6
6
|
export async function getReport(payload, _test) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// fetch resources
|
|
14
|
-
const iconRangeGreenBytes = util._base64ToArrayBuffer(base64.iconRangeGreen);
|
|
15
|
-
const iconRangeRedBytes = util._base64ToArrayBuffer(base64.iconRangeRed);
|
|
16
|
-
const iconFlagBlackBytes = util._base64ToArrayBuffer(base64.iconFlagBlack);
|
|
17
|
-
const iconFlagGreenBytes = util._base64ToArrayBuffer(base64.iconFlagGreen);
|
|
18
|
-
const iconFlagRedBytes = util._base64ToArrayBuffer(base64.iconFlagRed);
|
|
19
|
-
const iconFlagYellowBytes = util._base64ToArrayBuffer(base64.iconFlagYellow);
|
|
20
|
-
const iconStabilityBytes = util._base64ToArrayBuffer(base64.iconStability);
|
|
21
|
-
const iconThumbprintGreenBytes = util._base64ToArrayBuffer(base64.iconThumbprintGreen);
|
|
22
|
-
const iconThumbprintRedBytes = util._base64ToArrayBuffer(base64.iconThumbprintRed);
|
|
23
|
-
const mqLogoBytes = util._base64ToArrayBuffer(base64.mqLogo);
|
|
24
|
-
const gauge100Bytes = util._base64ToArrayBuffer(base64.gauge100);
|
|
25
|
-
const gauge90Bytes = util._base64ToArrayBuffer(base64.gauge90);
|
|
26
|
-
const gauge80Bytes = util._base64ToArrayBuffer(base64.gauge80);
|
|
27
|
-
const gauge70Bytes = util._base64ToArrayBuffer(base64.gauge70);
|
|
28
|
-
const gauge60Bytes = util._base64ToArrayBuffer(base64.gauge60);
|
|
29
|
-
const gauge50Bytes = util._base64ToArrayBuffer(base64.gauge50);
|
|
30
|
-
const gauge40Bytes = util._base64ToArrayBuffer(base64.gauge40);
|
|
31
|
-
const gauge30Bytes = util._base64ToArrayBuffer(base64.gauge30);
|
|
32
|
-
const gauge20Bytes = util._base64ToArrayBuffer(base64.gauge20);
|
|
33
|
-
const gauge10Bytes = util._base64ToArrayBuffer(base64.gauge10);
|
|
34
|
-
|
|
35
|
-
// load resources
|
|
36
|
-
const iconRangeGreen = await pdfDoc.embedPng(iconRangeGreenBytes);
|
|
37
|
-
const iconRangeRed = await pdfDoc.embedPng(iconRangeRedBytes);
|
|
38
|
-
const iconFlagBlack = await pdfDoc.embedPng(iconFlagBlackBytes);
|
|
39
|
-
const iconFlagGreen = await pdfDoc.embedPng(iconFlagGreenBytes);
|
|
40
|
-
const iconFlagRed = await pdfDoc.embedPng(iconFlagRedBytes);
|
|
41
|
-
const iconFlagYellow = await pdfDoc.embedPng(iconFlagYellowBytes);
|
|
42
|
-
const iconStability = await pdfDoc.embedPng(iconStabilityBytes);
|
|
43
|
-
const iconThumbprintGreen = await pdfDoc.embedPng(iconThumbprintGreenBytes);
|
|
44
|
-
const iconThumbprintRed = await pdfDoc.embedPng(iconThumbprintRedBytes);
|
|
45
|
-
const mqLogo = await pdfDoc.embedPng(mqLogoBytes);
|
|
46
|
-
const gauge100 = await pdfDoc.embedPng(gauge100Bytes);
|
|
47
|
-
const gauge90 = await pdfDoc.embedPng(gauge90Bytes);
|
|
48
|
-
const gauge80 = await pdfDoc.embedPng(gauge80Bytes);
|
|
49
|
-
const gauge70 = await pdfDoc.embedPng(gauge70Bytes);
|
|
50
|
-
const gauge60 = await pdfDoc.embedPng(gauge60Bytes);
|
|
51
|
-
const gauge50 = await pdfDoc.embedPng(gauge50Bytes);
|
|
52
|
-
const gauge40 = await pdfDoc.embedPng(gauge40Bytes);
|
|
53
|
-
const gauge30 = await pdfDoc.embedPng(gauge30Bytes);
|
|
54
|
-
const gauge20 = await pdfDoc.embedPng(gauge20Bytes);
|
|
55
|
-
const gauge10 = await pdfDoc.embedPng(gauge10Bytes);
|
|
7
|
+
try {
|
|
8
|
+
// fetch and load form
|
|
9
|
+
const formPdfBytes = util._base64ToArrayBuffer(pdf.base64);
|
|
10
|
+
const pdfDoc = await PDFDocument.load(formPdfBytes);
|
|
11
|
+
var errors = [];
|
|
56
12
|
|
|
57
|
-
|
|
13
|
+
// fetch resources
|
|
14
|
+
const iconRangeGreenBytes = util._base64ToArrayBuffer(
|
|
15
|
+
base64.iconRangeGreen
|
|
16
|
+
);
|
|
17
|
+
const iconRangeRedBytes = util._base64ToArrayBuffer(base64.iconRangeRed);
|
|
18
|
+
const iconFlagBlackBytes = util._base64ToArrayBuffer(base64.iconFlagBlack);
|
|
19
|
+
const iconFlagGreenBytes = util._base64ToArrayBuffer(base64.iconFlagGreen);
|
|
20
|
+
const iconFlagRedBytes = util._base64ToArrayBuffer(base64.iconFlagRed);
|
|
21
|
+
const iconFlagYellowBytes = util._base64ToArrayBuffer(
|
|
22
|
+
base64.iconFlagYellow
|
|
23
|
+
);
|
|
24
|
+
const iconStabilityBytes = util._base64ToArrayBuffer(base64.iconStability);
|
|
25
|
+
const iconThumbprintGreenBytes = util._base64ToArrayBuffer(
|
|
26
|
+
base64.iconThumbprintGreen
|
|
27
|
+
);
|
|
28
|
+
const iconThumbprintRedBytes = util._base64ToArrayBuffer(
|
|
29
|
+
base64.iconThumbprintRed
|
|
30
|
+
);
|
|
31
|
+
const mqLogoBytes = util._base64ToArrayBuffer(base64.mqLogo);
|
|
32
|
+
const gauge100Bytes = util._base64ToArrayBuffer(base64.gauge100);
|
|
33
|
+
const gauge90Bytes = util._base64ToArrayBuffer(base64.gauge90);
|
|
34
|
+
const gauge80Bytes = util._base64ToArrayBuffer(base64.gauge80);
|
|
35
|
+
const gauge70Bytes = util._base64ToArrayBuffer(base64.gauge70);
|
|
36
|
+
const gauge60Bytes = util._base64ToArrayBuffer(base64.gauge60);
|
|
37
|
+
const gauge50Bytes = util._base64ToArrayBuffer(base64.gauge50);
|
|
38
|
+
const gauge40Bytes = util._base64ToArrayBuffer(base64.gauge40);
|
|
39
|
+
const gauge30Bytes = util._base64ToArrayBuffer(base64.gauge30);
|
|
40
|
+
const gauge20Bytes = util._base64ToArrayBuffer(base64.gauge20);
|
|
41
|
+
const gauge10Bytes = util._base64ToArrayBuffer(base64.gauge10);
|
|
42
|
+
|
|
43
|
+
// load resources
|
|
44
|
+
const iconRangeGreen = await pdfDoc.embedPng(iconRangeGreenBytes);
|
|
45
|
+
const iconRangeRed = await pdfDoc.embedPng(iconRangeRedBytes);
|
|
46
|
+
const iconFlagBlack = await pdfDoc.embedPng(iconFlagBlackBytes);
|
|
47
|
+
const iconFlagGreen = await pdfDoc.embedPng(iconFlagGreenBytes);
|
|
48
|
+
const iconFlagRed = await pdfDoc.embedPng(iconFlagRedBytes);
|
|
49
|
+
const iconFlagYellow = await pdfDoc.embedPng(iconFlagYellowBytes);
|
|
50
|
+
const iconStability = await pdfDoc.embedPng(iconStabilityBytes);
|
|
51
|
+
const iconThumbprintGreen = await pdfDoc.embedPng(iconThumbprintGreenBytes);
|
|
52
|
+
const iconThumbprintRed = await pdfDoc.embedPng(iconThumbprintRedBytes);
|
|
53
|
+
const mqLogo = await pdfDoc.embedPng(mqLogoBytes);
|
|
54
|
+
const gauge100 = await pdfDoc.embedPng(gauge100Bytes);
|
|
55
|
+
const gauge90 = await pdfDoc.embedPng(gauge90Bytes);
|
|
56
|
+
const gauge80 = await pdfDoc.embedPng(gauge80Bytes);
|
|
57
|
+
const gauge70 = await pdfDoc.embedPng(gauge70Bytes);
|
|
58
|
+
const gauge60 = await pdfDoc.embedPng(gauge60Bytes);
|
|
59
|
+
const gauge50 = await pdfDoc.embedPng(gauge50Bytes);
|
|
60
|
+
const gauge40 = await pdfDoc.embedPng(gauge40Bytes);
|
|
61
|
+
const gauge30 = await pdfDoc.embedPng(gauge30Bytes);
|
|
62
|
+
const gauge20 = await pdfDoc.embedPng(gauge20Bytes);
|
|
63
|
+
const gauge10 = await pdfDoc.embedPng(gauge10Bytes);
|
|
64
|
+
|
|
65
|
+
const form = pdfDoc.getForm();
|
|
66
|
+
let textFields = getTextFields(payload);
|
|
67
|
+
|
|
68
|
+
//PAGE 1
|
|
69
|
+
//Header
|
|
70
|
+
let isCooling = true;
|
|
71
|
+
if (isCooling)
|
|
72
|
+
form.getTextField("Title").setText("Cooling System Verify Test");
|
|
73
|
+
else form.getTextField("Title").setText("Heating System Verify Test");
|
|
74
|
+
|
|
75
|
+
//Customer
|
|
76
|
+
let customerParts = [];
|
|
77
|
+
|
|
78
|
+
if (textFields.cName) customerParts.push(textFields.cName);
|
|
79
|
+
if (textFields.address) customerParts.push(textFields.address);
|
|
80
|
+
if (textFields.address2) customerParts.push(textFields.address2);
|
|
81
|
+
|
|
82
|
+
let cityLine = "";
|
|
83
|
+
if (textFields.city) cityLine += textFields.city;
|
|
84
|
+
if (textFields.state)
|
|
85
|
+
cityLine += `${textFields.city ? ", " : ""}${textFields.state}`;
|
|
86
|
+
if (textFields.zip)
|
|
87
|
+
cityLine += `${textFields.state ? " " : ""}${textFields.zip}`;
|
|
88
|
+
if (cityLine) customerParts.push(cityLine);
|
|
89
|
+
|
|
90
|
+
let customer =
|
|
91
|
+
customerParts.length > 0
|
|
92
|
+
? customerParts.join("\n")
|
|
93
|
+
: "Customer data not entered";
|
|
94
|
+
form.getTextField("Customer").setText(customer);
|
|
95
|
+
|
|
96
|
+
//Location
|
|
97
|
+
//Location information
|
|
98
|
+
let location = "";
|
|
99
|
+
if (payload && payload.site && payload.site.site_name)
|
|
100
|
+
location += payload.site.site_name;
|
|
101
|
+
form.getTextField("Location").setText(location);
|
|
102
|
+
|
|
103
|
+
//Testing Organization
|
|
104
|
+
let contractor = "";
|
|
105
|
+
if (payload && payload.meta && payload.meta.company_name)
|
|
106
|
+
contractor += payload.meta.company_name;
|
|
107
|
+
//TODO: get company address and phone number
|
|
108
|
+
form.getTextField("TestingOrganization").setText(contractor);
|
|
109
|
+
|
|
110
|
+
//Test Information & Conditions
|
|
111
|
+
let technicianParts = [];
|
|
112
|
+
if (payload && payload.meta && payload.meta.technician_name)
|
|
113
|
+
technicianParts.push(payload.meta.technician_name);
|
|
114
|
+
if (payload && payload.meta && payload.meta.date_of_service)
|
|
115
|
+
technicianParts.push("Date of Service: " + payload.meta.date_of_service);
|
|
116
|
+
if (payload && payload.meta && payload.meta.time_of_service)
|
|
117
|
+
technicianParts.push("Time of Service: " + payload.meta.time_of_service);
|
|
118
|
+
if (technicianParts.length > 0) technicianParts.push(" ");
|
|
119
|
+
if (
|
|
120
|
+
payload &&
|
|
121
|
+
payload.project &&
|
|
122
|
+
payload.project.tests &&
|
|
123
|
+
payload.project.tests[payload.project.tests.length - 1] &&
|
|
124
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo &&
|
|
125
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo
|
|
126
|
+
.weather &&
|
|
127
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo.weather
|
|
128
|
+
.currently &&
|
|
129
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo.weather
|
|
130
|
+
.currently.temperature
|
|
131
|
+
) {
|
|
132
|
+
technicianParts.push(
|
|
133
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo.weather
|
|
134
|
+
.currently.temperature + " degF"
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
if (
|
|
138
|
+
payload &&
|
|
139
|
+
payload.project &&
|
|
140
|
+
payload.project.tests &&
|
|
141
|
+
payload.project.tests[payload.project.tests.length - 1] &&
|
|
142
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo &&
|
|
143
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo.data &&
|
|
144
|
+
(payload.project.tests[payload.project.tests.length - 1].testInfo.data
|
|
145
|
+
.elevation ||
|
|
146
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo.data
|
|
147
|
+
.elevation)
|
|
148
|
+
) {
|
|
149
|
+
technicianParts.push(
|
|
150
|
+
payload.project.tests[payload.project.tests.length - 1].testInfo.data
|
|
151
|
+
.elevation + " ft"
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
let technician =
|
|
156
|
+
technicianParts.length > 0
|
|
157
|
+
? technicianParts.join("\n")
|
|
158
|
+
: "Technician data not entered";
|
|
159
|
+
form.getTextField("TestInformationConditions").setText(technician);
|
|
160
|
+
|
|
161
|
+
//System Information
|
|
162
|
+
let equipment = "";
|
|
163
|
+
if (payload && payload.equipment && payload.equipment.name)
|
|
164
|
+
equipment += payload.equipment.name;
|
|
165
|
+
if (!equipment) equipment = "Not entered";
|
|
166
|
+
|
|
167
|
+
let equipment_type = "";
|
|
168
|
+
if (
|
|
169
|
+
payload &&
|
|
170
|
+
payload.equipment &&
|
|
171
|
+
payload.equipment.tonnage_nominal &&
|
|
172
|
+
payload.equipment.system_type
|
|
173
|
+
)
|
|
174
|
+
equipment_type +=
|
|
175
|
+
payload.equipment.tonnage_nominal +
|
|
176
|
+
" Ton " +
|
|
177
|
+
payload.equipment.system_type;
|
|
178
|
+
if (!equipment_type) equipment_type = "Not entered";
|
|
179
|
+
form.getTextField("SystemType").setText(equipment_type);
|
|
180
|
+
|
|
181
|
+
let area = "";
|
|
182
|
+
if (payload && payload.equipment && payload.equipment.area_served)
|
|
183
|
+
area += payload.equipment.area_served + " sq ft";
|
|
184
|
+
if (!area) area = "Not entered";
|
|
185
|
+
form.getTextField("AreaServed").setText(area);
|
|
186
|
+
|
|
187
|
+
//Gas Furnace info
|
|
188
|
+
if (
|
|
189
|
+
payload.equipment &&
|
|
190
|
+
payload.equipment.heat_type &&
|
|
191
|
+
payload.equipment.heat_type !== "Heat Pump" &&
|
|
192
|
+
payload.equipment.heat_type !== "None"
|
|
193
|
+
) {
|
|
194
|
+
let afue = "N/A";
|
|
195
|
+
if (payload.equipment.heat_type.includes("90")) afue = "90+";
|
|
196
|
+
else if (payload.equipment.heat_type.includes("80")) afue = "80+";
|
|
197
|
+
else if (payload.equipment.heat_type.includes("70")) afue = "70+";
|
|
198
|
+
form.getTextField("AFUERating").setText(afue);
|
|
199
|
+
form
|
|
200
|
+
.getTextField("FuelType")
|
|
201
|
+
.setText(
|
|
202
|
+
payload.equipment.fuel_type ? payload.equipment.fuel_type : "N/A"
|
|
203
|
+
);
|
|
204
|
+
form
|
|
205
|
+
.getTextField("FurnaceType")
|
|
206
|
+
.setText(
|
|
207
|
+
payload.equipment.heat_type ? payload.equipment.heat_type : "N/A"
|
|
208
|
+
);
|
|
209
|
+
form
|
|
210
|
+
.getTextField("FurnaceManufacturer")
|
|
211
|
+
.setText(
|
|
212
|
+
payload.equipment.ahu_make ? payload.equipment.ahu_make : "N/A"
|
|
213
|
+
);
|
|
214
|
+
form
|
|
215
|
+
.getTextField("FurnaceModel")
|
|
216
|
+
.setText(
|
|
217
|
+
payload.equipment.ahu_model ? payload.equipment.ahu_model : "N/A"
|
|
218
|
+
);
|
|
219
|
+
form
|
|
220
|
+
.getTextField("RatedBTUInput")
|
|
221
|
+
.setText(
|
|
222
|
+
payload.equipment.gas_input_rated
|
|
223
|
+
? payload.equipment.gas_input_rated
|
|
224
|
+
: "N/A"
|
|
225
|
+
);
|
|
226
|
+
form
|
|
227
|
+
.getTextField("RatedBTUOutput")
|
|
228
|
+
.setText(
|
|
229
|
+
payload.equipment.gas_output_rated
|
|
230
|
+
? payload.equipment.gas_output_rated
|
|
231
|
+
: "N/A"
|
|
232
|
+
);
|
|
233
|
+
form
|
|
234
|
+
.getTextField("FurnaceSerial")
|
|
235
|
+
.setText(
|
|
236
|
+
payload.equipment.ahu_serial ? payload.equipment.ahu_serial : "N/A"
|
|
237
|
+
);
|
|
238
|
+
form
|
|
239
|
+
.getTextField("FurnaceYear")
|
|
240
|
+
.setText(
|
|
241
|
+
payload.equipment.year_installed_ahu_furnace
|
|
242
|
+
? payload.equipment.year_installed_ahu_furnace
|
|
243
|
+
: "N/A"
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
let duct_test =
|
|
248
|
+
payload && payload.project && payload.project.duct_screening
|
|
249
|
+
? payload.project.duct_screening
|
|
250
|
+
: {};
|
|
251
|
+
|
|
252
|
+
//Air Filter
|
|
253
|
+
form
|
|
254
|
+
.getTextField("AirFilterLocation")
|
|
255
|
+
.setText(
|
|
256
|
+
duct_test.ductScreeningFilterLocation
|
|
257
|
+
? duct_test.ductScreeningFilterLocation
|
|
258
|
+
: "N/A"
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
//Cooling Condenser
|
|
262
|
+
form
|
|
263
|
+
.getTextField("NominalCapacity")
|
|
264
|
+
.setText(
|
|
265
|
+
payload.equipment.tonnage_nominal
|
|
266
|
+
? (+payload.equipment.tonnage_nominal * 12000).toFixed(0)
|
|
267
|
+
: "N/A"
|
|
268
|
+
);
|
|
269
|
+
form
|
|
270
|
+
.getTextField("EER")
|
|
271
|
+
.setText(
|
|
272
|
+
payload.equipment.rated_eer ? payload.equipment.rated_eer : "N/A"
|
|
273
|
+
);
|
|
274
|
+
form
|
|
275
|
+
.getTextField("CondenserManufacturer")
|
|
276
|
+
.setText(
|
|
277
|
+
payload.equipment.condenser_make
|
|
278
|
+
? payload.equipment.condenser_make
|
|
279
|
+
: "N/A"
|
|
280
|
+
);
|
|
281
|
+
form
|
|
282
|
+
.getTextField("CondenserModel")
|
|
283
|
+
.setText(
|
|
284
|
+
payload.equipment.condenser_model
|
|
285
|
+
? payload.equipment.condenser_model
|
|
286
|
+
: "N/A"
|
|
287
|
+
);
|
|
288
|
+
form
|
|
289
|
+
.getTextField("SEER")
|
|
290
|
+
.setText(
|
|
291
|
+
payload.equipment.efficiency_seasonal
|
|
292
|
+
? payload.equipment.efficiency_seasonal
|
|
293
|
+
: "N/A"
|
|
294
|
+
);
|
|
295
|
+
form
|
|
296
|
+
.getTextField("CondenserSerial")
|
|
297
|
+
.setText(
|
|
298
|
+
payload.equipment.condenser_serial
|
|
299
|
+
? payload.equipment.condenser_serial
|
|
300
|
+
: "N/A"
|
|
301
|
+
);
|
|
302
|
+
form
|
|
303
|
+
.getTextField("CondenserYear")
|
|
304
|
+
.setText(
|
|
305
|
+
payload.equipment.year_installed
|
|
306
|
+
? payload.equipment.year_installed
|
|
307
|
+
: "N/A"
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
//Fan
|
|
311
|
+
form
|
|
312
|
+
.getTextField("FanCondition")
|
|
313
|
+
.setText(
|
|
314
|
+
payload.project.fanCondition ? payload.project.fanCondition : "N/A"
|
|
315
|
+
);
|
|
316
|
+
form
|
|
317
|
+
.getTextField("FanRatedStaticPressure")
|
|
318
|
+
.setText(
|
|
319
|
+
payload.equipment.pressure_static_total_external_rated
|
|
320
|
+
? payload.equipment.pressure_static_total_external_rated
|
|
321
|
+
: "N/A"
|
|
322
|
+
);
|
|
323
|
+
form
|
|
324
|
+
.getTextField("FanCapacity")
|
|
325
|
+
.setText(
|
|
326
|
+
payload.equipment.tonnage_nominal
|
|
327
|
+
? (+payload.equipment.tonnage_nominal * 12000).toFixed(0)
|
|
328
|
+
: "N/A"
|
|
329
|
+
);
|
|
330
|
+
form
|
|
331
|
+
.getTextField("FanSpeedSetting")
|
|
332
|
+
.setText(
|
|
333
|
+
payload.project.endFanSpeed
|
|
334
|
+
? capitalizeFirstLetter(payload.project.endFanSpeed)
|
|
335
|
+
: "N/A"
|
|
336
|
+
);
|
|
337
|
+
form
|
|
338
|
+
.getTextField("FanType")
|
|
339
|
+
.setText(
|
|
340
|
+
payload.equipment.blower_motor_type
|
|
341
|
+
? getFanType(payload.equipment.blower_motor_type)
|
|
342
|
+
: "N/A"
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
//Coil
|
|
346
|
+
form
|
|
347
|
+
.getTextField("CoilManufacturer")
|
|
348
|
+
.setText(
|
|
349
|
+
payload.equipment.evaporator_make
|
|
350
|
+
? payload.equipment.evaporator_make
|
|
351
|
+
: "N/A"
|
|
352
|
+
);
|
|
353
|
+
form
|
|
354
|
+
.getTextField("CoilModel")
|
|
355
|
+
.setText(
|
|
356
|
+
payload.equipment.evaporator_model
|
|
357
|
+
? payload.equipment.evaporator_model
|
|
358
|
+
: "N/A"
|
|
359
|
+
);
|
|
360
|
+
form
|
|
361
|
+
.getTextField("CoilSerial")
|
|
362
|
+
.setText(
|
|
363
|
+
payload.equipment.evaporator_serial
|
|
364
|
+
? payload.equipment.evaporator_serial
|
|
365
|
+
: "N/A"
|
|
366
|
+
);
|
|
367
|
+
form
|
|
368
|
+
.getTextField("CoilYear")
|
|
369
|
+
.setText(
|
|
370
|
+
payload.equipment.year_installed_evap
|
|
371
|
+
? payload.equipment.year_installed_evap
|
|
372
|
+
: "N/A"
|
|
373
|
+
);
|
|
374
|
+
|
|
375
|
+
//PAGE 2
|
|
376
|
+
//Temperatures
|
|
377
|
+
//Equipment
|
|
378
|
+
form.getTextField("EquipmentEnteringDB").setText("EquipmentEnteringDB");
|
|
379
|
+
form.getTextField("EquipmentExitingDB").setText("EquipmentExitingDB");
|
|
380
|
+
form
|
|
381
|
+
.getTextField("EquipmentTemperatureChange")
|
|
382
|
+
.setText("EquipmentTemperatureChange");
|
|
383
|
+
|
|
384
|
+
//Return Duct System
|
|
385
|
+
form.getTextField("AverageReturnGrilleDB").setText("AverageReturnGrilleDB");
|
|
386
|
+
form
|
|
387
|
+
.getTextField("ReturnTemperatureChange")
|
|
388
|
+
.setText("ReturnTemperatureChange");
|
|
389
|
+
|
|
390
|
+
//Supply Duct System
|
|
391
|
+
form
|
|
392
|
+
.getTextField("AverageSupplyRegisterDB")
|
|
393
|
+
.setText("AverageSupplyRegisterDB");
|
|
394
|
+
form
|
|
395
|
+
.getTextField("SupplyTemperatureChange")
|
|
396
|
+
.setText("SupplyTemperatureChange");
|
|
397
|
+
|
|
398
|
+
//Static Pressures
|
|
399
|
+
//TESP
|
|
400
|
+
form.getTextField("TESPEntering").setText("TESPEntering");
|
|
401
|
+
form.getTextField("TESPExiting").setText("TESPExiting");
|
|
402
|
+
form.getTextField("TESPValue").setText("TESPValue");
|
|
403
|
+
form.getTextField("TESPRated").setText("TESPRated");
|
|
404
|
+
form.getTextField("TESPPercentRated").setText("TESPPercentRated");
|
|
405
|
+
|
|
406
|
+
//Air Filter
|
|
407
|
+
form.getTextField("AirFilterEntering").setText("AirFilterEntering");
|
|
408
|
+
form.getTextField("AirFilterExiting").setText("AirFilterExiting");
|
|
409
|
+
form.getTextField("AirFilterDrop").setText("AirFilterDrop");
|
|
410
|
+
form.getTextField("AirFilterBudget").setText("AirFilterBudget");
|
|
411
|
+
form
|
|
412
|
+
.getTextField("AirFilterPercentBudget")
|
|
413
|
+
.setText("AirFilterPercentBudget");
|
|
414
|
+
|
|
415
|
+
//Coil
|
|
416
|
+
form.getTextField("CoilExiting").setText("CoilExiting");
|
|
417
|
+
form.getTextField("CoilDrop").setText("CoilDrop");
|
|
418
|
+
form.getTextField("CoilBudget").setText("CoilBudget");
|
|
419
|
+
form.getTextField("CoilPercentBudget").setText("CoilPercentBudget");
|
|
420
|
+
form.getTextField("CoilEntering").setText("CoilEntering");
|
|
58
421
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
422
|
+
//Return Duct System
|
|
423
|
+
form.getTextField("ReturnBudget").setText("ReturnBudget");
|
|
424
|
+
form.getTextField("ReturnPercentBudget").setText("ReturnPercentBudget");
|
|
425
|
+
form.getTextField("ReturnPressure").setText("ReturnPressure");
|
|
426
|
+
|
|
427
|
+
//Supply Duct System
|
|
428
|
+
form.getTextField("SupplyBudget").setText("SupplyBudget");
|
|
429
|
+
form.getTextField("SupplyPercentBudget").setText("SupplyPercentBudget");
|
|
430
|
+
form.getTextField("SupplyPressure").setText("SupplyPressure");
|
|
431
|
+
|
|
432
|
+
//PAGE 3
|
|
433
|
+
//Airflow
|
|
434
|
+
//Fan Airflow
|
|
435
|
+
form.getTextField("FanAirflowRequired").setText("FanAirflowRequired");
|
|
436
|
+
form.getTextField("FanAirflowMeasured").setText("FanAirflowMeasured");
|
|
437
|
+
form
|
|
438
|
+
.getTextField("FanAirflowPercentRequired")
|
|
439
|
+
.setText("FanAirflowPercentRequired");
|
|
440
|
+
|
|
441
|
+
//Return Duct Airflow
|
|
442
|
+
form.getTextField("ReturnAirflowTotal").setText("ReturnAirflowTotal");
|
|
443
|
+
form.getTextField("ReturnAirflowMeasured").setText("ReturnAirflowMeasured");
|
|
444
|
+
form.getTextField("ReturnDuctLeakage").setText("ReturnDuctLeakage");
|
|
445
|
+
form.getTextField("ReturnPercentLeakage").setText("ReturnPercentLeakage");
|
|
446
|
+
|
|
447
|
+
//Supply Duct Airflow
|
|
448
|
+
form.getTextField("SupplyAirflowMeasured").setText("SupplyAirflowMeasured");
|
|
449
|
+
form.getTextField("SupplyDuctLeakage").setText("SupplyDuctLeakage");
|
|
450
|
+
form.getTextField("SupplyPercentLeakage").setText("SupplyPercentLeakage");
|
|
451
|
+
|
|
452
|
+
//Equipment Performance
|
|
453
|
+
form.getTextField("EquipmentRatedBTU").setText("EquipmentRatedBTU");
|
|
454
|
+
form.getTextField("EquipmentDeliveredBTU").setText("EquipmentDeliveredBTU");
|
|
455
|
+
form
|
|
456
|
+
.getTextField("EquipmentMeasuredEfficiency")
|
|
457
|
+
.setText("EquipmentMeasuredEfficiency");
|
|
458
|
+
|
|
459
|
+
//Return Duct System Performance
|
|
460
|
+
form.getTextField("ReturnDuctLoss").setText("ReturnDuctLoss");
|
|
461
|
+
form.getTextField("ReturnPercentBTULoss").setText("ReturnPercentBTULoss");
|
|
462
|
+
|
|
463
|
+
//Supply Duct System Performance
|
|
464
|
+
form.getTextField("SupplyDuctLoss").setText("SupplyDuctLoss");
|
|
465
|
+
form.getTextField("SupplyPercentBTULoss").setText("SupplyPercentBTULoss");
|
|
466
|
+
|
|
467
|
+
//System Performance
|
|
468
|
+
form.getTextField("SystemDeliveredBTU").setText("SystemDeliveredBTU");
|
|
469
|
+
form
|
|
470
|
+
.getTextField("SystemMeasuredEfficiency")
|
|
471
|
+
.setText("SystemMeasuredEfficiency");
|
|
472
|
+
|
|
473
|
+
//PAGE 4
|
|
474
|
+
//Registers and Grilles
|
|
475
|
+
//Supply Registers
|
|
476
|
+
form
|
|
477
|
+
.getTextField("SupplyAirflow1Location")
|
|
478
|
+
.setText("SupplyAirflow1Location");
|
|
479
|
+
form
|
|
480
|
+
.getTextField("SupplyAirflow2Location")
|
|
481
|
+
.setText("SupplyAirflow2Location");
|
|
482
|
+
form
|
|
483
|
+
.getTextField("SupplyAirflow3Location")
|
|
484
|
+
.setText("SupplyAirflow3Location");
|
|
485
|
+
form
|
|
486
|
+
.getTextField("SupplyAirflow4Location")
|
|
487
|
+
.setText("SupplyAirflow4Location");
|
|
488
|
+
form
|
|
489
|
+
.getTextField("SupplyAirflow5Location")
|
|
490
|
+
.setText("SupplyAirflow5Location");
|
|
491
|
+
form
|
|
492
|
+
.getTextField("SupplyAirflow6Location")
|
|
493
|
+
.setText("SupplyAirflow6Location");
|
|
494
|
+
form
|
|
495
|
+
.getTextField("SupplyAirflow7Location")
|
|
496
|
+
.setText("SupplyAirflow7Location");
|
|
497
|
+
form
|
|
498
|
+
.getTextField("SupplyAirflow8Location")
|
|
499
|
+
.setText("SupplyAirflow8Location");
|
|
500
|
+
form
|
|
501
|
+
.getTextField("SupplyAirflow9Location")
|
|
502
|
+
.setText("SupplyAirflow9Location");
|
|
503
|
+
form
|
|
504
|
+
.getTextField("SupplyAirflow10Location")
|
|
505
|
+
.setText("SupplyAirflow10Location");
|
|
506
|
+
form
|
|
507
|
+
.getTextField("SupplyAirflow11Location")
|
|
508
|
+
.setText("SupplyAirflow11Location");
|
|
509
|
+
form
|
|
510
|
+
.getTextField("SupplyAirflow12Location")
|
|
511
|
+
.setText("SupplyAirflow12Location");
|
|
512
|
+
form
|
|
513
|
+
.getTextField("SupplyAirflow13Location")
|
|
514
|
+
.setText("SupplyAirflow13Location");
|
|
515
|
+
form
|
|
516
|
+
.getTextField("SupplyAirflow14Location")
|
|
517
|
+
.setText("SupplyAirflow14Location");
|
|
518
|
+
form
|
|
519
|
+
.getTextField("SupplyAirflow15Location")
|
|
520
|
+
.setText("SupplyAirflow15Location");
|
|
521
|
+
form
|
|
522
|
+
.getTextField("SupplyAirflow16Location")
|
|
523
|
+
.setText("SupplyAirflow16Location");
|
|
524
|
+
form
|
|
525
|
+
.getTextField("SupplyAirflow17Location")
|
|
526
|
+
.setText("SupplyAirflow17Location");
|
|
527
|
+
form
|
|
528
|
+
.getTextField("SupplyAirflow18Location")
|
|
529
|
+
.setText("SupplyAirflow18Location");
|
|
530
|
+
form
|
|
531
|
+
.getTextField("SupplyAirflow19Location")
|
|
532
|
+
.setText("SupplyAirflow19Location");
|
|
533
|
+
form
|
|
534
|
+
.getTextField("SupplyAirflow20Location")
|
|
535
|
+
.setText("SupplyAirflow20Location");
|
|
536
|
+
form
|
|
537
|
+
.getTextField("SupplyAirflow21Location")
|
|
538
|
+
.setText("SupplyAirflow21Location");
|
|
539
|
+
form
|
|
540
|
+
.getTextField("SupplyAirflow22Location")
|
|
541
|
+
.setText("SupplyAirflow22Location");
|
|
542
|
+
form
|
|
543
|
+
.getTextField("SupplyAirflow23Location")
|
|
544
|
+
.setText("SupplyAirflow23Location");
|
|
545
|
+
form
|
|
546
|
+
.getTextField("SupplyAirflow24Location")
|
|
547
|
+
.setText("SupplyAirflow24Location");
|
|
548
|
+
form.getTextField("SupplyAirflow1").setText("SupplyAirflow1");
|
|
549
|
+
form.getTextField("SupplyAirflow2").setText("SupplyAirflow2");
|
|
550
|
+
form.getTextField("SupplyAirflow3").setText("SupplyAirflow3");
|
|
551
|
+
form.getTextField("SupplyAirflow4").setText("SupplyAirflow4");
|
|
552
|
+
form.getTextField("SupplyAirflow5").setText("SupplyAirflow5");
|
|
553
|
+
form.getTextField("SupplyAirflow6").setText("SupplyAirflow6");
|
|
554
|
+
form.getTextField("SupplyAirflow7").setText("SupplyAirflow7");
|
|
555
|
+
form.getTextField("SupplyAirflow8").setText("SupplyAirflow8");
|
|
556
|
+
form.getTextField("SupplyAirflow9").setText("SupplyAirflow9");
|
|
557
|
+
form.getTextField("SupplyAirflow10").setText("SupplyAirflow10");
|
|
558
|
+
form.getTextField("SupplyAirflow11").setText("SupplyAirflow11");
|
|
559
|
+
form.getTextField("SupplyAirflow12").setText("SupplyAirflow12");
|
|
560
|
+
form.getTextField("SupplyAirflow13").setText("SupplyAirflow13");
|
|
561
|
+
form.getTextField("SupplyAirflow14").setText("SupplyAirflow14");
|
|
562
|
+
form.getTextField("SupplyAirflow15").setText("SupplyAirflow15");
|
|
563
|
+
form.getTextField("SupplyAirflow16").setText("SupplyAirflow16");
|
|
564
|
+
form.getTextField("SupplyAirflow17").setText("SupplyAirflow17");
|
|
565
|
+
form.getTextField("SupplyAirflow18").setText("SupplyAirflow18");
|
|
566
|
+
form.getTextField("SupplyAirflow19").setText("SupplyAirflow19");
|
|
567
|
+
form.getTextField("SupplyAirflow20").setText("SupplyAirflow20");
|
|
568
|
+
form.getTextField("SupplyAirflow21").setText("SupplyAirflow21");
|
|
569
|
+
form.getTextField("SupplyAirflow22").setText("SupplyAirflow22");
|
|
570
|
+
form.getTextField("SupplyAirflow23").setText("SupplyAirflow23");
|
|
571
|
+
form.getTextField("SupplyAirflow24").setText("SupplyAirflow24");
|
|
572
|
+
form.getTextField("SupplyAirflowTotal").setText("SupplyAirflowTotal");
|
|
573
|
+
form.getTextField("SupplyAverageDB").setText("SupplyAverageDB");
|
|
574
|
+
|
|
575
|
+
form
|
|
576
|
+
.getTextField("ReturnAirflow1Location")
|
|
577
|
+
.setText("ReturnAirflow1Location");
|
|
578
|
+
form
|
|
579
|
+
.getTextField("ReturnAirflow2Location")
|
|
580
|
+
.setText("ReturnAirflow2Location");
|
|
581
|
+
form
|
|
582
|
+
.getTextField("ReturnAirflow3Location")
|
|
583
|
+
.setText("ReturnAirflow3Location");
|
|
584
|
+
form
|
|
585
|
+
.getTextField("ReturnAirflow4Location")
|
|
586
|
+
.setText("ReturnAirflow4Location");
|
|
587
|
+
form
|
|
588
|
+
.getTextField("ReturnAirflow5Location")
|
|
589
|
+
.setText("ReturnAirflow5Location");
|
|
590
|
+
form
|
|
591
|
+
.getTextField("ReturnAirflow6Location")
|
|
592
|
+
.setText("ReturnAirflow6Location");
|
|
593
|
+
form
|
|
594
|
+
.getTextField("ReturnAirflow7Location")
|
|
595
|
+
.setText("ReturnAirflow7Location");
|
|
596
|
+
form
|
|
597
|
+
.getTextField("ReturnAirflow8Location")
|
|
598
|
+
.setText("ReturnAirflow8Location");
|
|
599
|
+
form
|
|
600
|
+
.getTextField("ReturnAirflow9Location")
|
|
601
|
+
.setText("ReturnAirflow9Location");
|
|
602
|
+
form
|
|
603
|
+
.getTextField("ReturnAirflow10Location")
|
|
604
|
+
.setText("ReturnAirflow10Location");
|
|
605
|
+
form
|
|
606
|
+
.getTextField("ReturnAirflow11Location")
|
|
607
|
+
.setText("ReturnAirflow11Location");
|
|
608
|
+
form
|
|
609
|
+
.getTextField("ReturnAirflow12Location")
|
|
610
|
+
.setText("ReturnAirflow12Location");
|
|
611
|
+
form
|
|
612
|
+
.getTextField("ReturnAirflow13Location")
|
|
613
|
+
.setText("ReturnAirflow13Location");
|
|
614
|
+
form
|
|
615
|
+
.getTextField("ReturnAirflow14Location")
|
|
616
|
+
.setText("ReturnAirflow14Location");
|
|
617
|
+
form
|
|
618
|
+
.getTextField("ReturnAirflow15Location")
|
|
619
|
+
.setText("ReturnAirflow15Location");
|
|
620
|
+
form
|
|
621
|
+
.getTextField("ReturnAirflow16Location")
|
|
622
|
+
.setText("ReturnAirflow16Location");
|
|
623
|
+
form
|
|
624
|
+
.getTextField("ReturnAirflow17Location")
|
|
625
|
+
.setText("ReturnAirflow17Location");
|
|
626
|
+
form
|
|
627
|
+
.getTextField("ReturnAirflow18Location")
|
|
628
|
+
.setText("ReturnAirflow18Location");
|
|
629
|
+
form
|
|
630
|
+
.getTextField("ReturnAirflow19Location")
|
|
631
|
+
.setText("ReturnAirflow19Location");
|
|
632
|
+
form
|
|
633
|
+
.getTextField("ReturnAirflow20Location")
|
|
634
|
+
.setText("ReturnAirflow20Location");
|
|
635
|
+
form.getTextField("ReturnAirflow1").setText("ReturnAirflow1");
|
|
636
|
+
form.getTextField("ReturnAirflow2").setText("ReturnAirflow2");
|
|
637
|
+
form.getTextField("ReturnAirflow3").setText("ReturnAirflow3");
|
|
638
|
+
form.getTextField("ReturnAirflow4").setText("ReturnAirflow4");
|
|
639
|
+
form.getTextField("ReturnAirflow5").setText("ReturnAirflow5");
|
|
640
|
+
form.getTextField("ReturnAirflow6").setText("ReturnAirflow6");
|
|
641
|
+
form.getTextField("ReturnAirflow7").setText("ReturnAirflow7");
|
|
642
|
+
form.getTextField("ReturnAirflow8").setText("ReturnAirflow8");
|
|
643
|
+
form.getTextField("ReturnAirflow9").setText("ReturnAirflow9");
|
|
644
|
+
form.getTextField("ReturnAirflow10").setText("ReturnAirflow10");
|
|
645
|
+
form.getTextField("ReturnAirflow11").setText("ReturnAirflow11");
|
|
646
|
+
form.getTextField("ReturnAirflow12").setText("ReturnAirflow12");
|
|
647
|
+
form.getTextField("ReturnAirflow13").setText("ReturnAirflow13");
|
|
648
|
+
form.getTextField("ReturnAirflow14").setText("ReturnAirflow14");
|
|
649
|
+
form.getTextField("ReturnAirflow15").setText("ReturnAirflow15");
|
|
650
|
+
form.getTextField("ReturnAirflow16").setText("ReturnAirflow16");
|
|
651
|
+
form.getTextField("ReturnAirflow17").setText("ReturnAirflow17");
|
|
652
|
+
form.getTextField("ReturnAirflow18").setText("ReturnAirflow18");
|
|
653
|
+
form.getTextField("ReturnAirflow19").setText("ReturnAirflow19");
|
|
654
|
+
form.getTextField("ReturnAirflow20").setText("ReturnAirflow20");
|
|
655
|
+
form.getTextField("ReturnAirflowTotal").setText("ReturnAirflowTotal");
|
|
656
|
+
form.getTextField("ReturnAverageDB").setText("ReturnAverageDB");
|
|
657
|
+
|
|
658
|
+
/* air_measurements - this is test values when leaving the user input page.. this needs to grab from acr-connect.data.X
|
|
115
659
|
if (this.nciComfortMaxx) {
|
|
116
660
|
this.project.air_measurements = {
|
|
117
661
|
temperature_entering_dry_bulb: this.active.data.temperature_entering_dry_bulb,
|
|
@@ -124,122 +668,7 @@ export async function getReport(payload, _test) {
|
|
|
124
668
|
}
|
|
125
669
|
*/
|
|
126
670
|
|
|
127
|
-
|
|
128
|
-
form.getTextField('ReturnTemperatureChange').setText('ReturnTemperatureChange');
|
|
129
|
-
form.getTextField('AverageSupplyRegisterDB').setText('AverageSupplyRegisterDB');
|
|
130
|
-
form.getTextField('SupplyTemperatureChange').setText('SupplyTemperatureChange');
|
|
131
|
-
form.getTextField('TESPEntering').setText('TESPEntering');
|
|
132
|
-
form.getTextField('TESPExiting').setText('TESPExiting');
|
|
133
|
-
form.getTextField('TESPValue').setText('TESPValue');
|
|
134
|
-
form.getTextField('TESPRated').setText('TESPRated');
|
|
135
|
-
form.getTextField('TESPPercentRated').setText('TESPPercentRated');
|
|
136
|
-
form.getTextField('AirFilterEntering').setText('AirFilterEntering');
|
|
137
|
-
form.getTextField('AirFilterExiting').setText('AirFilterExiting');
|
|
138
|
-
form.getTextField('AirFilterDrop').setText('AirFilterDrop');
|
|
139
|
-
form.getTextField('AirFilterBudget').setText('AirFilterBudget');
|
|
140
|
-
form.getTextField('AirFilterPercentBudget').setText('AirFilterPercentBudget');
|
|
141
|
-
form.getTextField('CoilExiting').setText('CoilExiting');
|
|
142
|
-
form.getTextField('CoilDrop').setText('CoilDrop');
|
|
143
|
-
form.getTextField('CoilBudget').setText('CoilBudget');
|
|
144
|
-
form.getTextField('CoilPercentBudget').setText('CoilPercentBudget');
|
|
145
|
-
form.getTextField('CoilEntering').setText('CoilEntering');
|
|
146
|
-
form.getTextField('ReturnBudget').setText('ReturnBudget');
|
|
147
|
-
form.getTextField('ReturnPercentBudget').setText('ReturnPercentBudget');
|
|
148
|
-
form.getTextField('ReturnPressure').setText('ReturnPressure');
|
|
149
|
-
form.getTextField('SupplyBudget').setText('SupplyBudget');
|
|
150
|
-
form.getTextField('SupplyPercentBudget').setText('SupplyPercentBudget');
|
|
151
|
-
form.getTextField('SupplyPressure').setText('SupplyPressure');
|
|
152
|
-
form.getTextField('TestingOrganization').setText('TestingOrganization');
|
|
153
|
-
form.getTextField('AFUERating').setText('AFUERating');
|
|
154
|
-
form.getTextField('FuelType').setText('FuelType');
|
|
155
|
-
form.getTextField('FurnaceType').setText('FurnaceType');
|
|
156
|
-
form.getTextField('FurnaceManufacturer').setText('FurnaceManufacturer');
|
|
157
|
-
form.getTextField('FurnaceModel').setText('FurnaceModel');
|
|
158
|
-
form.getTextField('RatedBTUInput').setText('RatedBTUInput');
|
|
159
|
-
form.getTextField('RatedBTUOutput').setText('RatedBTUOutput');
|
|
160
|
-
form.getTextField('FurnaceSerial').setText('FurnaceSerial');
|
|
161
|
-
form.getTextField('FurnaceYear').setText('FurnaceYear');
|
|
162
|
-
form.getTextField('AirFilterLocation').setText('AirFilterLocation');
|
|
163
|
-
form.getTextField('NominalCapacity').setText('NominalCapacity');
|
|
164
|
-
form.getTextField('EER').setText('EER');
|
|
165
|
-
form.getTextField('CondenserManufacturer').setText('CondenserManufacturer');
|
|
166
|
-
form.getTextField('CondenserModel').setText('CondenserModel');
|
|
167
|
-
form.getTextField('SEER').setText('SEER');
|
|
168
|
-
form.getTextField('CondenserSerial').setText('CondenserSerial');
|
|
169
|
-
form.getTextField('CondenserYear').setText('CondenserYear');
|
|
170
|
-
form.getTextField('FanCondition').setText('FanCondition');
|
|
171
|
-
form.getTextField('FanRatedStaticPressure').setText('FanRatedStaticPressure');
|
|
172
|
-
form.getTextField('FanCapacity').setText('FanCapacity');
|
|
173
|
-
form.getTextField('FanSpeedSetting').setText('FanSpeedSetting');
|
|
174
|
-
form.getTextField('FanType').setText('FanType');
|
|
175
|
-
form.getTextField('CoilManufacturer').setText('CoilManufacturer');
|
|
176
|
-
form.getTextField('CoilModel').setText('CoilModel');
|
|
177
|
-
form.getTextField('CoilSerial').setText('CoilSerial');
|
|
178
|
-
form.getTextField('CoilYear').setText('CoilYear');
|
|
179
|
-
form.getTextField('Title').setText('Title');
|
|
180
|
-
form.getTextField('Customer').setText('Customer');
|
|
181
|
-
form.getTextField('Location').setText('Location');
|
|
182
|
-
form.getTextField('FanAirflowRequired').setText('FanAirflowRequired');
|
|
183
|
-
form.getTextField('FanAirflowMeasured').setText('FanAirflowMeasured');
|
|
184
|
-
form.getTextField('FanAirflowPercentRequired').setText('FanAirflowPercentRequired');
|
|
185
|
-
form.getTextField('ReturnAirflowTotal').setText('ReturnAirflowTotal');
|
|
186
|
-
form.getTextField('ReturnAirflowMeasured').setText('ReturnAirflowMeasured');
|
|
187
|
-
form.getTextField('ReturnDuctLeakage').setText('ReturnDuctLeakage');
|
|
188
|
-
form.getTextField('ReturnPercentLeakage').setText('ReturnPercentLeakage');
|
|
189
|
-
form.getTextField('SupplyAirflowMeasured').setText('SupplyAirflowMeasured');
|
|
190
|
-
form.getTextField('SupplyDuctLeakage').setText('SupplyDuctLeakage');
|
|
191
|
-
form.getTextField('SupplyPercentLeakage').setText('SupplyPercentLeakage');
|
|
192
|
-
form.getTextField('EquipmentRatedBTU').setText('EquipmentRatedBTU');
|
|
193
|
-
form.getTextField('EquipmentDeliveredBTU').setText('EquipmentDeliveredBTU');
|
|
194
|
-
form.getTextField('EquipmentMeasuredEfficiency').setText('EquipmentMeasuredEfficiency');
|
|
195
|
-
form.getTextField('ReturnDuctLoss').setText('ReturnDuctLoss');
|
|
196
|
-
form.getTextField('ReturnPercentBTULoss').setText('ReturnPercentBTULoss');
|
|
197
|
-
form.getTextField('SupplyDuctLoss').setText('SupplyDuctLoss');
|
|
198
|
-
form.getTextField('SupplyPercentBTULoss').setText('SupplyPercentBTULoss');
|
|
199
|
-
form.getTextField('SystemDeliveredBTU').setText('SystemDeliveredBTU');
|
|
200
|
-
form.getTextField('SystemMeasuredEfficiency').setText('SystemMeasuredEfficiency');
|
|
201
|
-
form.getTextField('ReturnAirflow1Location').setText('ReturnAirflow1Location');
|
|
202
|
-
form.getTextField('ReturnAirflow2Location').setText('ReturnAirflow2Location');
|
|
203
|
-
form.getTextField('ReturnAirflow3Location').setText('ReturnAirflow3Location');
|
|
204
|
-
form.getTextField('ReturnAirflow4Location').setText('ReturnAirflow4Location');
|
|
205
|
-
form.getTextField('ReturnAirflow5Location').setText('ReturnAirflow5Location');
|
|
206
|
-
form.getTextField('ReturnAirflow6Location').setText('ReturnAirflow6Location');
|
|
207
|
-
form.getTextField('ReturnAirflow7Location').setText('ReturnAirflow7Location');
|
|
208
|
-
form.getTextField('ReturnAirflow8Location').setText('ReturnAirflow8Location');
|
|
209
|
-
form.getTextField('ReturnAirflow9Location').setText('ReturnAirflow9Location');
|
|
210
|
-
form.getTextField('ReturnAirflow10Location').setText('ReturnAirflow10Location');
|
|
211
|
-
form.getTextField('ReturnAirflow11Location').setText('ReturnAirflow11Location');
|
|
212
|
-
form.getTextField('ReturnAirflow12Location').setText('ReturnAirflow12Location');
|
|
213
|
-
form.getTextField('ReturnAirflow13Location').setText('ReturnAirflow13Location');
|
|
214
|
-
form.getTextField('ReturnAirflow14Location').setText('ReturnAirflow14Location');
|
|
215
|
-
form.getTextField('ReturnAirflow15Location').setText('ReturnAirflow15Location');
|
|
216
|
-
form.getTextField('ReturnAirflow16Location').setText('ReturnAirflow16Location');
|
|
217
|
-
form.getTextField('ReturnAirflow17Location').setText('ReturnAirflow17Location');
|
|
218
|
-
form.getTextField('ReturnAirflow18Location').setText('ReturnAirflow18Location');
|
|
219
|
-
form.getTextField('ReturnAirflow19Location').setText('ReturnAirflow19Location');
|
|
220
|
-
form.getTextField('ReturnAirflow20Location').setText('ReturnAirflow20Location');
|
|
221
|
-
form.getTextField('ReturnAirflow1').setText('ReturnAirflow1');
|
|
222
|
-
form.getTextField('ReturnAirflow2').setText('ReturnAirflow2');
|
|
223
|
-
form.getTextField('ReturnAirflow3').setText('ReturnAirflow3');
|
|
224
|
-
form.getTextField('ReturnAirflow4').setText('ReturnAirflow4');
|
|
225
|
-
form.getTextField('ReturnAirflow5').setText('ReturnAirflow5');
|
|
226
|
-
form.getTextField('ReturnAirflow6').setText('ReturnAirflow6');
|
|
227
|
-
form.getTextField('ReturnAirflow7').setText('ReturnAirflow7');
|
|
228
|
-
form.getTextField('ReturnAirflow8').setText('ReturnAirflow8');
|
|
229
|
-
form.getTextField('ReturnAirflow9').setText('ReturnAirflow9');
|
|
230
|
-
form.getTextField('ReturnAirflow10').setText('ReturnAirflow10');
|
|
231
|
-
form.getTextField('ReturnAirflow11').setText('ReturnAirflow11');
|
|
232
|
-
form.getTextField('ReturnAirflow12').setText('ReturnAirflow12');
|
|
233
|
-
form.getTextField('ReturnAirflow13').setText('ReturnAirflow13');
|
|
234
|
-
form.getTextField('ReturnAirflow14').setText('ReturnAirflow14');
|
|
235
|
-
form.getTextField('ReturnAirflow15').setText('ReturnAirflow15');
|
|
236
|
-
form.getTextField('ReturnAirflow16').setText('ReturnAirflow16');
|
|
237
|
-
form.getTextField('ReturnAirflow17').setText('ReturnAirflow17');
|
|
238
|
-
form.getTextField('ReturnAirflow18').setText('ReturnAirflow18');
|
|
239
|
-
form.getTextField('ReturnAirflow19').setText('ReturnAirflow19');
|
|
240
|
-
form.getTextField('ReturnAirflow20').setText('ReturnAirflow20');
|
|
241
|
-
|
|
242
|
-
/*
|
|
671
|
+
/*
|
|
243
672
|
//Setup fields
|
|
244
673
|
let filter_pressure_drop = 1,
|
|
245
674
|
return_pressure_drop = 2,
|
|
@@ -645,20 +1074,31 @@ export async function getReport(payload, _test) {
|
|
|
645
1074
|
}
|
|
646
1075
|
|
|
647
1076
|
/******** PHOTOS (X PAGES) *********/
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
1077
|
+
try {
|
|
1078
|
+
let selectedPhotosReport =
|
|
1079
|
+
payload.meta.origin === "virtuoso" ? photosReportS3 : photosReport;
|
|
1080
|
+
let photosReportBase64 =
|
|
1081
|
+
payload.meta.pdf_settings.includePhotos && payload.meta.photo_count > 0
|
|
1082
|
+
? await selectedPhotosReport.getReport(payload)
|
|
1083
|
+
: false;
|
|
1084
|
+
const photosReportDoc = photosReportBase64
|
|
1085
|
+
? await PDFDocument.load(
|
|
1086
|
+
util._base64ToArrayBuffer(photosReportBase64.data)
|
|
1087
|
+
)
|
|
1088
|
+
: false;
|
|
1089
|
+
for (
|
|
1090
|
+
let i = 0;
|
|
1091
|
+
photosReportDoc && i < photosReportDoc.getPages().length;
|
|
1092
|
+
i++
|
|
1093
|
+
) {
|
|
1094
|
+
const [_photosReport] = await pdfDoc.copyPages(photosReportDoc, [i]);
|
|
1095
|
+
pdfDoc.insertPage(pdfDoc.getPages().length, _photosReport);
|
|
1096
|
+
}
|
|
1097
|
+
} catch (error) {
|
|
1098
|
+
errors.push(`Photos: ${error}`);
|
|
1099
|
+
}
|
|
660
1100
|
|
|
661
|
-
|
|
1101
|
+
/*
|
|
662
1102
|
form.getTextField('Name').setText(`${payload.cName}`);
|
|
663
1103
|
form.getTextField('Address 1').setText(`${payload.address}`);
|
|
664
1104
|
form.getTextField('Address 2').setText(`${payload.address2}`);
|
|
@@ -702,28 +1142,65 @@ export async function getReport(payload, _test) {
|
|
|
702
1142
|
}
|
|
703
1143
|
}
|
|
704
1144
|
*/
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
1145
|
+
// flatten and return as base64
|
|
1146
|
+
form.flatten();
|
|
1147
|
+
|
|
1148
|
+
return { status: 200, data: await pdfDoc.saveAsBase64({ dataUri: true }) };
|
|
1149
|
+
} catch (error) {
|
|
1150
|
+
console.log("error message", error.message);
|
|
1151
|
+
console.log("error stack", error.stack);
|
|
1152
|
+
return { status: 400, data: error };
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
function getTESPPointsUsed(type) {
|
|
1157
|
+
if (type === "Package Draw Through") {
|
|
1158
|
+
return { entering: "2", exiting: "4" }; // testPoint2 + testPoint4
|
|
1159
|
+
} else if (type === "Package Blow Through") {
|
|
1160
|
+
return { entering: "2", exiting: "4" }; // testPoint2 + testPoint4
|
|
1161
|
+
} else if (type === "AHU Draw Through") {
|
|
1162
|
+
return { entering: "2", exiting: "4" }; // testPoint2 + testPoint4
|
|
1163
|
+
} else if (type === "AHU Blow Through") {
|
|
1164
|
+
return { entering: "2", exiting: "4" }; // testPoint4 + testPoint2
|
|
1165
|
+
} else if (type === "Split/Furnace") {
|
|
1166
|
+
return { entering: "2", exiting: "3" }; // testPoint2 + testPoint3
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
return { entering: "", exiting: "" }; // fallback
|
|
714
1170
|
}
|
|
715
1171
|
|
|
716
1172
|
function getTextFields(payload) {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
1173
|
+
return {
|
|
1174
|
+
cName:
|
|
1175
|
+
payload.site.customer.first_name && payload.site.customer.last_name
|
|
1176
|
+
? `${payload.site.customer.first_name} ${payload.site.customer.last_name}`
|
|
1177
|
+
: "",
|
|
1178
|
+
address: payload.site.location.address || "",
|
|
1179
|
+
address2: payload.site.location.address2 || "",
|
|
1180
|
+
city: payload.site.location.city || "",
|
|
1181
|
+
state: payload.site.location.state || "",
|
|
1182
|
+
zip: payload.site.location.zip || "",
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
function getFanType(type) {
|
|
1187
|
+
switch (type) {
|
|
1188
|
+
case "PSC":
|
|
1189
|
+
return "PSC";
|
|
1190
|
+
case "ECM":
|
|
1191
|
+
return "Variable Speed ECM";
|
|
1192
|
+
case "X13":
|
|
1193
|
+
return "Constant Torque ECM";
|
|
1194
|
+
case "Three Phase":
|
|
1195
|
+
return "Three Phase";
|
|
1196
|
+
}
|
|
1197
|
+
return "N/A";
|
|
725
1198
|
}
|
|
726
1199
|
|
|
727
|
-
function
|
|
728
|
-
|
|
729
|
-
}
|
|
1200
|
+
function capitalizeFirstLetter(string) {
|
|
1201
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
function getPassFailText(type) {
|
|
1205
|
+
return type === -1 ? "LOW" : type === 0 ? "PASS" : type === 1 ? "HIGH" : "";
|
|
1206
|
+
}
|
|
@@ -273,15 +273,15 @@ export async function getReport(payload, _test) {
|
|
|
273
273
|
|
|
274
274
|
let gauge = gauge10;
|
|
275
275
|
if (tesp_pct <= 100) gauge = gauge100;
|
|
276
|
-
else if (tesp_pct <=
|
|
277
|
-
else if (tesp_pct <=
|
|
278
|
-
else if (tesp_pct <=
|
|
279
|
-
else if (tesp_pct <=
|
|
280
|
-
else if (tesp_pct <=
|
|
281
|
-
else if (tesp_pct <=
|
|
282
|
-
else if (tesp_pct <=
|
|
283
|
-
else if (tesp_pct <=
|
|
284
|
-
else if (tesp_pct >
|
|
276
|
+
else if (tesp_pct <= 108) gauge = gauge90;
|
|
277
|
+
else if (tesp_pct <= 116) gauge = gauge80;
|
|
278
|
+
else if (tesp_pct <= 124) gauge = gauge70;
|
|
279
|
+
else if (tesp_pct <= 132) gauge = gauge60;
|
|
280
|
+
else if (tesp_pct <= 140) gauge = gauge50;
|
|
281
|
+
else if (tesp_pct <= 200) gauge = gauge40;
|
|
282
|
+
else if (tesp_pct <= 250) gauge = gauge30;
|
|
283
|
+
else if (tesp_pct <= 300) gauge = gauge20;
|
|
284
|
+
else if (tesp_pct > 300) gauge = gauge10;
|
|
285
285
|
form.getButton("TESPGauge").setImage(gauge);
|
|
286
286
|
|
|
287
287
|
form
|
|
@@ -453,15 +453,15 @@ export async function getReport(payload, _test) {
|
|
|
453
453
|
|
|
454
454
|
let gauge2 = gauge10;
|
|
455
455
|
if (filter_pct <= 100) gauge2 = gauge100;
|
|
456
|
-
else if (filter_pct <=
|
|
457
|
-
else if (filter_pct <=
|
|
458
|
-
else if (filter_pct <=
|
|
459
|
-
else if (filter_pct <=
|
|
460
|
-
else if (filter_pct <=
|
|
461
|
-
else if (filter_pct <=
|
|
462
|
-
else if (filter_pct <=
|
|
463
|
-
else if (filter_pct <=
|
|
464
|
-
else if (filter_pct >
|
|
456
|
+
else if (filter_pct <= 108) gauge2 = gauge90;
|
|
457
|
+
else if (filter_pct <= 116) gauge2 = gauge80;
|
|
458
|
+
else if (filter_pct <= 124) gauge2 = gauge70;
|
|
459
|
+
else if (filter_pct <= 132) gauge2 = gauge60;
|
|
460
|
+
else if (filter_pct <= 140) gauge2 = gauge50;
|
|
461
|
+
else if (filter_pct <= 200) gauge2 = gauge40;
|
|
462
|
+
else if (filter_pct <= 250) gauge2 = gauge30;
|
|
463
|
+
else if (filter_pct <= 300) gauge2 = gauge20;
|
|
464
|
+
else if (filter_pct > 300) gauge2 = gauge10;
|
|
465
465
|
form.getButton("AirFilterGauge").setImage(gauge2);
|
|
466
466
|
|
|
467
467
|
form
|
|
@@ -506,15 +506,15 @@ export async function getReport(payload, _test) {
|
|
|
506
506
|
|
|
507
507
|
let gauge3 = gauge10;
|
|
508
508
|
if (supply_pct <= 100) gauge3 = gauge100;
|
|
509
|
-
else if (supply_pct <=
|
|
510
|
-
else if (supply_pct <=
|
|
511
|
-
else if (supply_pct <=
|
|
512
|
-
else if (supply_pct <=
|
|
513
|
-
else if (supply_pct <=
|
|
514
|
-
else if (supply_pct <=
|
|
515
|
-
else if (supply_pct <=
|
|
516
|
-
else if (supply_pct <=
|
|
517
|
-
else if (supply_pct >
|
|
509
|
+
else if (supply_pct <= 108) gauge3 = gauge90;
|
|
510
|
+
else if (supply_pct <= 116) gauge3 = gauge80;
|
|
511
|
+
else if (supply_pct <= 124) gauge3 = gauge70;
|
|
512
|
+
else if (supply_pct <= 132) gauge3 = gauge60;
|
|
513
|
+
else if (supply_pct <= 140) gauge3 = gauge50;
|
|
514
|
+
else if (supply_pct <= 200) gauge3 = gauge40;
|
|
515
|
+
else if (supply_pct <= 250) gauge3 = gauge30;
|
|
516
|
+
else if (supply_pct <= 300) gauge3 = gauge20;
|
|
517
|
+
else if (supply_pct > 300) gauge3 = gauge10;
|
|
518
518
|
form.getButton("SupplyGauge").setImage(gauge3);
|
|
519
519
|
|
|
520
520
|
form
|
|
@@ -558,15 +558,15 @@ export async function getReport(payload, _test) {
|
|
|
558
558
|
|
|
559
559
|
let gauge4 = gauge10;
|
|
560
560
|
if (return_pct <= 100) gauge4 = gauge100;
|
|
561
|
-
else if (return_pct <=
|
|
562
|
-
else if (return_pct <=
|
|
563
|
-
else if (return_pct <=
|
|
564
|
-
else if (return_pct <=
|
|
565
|
-
else if (return_pct <=
|
|
566
|
-
else if (return_pct <=
|
|
567
|
-
else if (return_pct <=
|
|
568
|
-
else if (return_pct <=
|
|
569
|
-
else if (return_pct >
|
|
561
|
+
else if (return_pct <= 108) gauge4 = gauge90;
|
|
562
|
+
else if (return_pct <= 116) gauge4 = gauge80;
|
|
563
|
+
else if (return_pct <= 124) gauge4 = gauge70;
|
|
564
|
+
else if (return_pct <= 132) gauge4 = gauge60;
|
|
565
|
+
else if (return_pct <= 140) gauge4 = gauge50;
|
|
566
|
+
else if (return_pct <= 200) gauge4 = gauge40;
|
|
567
|
+
else if (return_pct <= 250) gauge4 = gauge30;
|
|
568
|
+
else if (return_pct <= 300) gauge4 = gauge20;
|
|
569
|
+
else if (return_pct > 300) gauge4 = gauge10;
|
|
570
570
|
form.getButton("ReturnGauge").setImage(gauge4);
|
|
571
571
|
|
|
572
572
|
form
|
|
@@ -1077,18 +1077,18 @@ export async function getReport(payload, _test) {
|
|
|
1077
1077
|
|
|
1078
1078
|
function getTESPPointsUsed(type) {
|
|
1079
1079
|
if (type === "Package Draw Through") {
|
|
1080
|
-
return { entering: "2", exiting: "4" };
|
|
1080
|
+
return { entering: "2", exiting: "4" }; // testPoint2 + testPoint4
|
|
1081
1081
|
} else if (type === "Package Blow Through") {
|
|
1082
|
-
return { entering: "2", exiting: "4" };
|
|
1082
|
+
return { entering: "2", exiting: "4" }; // testPoint2 + testPoint4
|
|
1083
1083
|
} else if (type === "AHU Draw Through") {
|
|
1084
|
-
return { entering: "
|
|
1084
|
+
return { entering: "2", exiting: "4" }; // testPoint2 + testPoint4
|
|
1085
1085
|
} else if (type === "AHU Blow Through") {
|
|
1086
|
-
return { entering: "
|
|
1086
|
+
return { entering: "2", exiting: "4" }; // testPoint4 + testPoint2
|
|
1087
1087
|
} else if (type === "Split/Furnace") {
|
|
1088
|
-
return { entering: "2", exiting: "3" };
|
|
1088
|
+
return { entering: "2", exiting: "3" }; // testPoint2 + testPoint3
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
|
-
return { entering: "", exiting: "" }; // fallback
|
|
1091
|
+
return { entering: "", exiting: "" }; // fallback
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
1094
|
function getTextFields(payload) {
|