@php /** @var callable $getState */ @endphp
@php $raw = $getState(); $edges = $raw instanceof \Illuminate\Support\Collection ? $raw : collect($raw); @endphp @if ($edges->isEmpty())
No dependencies found
@else
@foreach ($edges->groupBy('relationship_type') as $type => $group)
{{ str_replace('_', ' ', $type) }}
    @foreach ($group as $edge) @php $isMissing = ($edge['target_type'] ?? null) === 'missing'; $targetId = $edge['target_id'] ?? null; $rendered = $edge['rendered_target'] ?? []; $badgeText = is_array($rendered) ? ($rendered['badge_text'] ?? null) : null; $linkUrl = is_array($rendered) ? ($rendered['link_url'] ?? null) : null; $missingTitle = 'Missing target'; $lastKnownName = $edge['metadata']['last_known_name'] ?? null; if (is_string($lastKnownName) && $lastKnownName !== '') { $missingTitle .= ". Last known: {$lastKnownName}"; } $rawRef = $edge['metadata']['raw_ref'] ?? null; if ($rawRef !== null) { $encodedRef = json_encode($rawRef); if (is_string($encodedRef) && $encodedRef !== '') { $missingTitle .= '. Ref: '.\Illuminate\Support\Str::limit($encodedRef, 200); } } @endphp
  • @if (is_string($linkUrl) && $linkUrl !== '') {{ is_string($badgeText) && $badgeText !== '' ? $badgeText : 'External reference' }} @else {{ is_string($badgeText) && $badgeText !== '' ? $badgeText : 'External reference' }} @endif @if ($isMissing) Missing @endif
  • @endforeach
@endforeach
@endif