import { notFound } from "next/navigation"; import { prisma } from "@/lib/prisma"; import ProjectDetailClient from "./ProjectDetailClient"; export const dynamic = "force-dynamic"; export default async function AdminProjectDetailPage({ params, }: { params: Promise<{ id: string }>; }) { const { id } = await params; const project = await prisma.project.findUnique({ where: { id }, include: { assemblies: { orderBy: { code: "asc" }, include: { _count: { select: { parts: true } } }, }, _count: { select: { fasteners: true, purchaseOrders: true } }, }, }); if (!project) notFound(); return ( ({ id: a.id, code: a.code, name: a.name, qty: a.qty, notes: a.notes, partCount: a._count.parts, }))} /> ); }