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:
parent
6015357905
commit
5c8a6170e1
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue