fix: backfill binaryDecision, fix boolean criterion lookup, add assign buttons
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m9s
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m9s
- Backfilled 166 evaluations' binaryDecision from criterionScoresJson on production DB - Fixed roundEvaluationScores and ai-ranking to look in EvaluationForm.criteriaJson instead of round.configJson for the boolean "Move to the Next Stage?" criterion - Added advanceMode (count/threshold) toggle to round config Advancement Targets - Added "Assign to Jurors" button on Unassigned Projects section and Projects tab bulk bar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
'use client'
|
||||
|
||||
import { Users } from 'lucide-react'
|
||||
import { trpc } from '@/lib/trpc/client'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Button } from '@/components/ui/button'
|
||||
|
||||
export type RoundUnassignedQueueProps = {
|
||||
roundId: string
|
||||
requiredReviews?: number
|
||||
onAssignUnassigned?: () => void
|
||||
}
|
||||
|
||||
export function RoundUnassignedQueue({ roundId, requiredReviews = 3 }: RoundUnassignedQueueProps) {
|
||||
export function RoundUnassignedQueue({ roundId, requiredReviews = 3, onAssignUnassigned }: RoundUnassignedQueueProps) {
|
||||
const { data: unassigned, isLoading } = trpc.roundAssignment.unassignedQueue.useQuery(
|
||||
{ roundId, requiredReviews },
|
||||
{ refetchInterval: 15_000 },
|
||||
@@ -18,9 +21,17 @@ export function RoundUnassignedQueue({ roundId, requiredReviews = 3 }: RoundUnas
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<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 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>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
{isLoading ? (
|
||||
|
||||
@@ -59,6 +59,7 @@ import {
|
||||
Search,
|
||||
ExternalLink,
|
||||
Sparkles,
|
||||
Users,
|
||||
} from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import type { Route } from 'next'
|
||||
@@ -78,9 +79,10 @@ const stateConfig: Record<ProjectState, { label: string; color: string; icon: Re
|
||||
type ProjectStatesTableProps = {
|
||||
competitionId: string
|
||||
roundId: string
|
||||
onAssignProjects?: (projectIds: string[]) => void
|
||||
}
|
||||
|
||||
export function ProjectStatesTable({ competitionId, roundId }: ProjectStatesTableProps) {
|
||||
export function ProjectStatesTable({ competitionId, roundId, onAssignProjects }: ProjectStatesTableProps) {
|
||||
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set())
|
||||
const [stateFilter, setStateFilter] = useState<string>('ALL')
|
||||
const [searchQuery, setSearchQuery] = useState('')
|
||||
@@ -321,6 +323,16 @@ export function ProjectStatesTable({ competitionId, roundId }: ProjectStatesTabl
|
||||
<ArrowRight className="h-3.5 w-3.5 mr-1.5" />
|
||||
Change State
|
||||
</Button>
|
||||
{onAssignProjects && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => onAssignProjects(Array.from(selectedIds))}
|
||||
>
|
||||
<Users className="h-3.5 w-3.5 mr-1.5" />
|
||||
Assign to Jurors
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
|
||||
Reference in New Issue
Block a user