feat: Betrieb-Module auf 100% — Buttons verdrahtet, Delete-Flows, tote Links gefixt
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 36s
CI / test-python-backend-compliance (push) Successful in 32s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 17s

- consent-management: ConsentTemplateCreateModal + useRouter für DSR-Navigation
- vendor-compliance: QuickActionCard unterstützt onClick; /vendors/new → Modal, /processing-activities/new → Liste
- incidents: handleDeleteIncident + Löschen-Button im IncidentDetailDrawer
- whistleblower: handleDeleteReport + Löschen-Button im CaseDetailPanel
- escalations: handleDeleteEscalation + Löschen-Button im EscalationDetailDrawer
- notfallplan: ExerciseCreateModal (API-backed) + handleDeleteExercise + Neue-Übung-Button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-03 13:36:21 +01:00
parent b19fc11737
commit 232997deb6
6 changed files with 397 additions and 13 deletions

View File

@@ -607,19 +607,36 @@ function WhistleblowerCreateModal({
function CaseDetailPanel({
report,
onClose,
onUpdated
onUpdated,
onDeleted,
}: {
report: WhistleblowerReport
onClose: () => void
onUpdated: () => void
onDeleted?: () => void
}) {
const [officerName, setOfficerName] = useState(report.assignedTo || '')
const [commentText, setCommentText] = useState('')
const [isSavingOfficer, setIsSavingOfficer] = useState(false)
const [isSavingStatus, setIsSavingStatus] = useState(false)
const [isSendingComment, setIsSendingComment] = useState(false)
const [isDeleting, setIsDeleting] = useState(false)
const [actionError, setActionError] = useState<string | null>(null)
const handleDeleteReport = async () => {
if (!window.confirm(`Meldung "${report.title}" wirklich löschen?`)) return
setIsDeleting(true)
try {
const res = await fetch(`/api/sdk/v1/whistleblower/reports/${report.id}`, { method: 'DELETE' })
if (!res.ok) throw new Error(`Fehler: ${res.status}`)
onDeleted ? onDeleted() : onClose()
} catch (err: unknown) {
setActionError(err instanceof Error ? err.message : 'Löschen fehlgeschlagen.')
} finally {
setIsDeleting(false)
}
}
const categoryInfo = REPORT_CATEGORY_INFO[report.category]
const statusInfo = REPORT_STATUS_INFO[report.status]
@@ -857,6 +874,17 @@ function CaseDetailPanel({
</div>
</div>
)}
{/* Delete */}
<div className="pt-2 border-t border-gray-100">
<button
onClick={handleDeleteReport}
disabled={isDeleting}
className="px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 text-sm transition-colors disabled:opacity-50"
>
{isDeleting ? 'Löschen...' : 'Löschen'}
</button>
</div>
</div>
</div>
</>
@@ -1184,6 +1212,7 @@ export default function WhistleblowerPage() {
report={selectedReport}
onClose={() => setSelectedReport(null)}
onUpdated={() => { setSelectedReport(null); loadData() }}
onDeleted={() => { setSelectedReport(null); loadData() }}
/>
)}
</div>