TenantAtlas/resources/views/filament/widgets/tenant/tenant-verification-report.blade.php
ahmido 671abbed53 feat: retrofit deferred operator surfaces (#203)
## Summary
- retrofit the tenant detail recent-operations and verification surfaces to keep one clear primary inspect path per state
- keep onboarding workflow actions on the wizard step while moving previous-run and advanced monitoring links into diagnostics-only technical details
- add focused spec 172 design artifacts, feature coverage, and a dedicated browser smoke test for the deferred operator surface retrofit

## Testing
- `vendor/bin/sail artisan test --compact tests/Browser/Spec172DeferredOperatorSurfacesSmokeTest.php tests/Browser/OnboardingDraftRefreshTest.php tests/Browser/OnboardingDraftVerificationResumeTest.php`

## Notes
- base branch: `dev`
- branch head: `172-deferred-operator-surfaces-retrofit`
- browser smoke pack passed locally after the final changes

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #203
2026-04-02 09:22:44 +00:00

123 lines
4.7 KiB
PHP

@php
$run = $run ?? null;
$run = $run instanceof \App\Models\OperationRun ? $run : null;
$runData = $runData ?? null;
$runData = is_array($runData) ? $runData : null;
$runUrl = $runUrl ?? null;
$runUrl = is_string($runUrl) && trim($runUrl) !== '' ? trim($runUrl) : null;
$report = $report ?? null;
$report = is_array($report) ? $report : null;
$isInProgress = (bool) ($isInProgress ?? false);
$showStartAction = (bool) ($showStartAction ?? false);
$canStart = (bool) ($canStart ?? false);
$startTooltip = $startTooltip ?? null;
$startTooltip = is_string($startTooltip) && trim($startTooltip) !== '' ? trim($startTooltip) : null;
$lifecycleNotice = $lifecycleNotice ?? null;
$lifecycleNotice = is_string($lifecycleNotice) && trim($lifecycleNotice) !== '' ? trim($lifecycleNotice) : null;
$rerunHint = $rerunHint ?? null;
$rerunHint = is_string($rerunHint) && trim($rerunHint) !== '' ? trim($rerunHint) : null;
@endphp
<x-filament::section
heading="Verification report"
description="Latest verification state for this tenant (DB-only rendering)."
>
<div class="space-y-4">
@if ($run === null)
<div class="rounded-lg border border-gray-200 bg-white p-4 text-sm text-gray-600 shadow-sm dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300">
No verification operation has been started yet.
</div>
<div class="flex items-center gap-2">
@if ($showStartAction)
@if ($canStart)
<x-filament::button
color="primary"
size="sm"
wire:click="startVerification"
>
Start verification
</x-filament::button>
@else
<div class="flex flex-col gap-1">
<x-filament::button
color="gray"
size="sm"
disabled
:title="$startTooltip"
>
Start verification
</x-filament::button>
@if ($startTooltip)
<div class="text-xs text-gray-500 dark:text-gray-400">
{{ $startTooltip }}
</div>
@endif
</div>
@endif
@elseif ($lifecycleNotice)
<div class="text-xs text-gray-500 dark:text-gray-400">
{{ $lifecycleNotice }}
</div>
@endif
</div>
@elseif ($isInProgress)
<div class="rounded-lg border border-gray-200 bg-white p-4 text-sm text-gray-600 shadow-sm dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300">
Verification is currently in progress. This section reads only stored operation state and does not call external services.
</div>
<div class="flex flex-wrap items-center gap-2">
@if ($runUrl)
<x-filament::button
tag="a"
:href="$runUrl"
color="primary"
size="sm"
>
Open operation
</x-filament::button>
@endif
</div>
@if ($rerunHint || $startTooltip || $lifecycleNotice)
<div class="text-xs text-gray-500 dark:text-gray-400">
{{ $rerunHint ?? $startTooltip ?? $lifecycleNotice }}
</div>
@endif
@else
@include('filament.components.verification-report-viewer', [
'run' => $runData,
'report' => $report,
'redactionNotes' => $redactionNotes ?? [],
])
<div class="flex flex-wrap items-center gap-2">
@if ($runUrl)
<x-filament::button
tag="a"
:href="$runUrl"
color="primary"
size="sm"
>
Open operation
</x-filament::button>
@endif
</div>
@if ($rerunHint || $startTooltip || $lifecycleNotice)
<div class="text-xs text-gray-500 dark:text-gray-400">
{{ $rerunHint ?? $startTooltip ?? $lifecycleNotice }}
</div>
@endif
@endif
</div>
</x-filament::section>