Competition/Round architecture: full platform rewrite (Phases 1-9)
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m45s
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m45s
Replace Pipeline/Stage system with Competition/Round architecture. New schema: Competition, Round (7 types), JuryGroup, AssignmentPolicy, ProjectRoundState, DeliberationSession, ResultLock, SubmissionWindow. New services: round-engine, round-assignment, deliberation, result-lock, submission-manager, competition-context, ai-prompt-guard. Full admin/jury/applicant/mentor UI rewrite. AI prompt hardening with structured prompts, retry logic, and injection detection. All legacy pipeline/stage code removed. 4 new migrations + seed aligned. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@ export default function ApplicantDocumentsPage() {
|
||||
)
|
||||
}
|
||||
|
||||
const { project, openStages } = data
|
||||
const { project, openRounds } = data
|
||||
const isDraft = !project.submittedAt
|
||||
|
||||
return (
|
||||
@@ -98,23 +98,23 @@ export default function ApplicantDocumentsPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Per-stage upload sections */}
|
||||
{openStages.length > 0 && (
|
||||
{/* Per-round upload sections */}
|
||||
{openRounds.length > 0 && (
|
||||
<div className="space-y-6">
|
||||
{openStages.map((stage) => {
|
||||
{openRounds.map((round: { id: string; name: string; windowCloseAt?: string | Date | null }) => {
|
||||
const now = new Date()
|
||||
const hasDeadline = !!stage.windowCloseAt
|
||||
const deadlinePassed = hasDeadline && now > new Date(stage.windowCloseAt!)
|
||||
const hasDeadline = !!round.windowCloseAt
|
||||
const deadlinePassed = hasDeadline && now > new Date(round.windowCloseAt!)
|
||||
const isLate = deadlinePassed
|
||||
|
||||
return (
|
||||
<Card key={stage.id}>
|
||||
<Card key={round.id}>
|
||||
<CardHeader>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<CardTitle className="text-lg">{stage.name}</CardTitle>
|
||||
<CardTitle className="text-lg">{round.name}</CardTitle>
|
||||
<CardDescription>
|
||||
Upload documents for this stage
|
||||
Upload documents for this round
|
||||
</CardDescription>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -127,7 +127,7 @@ export default function ApplicantDocumentsPage() {
|
||||
{hasDeadline && !deadlinePassed && (
|
||||
<Badge variant="outline" className="gap-1">
|
||||
<Clock className="h-3 w-3" />
|
||||
Due {new Date(stage.windowCloseAt!).toLocaleDateString()}
|
||||
Due {new Date(round.windowCloseAt!).toLocaleDateString()}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@ export default function ApplicantDocumentsPage() {
|
||||
<CardContent>
|
||||
<RequirementUploadList
|
||||
projectId={project.id}
|
||||
stageId={stage.id}
|
||||
roundId={round.id}
|
||||
disabled={false}
|
||||
/>
|
||||
</CardContent>
|
||||
@@ -163,7 +163,7 @@ export default function ApplicantDocumentsPage() {
|
||||
<div className="space-y-2">
|
||||
{project.files.map((file) => {
|
||||
const Icon = fileTypeIcons[file.fileType] || File
|
||||
const fileRecord = file as typeof file & { isLate?: boolean; stageId?: string | null }
|
||||
const fileRecord = file as typeof file & { isLate?: boolean; roundId?: string | null }
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -197,13 +197,13 @@ export default function ApplicantDocumentsPage() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* No open stages message */}
|
||||
{openStages.length === 0 && project.files.length === 0 && (
|
||||
{/* No open rounds message */}
|
||||
{openRounds.length === 0 && project.files.length === 0 && (
|
||||
<Card className="bg-muted/50">
|
||||
<CardContent className="p-6 text-center">
|
||||
<Clock className="h-10 w-10 mx-auto text-muted-foreground/50 mb-3" />
|
||||
<p className="text-muted-foreground">
|
||||
No stages are currently open for document submissions.
|
||||
No rounds are currently open for document submissions.
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user