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:
@@ -1006,6 +1006,7 @@ function ProjectDetailContent({ projectId }: { projectId: string }) {
|
||||
open={!!selectedEvalAssignment}
|
||||
onOpenChange={(open) => { if (!open) setSelectedEvalAssignment(null) }}
|
||||
onSaved={() => utils.project.getFullDetail.invalidate({ id: projectId })}
|
||||
category={project?.competitionCategory}
|
||||
/>
|
||||
|
||||
{/* AI Evaluation Summary */}
|
||||
|
||||
@@ -2291,7 +2291,7 @@ export default function RoundDetailPage() {
|
||||
/>
|
||||
|
||||
{/* Evaluation Criteria Editor (EVALUATION rounds only) */}
|
||||
{isEvaluation && <EvaluationCriteriaEditor roundId={roundId} />}
|
||||
{isEvaluation && <EvaluationCriteriaEditor roundId={roundId} perCategoryCriteria={!!(config.perCategoryCriteria)} />}
|
||||
|
||||
{/* Document Requirements — hidden for EVALUATION rounds unless requireDocumentUpload is on */}
|
||||
{(!isEvaluation || !!(config.requireDocumentUpload as boolean)) && (
|
||||
|
||||
Reference in New Issue
Block a user