fix: resolve advance decision and surface country on rankings list
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m35s
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m35s
The side panel only read Evaluation.binaryDecision, which is null when the round's evaluation form stores the 'proceed to next round' answer as a boolean criterion in criterionScoresJson (the current round's shape). project.getFullDetail now resolves a unified `decision` field per assignment using the same fallback pattern as the ranking router: prefer the column, fall back to a type='advance' (or legacy 'move to the next stage' boolean) criterion looked up by id in the active form. Also: project country in the rankings list now renders whenever it's present, not only when teamName is also set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -169,10 +169,11 @@ function SortableProjectRow({
|
||||
<p className="text-sm font-medium truncate">
|
||||
{projectInfo?.title ?? `Project …${projectId.slice(-6)}`}
|
||||
</p>
|
||||
{projectInfo?.teamName && (
|
||||
{(projectInfo?.teamName || projectInfo?.country) && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{projectInfo.teamName}
|
||||
{projectInfo.country ? <> · <CountryDisplay country={projectInfo.country} /></> : ''}
|
||||
{projectInfo.teamName && projectInfo.country ? ' · ' : ''}
|
||||
{projectInfo.country && <CountryDisplay country={projectInfo.country} />}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
@@ -1153,12 +1154,12 @@ export function RankingDashboard({ competitionId: _competitionId, roundId }: Ran
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="font-medium text-sm">{a.user?.name ?? a.user?.email ?? 'Unknown'}</span>
|
||||
<div className="flex items-center gap-2">
|
||||
{a.evaluation?.binaryDecision != null && (
|
||||
{a.evaluation?.decision != null && (
|
||||
<Badge
|
||||
variant={a.evaluation.binaryDecision ? 'default' : 'destructive'}
|
||||
className={a.evaluation.binaryDecision ? 'bg-emerald-100 text-emerald-700 hover:bg-emerald-100' : ''}
|
||||
variant={a.evaluation.decision ? 'default' : 'destructive'}
|
||||
className={a.evaluation.decision ? 'bg-emerald-100 text-emerald-700 hover:bg-emerald-100' : ''}
|
||||
>
|
||||
{a.evaluation.binaryDecision ? 'Yes' : 'No'}
|
||||
{a.evaluation.decision ? 'Yes' : 'No'}
|
||||
</Badge>
|
||||
)}
|
||||
<Badge variant="outline">Score: {a.evaluation?.globalScore?.toFixed(1) ?? '—'}</Badge>
|
||||
|
||||
Reference in New Issue
Block a user