Move required reviews field into evaluation settings and add live voting migration

Move the "Required Reviews per Project" field from the Basic Information
card into the Evaluation Settings section of RoundTypeSettings, where it
contextually belongs. Add missing database migration for live voting
enhancements (criteria voting, audience voting, AudienceVoter table).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 16:57:56 +01:00
parent 7b85fd9602
commit 52cdca1b85
4 changed files with 157 additions and 51 deletions

View File

@@ -304,33 +304,6 @@ function EditRoundContent({ roundId }: { roundId: string }) {
)}
/>
{ROUND_FIELD_VISIBILITY[roundType]?.showRequiredReviews && (
<FormField
control={form.control}
name="requiredReviews"
render={({ field }) => (
<FormItem>
<FormLabel>Required Reviews per Project</FormLabel>
<FormControl>
<Input
type="number"
min={1}
max={10}
{...field}
onChange={(e) =>
field.onChange(parseInt(e.target.value) || 1)
}
/>
</FormControl>
<FormDescription>
Minimum number of evaluations each project should receive
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
)}
{ROUND_FIELD_VISIBILITY[roundType]?.showAssignmentLimits && (
<div className="grid gap-4 sm:grid-cols-2">
<FormField
@@ -393,6 +366,32 @@ function EditRoundContent({ roundId }: { roundId: string }) {
onRoundTypeChange={setRoundType}
settings={roundSettings}
onSettingsChange={setRoundSettings}
requiredReviewsField={
<FormField
control={form.control}
name="requiredReviews"
render={({ field }) => (
<FormItem>
<FormLabel>Required Reviews per Project</FormLabel>
<FormControl>
<Input
type="number"
min={1}
max={10}
{...field}
onChange={(e) =>
field.onChange(parseInt(e.target.value) || 1)
}
/>
</FormControl>
<FormDescription>
Minimum number of evaluations each project should receive
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
}
/>
{/* Voting Window */}

View File

@@ -294,30 +294,6 @@ function CreateRoundContent() {
)}
/>
{ROUND_FIELD_VISIBILITY[roundType]?.showRequiredReviews && (
<FormField
control={form.control}
name="requiredReviews"
render={({ field }) => (
<FormItem>
<FormLabel>Required Reviews per Project</FormLabel>
<FormControl>
<Input
type="number"
min={1}
max={10}
{...field}
onChange={(e) => field.onChange(parseInt(e.target.value) || 1)}
/>
</FormControl>
<FormDescription>
Minimum number of evaluations each project should receive
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
)}
</CardContent>
</Card>
@@ -327,6 +303,30 @@ function CreateRoundContent() {
onRoundTypeChange={setRoundType}
settings={roundSettings}
onSettingsChange={setRoundSettings}
requiredReviewsField={
<FormField
control={form.control}
name="requiredReviews"
render={({ field }) => (
<FormItem>
<FormLabel>Required Reviews per Project</FormLabel>
<FormControl>
<Input
type="number"
min={1}
max={10}
{...field}
onChange={(e) => field.onChange(parseInt(e.target.value) || 1)}
/>
</FormControl>
<FormDescription>
Minimum number of evaluations each project should receive
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
}
/>
{ROUND_FIELD_VISIBILITY[roundType]?.showVotingWindow && (