ST-1241: Verwijder frontend todo-UI (page, component, navbar en marketing page) (#133)
* feat(cleanup): verwijder Todo's navlink en todo-referenties uit marketing page [cmotto5ia000nx3178lq6xk8d] - nav-bar.tsx: Todo's navLink verwijderd; Ideas-link blijft staan - app/page.tsx: /todos quick-access link, feature-entry en /api/todos API-doc verwijderd Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(cleanup): verwijder app/(app)/todos/ en components/todos/ [cmottjvzo000cx3172472cu4g] --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
11937d8a8d
commit
628fbd7e7b
5 changed files with 0 additions and 765 deletions
|
|
@ -1,19 +0,0 @@
|
|||
export default function Loading() {
|
||||
return (
|
||||
<div className="p-6 max-w-2xl mx-auto w-full animate-pulse">
|
||||
<div className="h-6 w-20 bg-border rounded mb-6" />
|
||||
<div className="flex gap-3 mb-4">
|
||||
<div className="h-8 w-32 bg-border/50 rounded-lg" />
|
||||
<div className="flex-1" />
|
||||
<div className="h-8 w-8 bg-border/50 rounded-lg" />
|
||||
</div>
|
||||
<div className="rounded-xl border border-border overflow-hidden">
|
||||
<div className="h-10 bg-border/30" />
|
||||
{[1, 2, 3, 4, 5].map(i => (
|
||||
<div key={i} className="h-12 border-t border-border bg-border/20" />
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-4 h-24 bg-border/30 rounded-xl" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
import { cookies } from 'next/headers'
|
||||
import { getIronSession } from 'iron-session'
|
||||
import { SessionData, sessionOptions } from '@/lib/session'
|
||||
import { prisma } from '@/lib/prisma'
|
||||
import { productAccessFilter } from '@/lib/product-access'
|
||||
import { TodoList } from '@/components/todos/todo-list'
|
||||
|
||||
export default async function TodosPage() {
|
||||
const session = await getIronSession<SessionData>(await cookies(), sessionOptions)
|
||||
|
||||
const todos = await prisma.todo.findMany({
|
||||
where: { user_id: session.userId, archived: false },
|
||||
orderBy: { created_at: 'asc' },
|
||||
include: { product: { select: { name: true } } },
|
||||
})
|
||||
|
||||
const products = await prisma.product.findMany({
|
||||
where: { ...productAccessFilter(session.userId), archived: false },
|
||||
orderBy: { name: 'asc' },
|
||||
include: {
|
||||
pbis: { orderBy: [{ priority: 'asc' }, { sort_order: 'asc' }], select: { id: true, title: true } },
|
||||
},
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="p-6 max-w-2xl mx-auto w-full">
|
||||
<h1 className="text-xl font-medium text-foreground mb-6">Todo's</h1>
|
||||
<TodoList
|
||||
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,
|
||||
product_name: t.product?.name ?? null,
|
||||
}))}
|
||||
products={products.map(p => ({
|
||||
id: p.id,
|
||||
name: p.name,
|
||||
pbis: p.pbis,
|
||||
}))}
|
||||
isDemo={session.isDemo ?? false}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue