## Summary - introduce a shared operator outcome taxonomy with semantic axes, severity bands, and next-action policy - apply the taxonomy to operations, evidence/review completeness, baseline semantics, and restore semantics - harden badge rendering, tenant-safe filtering/search behavior, and operator-facing summary/notification wording - add the spec kit artifacts, reference documentation, and regression coverage for diagnostic-vs-primary state handling ## Testing - focused Pest coverage for taxonomy registry and badge guardrails - operations presentation and notification tests - evidence, baseline, restore, and tenant-scope regression tests ## Notes - Livewire v4.0+ compliance is preserved in the existing Filament v5 stack - panel provider registration remains unchanged in bootstrap/providers.php - no new globally searchable resource was added; adopted resources remain tenant-safe and out of global search where required - no new destructive action family was introduced; existing actions keep their current authorization and confirmation behavior - no new frontend asset strategy was introduced; existing deploy flow with filament:assets remains unchanged Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #186
57 lines
3.1 KiB
PHP
57 lines
3.1 KiB
PHP
@php
|
|
use App\Support\Badges\BadgeDomain;
|
|
use App\Support\Badges\BadgeRenderer;
|
|
@endphp
|
|
|
|
<x-filament-panels::page>
|
|
<div class="space-y-6">
|
|
@if ($rows === [])
|
|
<div class="rounded-xl border border-dashed border-gray-300 bg-white p-8 text-center shadow-sm">
|
|
<h2 class="text-lg font-semibold text-gray-950">No evidence snapshots in this scope</h2>
|
|
<p class="mt-2 text-sm text-gray-600">Adjust filters or create a tenant snapshot to populate the workspace overview.</p>
|
|
<div class="mt-4">
|
|
<a href="{{ route('admin.evidence.overview') }}" class="inline-flex items-center rounded-lg bg-gray-900 px-4 py-2 text-sm font-medium text-white">
|
|
Clear filters
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm">
|
|
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
|
<thead class="bg-gray-50 text-left text-gray-600">
|
|
<tr>
|
|
<th class="px-4 py-3 font-medium">Tenant</th>
|
|
<th class="px-4 py-3 font-medium">Completeness</th>
|
|
<th class="px-4 py-3 font-medium">Generated</th>
|
|
<th class="px-4 py-3 font-medium">Not collected yet</th>
|
|
<th class="px-4 py-3 font-medium">Refresh recommended</th>
|
|
<th class="px-4 py-3 font-medium">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100 bg-white text-gray-900">
|
|
@foreach ($rows as $row)
|
|
@php
|
|
$completenessSpec = BadgeRenderer::spec(BadgeDomain::EvidenceCompleteness, $row['completeness_state'] ?? null);
|
|
@endphp
|
|
<tr>
|
|
<td class="px-4 py-3">{{ $row['tenant_name'] }}</td>
|
|
<td class="px-4 py-3">
|
|
<x-filament::badge :color="$completenessSpec->color" :icon="$completenessSpec->icon" size="sm">
|
|
{{ $completenessSpec->label }}
|
|
</x-filament::badge>
|
|
</td>
|
|
<td class="px-4 py-3">{{ $row['generated_at'] ?? '—' }}</td>
|
|
<td class="px-4 py-3">{{ $row['missing_dimensions'] }}</td>
|
|
<td class="px-4 py-3">{{ $row['stale_dimensions'] }}</td>
|
|
<td class="px-4 py-3">
|
|
<a href="{{ $row['view_url'] }}" class="text-primary-600 hover:text-primary-500">View tenant evidence</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</x-filament-panels::page>
|