@measurequick/measurequick-report-generator 1.5.43 → 1.5.45
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
|
@@ -20,13 +20,11 @@ export async function getReport(payload) {
|
|
|
20
20
|
//const isGoettlInstall = util.projectIsGoettl(payload.project);
|
|
21
21
|
|
|
22
22
|
let utility_logo;
|
|
23
|
-
|
|
24
23
|
if (payload.project.franklin_utility === 'Unisource'){
|
|
25
24
|
utility_logo = await pdfDocPg1.embedPng(assets.unisourceLogo);
|
|
25
|
+
formPg1.getButton("ImageUtility").setImage(utility_logo);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
formPg1.getButton("ImageUtility").setImage(utility_logo);
|
|
29
|
-
|
|
27
|
+
|
|
30
28
|
//Block4-Title2a: Existing System
|
|
31
29
|
formPg1.getTextField('Block4-Title2a').setText('Existing System');
|
|
32
30
|
let row = 1;
|
|
@@ -63,21 +61,21 @@ export async function getReport(payload) {
|
|
|
63
61
|
//Block4-Row5-Col1: Nominal Capacity (Btu/h):
|
|
64
62
|
formPg1.getTextField('Block4-Row'+ row +'-Col1').setText('Nominal Capacity (Btu/h):');
|
|
65
63
|
//Block4-Row5-Col2: value
|
|
66
|
-
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText(capacity);
|
|
64
|
+
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText(numberWithCommas(capacity));
|
|
67
65
|
row++;
|
|
68
66
|
}
|
|
69
|
-
if (payload.tests[
|
|
67
|
+
if (payload.tests[0].testInfo.data.efficiency){
|
|
70
68
|
//Block4-Row6-Col1: Measured EER:
|
|
71
69
|
formPg1.getTextField('Block4-Row'+ row +'-Col1').setText('Measured EER:');
|
|
72
70
|
//Block4-Row6-Col2: value
|
|
73
|
-
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText(payload.tests[payload.tests[0]].testInfo.data.efficiency);
|
|
71
|
+
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText(payload.tests[payload.tests[0]].testInfo.data.efficiency.toString());
|
|
74
72
|
row++;
|
|
75
73
|
}
|
|
76
74
|
if (payload.equipment.equipment_age){
|
|
77
75
|
//Block4-Row7-Col1: Age of System:
|
|
78
76
|
formPg1.getTextField('Block4-Row'+ row +'-Col1').setText('Age of System:');
|
|
79
77
|
//Block4-Row7-Col2: value
|
|
80
|
-
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText(payload.equipment.equipment_age);
|
|
78
|
+
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText(payload.equipment.equipment_age.toSting());
|
|
81
79
|
row++;
|
|
82
80
|
}
|
|
83
81
|
if (payload.tests[payload.tests[0]].testInfo.diagnostics.system_wide.stability===0){
|
|
@@ -93,7 +91,7 @@ export async function getReport(payload) {
|
|
|
93
91
|
formPg1.getTextField('Block4-Row'+ row +'-Col2').setText('No');
|
|
94
92
|
row++;
|
|
95
93
|
}
|
|
96
|
-
|
|
94
|
+
|
|
97
95
|
//Block5-Title2a: New System
|
|
98
96
|
formPg1.getTextField('Block5-Title2a').setText('New System');
|
|
99
97
|
row = 1;
|
|
@@ -130,7 +128,7 @@ export async function getReport(payload) {
|
|
|
130
128
|
//Block5-Row5-Col1: Nominal Capacity (Btu/h):
|
|
131
129
|
formPg1.getTextField('Block5-Row'+ row +'-Col1').setText('Nominal Capacity (Btu/h):');
|
|
132
130
|
//Block5-Row5-Col2: value
|
|
133
|
-
formPg1.getTextField('Block5-Row'+ row +'-Col2').setText(payload.project.franklin_new_system_capacity);
|
|
131
|
+
formPg1.getTextField('Block5-Row'+ row +'-Col2').setText(numberWithCommas(payload.project.franklin_new_system_capacity));
|
|
134
132
|
row++;
|
|
135
133
|
}
|
|
136
134
|
if (payload.project.franklin_new_system_type){
|
|
@@ -167,10 +165,6 @@ export async function getReport(payload) {
|
|
|
167
165
|
formPg1.getTextField('RebateTable2').setText('Unisource Multi-family Rebates');
|
|
168
166
|
}
|
|
169
167
|
|
|
170
|
-
*/
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
168
|
let labels = ["iconRangeHigh", "iconRangeLow", "iconRangeNormal", "iconTesto", "iconCalculator", "iconFieldpiece",
|
|
175
169
|
"iconUei", "iconSporlanPro", "iconSporlanLegacy", "iconIconnect", "iconImanifold", "iconSensi", "iconDg8", "iconJb",
|
|
176
170
|
"iconBluflame", "iconSauermann", "iconRedfish510", "iconRedfish510333", "iconRedfish550", "iconDg1000", "iconTrueflow", "iconThumbprintRed", "iconThumbprintGreen", "iconThumbprintYellow"
|
|
@@ -369,3 +363,7 @@ export async function getReport(payload) {
|
|
|
369
363
|
return { status: 400, data: error };
|
|
370
364
|
}
|
|
371
365
|
}
|
|
366
|
+
|
|
367
|
+
function numberWithCommas(number) {
|
|
368
|
+
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
369
|
+
}
|