From 5ff65b3402b12f6793d1449f397046081273eec2 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 28 Apr 2026 00:43:34 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Consent=20Migration=20Phasen=203-6=20?= =?UTF-8?q?=E2=80=94=20Cookie=20Banner,=20Deadlines,=20Public=20DSR,=20Int?= =?UTF-8?q?egrations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3 (Cookie Banner): Backend + Frontend existierten bereits — keine Aenderungen noetig. Phase 4 (Deadlines): DeadlineTab mit Fristen-Timeline (30 Tage, 4 Erinnerungen, Auto-Sperrung). Backend-Cron in Production via Core. Phase 5 (Public DSR): PublicFormConfig im DSR Settings-Tab — konfigurierbare Anfragetypen, Identitaetspflicht, Embed-Code. Phase 6 (Integrations): IntegrationStubs fuer Matrix, Jitsi, OAuth, 2FA, Notifications — vorbereitet fuer Core-Service-Anbindung. Consent Management: 2 neue Tabs (Fristen, Integrationen). DSR: Settings-Tab mit Public Form statt Platzhalter. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../_components/DeadlineTab.tsx | 90 +++++++++++++++++ .../_components/IntegrationStubs.tsx | 72 ++++++++++++++ .../app/sdk/consent-management/_types.ts | 2 +- .../app/sdk/consent-management/page.tsx | 8 ++ .../app/sdk/dsr/_components/DSRBanners.tsx | 23 ++--- .../sdk/dsr/_components/PublicFormConfig.tsx | 97 +++++++++++++++++++ 6 files changed, 280 insertions(+), 12 deletions(-) create mode 100644 admin-compliance/app/sdk/consent-management/_components/DeadlineTab.tsx create mode 100644 admin-compliance/app/sdk/consent-management/_components/IntegrationStubs.tsx create mode 100644 admin-compliance/app/sdk/dsr/_components/PublicFormConfig.tsx diff --git a/admin-compliance/app/sdk/consent-management/_components/DeadlineTab.tsx b/admin-compliance/app/sdk/consent-management/_components/DeadlineTab.tsx new file mode 100644 index 0000000..6f3a07f --- /dev/null +++ b/admin-compliance/app/sdk/consent-management/_components/DeadlineTab.tsx @@ -0,0 +1,90 @@ +'use client' + +import Link from 'next/link' + +interface DeadlineConfig { + gracePeriodDays: number + reminderDays: number[] + suspendOnExpiry: boolean +} + +export function DeadlineTab() { + // Phase 4: Deadline management — backend service pending (Core integration) + const config: DeadlineConfig = { + gracePeriodDays: 30, + reminderDays: [28, 21, 14, 7], + suspendOnExpiry: true, + } + + return ( +
+
+

Fristen & Erinnerungen

+ In Vorbereitung +
+ +
+ Das Fristen-System wird automatisch Erinnerungen an Nutzer senden, die neue Pflichtdokumente + noch nicht akzeptiert haben. Nach Ablauf der Frist wird der Account gesperrt bis die Zustimmung erfolgt. + Die E-Mail-Zustellung wird ueber den Core-Service in Production bereitgestellt. +
+ +
+
+

Nachfrist

+

{config.gracePeriodDays} Tage

+

Nach Veroeffentlichung eines Pflichtdokuments

+
+
+

Erinnerungen

+

{config.reminderDays.length}x

+

+ Tag {config.reminderDays.join(', ')} nach Veroeffentlichung +

+
+
+

Auto-Sperrung

+

{config.suspendOnExpiry ? 'Aktiv' : 'Inaktiv'}

+

Account wird nach Fristablauf gesperrt

+
+
+ +
+

Erinnerungs-Timeline

+
+ {Array.from({ length: 30 }, (_, i) => { + const day = 30 - i + const isReminder = config.reminderDays.includes(day) + const isDeadline = day === 0 + return ( +
+
+ {isReminder && ( + + Tag {day} + + )} +
+ ) + })} +
+
+
+ Veroeffentlichung + Sperrung +
+
+ +
+ + E-Mail-Templates konfigurieren → + + + Betroffenenrechte verwalten → + +
+
+ ) +} diff --git a/admin-compliance/app/sdk/consent-management/_components/IntegrationStubs.tsx b/admin-compliance/app/sdk/consent-management/_components/IntegrationStubs.tsx new file mode 100644 index 0000000..b4b3ad4 --- /dev/null +++ b/admin-compliance/app/sdk/consent-management/_components/IntegrationStubs.tsx @@ -0,0 +1,72 @@ +'use client' + +const INTEGRATIONS = [ + { + id: 'matrix', + name: 'Matrix Kommunikation', + description: 'Sichere, verschluesselte Kommunikation mit Betroffenen ueber Matrix-Protokoll. Wird in Production ueber den Core Communication Service bereitgestellt.', + status: 'planned', + icon: '💬', + }, + { + id: 'jitsi', + name: 'Jitsi Video-Meetings', + description: 'DSGVO-konforme Video-Konsultationen mit Betroffenen fuer komplexe Datenschutzanfragen. Wird ueber den Core Jitsi Service bereitgestellt.', + status: 'planned', + icon: '📹', + }, + { + id: 'oauth', + name: 'OAuth 2.0 Client-Verwaltung', + description: 'Verwaltung von OAuth-Clients fuer API-Zugriff auf Consent-Endpunkte. Authorization Code Flow mit PKCE-Support.', + status: 'planned', + icon: '🔑', + }, + { + id: '2fa', + name: 'Zwei-Faktor-Authentifizierung', + description: 'TOTP-basierte Zwei-Faktor-Authentifizierung fuer Admin-Zugang. Recovery-Codes fuer Notfallzugriff.', + status: 'planned', + icon: '🛡️', + }, + { + id: 'notifications', + name: 'Benachrichtigungssystem', + description: 'In-App und E-Mail Benachrichtigungen fuer Consent-Aenderungen, DSR-Fristen und Dokument-Updates. Praeferenz-Verwaltung pro Nutzer.', + status: 'planned', + icon: '🔔', + }, +] + +export function IntegrationStubs() { + return ( +
+
+

Integrationen

+ Production-Anbindung +
+ +

+ Diese Dienste werden in Production ueber die Core-Services bereitgestellt und sind + im SDK vorbereitet. +

+ +
+ {INTEGRATIONS.map(integration => ( +
+
+ {integration.icon} +
+
+

{integration.name}

+ Geplant +
+

{integration.description}

+
+
+
+ ))} +
+
+ ) +} diff --git a/admin-compliance/app/sdk/consent-management/_types.ts b/admin-compliance/app/sdk/consent-management/_types.ts index 97eb576..d372239 100644 --- a/admin-compliance/app/sdk/consent-management/_types.ts +++ b/admin-compliance/app/sdk/consent-management/_types.ts @@ -1,6 +1,6 @@ export const API_BASE = '/api/admin/consent' -export type Tab = 'documents' | 'versions' | 'emails' | 'gdpr' | 'stats' +export type Tab = 'documents' | 'versions' | 'emails' | 'gdpr' | 'stats' | 'deadlines' | 'integrations' export interface Document { id: string diff --git a/admin-compliance/app/sdk/consent-management/page.tsx b/admin-compliance/app/sdk/consent-management/page.tsx index 6ab3e02..1446aef 100644 --- a/admin-compliance/app/sdk/consent-management/page.tsx +++ b/admin-compliance/app/sdk/consent-management/page.tsx @@ -25,6 +25,8 @@ import { GdprTab } from './_components/GdprTab' import { StatsTab } from './_components/StatsTab' import { ConsentTemplateCreateModal } from './_components/ConsentTemplateCreateModal' import { EmailTemplateEditModal, EmailTemplatePreviewModal } from './_components/EmailTemplateModals' +import { DeadlineTab } from './_components/DeadlineTab' +import { IntegrationStubs } from './_components/IntegrationStubs' export default function ConsentManagementPage() { const { state } = useSDK() @@ -55,6 +57,8 @@ export default function ConsentManagementPage() { { id: 'emails', label: 'E-Mail Vorlagen' }, { id: 'gdpr', label: 'DSGVO Prozesse' }, { id: 'stats', label: 'Statistiken' }, + { id: 'deadlines', label: 'Fristen' }, + { id: 'integrations', label: 'Integrationen' }, ] return ( @@ -162,6 +166,10 @@ export default function ConsentManagementPage() { )} {activeTab === 'stats' && } + + {activeTab === 'deadlines' && } + + {activeTab === 'integrations' && }
diff --git a/admin-compliance/app/sdk/dsr/_components/DSRBanners.tsx b/admin-compliance/app/sdk/dsr/_components/DSRBanners.tsx index df734c0..e9d7aca 100644 --- a/admin-compliance/app/sdk/dsr/_components/DSRBanners.tsx +++ b/admin-compliance/app/sdk/dsr/_components/DSRBanners.tsx @@ -13,20 +13,21 @@ export function LoadingSpinner() { ) } +export { PublicFormConfig as SettingsTabContent } from './PublicFormConfig' + export function SettingsTab() { return ( -
-
- - - - +
+
+ +
+
+

Workflow-Konfiguration

+

+ SLA-Fristen, automatische Zuweisungen und Eskalationsregeln + werden in Production ueber den Core-Service konfiguriert. +

-

Einstellungen

-

- DSR-Portal-Einstellungen, E-Mail-Vorlagen und Workflow-Konfiguration - werden in einer spaeteren Version verfuegbar sein. -

) } diff --git a/admin-compliance/app/sdk/dsr/_components/PublicFormConfig.tsx b/admin-compliance/app/sdk/dsr/_components/PublicFormConfig.tsx new file mode 100644 index 0000000..ab19279 --- /dev/null +++ b/admin-compliance/app/sdk/dsr/_components/PublicFormConfig.tsx @@ -0,0 +1,97 @@ +'use client' + +import { useState } from 'react' + +interface PublicFormSettings { + enabled: boolean + formUrl: string + allowedTypes: string[] + requireIdentity: boolean + customCss: string +} + +const DSR_TYPES = [ + { value: 'access', label: 'Auskunft (Art. 15)' }, + { value: 'rectification', label: 'Berichtigung (Art. 16)' }, + { value: 'erasure', label: 'Loeschung (Art. 17)' }, + { value: 'restriction', label: 'Einschraenkung (Art. 18)' }, + { value: 'portability', label: 'Datenportabilitaet (Art. 20)' }, + { value: 'objection', label: 'Widerspruch (Art. 21)' }, +] + +export function PublicFormConfig() { + const [settings, setSettings] = useState({ + enabled: false, + formUrl: '', + allowedTypes: ['access', 'erasure', 'portability'], + requireIdentity: true, + customCss: '', + }) + + return ( +
+
+

Oeffentliches DSR-Formular

+ +
+ + {!settings.enabled ? ( +
+ Das oeffentliche DSR-Formular ermoeglicht Betroffenen, Datenschutzanfragen direkt + ueber Ihre Website einzureichen — ohne Anmeldung. Aktivieren Sie es, um den + Embed-Code zu generieren. +
+ ) : ( +
+
+ +
+ {DSR_TYPES.map(type => ( + + ))} +
+
+ + + +
+

Embed-Code

+
+{``}
+            
+

+ Embed-Code wird nach Anbindung an Production generiert. +

+
+
+ )} +
+ ) +}