fix: backfill binaryDecision, fix boolean criterion lookup, add assign buttons
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:
2026-03-02 12:48:08 +01:00
parent 19b58e4434
commit 2df9c54de2
6 changed files with 142 additions and 70 deletions

View File

@@ -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 ? (