@php $displayName = $displayName ?? ($contact->name ?? __('devices.contacts.no_name')); $words = preg_split('/\s+/u', trim($displayName), -1, PREG_SPLIT_NO_EMPTY) ?: []; $initials = ''; foreach (array_slice($words, 0, 2) as $word) { $initials .= mb_strtoupper(mb_substr($word, 0, 1)); } if ($initials === '') { $initials = '?'; } $contactIndex = \App\Support\ContactResolver::phoneIndex($device); @endphp
{{ $initials }}

{{ $displayName }}

@if($currentPhone)

{{ $currentPhone }}

@endif @if(empty($contact))

{{ __('devices.contacts.profile_not_in_agenda') }}

@endif
← {{ __('devices.contacts.back_to_contacts') }}
@if(count($phoneHistory) > 0)

{{ __('devices.contacts.phone_history') }}

@foreach($phoneHistory as $entry)
{{ $entry['phone'] }} ({{ $entry['label'] }}) @if(!empty($entry['aliases'])) {{ __('devices.contacts.phone_aliases', ['aliases' => implode(', ', $entry['aliases'])]) }} @endif
@endforeach
@endif

{{ $stats['events'] }}

{{ __('devices.contacts.stats_agenda_changes') }}

{{ $stats['sms'] }}

SMS

{{ $stats['calls'] }}

{{ __('devices.pages.calls') }}

{{ __('devices.sms.thread_title') }}

@include('admin.devices.partials.contact-sms-thread', [ 'smsThread' => $smsThread ?? collect(), 'smsStats' => $smsStats ?? ['sent' => 0, 'received' => 0], ])

{{ __('devices.contacts.profile_timeline') }}

@if($timeline->isEmpty())

{{ __('devices.contacts.profile_timeline_empty') }}

@else
    @foreach($timeline as $item) @include('admin.devices.partials.contact-timeline-item', [ 'item' => $item, 'device' => $device, 'contact' => $contact, 'contactIndex' => $contactIndex, ]) @endforeach
@endif