Implements workspace-scoped managed tenant onboarding wizard (Filament v5 / Livewire v4) with strict RBAC (404/403 semantics), resumable sessions, provider connection selection/creation, verification OperationRun, and optional bootstrap. Removes legacy onboarding entrypoints and adds Pest coverage + spec artifacts (073). ## Summary <!-- Kurz: Was ändert sich und warum? --> ## Spec-Driven Development (SDD) - [ ] Es gibt eine Spec unter `specs/<NNN>-<feature>/` - [ ] Enthaltene Dateien: `plan.md`, `tasks.md`, `spec.md` - [ ] Spec beschreibt Verhalten/Acceptance Criteria (nicht nur Implementation) - [ ] Wenn sich Anforderungen während der Umsetzung geändert haben: Spec/Plan/Tasks wurden aktualisiert ## Implementation - [ ] Implementierung entspricht der Spec - [ ] Edge cases / Fehlerfälle berücksichtigt - [ ] Keine unbeabsichtigten Änderungen außerhalb des Scopes ## Tests - [ ] Tests ergänzt/aktualisiert (Pest/PHPUnit) - [ ] Relevante Tests lokal ausgeführt (`./vendor/bin/sail artisan test` oder `php artisan test`) ## Migration / Config / Ops (falls relevant) - [ ] Migration(en) enthalten und getestet - [ ] Rollback bedacht (rückwärts kompatibel, sichere Migration) - [ ] Neue Env Vars dokumentiert (`.env.example` / Doku) - [ ] Queue/cron/storage Auswirkungen geprüft ## UI (Filament/Livewire) (falls relevant) - [ ] UI-Flows geprüft - [ ] Screenshots/Notizen hinzugefügt ## Notes <!-- Links, Screenshots, Follow-ups, offene Punkte --> Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.fritz.box> Reviewed-on: #88
77 lines
3.4 KiB
PHP
77 lines
3.4 KiB
PHP
<x-filament-panels::page>
|
|
<x-filament::section>
|
|
<div class="flex flex-col gap-4">
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">
|
|
Workspace: <span class="font-medium text-gray-900 dark:text-gray-100">{{ $this->workspace->name }}</span>
|
|
</div>
|
|
|
|
@php
|
|
$tenants = $this->getTenants();
|
|
@endphp
|
|
|
|
@if ($tenants->isEmpty())
|
|
<div class="rounded-md border border-gray-200 bg-gray-50 p-4 text-sm text-gray-700 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-200">
|
|
<div class="font-medium text-gray-900 dark:text-gray-100">No managed tenants yet.</div>
|
|
<div class="mt-1 text-sm text-gray-600 dark:text-gray-300">
|
|
Add a managed tenant to start inventory, drift, backups, and policy management.
|
|
</div>
|
|
|
|
<div class="mt-4 flex flex-col gap-2 sm:flex-row">
|
|
<x-filament::button
|
|
type="button"
|
|
color="primary"
|
|
tag="a"
|
|
href="{{ route('admin.workspace.managed-tenants.onboarding', ['workspace' => $this->workspace->slug ?? $this->workspace->getKey()]) }}"
|
|
>
|
|
Start onboarding
|
|
</x-filament::button>
|
|
|
|
<x-filament::button
|
|
type="button"
|
|
color="gray"
|
|
tag="a"
|
|
href="{{ route('filament.admin.pages.choose-workspace') }}"
|
|
>
|
|
Change workspace
|
|
</x-filament::button>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="flex items-center justify-between gap-3">
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">
|
|
{{ $tenants->count() }} managed tenant{{ $tenants->count() === 1 ? '' : 's' }}
|
|
</div>
|
|
|
|
<x-filament::button
|
|
type="button"
|
|
color="gray"
|
|
wire:click="goToChooseTenant"
|
|
>
|
|
Choose tenant
|
|
</x-filament::button>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
|
@foreach ($tenants as $tenant)
|
|
<div wire:key="tenant-{{ $tenant->id }}" class="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
|
<div class="flex flex-col gap-3">
|
|
<div class="font-medium text-gray-900 dark:text-gray-100">
|
|
{{ $tenant->name }}
|
|
</div>
|
|
|
|
<x-filament::button
|
|
type="button"
|
|
color="primary"
|
|
wire:click="openTenant({{ (int) $tenant->id }})"
|
|
>
|
|
Open
|
|
</x-filament::button>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</x-filament::section>
|
|
</x-filament-panels::page>
|