feat(ideas): STATUS_SORT_ORDER + sorteerstate (ST-cmotjj9uf000104l5i70so19b)

- Voeg STATUS_SORT_ORDER toe: workflow-volgorde map (draft→plan_failed)
- Zet standaard sortDir op 'desc' conform AC (code aflopend bij laden)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scrum4Me Agent 2026-05-06 07:14:58 +02:00
parent 6015357905
commit 5c8a6170e1

View file

@ -70,6 +70,11 @@ const STATUS_FILTERS: { value: IdeaStatusApi; label: string }[] = [
{ value: 'plan_failed', label: 'Plan mislukt' },
]
const STATUS_SORT_ORDER: Record<IdeaStatusApi, number> = {
draft: 0, grilling: 1, grilled: 2, planning: 3,
plan_ready: 4, planned: 5, grill_failed: 6, plan_failed: 7,
}
function SortHeader({
col,
label,
@ -113,7 +118,7 @@ export function IdeaList({ ideas, products, isDemo }: IdeaListProps) {
// Sort state
const [sortKey, setSortKey] = useState<SortKey>('code')
const [sortDir, setSortDir] = useState<'asc' | 'desc'>('asc')
const [sortDir, setSortDir] = useState<'asc' | 'desc'>('desc')
// Create-form state
const [showCreate, setShowCreate] = useState(false)