diff --git a/admin-compliance/app/(sdk)/sdk/ai-act/page.tsx b/admin-compliance/app/(sdk)/sdk/ai-act/page.tsx index 4ca76bb..df43284 100644 --- a/admin-compliance/app/(sdk)/sdk/ai-act/page.tsx +++ b/admin-compliance/app/(sdk)/sdk/ai-act/page.tsx @@ -18,13 +18,14 @@ interface AISystem { status: 'draft' | 'classified' | 'compliant' | 'non-compliant' obligations: string[] assessmentDate: Date | null + assessmentResult: Record | null } // ============================================================================= -// MOCK DATA +// INITIAL DATA // ============================================================================= -const mockAISystems: AISystem[] = [ +const initialSystems: AISystem[] = [ { id: 'ai-1', name: 'Kundenservice Chatbot', @@ -35,6 +36,7 @@ const mockAISystems: AISystem[] = [ status: 'classified', obligations: ['Transparenzpflicht', 'Kennzeichnung als KI-System'], assessmentDate: new Date('2024-01-15'), + assessmentResult: null, }, { id: 'ai-2', @@ -46,6 +48,7 @@ const mockAISystems: AISystem[] = [ status: 'non-compliant', obligations: ['Risikomanagementsystem', 'Datenlenkung', 'Technische Dokumentation', 'Menschliche Aufsicht', 'Transparenz'], assessmentDate: new Date('2024-01-10'), + assessmentResult: null, }, { id: 'ai-3', @@ -57,17 +60,7 @@ const mockAISystems: AISystem[] = [ status: 'compliant', obligations: [], assessmentDate: new Date('2024-01-05'), - }, - { - id: 'ai-4', - name: 'Neue KI-Anwendung', - description: 'Noch nicht klassifiziertes System', - classification: 'unclassified', - purpose: 'In Evaluierung', - sector: 'Unbestimmt', - status: 'draft', - obligations: [], - assessmentDate: null, + assessmentResult: null, }, ] @@ -107,7 +100,113 @@ function RiskPyramid({ systems }: { systems: AISystem[] }) { ) } -function AISystemCard({ system }: { system: AISystem }) { +function AddSystemForm({ + onSubmit, + onCancel, +}: { + onSubmit: (system: Omit) => void + onCancel: () => void +}) { + const [formData, setFormData] = useState({ + name: '', + description: '', + purpose: '', + sector: '', + classification: 'unclassified' as AISystem['classification'], + status: 'draft' as AISystem['status'], + obligations: [] as string[], + }) + + return ( +
+

Neues KI-System registrieren

+
+
+ + setFormData({ ...formData, name: e.target.value })} + placeholder="z.B. Dokumenten-Scanner" + className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent" + /> +
+
+ +