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" && ( + + )} ); }