Contacts

{{-- Bouton Créer (icône seule) --}} @if(auth()->user()->hasPermission('members-manage')) @endif {{-- Bouton Corbeille (icône seule) --}}
{{-- Note: Le layout gère automatiquement max-w-5xl, pas besoin de wrapper --}}
{{-- BARRE DE RECHERCHE (Alpine.js) --}} {{-- DESKTOP: Tableau --}}
@forelse($contacts as $contact) @empty @endforelse
Actions
{{ $contact->email ?? '-' }}
@if($contact->email && $contact->email_verified_at) @endif
{{ format_phone($contact->phone) ?: '-' }}
@if($contact->members_count > 0) @php $memberNames = $contact->members->take(3)->pluck('full_name')->implode(', '); $remaining = $contact->members_count - 3; @endphp
{{ $contact->members_count }} adhérent(s)
{{ $memberNames }} @if($remaining > 0) ... +{{ $remaining }} @endif
@else Aucun @endif
@if(auth()->user()->hasPermission('members-view')) @endif @if(auth()->user()->hasPermission('members-manage')) @if($contact->members_count > 0) @else Supprimer le contact ? Êtes-vous sûr de vouloir supprimer le contact {{ $contact->full_name }} ?
@csrf @method('DELETE')
@endif @endif
@if(request('search')) Aucun contact ne correspond à votre recherche. @else Aucun contact enregistré. @endif
{{-- PAGINATION (conditionnelle) --}} @if($contacts->hasPages())
{{ $contacts->links() }}
@endif