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:
@@ -1,46 +0,0 @@
|
||||
import { trpc } from '@/lib/trpc/client'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
export function usePipelineInlineEdit(pipelineId: string) {
|
||||
const utils = trpc.useUtils()
|
||||
|
||||
const updateMutation = trpc.pipeline.update.useMutation({
|
||||
onSuccess: () => {
|
||||
utils.pipeline.getDraft.invalidate({ id: pipelineId })
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(`Failed to update pipeline: ${err.message}`)
|
||||
},
|
||||
})
|
||||
|
||||
const updateConfigMutation = trpc.stage.updateConfig.useMutation({
|
||||
onSuccess: () => {
|
||||
utils.pipeline.getDraft.invalidate({ id: pipelineId })
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(`Failed to update stage: ${err.message}`)
|
||||
},
|
||||
})
|
||||
|
||||
const updatePipeline = async (
|
||||
data: { name?: string; slug?: string; status?: 'DRAFT' | 'ACTIVE' | 'CLOSED' | 'ARCHIVED'; settingsJson?: Record<string, unknown> }
|
||||
) => {
|
||||
await updateMutation.mutateAsync({ id: pipelineId, ...data })
|
||||
toast.success('Pipeline updated')
|
||||
}
|
||||
|
||||
const updateStageConfig = async (
|
||||
stageId: string,
|
||||
configJson: Record<string, unknown>,
|
||||
name?: string
|
||||
) => {
|
||||
await updateConfigMutation.mutateAsync({ id: stageId, configJson, name })
|
||||
toast.success('Stage configuration updated')
|
||||
}
|
||||
|
||||
return {
|
||||
isUpdating: updateMutation.isPending || updateConfigMutation.isPending,
|
||||
updatePipeline,
|
||||
updateStageConfig,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user