Add non-destructive dev seed on startup

This commit is contained in:
t.indorf
2026-05-06 22:31:07 +02:00
parent 9f452fccac
commit b686e714ff
77 changed files with 10862 additions and 87 deletions
+29
View File
@@ -0,0 +1,29 @@
import { UserRole } from "@prisma/client";
import { requireRole } from "@/lib/auth-utils";
import { prisma } from "@/lib/prisma";
import { ErzieherList } from "./_components/erzieher-list";
export const metadata = { title: "ErzieherInnen · Kita-Planer" };
export default async function ErzieherPage() {
const session = await requireRole([UserRole.ADMIN]);
const educators = await prisma.educator.findMany({
where: { kitaId: session.user.kitaId! },
orderBy: [{ lastName: "asc" }, { firstName: "asc" }],
});
return (
<div className="flex h-full flex-col gap-6 p-6">
<div>
<h1 className="text-2xl font-bold tracking-tight">ErzieherInnen-Verwaltung</h1>
<p className="text-muted-foreground">
Verwalte die Stammdaten des Kita-Personals (nur für den Vorstand sichtbar).
</p>
</div>
<ErzieherList educators={educators} />
</div>
);
}