Schema-uitbreidingen voor de sprint-niveau jobflow (PBI-46): - TaskStatus, StoryStatus, PbiStatus, SprintStatus krijgen FAILED - Nieuwe enums: SprintRunStatus, PrStrategy - Nieuw SprintRun-model dat per-task ClaudeJobs groepeert - ClaudeJob.sprint_run_id koppeling + index - Product.pr_strategy (default SPRINT) - Bijhorende Prisma-migratie propagateStatusUpwards vervangt updateTaskStatusWithStoryPromotion en herevalueert de keten Task → Story → PBI → Sprint → SprintRun bij elke task-statuswijziging. Bij FAILED cancelt het sibling-jobs in dezelfde SprintRun. PBI-status BLOCKED blijft handmatig en wordt niet overschreven. Status-mappers + theme krijgen failed-token + label-uitbreidingen. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
'use client'
|
|
|
|
import { Select, SelectContent, SelectItem, SelectTrigger } from '@/components/ui/select'
|
|
import { cn } from '@/lib/utils'
|
|
import type { PbiStatusApi } from '@/lib/task-status'
|
|
|
|
export const PBI_STATUS_LABELS: Record<PbiStatusApi, string> = {
|
|
ready: 'Klaar voor sprint',
|
|
blocked: 'Geblokkeerd',
|
|
failed: 'Gefaald',
|
|
done: 'Afgerond',
|
|
}
|
|
|
|
export const PBI_STATUS_COLORS: Record<PbiStatusApi, string> = {
|
|
ready: 'bg-status-todo/15 text-status-todo border-status-todo/30',
|
|
blocked: 'bg-status-blocked/15 text-status-blocked border-status-blocked/30',
|
|
failed: 'bg-status-failed/15 text-status-failed border-status-failed/30',
|
|
done: 'bg-status-done/15 text-status-done border-status-done/30',
|
|
}
|
|
|
|
interface PbiStatusSelectProps {
|
|
value: PbiStatusApi
|
|
onChange: (value: PbiStatusApi) => void
|
|
className?: string
|
|
}
|
|
|
|
export function PbiStatusSelect({ value, onChange, className }: PbiStatusSelectProps) {
|
|
return (
|
|
<Select
|
|
value={value}
|
|
onValueChange={(v) => { if (v) onChange(v as PbiStatusApi) }}
|
|
>
|
|
<SelectTrigger className={cn('w-full', className)}>
|
|
{PBI_STATUS_LABELS[value] ?? value}
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectItem value="ready">Klaar voor sprint</SelectItem>
|
|
<SelectItem value="blocked">Geblokkeerd</SelectItem>
|
|
<SelectItem value="done">Afgerond</SelectItem>
|
|
</SelectContent>
|
|
</Select>
|
|
)
|
|
}
|