Admin dashboard & round management UX overhaul
- Extract round detail monolith (2900→600 lines) into 13 standalone components
- Add shared round/status config (round-config.ts) replacing 4 local copies
- Delete 12 legacy competition-scoped pages, merge project pool into projects page
- Add round-type-specific dashboard stat panels (submission, mentoring, live final, deliberation, summary)
- Add contextual header quick actions based on active round type
- Improve pipeline visualization: progress bars, checkmarks, chevron connectors, overflow fix
- Add config tab completion dots (green/amber/red) and inline validation warnings
- Enhance juries page with round assignments, member avatars, and cap mode badges
- Add context-aware project list (recent submissions vs active evaluations)
- Move competition settings into Manage Editions page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:14:00 +01:00
|
|
|
'use client'
|
|
|
|
|
|
2026-03-02 12:48:08 +01:00
|
|
|
import { Users } from 'lucide-react'
|
Admin dashboard & round management UX overhaul
- Extract round detail monolith (2900→600 lines) into 13 standalone components
- Add shared round/status config (round-config.ts) replacing 4 local copies
- Delete 12 legacy competition-scoped pages, merge project pool into projects page
- Add round-type-specific dashboard stat panels (submission, mentoring, live final, deliberation, summary)
- Add contextual header quick actions based on active round type
- Improve pipeline visualization: progress bars, checkmarks, chevron connectors, overflow fix
- Add config tab completion dots (green/amber/red) and inline validation warnings
- Enhance juries page with round assignments, member avatars, and cap mode badges
- Add context-aware project list (recent submissions vs active evaluations)
- Move competition settings into Manage Editions page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:14:00 +01:00
|
|
|
import { trpc } from '@/lib/trpc/client'
|
|
|
|
|
import { cn } from '@/lib/utils'
|
|
|
|
|
import { Skeleton } from '@/components/ui/skeleton'
|
|
|
|
|
import { Badge } from '@/components/ui/badge'
|
2026-03-02 12:48:08 +01:00
|
|
|
import { Button } from '@/components/ui/button'
|
Admin dashboard & round management UX overhaul
- Extract round detail monolith (2900→600 lines) into 13 standalone components
- Add shared round/status config (round-config.ts) replacing 4 local copies
- Delete 12 legacy competition-scoped pages, merge project pool into projects page
- Add round-type-specific dashboard stat panels (submission, mentoring, live final, deliberation, summary)
- Add contextual header quick actions based on active round type
- Improve pipeline visualization: progress bars, checkmarks, chevron connectors, overflow fix
- Add config tab completion dots (green/amber/red) and inline validation warnings
- Enhance juries page with round assignments, member avatars, and cap mode badges
- Add context-aware project list (recent submissions vs active evaluations)
- Move competition settings into Manage Editions page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:14:00 +01:00
|
|
|
|
|
|
|
|
export type RoundUnassignedQueueProps = {
|
|
|
|
|
roundId: string
|
|
|
|
|
requiredReviews?: number
|
2026-03-02 12:48:08 +01:00
|
|
|
onAssignUnassigned?: () => void
|
Admin dashboard & round management UX overhaul
- Extract round detail monolith (2900→600 lines) into 13 standalone components
- Add shared round/status config (round-config.ts) replacing 4 local copies
- Delete 12 legacy competition-scoped pages, merge project pool into projects page
- Add round-type-specific dashboard stat panels (submission, mentoring, live final, deliberation, summary)
- Add contextual header quick actions based on active round type
- Improve pipeline visualization: progress bars, checkmarks, chevron connectors, overflow fix
- Add config tab completion dots (green/amber/red) and inline validation warnings
- Enhance juries page with round assignments, member avatars, and cap mode badges
- Add context-aware project list (recent submissions vs active evaluations)
- Move competition settings into Manage Editions page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:14:00 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-02 12:48:08 +01:00
|
|
|
export function RoundUnassignedQueue({ roundId, requiredReviews = 3, onAssignUnassigned }: RoundUnassignedQueueProps) {
|
Admin dashboard & round management UX overhaul
- Extract round detail monolith (2900→600 lines) into 13 standalone components
- Add shared round/status config (round-config.ts) replacing 4 local copies
- Delete 12 legacy competition-scoped pages, merge project pool into projects page
- Add round-type-specific dashboard stat panels (submission, mentoring, live final, deliberation, summary)
- Add contextual header quick actions based on active round type
- Improve pipeline visualization: progress bars, checkmarks, chevron connectors, overflow fix
- Add config tab completion dots (green/amber/red) and inline validation warnings
- Enhance juries page with round assignments, member avatars, and cap mode badges
- Add context-aware project list (recent submissions vs active evaluations)
- Move competition settings into Manage Editions page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:14:00 +01:00
|
|
|
const { data: unassigned, isLoading } = trpc.roundAssignment.unassignedQueue.useQuery(
|
|
|
|
|
{ roundId, requiredReviews },
|
|
|
|
|
{ refetchInterval: 15_000 },
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-3">
|
2026-03-02 12:48:08 +01:00
|
|
|
<div className="flex items-center justify-between">
|
|
|
|
|
<div>
|
|
|
|
|
<p className="text-sm font-medium">Unassigned Projects</p>
|
|
|
|
|
<p className="text-xs text-muted-foreground">Projects with fewer than {requiredReviews} jury assignments</p>
|
|
|
|
|
</div>
|
|
|
|
|
{unassigned && unassigned.length > 0 && onAssignUnassigned && (
|
|
|
|
|
<Button size="sm" variant="outline" onClick={onAssignUnassigned}>
|
|
|
|
|
<Users className="h-3.5 w-3.5 mr-1.5" />
|
|
|
|
|
Assign to Jurors
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
Admin dashboard & round management UX overhaul
- Extract round detail monolith (2900→600 lines) into 13 standalone components
- Add shared round/status config (round-config.ts) replacing 4 local copies
- Delete 12 legacy competition-scoped pages, merge project pool into projects page
- Add round-type-specific dashboard stat panels (submission, mentoring, live final, deliberation, summary)
- Add contextual header quick actions based on active round type
- Improve pipeline visualization: progress bars, checkmarks, chevron connectors, overflow fix
- Add config tab completion dots (green/amber/red) and inline validation warnings
- Enhance juries page with round assignments, member avatars, and cap mode badges
- Add context-aware project list (recent submissions vs active evaluations)
- Move competition settings into Manage Editions page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:14:00 +01:00
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
{isLoading ? (
|
|
|
|
|
<div className="space-y-2">
|
|
|
|
|
{[1, 2, 3].map((i) => <Skeleton key={i} className="h-14 w-full" />)}
|
|
|
|
|
</div>
|
|
|
|
|
) : unassigned && unassigned.length > 0 ? (
|
|
|
|
|
<div className="space-y-2 max-h-[400px] overflow-y-auto">
|
|
|
|
|
{unassigned.map((project: any) => (
|
|
|
|
|
<div
|
|
|
|
|
key={project.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
'flex justify-between items-center p-3 border rounded-md hover:bg-muted/30 transition-colors',
|
|
|
|
|
(project.assignmentCount || 0) === 0 && 'border-l-4 border-l-red-500',
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
<div className="min-w-0">
|
|
|
|
|
<p className="text-sm font-medium truncate">{project.title}</p>
|
|
|
|
|
<p className="text-xs text-muted-foreground">
|
|
|
|
|
{project.competitionCategory || 'No category'}
|
|
|
|
|
{project.teamName && ` \u00b7 ${project.teamName}`}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<Badge variant="outline" className={cn(
|
|
|
|
|
'text-xs shrink-0 ml-3',
|
|
|
|
|
(project.assignmentCount || 0) === 0
|
|
|
|
|
? 'bg-red-50 text-red-700 border-red-200'
|
|
|
|
|
: 'bg-amber-50 text-amber-700 border-amber-200',
|
|
|
|
|
)}>
|
|
|
|
|
{project.assignmentCount || 0} / {requiredReviews}
|
|
|
|
|
</Badge>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<p className="text-sm text-muted-foreground text-center py-6">
|
|
|
|
|
All projects have sufficient assignments
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|