@measurequick/measurequick-report-generator 1.5.188 → 1.5.189
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
|
@@ -199,26 +199,33 @@ export async function getReport(payload, _test) {
|
|
|
199
199
|
form.getTextField("TotalExternalStaticPressure").setText(`${textFields.tesp} inH2O`);
|
|
200
200
|
form.getTextField("FilterFaceVelocity").setText(`${textFields.airflow} CFM`);
|
|
201
201
|
|
|
202
|
-
// Heat pump heating scoring factors
|
|
202
|
+
// Heat pump heating scoring factors - show as deductions
|
|
203
203
|
let ptsFilter = textFields.ptsFilter;
|
|
204
204
|
let ptsA = textFields.ptsA;
|
|
205
205
|
let ptsB = textFields.ptsB;
|
|
206
206
|
let ptsC = textFields.ptsC;
|
|
207
207
|
let ptsD = textFields.ptsD;
|
|
208
208
|
|
|
209
|
-
//
|
|
210
|
-
let
|
|
211
|
-
let
|
|
212
|
-
let
|
|
213
|
-
let
|
|
214
|
-
let
|
|
209
|
+
// Calculate deductions (20 - points earned)
|
|
210
|
+
let deductFilter = ptsFilter !== "--" ? (20 - +ptsFilter).toFixed(0) : "20";
|
|
211
|
+
let deductA = ptsA !== "--" ? (20 - +ptsA).toFixed(0) : "20";
|
|
212
|
+
let deductB = ptsB !== "--" ? (20 - +ptsB).toFixed(0) : "20";
|
|
213
|
+
let deductC = ptsC !== "--" ? (20 - +ptsC).toFixed(0) : "20";
|
|
214
|
+
let deductD = ptsD !== "--" ? (20 - +ptsD).toFixed(0) : "20";
|
|
215
215
|
|
|
216
|
-
//
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
// Determine colors based on deductions (green if deduction <= 5, red otherwise)
|
|
217
|
+
let filterColor = +deductFilter <= 5 ? "Green" : "Red";
|
|
218
|
+
let aColor = +deductA <= 5 ? "Green" : "Red";
|
|
219
|
+
let bColor = +deductB <= 5 ? "Green" : "Red";
|
|
220
|
+
let cColor = +deductC <= 5 ? "Green" : "Red";
|
|
221
|
+
let dColor = +deductD <= 5 ? "Green" : "Red";
|
|
222
|
+
|
|
223
|
+
// Set scoring factor values as deductions
|
|
224
|
+
form.getTextField(`AgeLosses${filterColor}`).setText(`-${deductFilter}`);
|
|
225
|
+
form.getTextField(`TemperatureSplitLosses${aColor}`).setText(`-${deductA}`);
|
|
226
|
+
form.getTextField(`StaticPressureLosses${bColor}`).setText(`-${deductB}`);
|
|
227
|
+
form.getTextField(`ApproachLosses${cColor}`).setText(`-${deductC}`);
|
|
228
|
+
form.getTextField(`RefrigerantChargeIssues${dColor}`).setText(`-${deductD}`);
|
|
222
229
|
|
|
223
230
|
form.getTextField("YourSystemScorePage2").setText(`${systemScorePercentage} ${systemScoreGrade}`);
|
|
224
231
|
|