Show error feedback when run deletion is blocked

Add optional error prop to DeleteConfirmModal and wire it into AdminRuns
so the backend's rejection message is displayed to the user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 12:07:09 +01:00
parent f0307f0625
commit 924efa9073
2 changed files with 9 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ interface DeleteConfirmModalProps {
onConfirm: () => void
onCancel: () => void
isDeleting?: boolean
error?: string | null
}
export function DeleteConfirmModal({
@@ -12,6 +13,7 @@ export function DeleteConfirmModal({
onConfirm,
onCancel,
isDeleting,
error,
}: DeleteConfirmModalProps) {
return (
<div className="fixed inset-0 z-50 flex items-center justify-center">
@@ -24,6 +26,11 @@ export function DeleteConfirmModal({
<p className="mt-2 text-sm text-gray-600 dark:text-gray-300">
{message}
</p>
{error && (
<p className="mt-2 text-sm text-red-600 dark:text-red-400">
{error}
</p>
)}
</div>
<div className="px-6 py-4 border-t border-gray-200 dark:border-gray-700 flex justify-end gap-3">
<button