From 5c8a6170e104e90384dfd4dc5897571787f6883c Mon Sep 17 00:00:00 2001 From: Scrum4Me Agent <30029041+madhura68@users.noreply.github.com> Date: Wed, 6 May 2026 07:14:58 +0200 Subject: [PATCH] feat(ideas): STATUS_SORT_ORDER + sorteerstate (ST-cmotjj9uf000104l5i70so19b) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- components/ideas/idea-list.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)