import { Server } from "lucide-react"; import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { adresseMitPort } from "@/components/hosts/Anzeige"; import { GruppenFormular } from "@/components/hosts/GruppenFormular"; import { Breadcrumb } from "@/components/ui/Breadcrumb"; import { Karte } from "@/components/ui/Karte"; import { Leerzustand } from "@/components/ui/Leerzustand"; import { Seitenkopf } from "@/components/ui/Seitenkopf"; import { Statuspunkt } from "@/components/ui/Statuspunkt"; import { Tabelle, TabellenZeile, TabellenZelle } from "@/components/ui/Tabelle"; import { datum } from "@/lib/format"; import { darf } from "@/server/auth/rechte"; import { sitzungErforderlich } from "@/server/auth/sitzungspflicht"; import { gruppeDetail, hostAuswahl } from "@/server/queries/hosts"; export const metadata: Metadata = { title: "Hostgruppe" }; /** Gruppendetail mit Mitgliedern; wer Hosts verwalten darf, bearbeitet hier auch (#008). */ export default async function HostgruppeSeite({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const { benutzer } = await sitzungErforderlich("lesen", `/hostgruppen/${id}`); const gruppe = await gruppeDetail(id); if (!gruppe) notFound(); const verwalten = darf(benutzer.rolle, "hostsVerwalten"); const hosts = verwalten ? await hostAuswahl() : []; const anzahl = gruppe.mitglieder.length; return (
{adresseMitPort(h.adresse, h.port)}