'use client' import React, { useState } from 'react' import { useSDK } from '@/lib/sdk' import { StepHeader, STEP_EXPLANATIONS } from '@/components/sdk/StepHeader' // ============================================================================= // TYPES // ============================================================================= interface Escalation { id: string title: string description: string type: 'data-breach' | 'dsr-overdue' | 'audit-finding' | 'compliance-gap' | 'security-incident' severity: 'critical' | 'high' | 'medium' | 'low' status: 'open' | 'in-progress' | 'resolved' | 'escalated' createdAt: Date deadline: Date | null assignedTo: string escalatedTo: string | null relatedItems: string[] actions: EscalationAction[] } interface EscalationAction { id: string action: string performedBy: string performedAt: Date } // ============================================================================= // MOCK DATA // ============================================================================= const mockEscalations: Escalation[] = [ { id: 'esc-001', title: 'Potenzielle Datenpanne - Kundendaten', description: 'Unberechtigter Zugriff auf Kundendatenbank festgestellt', type: 'data-breach', severity: 'critical', status: 'escalated', createdAt: new Date('2024-01-22'), deadline: new Date('2024-01-25'), assignedTo: 'IT Security', escalatedTo: 'CISO', relatedItems: ['INC-2024-001'], actions: [ { id: 'a1', action: 'Incident erkannt und gemeldet', performedBy: 'SOC Team', performedAt: new Date('2024-01-22T08:00:00') }, { id: 'a2', action: 'An CISO eskaliert', performedBy: 'IT Security', performedAt: new Date('2024-01-22T09:30:00') }, ], }, { id: 'esc-002', title: 'DSR-Anfrage ueberfaellig', description: 'Auskunftsanfrage von Max Mustermann ueberschreitet 30-Tage-Frist', type: 'dsr-overdue', severity: 'high', status: 'in-progress', createdAt: new Date('2024-01-20'), deadline: new Date('2024-01-23'), assignedTo: 'DSB Mueller', escalatedTo: null, relatedItems: ['DSR-001'], actions: [ { id: 'a1', action: 'Automatische Eskalation bei Fristueberschreitung', performedBy: 'System', performedAt: new Date('2024-01-20') }, ], }, { id: 'esc-003', title: 'Kritische Audit-Feststellung', description: 'Fehlende Auftragsverarbeitungsvertraege mit Cloud-Providern', type: 'audit-finding', severity: 'high', status: 'in-progress', createdAt: new Date('2024-01-15'), deadline: new Date('2024-02-15'), assignedTo: 'Rechtsabteilung', escalatedTo: null, relatedItems: ['AUDIT-2024-Q1-003'], actions: [ { id: 'a1', action: 'Feststellung dokumentiert', performedBy: 'Auditor', performedAt: new Date('2024-01-15') }, { id: 'a2', action: 'An Rechtsabteilung zugewiesen', performedBy: 'DSB Mueller', performedAt: new Date('2024-01-16') }, ], }, { id: 'esc-004', title: 'AI Act Compliance-Luecke', description: 'Hochrisiko-KI-System ohne Risikomanagementsystem', type: 'compliance-gap', severity: 'high', status: 'open', createdAt: new Date('2024-01-18'), deadline: new Date('2024-03-01'), assignedTo: 'KI-Compliance Team', escalatedTo: null, relatedItems: ['AI-SYS-002'], actions: [], }, { id: 'esc-005', title: 'Sicherheitsluecke in Anwendung', description: 'Kritische CVE in verwendeter Bibliothek entdeckt', type: 'security-incident', severity: 'medium', status: 'resolved', createdAt: new Date('2024-01-10'), deadline: new Date('2024-01-17'), assignedTo: 'Entwicklung', escalatedTo: null, relatedItems: ['CVE-2024-12345'], actions: [ { id: 'a1', action: 'CVE identifiziert', performedBy: 'Security Scanner', performedAt: new Date('2024-01-10') }, { id: 'a2', action: 'Patch entwickelt', performedBy: 'Entwicklung', performedAt: new Date('2024-01-12') }, { id: 'a3', action: 'Patch deployed', performedBy: 'DevOps', performedAt: new Date('2024-01-13') }, { id: 'a4', action: 'Eskalation geschlossen', performedBy: 'IT Security', performedAt: new Date('2024-01-14') }, ], }, ] // ============================================================================= // COMPONENTS // ============================================================================= function EscalationCard({ escalation }: { escalation: Escalation }) { const [expanded, setExpanded] = useState(false) const typeLabels = { 'data-breach': 'Datenpanne', 'dsr-overdue': 'DSR ueberfaellig', 'audit-finding': 'Audit-Feststellung', 'compliance-gap': 'Compliance-Luecke', 'security-incident': 'Sicherheitsvorfall', } const typeColors = { 'data-breach': 'bg-red-100 text-red-700', 'dsr-overdue': 'bg-orange-100 text-orange-700', 'audit-finding': 'bg-yellow-100 text-yellow-700', 'compliance-gap': 'bg-purple-100 text-purple-700', 'security-incident': 'bg-blue-100 text-blue-700', } const severityColors = { critical: 'bg-red-500 text-white', high: 'bg-orange-500 text-white', medium: 'bg-yellow-500 text-white', low: 'bg-green-500 text-white', } const statusColors = { open: 'bg-blue-100 text-blue-700', 'in-progress': 'bg-yellow-100 text-yellow-700', resolved: 'bg-green-100 text-green-700', escalated: 'bg-red-100 text-red-700', } const statusLabels = { open: 'Offen', 'in-progress': 'In Bearbeitung', resolved: 'Geloest', escalated: 'Eskaliert', } return (
{escalation.description}
{action.action}
{action.performedBy} - {action.performedAt.toLocaleString('de-DE')}
Priorisieren Sie diese Vorfaelle zur Vermeidung von Schaeden.
Passen Sie den Filter an.