feat(ST-509): add description textarea to Todo create and edit cards
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
856a051b2f
commit
c45ba1d0c2
2 changed files with 18 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ export default async function TodosPage() {
|
|||
todos={todos.map(t => ({
|
||||
id: t.id,
|
||||
title: t.title,
|
||||
description: t.description ?? null,
|
||||
done: t.done,
|
||||
created_at: t.created_at.toISOString(),
|
||||
product_id: t.product_id ?? null,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import { cn } from '@/lib/utils'
|
|||
import { Button } from '@/components/ui/button'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { DemoTooltip } from '@/components/shared/demo-tooltip'
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
|
||||
import {
|
||||
|
|
@ -30,6 +31,7 @@ import {
|
|||
interface Todo {
|
||||
id: string
|
||||
title: string
|
||||
description: string | null
|
||||
done: boolean
|
||||
created_at: string
|
||||
product_id: string | null
|
||||
|
|
@ -292,6 +294,13 @@ function TodoCard({
|
|||
autoComplete="off"
|
||||
/>
|
||||
</div>
|
||||
<Textarea
|
||||
name="description"
|
||||
placeholder="Beschrijving (optioneel, max 2000 tekens)…"
|
||||
disabled={isDemo}
|
||||
maxLength={2000}
|
||||
rows={4}
|
||||
/>
|
||||
{typeof createState?.error === 'string' && (
|
||||
<p className="text-xs text-error">{createState.error}</p>
|
||||
)}
|
||||
|
|
@ -331,6 +340,14 @@ function TodoCard({
|
|||
autoComplete="off"
|
||||
/>
|
||||
</div>
|
||||
<Textarea
|
||||
name="description"
|
||||
defaultValue={activeTodo.description ?? ''}
|
||||
placeholder="Beschrijving (optioneel, max 2000 tekens)…"
|
||||
disabled={isDemo}
|
||||
maxLength={2000}
|
||||
rows={4}
|
||||
/>
|
||||
<label className="flex items-center gap-2 text-sm cursor-pointer w-fit select-none">
|
||||
<input
|
||||
type="checkbox"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue