@measurequick/measurequick-report-generator 1.5.194 → 1.5.196

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.5.194",
3
+ "version": "1.5.196",
4
4
  "description": "Generates PDF documents for various measureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -177,7 +177,7 @@ export async function getReport(payload, options = {}) {
177
177
  y: yPos,
178
178
  size: titleFontSize,
179
179
  font: helveticaBold,
180
- color: rgb(0.2, 0.4, 0.2), // MeasureQuick green
180
+ color: rgb(0.2, 0.2, 0.2), // Dark charcoal
181
181
  });
182
182
  yPos -= lineHeight * 1.5;
183
183
  } else if (line.trim()) {
package/util.js CHANGED
@@ -1079,12 +1079,19 @@ export function getAiSummary(payload) {
1079
1079
  }
1080
1080
  // Check aiSummaries array on project
1081
1081
  if (payload.project && payload.project.aiSummaries && payload.project.aiSummaries.length > 0) {
1082
- // Return the most recent summary - extract text if it's an object
1083
- const summary = payload.project.aiSummaries[payload.project.aiSummaries.length - 1];
1084
- if (typeof summary === 'string') return summary;
1085
- if (summary && summary.text) return summary.text;
1086
- if (summary && summary.summary) return summary.summary;
1087
- if (summary && summary.content) return summary.content;
1082
+ // Find summaries with showOnReport enabled, take the most recent one
1083
+ const summariesForReport = payload.project.aiSummaries.filter(s => {
1084
+ if (typeof s === 'string') return true; // Plain strings are always included
1085
+ return s && (s.showOnReport === true || s.show_on_report === true);
1086
+ });
1087
+
1088
+ if (summariesForReport.length > 0) {
1089
+ const summary = summariesForReport[summariesForReport.length - 1];
1090
+ if (typeof summary === 'string') return summary;
1091
+ if (summary && summary.text) return summary.text;
1092
+ if (summary && summary.summary) return summary.summary;
1093
+ if (summary && summary.content) return summary.content;
1094
+ }
1088
1095
  }
1089
1096
  return null;
1090
1097
  }