{{-- Recursive supersession chain renderer. $entries: array of supersession entries (each shaped like the JLR API's supersession[] items -- apn, apnDesc, quantity, comment, and its own nested `supersession` array). Handles both real-world branching cases by construction, not special-casing either: - More than one entry at the same level (an APN superseded by several parts at once) -- the @foreach below just renders every sibling, not only the first. - Arbitrarily deep chains -- each entry that itself has a non-empty `supersession` array re-includes this same partial one level deeper, however far the real data goes. --}} @if(!empty($entries))
@foreach($entries as $entry)
→ {{ $entry['apn'] ?? '' }} @if(!empty($entry['apnDesc'])) {{ $entry['apnDesc'] }} @endif
@if(!empty($entry['supersession']))
@include('jlr-epc::filament.partials.supersession-tree', ['entries' => $entry['supersession']])
@endif @endforeach
@endif