feat: Rechtliche-Texte-Module auf 100% — Dead Code, RAG-Fallback, Fehler-UI
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 33s
CI / test-python-backend-compliance (push) Successful in 35s
CI / test-python-document-crawler (push) Successful in 24s
CI / test-python-dsms-gateway (push) Successful in 18s
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 33s
CI / test-python-backend-compliance (push) Successful in 35s
CI / test-python-document-crawler (push) Successful in 24s
CI / test-python-dsms-gateway (push) Successful in 18s
Paket A: - einwilligungen/page.tsx: mockRecords (80 Zeilen toter Code) entfernt - consent/page.tsx: RAG-Suggest-Button im Create-Dialog (+handleRagSuggest) - workflow/page.tsx: uploadError State + rotes Fehler-Banner statt alert() Paket B: - cookie-banner/page.tsx: mockCategories → DEFAULT_COOKIE_CATEGORIES (Bug-Fix) DB-Kategorien haben jetzt immer Vorrang — kein Mock-Überschreiben mehr - test_einwilligungen_routes.py: +4 TestCookieBannerEmbedCode-Tests (36 gesamt) Paket C: - searchTemplates.ts: neue Hilfsdatei mit zwei-stufiger Suche 1. KLAUSUR_SERVICE (5s Timeout), 2. RAG-Fallback via ai-compliance-sdk - document-generator/page.tsx: ServiceMode State + UI-Badges (rag-only/offline) - searchTemplates.test.ts: 3 Vitest-Tests (KLAUSUR ok / RAG-Fallback / offline) flow-data.ts: alle 5 Rechtliche-Texte-Module auf completion: 100 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -138,245 +138,6 @@ interface ConsentRecord {
|
||||
history: ConsentHistoryEntry[]
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// MOCK DATA WITH HISTORY
|
||||
// =============================================================================
|
||||
|
||||
const mockRecords: ConsentRecord[] = [
|
||||
{
|
||||
id: 'c-1',
|
||||
identifier: 'usr-001',
|
||||
email: 'max.mustermann@example.de',
|
||||
firstName: 'Max',
|
||||
lastName: 'Mustermann',
|
||||
consentType: 'terms',
|
||||
status: 'granted',
|
||||
currentVersion: '2.1',
|
||||
grantedAt: new Date('2024-01-15T10:23:45'),
|
||||
withdrawnAt: null,
|
||||
source: 'Website-Formular',
|
||||
ipAddress: '192.168.1.45',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
|
||||
history: [
|
||||
{
|
||||
id: 'h-1-1',
|
||||
action: 'granted',
|
||||
timestamp: new Date('2023-06-01T14:30:00'),
|
||||
version: '1.0',
|
||||
documentTitle: 'AGB Version 1.0',
|
||||
ipAddress: '192.168.1.42',
|
||||
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0)',
|
||||
source: 'App-Registrierung',
|
||||
},
|
||||
{
|
||||
id: 'h-1-2',
|
||||
action: 'version_update',
|
||||
timestamp: new Date('2023-09-15T09:15:00'),
|
||||
version: '1.5',
|
||||
documentTitle: 'AGB Version 1.5 - DSGVO Update',
|
||||
ipAddress: '192.168.1.43',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)',
|
||||
source: 'E-Mail Bestätigung',
|
||||
notes: 'Nutzer hat neuen AGB nach DSGVO-Anpassung zugestimmt',
|
||||
},
|
||||
{
|
||||
id: 'h-1-3',
|
||||
action: 'version_update',
|
||||
timestamp: new Date('2024-01-15T10:23:45'),
|
||||
version: '2.1',
|
||||
documentTitle: 'AGB Version 2.1 - KI-Klauseln',
|
||||
ipAddress: '192.168.1.45',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
|
||||
source: 'Website-Formular',
|
||||
notes: 'Zustimmung zu neuen KI-Nutzungsbedingungen',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'c-2',
|
||||
identifier: 'usr-001',
|
||||
email: 'max.mustermann@example.de',
|
||||
firstName: 'Max',
|
||||
lastName: 'Mustermann',
|
||||
consentType: 'marketing',
|
||||
status: 'granted',
|
||||
currentVersion: '1.3',
|
||||
grantedAt: new Date('2024-01-15T10:23:45'),
|
||||
withdrawnAt: null,
|
||||
source: 'Website-Formular',
|
||||
ipAddress: '192.168.1.45',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
|
||||
history: [
|
||||
{
|
||||
id: 'h-2-1',
|
||||
action: 'granted',
|
||||
timestamp: new Date('2024-01-15T10:23:45'),
|
||||
version: '1.3',
|
||||
ipAddress: '192.168.1.45',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
|
||||
source: 'Website-Formular',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'c-3',
|
||||
identifier: 'usr-002',
|
||||
email: 'anna.schmidt@example.de',
|
||||
firstName: 'Anna',
|
||||
lastName: 'Schmidt',
|
||||
consentType: 'newsletter',
|
||||
status: 'withdrawn',
|
||||
currentVersion: '1.2',
|
||||
grantedAt: new Date('2023-11-20T16:45:00'),
|
||||
withdrawnAt: new Date('2024-01-10T08:30:00'),
|
||||
source: 'App',
|
||||
ipAddress: '10.0.0.88',
|
||||
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0)',
|
||||
history: [
|
||||
{
|
||||
id: 'h-3-1',
|
||||
action: 'granted',
|
||||
timestamp: new Date('2023-11-20T16:45:00'),
|
||||
version: '1.2',
|
||||
ipAddress: '10.0.0.88',
|
||||
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0)',
|
||||
source: 'App',
|
||||
},
|
||||
{
|
||||
id: 'h-3-2',
|
||||
action: 'withdrawn',
|
||||
timestamp: new Date('2024-01-10T08:30:00'),
|
||||
version: '1.2',
|
||||
ipAddress: '10.0.0.92',
|
||||
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_2)',
|
||||
source: 'Profil-Einstellungen',
|
||||
notes: 'Nutzer hat Newsletter-Abo über Profil deaktiviert',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'c-4',
|
||||
identifier: 'usr-003',
|
||||
email: 'peter.meier@example.de',
|
||||
firstName: 'Peter',
|
||||
lastName: 'Meier',
|
||||
consentType: 'privacy',
|
||||
status: 'granted',
|
||||
currentVersion: '3.0',
|
||||
grantedAt: new Date('2024-01-20T11:00:00'),
|
||||
withdrawnAt: null,
|
||||
source: 'Cookie-Banner',
|
||||
ipAddress: '172.16.0.55',
|
||||
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
|
||||
history: [
|
||||
{
|
||||
id: 'h-4-1',
|
||||
action: 'granted',
|
||||
timestamp: new Date('2023-03-10T09:00:00'),
|
||||
version: '2.0',
|
||||
documentTitle: 'Datenschutzerklärung v2.0',
|
||||
ipAddress: '172.16.0.50',
|
||||
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)',
|
||||
source: 'Registrierung',
|
||||
},
|
||||
{
|
||||
id: 'h-4-2',
|
||||
action: 'version_update',
|
||||
timestamp: new Date('2023-08-01T14:00:00'),
|
||||
version: '2.5',
|
||||
documentTitle: 'Datenschutzerklärung v2.5 - Cookie-Update',
|
||||
ipAddress: '172.16.0.52',
|
||||
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)',
|
||||
source: 'Cookie-Banner',
|
||||
notes: 'Zustimmung nach Cookie-Richtlinien-Update',
|
||||
},
|
||||
{
|
||||
id: 'h-4-3',
|
||||
action: 'version_update',
|
||||
timestamp: new Date('2024-01-20T11:00:00'),
|
||||
version: '3.0',
|
||||
documentTitle: 'Datenschutzerklärung v3.0 - AI Act Compliance',
|
||||
ipAddress: '172.16.0.55',
|
||||
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
|
||||
source: 'Cookie-Banner',
|
||||
notes: 'Neue DSI mit AI Act Transparenzhinweisen',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'c-5',
|
||||
identifier: 'usr-004',
|
||||
email: 'lisa.weber@example.de',
|
||||
firstName: 'Lisa',
|
||||
lastName: 'Weber',
|
||||
consentType: 'analytics',
|
||||
status: 'granted',
|
||||
currentVersion: '1.0',
|
||||
grantedAt: new Date('2024-01-18T13:22:00'),
|
||||
withdrawnAt: null,
|
||||
source: 'Cookie-Banner',
|
||||
ipAddress: '192.168.2.100',
|
||||
userAgent: 'Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36',
|
||||
history: [
|
||||
{
|
||||
id: 'h-5-1',
|
||||
action: 'granted',
|
||||
timestamp: new Date('2024-01-18T13:22:00'),
|
||||
version: '1.0',
|
||||
ipAddress: '192.168.2.100',
|
||||
userAgent: 'Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36',
|
||||
source: 'Cookie-Banner',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'c-6',
|
||||
identifier: 'usr-005',
|
||||
email: 'thomas.klein@example.de',
|
||||
firstName: 'Thomas',
|
||||
lastName: 'Klein',
|
||||
consentType: 'cookies',
|
||||
status: 'granted',
|
||||
currentVersion: '1.8',
|
||||
grantedAt: new Date('2024-01-22T09:15:00'),
|
||||
withdrawnAt: null,
|
||||
source: 'Cookie-Banner',
|
||||
ipAddress: '10.1.0.200',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) Safari/605.1.15',
|
||||
history: [
|
||||
{
|
||||
id: 'h-6-1',
|
||||
action: 'granted',
|
||||
timestamp: new Date('2023-05-10T10:00:00'),
|
||||
version: '1.0',
|
||||
ipAddress: '10.1.0.150',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0)',
|
||||
source: 'Cookie-Banner',
|
||||
},
|
||||
{
|
||||
id: 'h-6-2',
|
||||
action: 'withdrawn',
|
||||
timestamp: new Date('2023-08-20T15:30:00'),
|
||||
version: '1.0',
|
||||
ipAddress: '10.1.0.160',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_0)',
|
||||
source: 'Cookie-Einstellungen',
|
||||
notes: 'Nutzer hat alle Cookies abgelehnt',
|
||||
},
|
||||
{
|
||||
id: 'h-6-3',
|
||||
action: 'renewed',
|
||||
timestamp: new Date('2024-01-22T09:15:00'),
|
||||
version: '1.8',
|
||||
ipAddress: '10.1.0.200',
|
||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) Safari/605.1.15',
|
||||
source: 'Cookie-Banner',
|
||||
notes: 'Nutzer hat Cookies nach Banner-Redesign erneut akzeptiert',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
// =============================================================================
|
||||
// HELPER FUNCTIONS
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user