feat: render project averages to two decimals
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m15s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m15s
Project-level averages (Raw + Balanced in the side panel, observer project detail score card, observer preview dialog Avg Score) now show two decimals (e.g. 8.33 instead of 8.0/8.3) so admins can see the actual computed value. Per-juror individual scores keep one decimal — they're submissions, not aggregates. ScorePill gains an optional precision prop so call sites can opt into 2-decimal display where the value is an aggregate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,7 @@ function SortableProjectRow({
|
||||
</div>
|
||||
) : entry?.avgGlobalScore !== null && entry?.avgGlobalScore !== undefined ? (
|
||||
<span className="text-xs text-muted-foreground">
|
||||
Avg {entry.avgGlobalScore.toFixed(1)}
|
||||
Avg {entry.avgGlobalScore.toFixed(2)}
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
@@ -1067,12 +1067,12 @@ export function RankingDashboard({ competitionId: _competitionId, roundId }: Ran
|
||||
<div className="flex items-baseline gap-4 flex-wrap">
|
||||
<div className={`flex items-baseline gap-1 ${useBalanced ? 'text-muted-foreground' : 'font-semibold'}`}>
|
||||
<span className="text-xs">Raw</span>
|
||||
<span className="text-lg tabular-nums">{raw != null ? raw.toFixed(1) : '—'}</span>
|
||||
<span className="text-lg tabular-nums">{raw != null ? raw.toFixed(2) : '—'}</span>
|
||||
{!useBalanced && <span className="ml-1 text-[10px] text-muted-foreground">← used for ranking</span>}
|
||||
</div>
|
||||
<div className={`flex items-baseline gap-1 ${useBalanced ? 'font-semibold' : 'text-muted-foreground'}`}>
|
||||
<span className="text-xs">Balanced</span>
|
||||
<span className="text-lg tabular-nums">{balanced != null ? balanced.toFixed(1) : '—'}</span>
|
||||
<span className="text-lg tabular-nums">{balanced != null ? balanced.toFixed(2) : '—'}</span>
|
||||
{useBalanced && <span className="ml-1 text-[10px] text-muted-foreground">← used for ranking</span>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user