TenantAtlas/apps/platform/resources/views/admin-consent-callback.blade.php
ahmido 3ec582a182 feat: retire legacy tenant route surfaces (#352)
## Summary
- retire legacy `/admin/t` and active `/admin/tenants` product surfaces in favor of canonical workspace-scoped managed-environment routes
- centralize runtime URL generation through `ManagedEnvironmentLinks` and update intended URL handling to reject legacy tenant paths
- remove dormant tenant panel runtime, rename test helpers to the admin environment context, and add guard coverage for route/helper regressions

## Validation
- targeted Feature guard, workspace, provider connection, required permissions, and Filament test lanes run under Sail
- browser smoke coverage run for provider connection and workspace RBAC environment access flows
- formatting and diff checks completed with Pint and `git diff --check`

## Notes
- Filament remains on v5 with Livewire v4
- provider registration stays in `apps/platform/bootstrap/providers.php`
- retired tenant resource global search is disabled and destructive action confirmation rules remain unchanged

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #352
2026-05-12 23:35:03 +00:00

54 lines
2.4 KiB
PHP

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TenantPilot Admin Consent</title>
<style>
body { font-family: sans-serif; max-width: 640px; margin: 2rem auto; padding: 1.5rem; line-height: 1.6; }
.card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.25rem; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.status { display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.9rem; }
.ok { background: #dcfce7; color: #166534; }
.error { background: #fee2e2; color: #991b1b; }
.warning { background: #fef3c7; color: #92400e; }
a { color: #2563eb; text-decoration: none; }
</style>
</head>
<body>
<div class="card">
<h1>Admin Consent Status</h1>
<p><strong>ManagedEnvironment:</strong> {{ $tenant->name }} ({{ $tenant->graphTenantId() }})</p>
@isset($connection)
<p><strong>Connection:</strong> {{ $connection->connection_type->value === 'platform' ? 'Platform connection' : 'Dedicated connection' }}</p>
<p><strong>Verification state:</strong> {{ $verificationStateLabel ?? ucfirst($connection->verification_status->value) }}</p>
@endisset
<p>
<span class="status {{ $status === 'ok' ? 'ok' : ($status === 'consent_denied' ? 'warning' : 'error') }}">
Status: {{ ucfirst(str_replace('_', ' ', $status)) }}
</span>
</p>
@if($error)
<p><strong>Error:</strong> {{ $error }}</p>
@elseif($consentGranted === false)
<p>Admin consent was not granted. Review the connection state and try again.</p>
@else
<p>Admin consent was granted. Run verification again to confirm operational readiness.</p>
@endif
<p>
@php
$isOnboarding = in_array($tenant->status, [\App\Models\ManagedEnvironment::STATUS_DRAFT, \App\Models\ManagedEnvironment::STATUS_ONBOARDING], true);
$backUrl = $isOnboarding
? route('admin.onboarding')
: \App\Support\ManagedEnvironmentLinks::viewUrl($tenant);
$backLabel = $isOnboarding ? 'Zurück zum Onboarding' : 'Zurück zur ManagedEnvironment-Detailseite';
@endphp
<a href="{{ $backUrl }}">
{{ $backLabel }}
</a>
</p>
</div>
</body>
</html>