feat: ST-101-ST-110 M1 producten, PBI backlog, iconen en PWA manifest
- Product aanmaken/bewerken/archiveren/herstellen (ST-101, ST-103) - SplitPane component met versleepbare splitter en localStorage (ST-104) - PanelNavBar herbruikbaar paneelheader component (ST-105) - PbiList met prioriteitsgroepen, inline aanmaken, filter en verwijderen (ST-106-ST-110) - StoryPanel placeholder rechter paneel met selectie via Zustand (ST-109) - App iconen geinstalleerd: favicon, apple-icon, PWA manifest (192/512px) - AppIcon SVG component in navigatiebar - Root layout metadata bijgewerkt naar Nederlands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8017968e60
commit
ffda65490f
23 changed files with 1229 additions and 26 deletions
|
|
@ -6,24 +6,47 @@ import Link from 'next/link'
|
|||
import { Button } from '@/components/ui/button'
|
||||
import { ProductList } from '@/components/dashboard/product-list'
|
||||
|
||||
export default async function DashboardPage() {
|
||||
interface Props {
|
||||
searchParams: Promise<{ archived?: string }>
|
||||
}
|
||||
|
||||
export default async function DashboardPage({ searchParams }: Props) {
|
||||
const session = await getIronSession<SessionData>(await cookies(), sessionOptions)
|
||||
const { archived } = await searchParams
|
||||
const showArchived = archived === '1'
|
||||
|
||||
const products = await prisma.product.findMany({
|
||||
where: { user_id: session.userId, archived: false },
|
||||
where: { user_id: session.userId, archived: showArchived },
|
||||
orderBy: { created_at: 'desc' },
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="p-6 max-w-4xl mx-auto w-full">
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<h1 className="text-xl font-medium text-foreground">Mijn Producten</h1>
|
||||
{!session.isDemo && (
|
||||
<Button render={<Link href="/products/new" />}>+ Nieuw product</Button>
|
||||
<div className="flex items-center gap-3">
|
||||
<h1 className="text-xl font-medium text-foreground">
|
||||
{showArchived ? 'Gearchiveerde producten' : 'Mijn Producten'}
|
||||
</h1>
|
||||
{showArchived ? (
|
||||
<Link href="/dashboard" className="text-xs text-primary hover:underline">
|
||||
← Actief
|
||||
</Link>
|
||||
) : (
|
||||
<Link href="/dashboard?archived=1" className="text-xs text-muted-foreground hover:text-foreground">
|
||||
Toon gearchiveerd
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
{!session.isDemo && !showArchived && (
|
||||
<Button nativeButton={false} render={<Link href="/products/new" />}>+ Nieuw product</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ProductList products={products} isDemo={session.isDemo ?? false} />
|
||||
<ProductList
|
||||
products={products}
|
||||
isDemo={session.isDemo ?? false}
|
||||
showArchived={showArchived}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue