@php $results = $getState() ?? []; @endphp @if (empty($results))

No results recorded.

@else @php $needsAttention = collect($results)->contains(function ($item) { $status = $item['status'] ?? null; return in_array($status, ['partial', 'manual_required'], true); }); @endphp
@if ($needsAttention)
Some settings could not be applied automatically. Review the per-setting details below.
@endif @foreach ($results as $item)
{{ $item['policy_identifier'] ?? $item['policy_id'] ?? 'Policy' }} {{ $item['policy_type'] ?? '' }}
@php $status = $item['status'] ?? 'unknown'; $statusColor = match ($status) { 'applied' => 'text-green-700 bg-green-100 border-green-200', 'dry_run' => 'text-blue-700 bg-blue-100 border-blue-200', 'partial' => 'text-amber-900 bg-amber-50 border-amber-200', 'manual_required' => 'text-amber-900 bg-amber-100 border-amber-200', 'failed' => 'text-red-700 bg-red-100 border-red-200', default => 'text-gray-700 bg-gray-100 border-gray-200', }; @endphp {{ $status }}
@if (! empty($item['reason']))
{{ $item['reason'] }}
@endif @if (! empty($item['graph_error_message']) || ! empty($item['graph_error_code']))
Graph error
{{ $item['graph_error_message'] ?? 'Unknown error' }}
@if (! empty($item['graph_error_code']))
Code: {{ $item['graph_error_code'] }}
@endif @if (! empty($item['graph_request_id']) || ! empty($item['graph_client_request_id']))
Details
@if (! empty($item['graph_request_id']))
request-id: {{ $item['graph_request_id'] }}
@endif @if (! empty($item['graph_client_request_id']))
client-request-id: {{ $item['graph_client_request_id'] }}
@endif
@endif
@endif @if (! empty($item['settings_apply']) && is_array($item['settings_apply'])) @php $apply = $item['settings_apply']; $total = (int) ($apply['total'] ?? 0); $applied = (int) ($apply['applied'] ?? 0); $failed = (int) ($apply['failed'] ?? 0); $manual = (int) ($apply['manual_required'] ?? 0); $issues = $apply['issues'] ?? []; @endphp
Settings applied: {{ $applied }}/{{ $total }} @if ($failed > 0 || $manual > 0) • {{ $failed }} failed • {{ $manual }} manual @endif
@if (! empty($issues))
Settings requiring attention
@foreach ($issues as $issue) @php $issueStatus = $issue['status'] ?? 'unknown'; $issueColor = match ($issueStatus) { 'failed' => 'text-red-700 bg-red-100 border-red-200', 'manual_required' => 'text-amber-900 bg-amber-100 border-amber-200', default => 'text-gray-700 bg-gray-100 border-gray-200', }; @endphp
Setting {{ $issue['setting_id'] ?? 'unknown' }}
{{ $issueStatus }}
@if (! empty($issue['reason']))
{{ $issue['reason'] }}
@endif @if (! empty($issue['graph_error_message']) || ! empty($issue['graph_error_code']))
{{ $issue['graph_error_message'] ?? 'Unknown error' }}
@if (! empty($issue['graph_error_code']))
Code: {{ $issue['graph_error_code'] }}
@endif @if (! empty($issue['graph_request_id']) || ! empty($issue['graph_client_request_id']))
@if (! empty($issue['graph_request_id']))
request-id: {{ $issue['graph_request_id'] }}
@endif @if (! empty($issue['graph_client_request_id']))
client-request-id: {{ $issue['graph_client_request_id'] }}
@endif
@endif
@endif
@endforeach
@endif @endif @if (! empty($item['platform']))
Platform: {{ $item['platform'] }}
@endif
@endforeach
@endif