feat: DSFA Modul — Backend, Proxy, Frontend-Migration, Tests + Mock-Daten entfernt
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 38s
CI / test-python-backend-compliance (push) Successful in 38s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 19s

- Migration 024: compliance_dsfas + compliance_dsfa_audit_log Tabellen
- dsfa_routes.py: CRUD + stats + audit-log + PATCH status Endpoints
- Proxy: /api/sdk/v1/dsfa/[[...path]] → backend-compliance:8002/api/v1/dsfa
- dsfa/page.tsx: mockDSFAs entfernt → echte API (loadDSFAs, handleCreateDSFA, handleStatusChange, handleDeleteDSFA)
- GeneratorWizard: kontrollierte Inputs + onSubmit-Handler
- reporting/page.tsx: getMockReport() Fallback entfernt → Fehlerstate
- dsr/[requestId]/page.tsx: mockCommunications entfernt → leeres Array (TODO: Backend fehlt)
- 52 neue Tests (680 gesamt, alle grün)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-04 22:41:05 +01:00
parent dc0d38ea40
commit a694b9d9ea
8 changed files with 1199 additions and 182 deletions

View File

@@ -362,82 +362,6 @@ function ActivityTab({ report }: { report: ExecutiveReport }) {
)
}
// =============================================================================
// MOCK DATA (used when backend is unavailable)
// =============================================================================
function getMockReport(): ExecutiveReport {
return {
generatedAt: new Date().toISOString(),
tenantId: 'demo',
complianceScore: 72,
dsgvo: {
processingActivities: 24,
activeProcessings: 18,
tomsImplemented: 31,
tomsPlanned: 7,
tomsTotal: 42,
completionPercent: 74,
openDSRs: 3,
overdueDSRs: 1,
dsfasCompleted: 4,
retentionPolicies: 12,
},
vendors: {
totalVendors: 15,
activeVendors: 12,
byRiskLevel: { LOW: 8, MEDIUM: 4, HIGH: 2, CRITICAL: 1 },
pendingReviews: 3,
expiredContracts: 1,
},
incidents: {
totalIncidents: 7,
openIncidents: 2,
criticalIncidents: 0,
notificationsPending: 0,
avgResolutionHours: 48.5,
},
whistleblower: {
totalReports: 4,
openReports: 1,
overdueAcknowledgments: 0,
overdueFeedbacks: 0,
avgResolutionDays: 21.3,
},
academy: {
totalCourses: 5,
totalEnrollments: 47,
completionRate: 68.5,
overdueCount: 4,
avgCompletionDays: 14.2,
},
riskOverview: {
overallLevel: 'MEDIUM',
moduleRisks: [
{ module: 'DSGVO', level: 'MEDIUM', score: 74, issues: 8 },
{ module: 'Lieferanten', level: 'HIGH', score: 55, issues: 5 },
{ module: 'Vorfaelle', level: 'LOW', score: 85, issues: 2 },
{ module: 'Hinweisgeberschutz', level: 'LOW', score: 90, issues: 1 },
{ module: 'Schulungen', level: 'MEDIUM', score: 68, issues: 4 },
],
openFindings: 12,
criticalFindings: 2,
},
upcomingDeadlines: [
{ module: 'DSGVO', type: 'Betroffenenanfrage', description: 'Auskunftsersuchen Max Mustermann', dueDate: new Date(Date.now() + 2 * 86400000).toISOString(), daysLeft: 2, severity: 'URGENT' },
{ module: 'Lieferanten', type: 'Vertragspruefung', description: 'AWS AVV-Erneuerung', dueDate: new Date(Date.now() + 14 * 86400000).toISOString(), daysLeft: 14, severity: 'WARNING' },
{ module: 'Schulungen', type: 'Pflichtschulung', description: 'DSGVO-Jahresschulung Q1 2026', dueDate: new Date(Date.now() + 30 * 86400000).toISOString(), daysLeft: 30, severity: 'INFO' },
{ module: 'Vorfaelle', type: 'Aufsichtsbehoerde', description: 'Meldung Datenpanne #7 an LfDI', dueDate: new Date(Date.now() - 1 * 86400000).toISOString(), daysLeft: -1, severity: 'OVERDUE' },
],
recentActivity: [
{ timestamp: new Date(Date.now() - 3600000).toISOString(), module: 'Academy', action: 'completed', description: 'IT-Sicherheitsschulung von Anna Mueller abgeschlossen' },
{ timestamp: new Date(Date.now() - 7200000).toISOString(), module: 'Incidents', action: 'created', description: 'Neuer Vorfall: USB-Stick mit Kundendaten verloren' },
{ timestamp: new Date(Date.now() - 86400000).toISOString(), module: 'DSGVO', action: 'updated', description: 'TOM IT-05 (Firewall-Policy) als umgesetzt markiert' },
{ timestamp: new Date(Date.now() - 172800000).toISOString(), module: 'Vendors', action: 'reviewed', description: 'Lieferanten-Assessment: Mailchimp abgeschlossen' },
],
}
}
// =============================================================================
// MAIN COMPONENT
// =============================================================================
@@ -459,8 +383,8 @@ export default function ReportingPage() {
const data = await getExecutiveReport()
if (!cancelled) setReport(data)
} catch (err) {
console.warn('Backend nicht erreichbar, verwende Demo-Daten:', err)
if (!cancelled) setReport(getMockReport())
console.warn('Backend nicht erreichbar:', err)
if (!cancelled) setError(err instanceof Error ? err.message : 'Verbindung zum Backend fehlgeschlagen')
} finally {
if (!cancelled) setLoading(false)
}