feat: add advance criterion type to evaluation form builder

Adds a new 'advance' criterion type representing "should this project advance to the next round?". Only one advance criterion is allowed per form (button disabled once added). No weight, no condition fields, always required. Also updates the upsertForm Zod schema to accept the new type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 15:04:58 +01:00
parent bf86eeee7f
commit 0edb50cd3a
2 changed files with 63 additions and 7 deletions

View File

@@ -1227,7 +1227,7 @@ export const evaluationRouter = router({
id: z.string(),
label: z.string().min(1).max(255),
description: z.string().max(2000).optional(),
type: z.enum(['numeric', 'text', 'boolean', 'section_header']).optional(),
type: z.enum(['numeric', 'text', 'boolean', 'advance', 'section_header']).optional(),
// Numeric fields
weight: z.number().min(0).max(100).optional(),
minScore: z.number().int().min(0).optional(),