| Résidences | Actions | ||
|---|---|---|---|
|
@if(auth()->user()->hasPermission('guardians-view'))
{{ $guardian->full_name }}
@else
{{ $guardian->full_name }}
@endif
|
{{ format_phone($guardian->mobile_phone) ?? '-' }} | {{ $guardian->residences->pluck('name')->implode(', ') ?: '-' }} |
@if(auth()->user()->hasPermission('guardians-view'))
@endif
@if(auth()->user()->hasPermission('guardians-manage'))
@php
$cannotDelete = false;
$deleteBlockReason = '';
if ($guardian->residences()->count() > 0) {
$cannotDelete = true;
$residencesCount = $guardian->residences()->count();
$deleteBlockReason = "Résidences assignées : {$residencesCount}";
}
@endphp
@if($cannotDelete)
@else
|
| @if(request('search')) Aucun gardien trouvé pour cette recherche. @else Aucun gardien enregistré. @endif | |||