diff --git a/components/ideas/idea-list.tsx b/components/ideas/idea-list.tsx index 2b92ca2..e4a8dfe 100644 --- a/components/ideas/idea-list.tsx +++ b/components/ideas/idea-list.tsx @@ -70,6 +70,11 @@ const STATUS_FILTERS: { value: IdeaStatusApi; label: string }[] = [ { value: 'plan_failed', label: 'Plan mislukt' }, ] +const STATUS_SORT_ORDER: Record = { + 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('code') - const [sortDir, setSortDir] = useState<'asc' | 'desc'>('asc') + const [sortDir, setSortDir] = useState<'asc' | 'desc'>('desc') // Create-form state const [showCreate, setShowCreate] = useState(false)