{{-- Left: Back button --}} {{-- Center: Title --}}

Contact

{{-- Right: Action buttons --}}
@if(auth()->user()->hasPermission('members-manage')) @if($contact->members->count() > 0) @else Supprimer ce contact ? Le contact {{ $contact->full_name }} sera mis en corbeille.
@csrf @method('DELETE')
@endif @else
@endif
{{-- Contact Info --}}

Informations du contact

Nom complet

{{ $contact->full_name }}

Email

{{ $contact->email ?? '-' }}

@if($contact->email) @if($contact->email_verified_at) @else @endif @if(auth()->user()->hasPermission('members-manage'))
@csrf
@endif @endif
Téléphone

{{ format_phone($contact->phone) ?: '-' }}

{{-- Linked Members --}}

Adhérents liés ({{ $contact->members->count() }})

@if($contact->members->count() > 0)
@foreach($contact->members as $member) @php $activeLease = $member->leases->where('status', 'active')->first(); @endphp @if(auth()->user()->hasPermission('members-view'))
{{ strtoupper($member->last_name) }} {{ $member->first_name }} ({{ $member->member_number }}) @if($activeLease) {{ $activeLease->address->street_number }}{{ $activeLease->address->street_suffix ? ' ' . $activeLease->address->street_suffix : '' }} {{ $activeLease->address->street_name }} {{ $activeLease->address->postal_code }} {{ $activeLease->address->city }} @else Aucune adresse active @endif
@else
{{ strtoupper($member->last_name) }} {{ $member->first_name }} ({{ $member->member_number }}) @if($activeLease) {{ $activeLease->address->street_number }}{{ $activeLease->address->street_suffix ? ' ' . $activeLease->address->street_suffix : '' }} {{ $activeLease->address->street_name }} {{ $activeLease->address->postal_code }} {{ $activeLease->address->city }} @else Aucune adresse active @endif
@endif @endforeach
@else

Aucun adhérent n'utilise ce contact.

@endif