'use client' import React, { useState } from 'react' import { useSDK } from '@/lib/sdk' import { StepHeader, STEP_EXPLANATIONS } from '@/components/sdk/StepHeader' // ============================================================================= // TYPES // ============================================================================= interface LegalDocument { id: string type: 'privacy-policy' | 'terms' | 'cookie-policy' | 'imprint' | 'dpa' name: string version: string language: string status: 'draft' | 'active' | 'archived' lastUpdated: Date publishedAt: Date | null author: string changes: string[] } // ============================================================================= // MOCK DATA // ============================================================================= const mockDocuments: LegalDocument[] = [ { id: 'doc-1', type: 'privacy-policy', name: 'Datenschutzerklaerung', version: '2.3', language: 'de', status: 'active', lastUpdated: new Date('2024-01-15'), publishedAt: new Date('2024-01-15'), author: 'DSB Mueller', changes: ['KI-Verarbeitungen ergaenzt', 'Cookie-Abschnitt aktualisiert'], }, { id: 'doc-2', type: 'terms', name: 'Allgemeine Geschaeftsbedingungen', version: '1.8', language: 'de', status: 'active', lastUpdated: new Date('2023-12-01'), publishedAt: new Date('2023-12-01'), author: 'Rechtsabteilung', changes: ['Widerrufsrecht angepasst'], }, { id: 'doc-3', type: 'cookie-policy', name: 'Cookie-Richtlinie', version: '1.5', language: 'de', status: 'active', lastUpdated: new Date('2024-01-10'), publishedAt: new Date('2024-01-10'), author: 'DSB Mueller', changes: ['Analytics-Cookies aktualisiert', 'Neue Cookie-Kategorien'], }, { id: 'doc-4', type: 'privacy-policy', name: 'Privacy Policy (EN)', version: '2.3', language: 'en', status: 'draft', lastUpdated: new Date('2024-01-20'), publishedAt: null, author: 'DSB Mueller', changes: ['Uebersetzung der deutschen Version'], }, { id: 'doc-5', type: 'dpa', name: 'Auftragsverarbeitungsvertrag (AVV)', version: '1.2', language: 'de', status: 'active', lastUpdated: new Date('2024-01-05'), publishedAt: new Date('2024-01-05'), author: 'Rechtsabteilung', changes: ['Subunternehmer aktualisiert', 'TOMs ergaenzt'], }, { id: 'doc-6', type: 'imprint', name: 'Impressum', version: '1.1', language: 'de', status: 'active', lastUpdated: new Date('2023-11-01'), publishedAt: new Date('2023-11-01'), author: 'Admin', changes: ['Neue Geschaeftsadresse'], }, ] // ============================================================================= // COMPONENTS // ============================================================================= function DocumentCard({ document }: { document: LegalDocument }) { const typeColors = { 'privacy-policy': 'bg-blue-100 text-blue-700', terms: 'bg-green-100 text-green-700', 'cookie-policy': 'bg-yellow-100 text-yellow-700', imprint: 'bg-gray-100 text-gray-700', dpa: 'bg-purple-100 text-purple-700', } const typeLabels = { 'privacy-policy': 'Datenschutz', terms: 'AGB', 'cookie-policy': 'Cookie-Richtlinie', imprint: 'Impressum', dpa: 'AVV', } const statusColors = { draft: 'bg-yellow-100 text-yellow-700', active: 'bg-green-100 text-green-700', archived: 'bg-gray-100 text-gray-500', } const statusLabels = { draft: 'Entwurf', active: 'Aktiv', archived: 'Archiviert', } return (
Passen Sie den Filter an oder erstellen Sie ein neues Dokument.