@php /** @var list> $nodes */ /** @var int $depth */ @endphp @foreach ($nodes as $node) @php $indent = $depth * 18; $isSynthetic = (bool) ($node['is_synthetic'] ?? false); $title = $node['job_title'] ?? ($isSynthetic ? 'Manager' : '—'); $meta = collect([ $node['code'] ?? null, $node['department'] ?? null, ])->filter()->implode(' · '); @endphp
{{ $node['name'] }}
{{ $title }}
@if ($meta !== '')
{{ $meta }}
@endif
@if (! empty($node['children'])) @include('pdf.partials.organization-chart-branch', [ 'nodes' => $node['children'], 'depth' => $depth + 1, ]) @endif @endforeach