@measurequick/measurequick-report-generator 1.0.64 → 1.0.66
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.
|
@@ -86,7 +86,6 @@ function printBoilerPlateDiagnostic() {
|
|
|
86
86
|
doc.text('Corrective Actions', .25, 3.5);
|
|
87
87
|
doc.setFontSize(8);
|
|
88
88
|
doc.setFontStyle('normal');
|
|
89
|
-
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
function printHeaderData() {
|
|
@@ -128,6 +127,7 @@ function printBodySection(currentSnapshot, measurementSection, xLeft, xRight, y)
|
|
|
128
127
|
let sMultiplier = 1;
|
|
129
128
|
|
|
130
129
|
for (let key in dataPoints.values) {
|
|
130
|
+
if (key == "condenserVoltageSource" || key == "condenserAmperageSource" || key == "airHandlerVoltageSource" || key == "airHandlerAmperageSource") break;
|
|
131
131
|
let dataPoint = dataPoints.values[key];
|
|
132
132
|
let valueBeforeEditing = dataPoint;
|
|
133
133
|
let templateRef = templates[measurementSection][key];
|
|
@@ -136,6 +136,8 @@ function printBodySection(currentSnapshot, measurementSection, xLeft, xRight, y)
|
|
|
136
136
|
if (templateRef.hasOwnProperty("units")) {
|
|
137
137
|
units = Array.isArray(templateRef.units) ? `(${templateRef.units[0]} / ${templateRef.units[1]})` : `(${templateRef.units})`;
|
|
138
138
|
labelText += ` ${units}:`;
|
|
139
|
+
if ((key == "condenserVoltage" || key == "condenserAmperage" || key == "airHandlerVoltage" || key == "airHandlerAmperage") && dataPoints.values[`${key}Source`])
|
|
140
|
+
doc.addImage(graphics[dataPoints.values[`${key}Source`]], "JPEG", xRight + .25, y - .12, .16, .16);
|
|
139
141
|
} else labelText += ':';
|
|
140
142
|
if (templateRef.hasOwnProperty("roundTo")) {
|
|
141
143
|
dataPoint *= 1;
|
|
@@ -168,6 +170,7 @@ function printBodySection(currentSnapshot, measurementSection, xLeft, xRight, y)
|
|
|
168
170
|
}
|
|
169
171
|
let toolIconRef = getToolIcon(JSON.parse(currentSnapshot.toolIcons)[key]);
|
|
170
172
|
if (toolIconRef) doc.addImage(graphics[toolIconRef], "JPEG", xRight + .25, y - .12, .16, .16);
|
|
173
|
+
else if (currentSnapshot.calculated && JSON.parse(currentSnapshot.calculated)[key]) doc.addImage(graphics.iconCalculator, "JPEG", xRight + .25, y - .12, .16, .16);
|
|
171
174
|
y += (s * sMultiplier);
|
|
172
175
|
} else if (key == "newColumn") {
|
|
173
176
|
sMultiplier = 1;
|
|
@@ -176,7 +179,7 @@ function printBodySection(currentSnapshot, measurementSection, xLeft, xRight, y)
|
|
|
176
179
|
y = yTop;
|
|
177
180
|
} else if (key == "newRow") {
|
|
178
181
|
y += .35;
|
|
179
|
-
}
|
|
182
|
+
} else console.log("No Template Found for: " + key);
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
185
|
|