@props(['person', 'ancestors', 'level_current' => 0, 'level_max']) @php $level_current++; $person_sequence = $ancestors->firstWhere('id', $person->id)->sequence; $ancestors_next = $ancestors->where('degree', $level_current)->filter(function ($item) use ($person_sequence): bool { return strpos($item->sequence, $person_sequence) !== false; }); @endphp
  • @if ($person)
    @php $photoPath = $person->team_id . '/' . $person->id . '/' . $person->photo . '_small.webp'; @endphp @if ($person->photo && Storage::disk('photos')->exists($photoPath)) {{ $person->id }} @else @endif @if ($person->dod or $person->yod)
     
    @endif
    $person->dod or $person->yod, 'text-primary-500 dark:text-primary-300' => !($person->dod or $person->yod), 'line-clamp-2 text-xs leading-tight w-24 wrap-break-word' ]) title="{{ implode(' ', array_filter([$person->firstname, $person->surname])) }}"> {{ implode(' ', array_filter([$person->firstname, $person->surname])) }}
    {{-- ancestors (recursive) --}} @if ($level_current < $level_max) @if (count($ancestors_next) > 0) @endif @endif @endif