Materialänderungslog: Historie-Endpunkt + Admin-Tab
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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user