Spaces:
Sleeping
Sleeping
remove multiple insight boxes
Browse files- templates/index.html +8 -7
templates/index.html
CHANGED
@@ -293,15 +293,16 @@
|
|
293 |
}
|
294 |
|
295 |
const documentType = row.cells[0].textContent.toLowerCase();
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
insightsContainer =
|
|
|
301 |
insightsContainer.innerHTML = '<div class="loading-spinner"></div><div>Extracting insights...</div>';
|
302 |
} else {
|
303 |
-
// Create insights
|
304 |
-
|
305 |
insightsRow.className = 'insights-row';
|
306 |
|
307 |
const insightsTd = document.createElement('td');
|
|
|
293 |
}
|
294 |
|
295 |
const documentType = row.cells[0].textContent.toLowerCase();
|
296 |
+
// Check if there's already an insights row for this document
|
297 |
+
let insightsRow = row.nextElementSibling;
|
298 |
+
if (insightsRow && insightsRow.className === 'insights-row') {
|
299 |
+
// Insights row already exists, get the container
|
300 |
+
insightsContainer = insightsRow.querySelector('.insights-container');
|
301 |
+
|
302 |
insightsContainer.innerHTML = '<div class="loading-spinner"></div><div>Extracting insights...</div>';
|
303 |
} else {
|
304 |
+
// Create insights row that spans across all columns
|
305 |
+
insightsRow = document.createElement('tr');
|
306 |
insightsRow.className = 'insights-row';
|
307 |
|
308 |
const insightsTd = document.createElement('td');
|