@php use App\Support\Badges\BadgeCatalog; use App\Support\Badges\BadgeDomain; use App\Support\Badges\TagBadgeCatalog; use App\Support\Badges\TagBadgeDomain; $rows = array_values(array_filter($rows ?? [], 'is_array')); $summary = is_array($summary ?? null) ? $summary : []; $followUpRows = array_values(array_filter($rows, static fn (array $row): bool => (bool) ($row['followUpRequired'] ?? false))); $topFollowUp = $followUpRows[0] ?? null; @endphp
Types in run
{{ (int) ($summary['totalTypes'] ?? count($rows)) }}
Succeeded: {{ (int) ($summary['succeededTypes'] ?? 0) }}. Failed: {{ (int) ($summary['failedTypes'] ?? 0) }}. Skipped: {{ (int) ($summary['skippedTypes'] ?? 0) }}.
Need follow-up
{{ (int) ($summary['followUpTypes'] ?? count($followUpRows)) }}
Execution outcome stays separate from the per-type results below.
Observed items
{{ (int) ($summary['observedItems'] ?? 0) }}
Item counts show what this run observed for the listed types.
Run outcome
{{ $runOutcomeLabel ?? 'Unknown' }}
Coverage truth below explains which types created the follow-up.
@if ($topFollowUp !== null)
Highest-priority follow-up: {{ $topFollowUp['label'] ?? ($topFollowUp['type'] ?? 'Unknown type') }}. {{ $topFollowUp['followUpGuidance'] ?? 'Review the latest inventory sync details before retrying.' }}
@endif
@foreach ($rows as $row) @php $typeSpec = TagBadgeCatalog::spec(TagBadgeDomain::PolicyType, $row['type'] ?? null); $categorySpec = TagBadgeCatalog::spec(TagBadgeDomain::PolicyCategory, $row['category'] ?? null); $stateSpec = BadgeCatalog::spec(BadgeDomain::InventoryCoverageState, $row['coverageState'] ?? null); @endphp
{{ $typeSpec->label }} {{ $stateSpec->label }} {{ $categorySpec->label }} {{ ($row['segment'] ?? 'policy') === 'foundation' ? 'Foundation' : 'Policy' }}
{{ $row['label'] ?? ($row['type'] ?? 'Unknown type') }}
{{ $row['type'] ?? 'unknown' }}
Observed items
{{ (int) ($row['itemCount'] ?? 0) }}
{{ $row['followUpGuidance'] ?? 'No follow-up is currently required.' }}
@if (filled($row['errorCode'] ?? null))
Reason code: {{ $row['errorCode'] }}
@endif
@endforeach