feat(todos): dropdown filters visible todos; 'Alles' toont alles
De product-dropdown fungeert nu als filter voor de lijst: - 'Alles' (default) toont alle todo's - 'Geen product' toont alleen ongelinkte todo's - Een specifiek product toont alleen todo's van dat product Nieuw aangemaakte todo's krijgen het geselecteerde product mee. 'Alles' en 'Geen product' resulteren in een todo zonder productlink. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ca6510c98e
commit
2dfd01e421
2 changed files with 36 additions and 7 deletions
|
|
@ -18,7 +18,8 @@ export async function createTodoAction(_prevState: unknown, formData: FormData)
|
|||
if (session.isDemo) return { error: 'Niet beschikbaar in demo-modus' }
|
||||
|
||||
const title = (formData.get('title') as string)?.trim()
|
||||
const productId = (formData.get('productId') as string)?.trim() || null
|
||||
const raw = (formData.get('productId') as string)?.trim()
|
||||
const productId = (raw && raw !== 'all') ? raw : null
|
||||
|
||||
if (!title) return { error: 'Titel is verplicht' }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue