fix(bi): resolve remaining totalCount reference in ROI projections

Fixed ReferenceError in enterprise scaling projections.

Changed totalCount to auditData.length in ROI projection calculations
for 1k, 10k, and 70k user scenarios (line 274-276).

Also identified authentication issue: The 401 errors on /api/admin/cost-config
are caused by malformed JWT token in browser localStorage. Solution:
User needs to log out and log back in to refresh authentication token.

🤖 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 10:57:33 +13:00
parent 5afe5d9584
commit 49fe809cbd

View file

@ -271,9 +271,9 @@ async function renderBusinessIntelligence() {
).length;
const projections = [
{ users: '1,000', decisions: Math.round(totalCount * 10), blocks: Math.round(blockedCount * 10), critical: Math.round(highSeverityCount * 10) },
{ users: '10,000', decisions: Math.round(totalCount * 100), blocks: Math.round(blockedCount * 100), critical: Math.round(highSeverityCount * 100) },
{ users: '70,000', decisions: Math.round(totalCount * 700), blocks: Math.round(blockedCount * 700), critical: Math.round(highSeverityCount * 700) }
{ users: '1,000', decisions: Math.round(auditData.length * 10), blocks: Math.round(blockedCount * 10), critical: Math.round(highSeverityCount * 10) },
{ users: '10,000', decisions: Math.round(auditData.length * 100), blocks: Math.round(blockedCount * 100), critical: Math.round(highSeverityCount * 100) },
{ users: '70,000', decisions: Math.round(auditData.length * 700), blocks: Math.round(blockedCount * 700), critical: Math.round(highSeverityCount * 700) }
];
projections.forEach(proj => {