@php $contactsByHash = $contactsByHash ?? collect(); $contactIndex = $contactIndex ?? []; @endphp

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

@if($events->isEmpty())

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

@else
@endif

{{ __('devices.contacts.agenda_title') }} ({{ $contacts->count() }})

@if($contacts->isEmpty())

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

@else
@foreach($contacts as $contact) @php $cName = $contact->name ?: __('devices.contacts.no_name'); $cWords = preg_split('/\s+/u', trim($cName), -1, PREG_SPLIT_NO_EMPTY) ?: []; $cInitials = ''; foreach (array_slice($cWords, 0, 2) as $w) { $cInitials .= mb_strtoupper(mb_substr($w, 0, 1)); } if ($cInitials === '') { $cInitials = '?'; } $searchKey = mb_strtolower($cName.' '.($contact->phone_no ?? '')); $profileUrl = \App\Support\ContactResolver::profileUrl($device, $contact->phone_no, $contact); @endphp @endforeach
{{ __('devices.contacts.col_contact') }} {{ __('devices.contacts.col_phone') }} {{ __('devices.contacts.col_synced') }}
{{ $cName }} @if($contact->phone_no) {{ $contact->phone_no }} @else @endif {{ $contact->updated_at?->diffForHumans() ?? '—' }}
@endif