'use client' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Label } from '@/components/ui/label' import { Switch } from '@/components/ui/switch' import { Badge } from '@/components/ui/badge' type SubmissionConfigProps = { config: Record onChange: (config: Record) => void } const STATUSES = [ { value: 'PENDING', label: 'Pending', color: 'bg-gray-100 text-gray-700' }, { value: 'IN_PROGRESS', label: 'In Progress', color: 'bg-blue-100 text-blue-700' }, { value: 'PASSED', label: 'Passed', color: 'bg-emerald-100 text-emerald-700' }, { value: 'REJECTED', label: 'Rejected', color: 'bg-red-100 text-red-700' }, { value: 'COMPLETED', label: 'Completed', color: 'bg-purple-100 text-purple-700' }, { value: 'WITHDRAWN', label: 'Withdrawn', color: 'bg-amber-100 text-amber-700' }, ] export function SubmissionConfig({ config, onChange }: SubmissionConfigProps) { const update = (key: string, value: unknown) => { onChange({ ...config, [key]: value }) } const eligible = (config.eligibleStatuses as string[]) ?? ['PASSED'] const toggleStatus = (status: string) => { const current = [...eligible] const idx = current.indexOf(status) if (idx >= 0) { current.splice(idx, 1) } else { current.push(status) } update('eligibleStatuses', current) } return (
Submission Eligibility Which project states from the previous round are eligible to submit documents in this round

Projects with these statuses from the previous round can submit

{STATUSES.map((s) => ( toggleStatus(s.value)} > {s.label} ))}
Notifications & Locking Behavior when the submission round activates

Send email notification to teams when submission window opens

update('notifyEligibleTeams', v)} />

Prevent uploads to earlier submission windows when this round activates

update('lockPreviousWindows', v)} />
) }