import { redirect } from "next/navigation"; import { loadProfile } from "@/lib/auth/profile"; import { kannStammdatenPflegen } from "@/lib/auth/roles"; import { listOrte } from "@/lib/auftraege/queries"; import { StandorteTabelle } from "@/components/standorte/StandorteTabelle"; export default async function StandortePage() { const profileResult = await loadProfile(); if (profileResult.status !== "ok" || !kannStammdatenPflegen(profileResult.profile.role)) { redirect(`/auftraege?error=${encodeURIComponent("Nur Disponent/Admin duerfen Stammdaten pflegen.")}`); } const orte = await listOrte(); return (