Sprint 8: minimale Admin-Seite (Standort/Objekt-Anlage) im Frontend
CI / backend-tests (push) Successful in 56s
CI / frontend-build (push) Successful in 1m43s

Frontend deckte bisher nur den Mitarbeiter-Kontrollflow ab, Stammdaten
mussten per API/Skript angelegt werden (Test-Deployment-Lücke). /admin
zeigt Standort- und Objekt-Anlage (aus aktiver Vorlage), nur für Rolle
administration sichtbar (/auth/me liefert Rollen an AuthContext).
Bewusst kein Bereich/Kategorie/Material-CRUD - kommt aus Excel-Import.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L85hmKbvX7Cqkq47KnQhFt
This commit is contained in:
2026-09-04 00:33:28 +02:00
co-authored by Claude Sonnet 5
parent 8943e362e1
commit a97886defd
5 changed files with 200 additions and 3 deletions
+7
View File
@@ -3,6 +3,7 @@ import { Link } from "react-router-dom";
import { apiRequest } from "../api/client";
import type { Objekt } from "../api/types";
import { useAuth } from "../auth/AuthContext";
// Prompt 11 Screen 1: Standort/Objekt wählen. QR-/Barcode-Scan (Karte 10) ist
// Roadmap - dieser Screen bietet bewusst schon die Code-Suche als Textfeld an,
@@ -11,6 +12,7 @@ export function ObjektListPage() {
const [objekte, setObjekte] = useState<Objekt[]>([]);
const [suche, setSuche] = useState("");
const [ladefehler, setLadefehler] = useState<string | null>(null);
const { istAdmin } = useAuth();
useEffect(() => {
apiRequest<Objekt[]>("/objekte")
@@ -27,6 +29,11 @@ export function ObjektListPage() {
return (
<main style={{ maxWidth: 480, margin: "0 auto", padding: "1rem" }}>
<h1>Objekte</h1>
{istAdmin && (
<Link to="/admin" style={{ display: "inline-block", marginBottom: "1rem" }}>
Administration
</Link>
)}
<input
placeholder="Suche oder Code scannen…"
value={suche}