feat(cleanup): verwijder app/(app)/todos/ en components/todos/ [cmottjvzo000cx3172472cu4g]

This commit is contained in:
Scrum4Me Agent 2026-05-06 11:46:16 +02:00
parent ef3c6b3f50
commit 180513b2e5
3 changed files with 0 additions and 753 deletions

View file

@ -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>
)
}

View file

@ -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&apos;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>
)
}