Materialänderungslog: Historie-Endpunkt + Admin-Tab
CI / backend-tests (push) Successful in 1m11s
CI / frontend-build (push) Successful in 25s

historie-Tabelle (append-only Audit-Trail über Kontrolle/Fehlbestand/
Nachfüllung/Mindermenge) war bisher nur intern befüllt, ohne API/UI. Neu:
GET /api/v1/historie (gefiltert nach Typ/ID/Benutzer/Zeitraum, paginiert,
Benutzername aufgelöst), Admin-Portal-Tab "Änderungslog" mit Typ-Filter.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVgbozhYmuEhiEJHffRXCV
This commit is contained in:
2026-09-04 19:54:01 +02:00
co-authored by Claude Sonnet 5
parent d7c3e52002
commit e949b5e9ac
10 changed files with 322 additions and 1 deletions
+4 -1
View File
@@ -5,6 +5,7 @@ import type { Benutzer, Bereich, Beladungsvorlage, Fach, Kategorie, Material, Ob
import { BenutzerSection } from "./admin/BenutzerSection";
import { BereichSection } from "./admin/BereichSection";
import { FachSection } from "./admin/FachSection";
import { HistorieSection } from "./admin/HistorieSection";
import { KategorieSection } from "./admin/KategorieSection";
import { MaterialSection } from "./admin/MaterialSection";
import { ObjektSection } from "./admin/ObjektSection";
@@ -12,7 +13,7 @@ import { ObjekttypSection } from "./admin/ObjekttypSection";
import { StandortSection } from "./admin/StandortSection";
import { VorlageSection } from "./admin/VorlageSection";
type Tab = "objekte" | "vorlagen" | "material" | "struktur" | "standorte" | "benutzer";
type Tab = "objekte" | "vorlagen" | "material" | "struktur" | "standorte" | "benutzer" | "historie";
const TABS: { key: Tab; label: string }[] = [
{ key: "objekte", label: "Objekte" },
@@ -21,6 +22,7 @@ const TABS: { key: Tab; label: string }[] = [
{ key: "struktur", label: "Struktur" },
{ key: "standorte", label: "Standorte" },
{ key: "benutzer", label: "Benutzer" },
{ key: "historie", label: "Änderungslog" },
];
/**
@@ -153,6 +155,7 @@ export function AdminPage() {
{tab === "benutzer" && (
<BenutzerSection benutzer={benutzer} onGeaendert={ladeAlles} onFehler={setFehler} />
)}
{tab === "historie" && <HistorieSection onFehler={setFehler} />}
</main>
);
}