switched to light mode
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-06-15 10:18:51 +02:00
parent b06c4bf3ee
commit 5dd0ee28c0
4 changed files with 122 additions and 139 deletions

View File

@ -48,12 +48,6 @@ function renderHomeDashboard(ov, isAdmin) {
links.push({ href: '#/dev', label: 'Admin settings', desc: 'Dev import, exports, database tools' });
}
const scoringProfiles = ov.scoringProfiles || [];
const primaryProfile = scoringProfiles[0];
const greenPct = primaryProfile && primaryProfile.clientCount
? Math.round(((primaryProfile.bands?.green ?? 0) / primaryProfile.clientCount) * 100)
: null;
el.innerHTML = `
<div class="insights-kpi-grid">
<a href="#/clients" class="insights-kpi card home-kpi-link">
@ -72,16 +66,6 @@ function renderHomeDashboard(ov, isAdmin) {
<div class="insights-kpi-value">${ov.submissionsLast30d ?? 0}</div>
<div class="insights-kpi-label">Uploads (30 days)</div>
</a>
${primaryProfile ? `
<a href="#/insights" class="insights-kpi card home-kpi-link">
<div class="insights-kpi-value">${primaryProfile.clientCount ?? 0}</div>
<div class="insights-kpi-label">${esc(primaryProfile.name)} scored</div>
</a>` : ''}
${greenPct != null ? `
<a href="#/insights" class="insights-kpi card home-kpi-link">
<div class="insights-kpi-value">${greenPct}%</div>
<div class="insights-kpi-label">Green (${esc(primaryProfile.name)})</div>
</a>` : ''}
</div>
<div class="card" style="margin-top:20px">