diff --git a/src/Web/autopilot-monitor-web/app/admin/components/OffboardTenantConfirmDialog.tsx b/src/Web/autopilot-monitor-web/app/admin/components/OffboardTenantConfirmDialog.tsx new file mode 100644 index 00000000..8447b4bb --- /dev/null +++ b/src/Web/autopilot-monitor-web/app/admin/components/OffboardTenantConfirmDialog.tsx @@ -0,0 +1,92 @@ +"use client"; + +import { useState } from "react"; + +interface OffboardTenantConfirmDialogProps { + tenantLabel: string; + tenantId: string; + saving: boolean; + onCancel: () => void; + onConfirm: () => void; +} + +/** + * GA confirmation for the irreversible tenant-offboarding cascade. Renders above the tenant + * editor modal (z-[60] vs its z-50). Type-to-confirm ("OFFBOARD") mirrors the tenant-facing + * self-service dialog — a plain OK button is not enough of a guard for a destructive action, + * Global Admin included. + */ +export function OffboardTenantConfirmDialog({ + tenantLabel, + tenantId, + saving, + onCancel, + onConfirm, +}: OffboardTenantConfirmDialogProps) { + const [confirmText, setConfirmText] = useState(""); + const armed = confirmText === "OFFBOARD"; + + return ( +
{tenantLabel}
+{tenantId}
++ This queues the offboarding cascade: the tenant is suspended immediately, + and after a short drain window all of its data is permanently deleted — + sessions, events, rules, admins, and the tenant configuration itself. +
++ Blocks sign-in and tenant auto-activation while the tenant's data stays in + place — this is the durable lock-out lever for abuse cases (offboarding below is + not: it deletes the suspension along with everything else). +