fix(bi): resolve duplicate variable declaration in audit-analytics.js

Fixed SyntaxError: Identifier 'breakdownEl' has already been declared at line 288.

Renamed second occurrence from 'breakdownEl' to 'participationBreakdownEl'
to avoid variable name collision in same function scope.

First use (line 229): cost-avoidance-breakdown
Second use (line 288): participation-breakdown

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TheFlow 2025-10-27 19:49:33 +13:00
parent 8c729bcf73
commit 636be3afd1

View file

@ -285,20 +285,20 @@ async function renderBusinessIntelligence() {
participationByService[service]++; participationByService[service]++;
}); });
const breakdownEl = document.getElementById('participation-breakdown'); const participationBreakdownEl = document.getElementById('participation-breakdown');
const sortedServices = Object.entries(participationByService) const sortedServices = Object.entries(participationByService)
.sort((a, b) => b[1] - a[1]) .sort((a, b) => b[1] - a[1])
.slice(0, 5); // Top 5 services .slice(0, 5); // Top 5 services
if (sortedServices.length > 0) { if (sortedServices.length > 0) {
breakdownEl.innerHTML = sortedServices participationBreakdownEl.innerHTML = sortedServices
.map(([service, count]) => { .map(([service, count]) => {
const percentage = ((count / frameworkBackedDecisions.length) * 100).toFixed(0); const percentage = ((count / frameworkBackedDecisions.length) * 100).toFixed(0);
return `<div class="text-gray-600">${service}: ${count} (${percentage}%)</div>`; return `<div class="text-gray-600">${service}: ${count} (${percentage}%)</div>`;
}) })
.join(''); .join('');
} else { } else {
breakdownEl.innerHTML = '<div class="text-gray-500 italic">No framework guidance data yet</div>'; participationBreakdownEl.innerHTML = '<div class="text-gray-500 italic">No framework guidance data yet</div>';
} }
// Team Comparison (AI vs Human) // Team Comparison (AI vs Human)