diff --git a/admin-compliance/app/sdk/consent-management/_components/ApiGdprProcessEditor.tsx b/admin-compliance/app/sdk/consent-management/_components/ApiGdprProcessEditor.tsx new file mode 100644 index 0000000..5d63e15 --- /dev/null +++ b/admin-compliance/app/sdk/consent-management/_components/ApiGdprProcessEditor.tsx @@ -0,0 +1,73 @@ +'use client' + +import { useState } from 'react' + +export function ApiGdprProcessEditor({ + process, + saving, + onSave, +}: { + process: { id: string; process_key: string; title: string; description: string; legal_basis: string; retention_days: number; is_active: boolean } + saving: boolean + onSave: (title: string, description: string) => void +}) { + const [title, setTitle] = useState(process.title) + const [description, setDescription] = useState(process.description || '') + const [expanded, setExpanded] = useState(false) + + return ( +
+
+
+
+ {process.legal_basis?.replace('Art. ', '').replace(' DSGVO', '') || '?'} +
+
+

{title}

+

{description || 'Keine Beschreibung'}

+ {process.retention_days && ( + Aufbewahrung: {process.retention_days} Tage + )} +
+
+ +
+ {expanded && ( +
+
+ + setTitle(e.target.value)} + className="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm" + /> +
+
+ +