feat: per-category evaluation criteria (startup vs business concept)
Add ability to define completely different evaluation criteria for each competition category. Admins toggle "Separate Criteria per Category" in round config, then configure criteria independently via tabbed editor. - Schema: add nullable `category` to EvaluationForm with updated constraints - Config: add `perCategoryCriteria` boolean to EvaluationConfigSchema - Helper: new `findActiveForm()` with category-aware resolution + fallback - Backend: getForm, upsertForm, getStageForm, startStage all category-aware - AI services: use project category for form lookup in summaries + ranking - Export/ranking: merge criteria from all active forms for cross-category reports - Admin UI: toggle switch + tabbed criteria editor with per-category builders - Jury UI: auto-selects correct form based on project category (invisible to juror) - Fully backwards compatible: toggle defaults OFF, existing forms unchanged Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,10 +80,10 @@ export default function JuryEvaluatePage({ params: paramsPromise }: PageProps) {
|
||||
const [coiCompleted, setCOICompleted] = useState(false)
|
||||
const [coiHasConflict, setCOIHasConflict] = useState(false)
|
||||
|
||||
// Fetch the active evaluation form for this round
|
||||
// Fetch the active evaluation form for this round (category-aware)
|
||||
const { data: activeForm } = trpc.evaluation.getStageForm.useQuery(
|
||||
{ roundId },
|
||||
{ enabled: !!roundId }
|
||||
{ roundId, category: project?.competitionCategory },
|
||||
{ enabled: !!roundId && !!project }
|
||||
)
|
||||
|
||||
// Start evaluation mutation (creates draft)
|
||||
|
||||
Reference in New Issue
Block a user