diff --git a/admin-compliance/app/sdk/audit-checklist/_components/ChecklistItemCard.tsx b/admin-compliance/app/sdk/audit-checklist/_components/ChecklistItemCard.tsx new file mode 100644 index 0000000..6803c73 --- /dev/null +++ b/admin-compliance/app/sdk/audit-checklist/_components/ChecklistItemCard.tsx @@ -0,0 +1,119 @@ +'use client' + +import { useState } from 'react' +import { DisplayChecklistItem, DisplayStatus } from './types' + +interface ChecklistItemCardProps { + item: DisplayChecklistItem + onStatusChange: (status: DisplayStatus) => void + onNotesChange: (notes: string) => void + onAddEvidence: () => void +} + +export function ChecklistItemCard({ + item, + onStatusChange, + onNotesChange, + onAddEvidence, +}: ChecklistItemCardProps) { + const [showNotes, setShowNotes] = useState(false) + + const statusColors = { + compliant: 'bg-green-100 text-green-700 border-green-300', + 'non-compliant': 'bg-red-100 text-red-700 border-red-300', + partial: 'bg-yellow-100 text-yellow-700 border-yellow-300', + 'not-reviewed': 'bg-gray-100 text-gray-500 border-gray-300', + } + + const priorityColors = { + critical: 'bg-red-100 text-red-700', + high: 'bg-orange-100 text-orange-700', + medium: 'bg-yellow-100 text-yellow-700', + low: 'bg-green-100 text-green-700', + } + + return ( +
+
+
+
+ {item.category} + + {item.priority === 'critical' ? 'Kritisch' : + item.priority === 'high' ? 'Hoch' : + item.priority === 'medium' ? 'Mittel' : 'Niedrig'} + + + {item.requirementId} + +
+

{item.question}

+
+ +
+ + {item.notes && ( +
+ {item.notes} +
+ )} + + {item.evidence.length > 0 && ( +
+ Nachweise: + {item.evidence.map(ev => ( + + {ev} + + ))} +
+ )} + + {item.verifiedBy && item.verifiedAt && ( +
+ Geprueft von {item.verifiedBy} am {item.verifiedAt.toLocaleDateString('de-DE')} +
+ )} + +
+ + +
+ + {showNotes && ( +
+