From 2c9ca3ed3e118c7630b5ca87797c32f887b076e9 Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 4 Sep 2026 09:29:56 +0200 Subject: [PATCH] =?UTF-8?q?Admin-Portal:=20Tab-Men=C3=BC=20statt=20einer?= =?UTF-8?q?=20langen=20Scroll-Seite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01L85hmKbvX7Cqkq47KnQhFt --- frontend/src/pages/AdminPage.tsx | 92 +++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 26 deletions(-) diff --git a/frontend/src/pages/AdminPage.tsx b/frontend/src/pages/AdminPage.tsx index 540b1d2..c00660a 100644 --- a/frontend/src/pages/AdminPage.tsx +++ b/frontend/src/pages/AdminPage.tsx @@ -10,6 +10,16 @@ import { ObjekttypSection } from "./admin/ObjekttypSection"; import { StandortSection } from "./admin/StandortSection"; import { VorlageSection } from "./admin/VorlageSection"; +type Tab = "objekte" | "vorlagen" | "material" | "struktur" | "standorte"; + +const TABS: { key: Tab; label: string }[] = [ + { key: "objekte", label: "Objekte" }, + { key: "vorlagen", label: "Vorlagen" }, + { key: "material", label: "Material" }, + { key: "struktur", label: "Struktur" }, + { key: "standorte", label: "Standorte" }, +]; + /** * Admin-Seite (Stammdaten/Objekt-Anlage), nachgezogen weil das Frontend * bisher nur den Mitarbeiter-Kontrollflow (Sprint 7) abdeckte und @@ -29,6 +39,7 @@ export function AdminPage() { const [materialien, setMaterialien] = useState([]); const [fehler, setFehler] = useState(null); const [laedt, setLaedt] = useState(true); + const [tab, setTab] = useState("objekte"); async function ladeAlles() { const [be, ka, ot, s, v, o, m] = await Promise.all([ @@ -68,32 +79,61 @@ export function AdminPage() {

Administration

{fehler &&
{fehler}
} - - - - - - - v.status === "aktiv")} - standorte={standorte} - materialien={materialien} - onGeaendert={ladeAlles} - onFehler={setFehler} - /> + + + {tab === "objekte" && ( + v.status === "aktiv")} + standorte={standorte} + materialien={materialien} + onGeaendert={ladeAlles} + onFehler={setFehler} + /> + )} + {tab === "vorlagen" && ( + + )} + {tab === "material" && ( + + )} + {tab === "struktur" && ( + <> + + + + + )} + {tab === "standorte" && ( + + )} ); }