feat: show destruction summary in org delete modal
Lists what will be deleted: site count with analytics data, member count, active subscription, and notification settings. Replaces the generic warning with specific impact details.
This commit is contained in:
@@ -1345,10 +1345,35 @@ export default function OrganizationSettings() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p className="text-neutral-600 dark:text-neutral-300 mb-6">
|
<p className="text-neutral-600 dark:text-neutral-300 mb-4">
|
||||||
This action cannot be undone. This will permanently delete the organization, all stored files, and remove all members.
|
This action cannot be undone. The following will be permanently deleted:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<ul className="text-sm text-neutral-600 dark:text-neutral-300 mb-6 space-y-1.5 list-none">
|
||||||
|
{typeof subscription?.sites_count === 'number' && subscription.sites_count > 0 && (
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<span className="h-1.5 w-1.5 rounded-full bg-red-500 shrink-0" />
|
||||||
|
{subscription.sites_count} {subscription.sites_count === 1 ? 'site' : 'sites'} and all analytics data
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
{members.length > 1 && (
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<span className="h-1.5 w-1.5 rounded-full bg-red-500 shrink-0" />
|
||||||
|
{members.length - 1} {members.length - 1 === 1 ? 'member' : 'members'} will be removed
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
{subscription?.subscription_status === 'active' && subscription?.plan_id !== 'free' && (
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<span className="h-1.5 w-1.5 rounded-full bg-red-500 shrink-0" />
|
||||||
|
Active subscription will be cancelled
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<span className="h-1.5 w-1.5 rounded-full bg-red-500 shrink-0" />
|
||||||
|
All notifications and settings
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-xs font-medium text-neutral-500 uppercase mb-1">
|
<label className="block text-xs font-medium text-neutral-500 uppercase mb-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user