@measurequick/measurequick-report-generator 1.2.113 → 1.2.114
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
|
@@ -93,7 +93,7 @@ export async function getReport(payload) {
|
|
|
93
93
|
if (icon) form.getButton(`Block2-Row${rowNum}-Col3`).setImage(icon);
|
|
94
94
|
} else break;
|
|
95
95
|
}
|
|
96
|
-
form.getTextField(`Block3-Title`).setText(
|
|
96
|
+
form.getTextField(`Block3-Title`).setText(pageHeader);
|
|
97
97
|
|
|
98
98
|
/** START CORRECTIVE ACTIONS **/
|
|
99
99
|
let header,
|
|
@@ -101,26 +101,26 @@ export async function getReport(payload) {
|
|
|
101
101
|
col = 1,
|
|
102
102
|
maxWidth = 165,
|
|
103
103
|
maxHeight = 362,
|
|
104
|
-
maxLines = Math.floor(362 / font.heightAtSize(8)),
|
|
104
|
+
maxLines = Math.floor(362 / font.heightAtSize(8)) - 3,
|
|
105
105
|
numLines = 1;
|
|
106
106
|
for (let i = 0; i < payload.system_data.block3.length && col < 7; i++) {
|
|
107
107
|
let action = payload.system_data.block3[i];
|
|
108
108
|
if (header != action.ref) {
|
|
109
109
|
if (text.length > 0) text += "\n";
|
|
110
110
|
text += `${action.ref}\n`;
|
|
111
|
-
numLines
|
|
111
|
+
numLines += 2;
|
|
112
112
|
}
|
|
113
113
|
header = action.ref;
|
|
114
114
|
if (!action.label) continue;
|
|
115
115
|
let textWidth = font.widthOfTextAtSize(action.label, 8);
|
|
116
116
|
if (textWidth > maxWidth) numLines += Math.ceil(textWidth / maxWidth);
|
|
117
117
|
else numLines++;
|
|
118
|
-
text += action.label + "\n";
|
|
118
|
+
text += " • " + action.label + "\n";
|
|
119
119
|
if (numLines >= maxLines) {
|
|
120
120
|
form.getTextField(`Text${col}`).setText(text);
|
|
121
121
|
col++;
|
|
122
122
|
numLines = 1;
|
|
123
|
-
text = "";
|
|
123
|
+
text = header + " (Cont.)";
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
if (numLines < maxLines) form.getTextField(`Text${col}`).setText(text);
|