## 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
74 lines
3.1 KiB
PHP
74 lines
3.1 KiB
PHP
@php
|
|
/** @var ?\App\Models\Tenant $tenant */
|
|
/** @var \Illuminate\Support\Collection<int, \App\Models\OperationRun> $runs */
|
|
/** @var string $operationsIndexUrl */
|
|
@endphp
|
|
|
|
<x-filament::section heading="Recent operations">
|
|
<x-slot name="afterHeader">
|
|
<a
|
|
href="{{ $operationsIndexUrl }}"
|
|
class="text-sm font-medium text-primary-600 hover:text-primary-500 dark:text-primary-400 dark:hover:text-primary-300"
|
|
>
|
|
View all operations
|
|
</a>
|
|
</x-slot>
|
|
|
|
@if ($runs->isEmpty())
|
|
<div class="text-sm text-gray-500 dark:text-gray-400">
|
|
No operations yet.
|
|
</div>
|
|
@else
|
|
<ul class="divide-y divide-gray-100 dark:divide-gray-800">
|
|
@foreach ($runs as $run)
|
|
@php
|
|
$statusSpec = \App\Support\Badges\BadgeRenderer::spec(
|
|
\App\Support\Badges\BadgeDomain::OperationRunStatus,
|
|
(string) $run->status,
|
|
);
|
|
$outcomeSpec = \App\Support\Badges\BadgeRenderer::spec(
|
|
\App\Support\Badges\BadgeDomain::OperationRunOutcome,
|
|
(string) $run->outcome,
|
|
);
|
|
$guidance = \App\Support\OpsUx\OperationUxPresenter::surfaceGuidance($run);
|
|
@endphp
|
|
<li class="flex items-center justify-between gap-3 py-2">
|
|
<div class="min-w-0">
|
|
<div class="truncate text-sm font-medium">
|
|
{{ \App\Support\OperationCatalog::label((string) $run->type) }}
|
|
</div>
|
|
|
|
<div class="mt-1 flex flex-wrap items-center gap-2">
|
|
<x-filament::badge :color="$statusSpec->color" size="sm">
|
|
{{ $statusSpec->label }}
|
|
</x-filament::badge>
|
|
<x-filament::badge :color="$outcomeSpec->color" size="sm">
|
|
{{ $outcomeSpec->label }}
|
|
</x-filament::badge>
|
|
</div>
|
|
|
|
<div class="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
|
{{ $run->created_at?->diffForHumans() ?? '—' }}
|
|
</div>
|
|
|
|
@if ($guidance)
|
|
<div class="mt-1 text-xs text-gray-600 dark:text-gray-300">
|
|
{{ $guidance }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="shrink-0">
|
|
<a
|
|
href="{{ \App\Support\OperationRunLinks::tenantlessView($run) }}"
|
|
class="text-sm font-medium text-primary-600 hover:text-primary-500 dark:text-primary-400 dark:hover:text-primary-300"
|
|
>
|
|
View
|
|
</a>
|
|
</div>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
</x-filament::section>
|