diff --git a/components/audit/AuditDetail.tsx b/components/audit/AuditDetail.tsx index 815d628..9a66b54 100644 --- a/components/audit/AuditDetail.tsx +++ b/components/audit/AuditDetail.tsx @@ -2,6 +2,7 @@ import Link from "next/link"; import { useState } from "react"; +import { AenderungsTabelle } from "@/components/ui/AenderungsTabelle"; import { SlideOver } from "@/components/ui/SlideOver"; import { actionBadgeStyle } from "@/lib/colors"; import type { AuditChange } from "@/lib/supabase/types"; @@ -33,14 +34,6 @@ const zeitFormat = new Intl.DateTimeFormat("de-AT", { timeZone: "Europe/Vienna", }); -/** Leerer Wert heisst „war nicht gesetzt“ — und das ist eine Aussage. */ -function Wert({ text, art }: { text: string | null; art: "vorher" | "nachher" }) { - if (text === null || text === "") { - return leer; - } - return {text}; -} - export function AuditDetail({ eintrag }: { eintrag: AuditEintrag }) { const [offen, setOffen] = useState(false); const anzahl = eintrag.changes?.length ?? 0; @@ -101,29 +94,8 @@ export function AuditDetail({ eintrag }: { eintrag: AuditEintrag }) {
| Feld | -Vorher | -Nachher | -
|---|---|---|
| {c.feld} | -
- |
-
- |
-
{h.description}
+ + {changes.length > 0 && ( +| Feld | +Vorher | +Nachher | +
|---|---|---|
| {c.feld} | +
+ |
+
+ |
+