'use client' import { trpc } from '@/lib/trpc/client' import { Card, CardContent, CardHeader, CardTitle, } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' import { Skeleton } from '@/components/ui/skeleton' import { Star, MessageSquare } from 'lucide-react' export default function ApplicantEvaluationsPage() { const { data: rounds, isLoading } = trpc.applicant.getMyEvaluations.useQuery() if (isLoading) { return (

Jury Feedback

Anonymous evaluations from jury members

{[1, 2].map((i) => ( ))}
) } const hasEvaluations = rounds && rounds.length > 0 return (

Jury Feedback

Anonymous evaluations from jury members

{!hasEvaluations ? (

No Evaluations Available

Evaluations will appear here once jury review is complete and results are published.

) : (
{rounds.map((round) => (
{round.roundName} {round.evaluationCount} evaluation{round.evaluationCount !== 1 ? 's' : ''}
{round.evaluations.map((ev, idx) => (
Evaluator #{idx + 1} {ev.submittedAt && ( {new Date(ev.submittedAt).toLocaleDateString()} )}
{ev.globalScore !== null && (
{ev.globalScore} / 100
)} {ev.criterionScores && ev.criteria && (

Criterion Scores

{(() => { const criteria = ev.criteria as Array<{ id?: string; label?: string; name?: string; maxScore?: number }> const scores = ev.criterionScores as Record return criteria .filter((c) => c.id || c.label || c.name) .map((c, ci) => { const key = c.id || String(ci) const score = scores[key] return (
{c.label || c.name || `Criterion ${ci + 1}`} {score !== undefined ? score : '—'} {c.maxScore ? ` / ${c.maxScore}` : ''}
) }) })()}
)} {ev.feedbackText && (
Written Feedback
{ev.feedbackText}
)}
))}
))}

Evaluator identities are kept confidential.

)}
) }