@forelse($beneficiaires as $key => $b) @php $statusClass = 'm-badge-status-ko'; $statusLabel = 'Inactif'; if ($b->enVigueur == 1 && $b->sorti != 1) { $statusClass = 'm-badge-status-ok'; $statusLabel = 'Actif'; } $parentLabel = 'Ayant-Droit'; foreach ($lienParentes as $lien) { if ($lien->codeLienParente == $b->codeLienParente) { $parentLabel = $lien->libelle; break; } } $naturePieceLabel = 'Pièce N/A'; foreach ($naturepieces as $piece) { if ($piece->codeNaturePiece == $b->codeNaturePiece) { $naturePieceLabel = $piece->libelle; break; } } $photoPath = 'plugins/thumbs/vitalis/'.$b->lienPhoto; $img_b = ($b->lienPhoto && file_exists(public_path($photoPath))) ? asset($photoPath) : asset('plugins/thumbs/img_placeholder.png'); @endphp

{{ Str::limit($b->Beneficiaire, 35) }}

{{ $parentLabel }} {{ $statusLabel }}
Âge / Sexe{{ $b->ageBeneficiaire }} ans / {{ $b->sexe }}
Groupe{{ ($b->codeGroupeSanguin == "I" || $b->codeGroupeSanguin == " ") ? '—' : $b->codeGroupeSanguin }}
Date Effet{{ \Carbon\Carbon::parse($b->dateEffetPolice)->format('d/m/Y') }}
Date Échéance{{ \Carbon\Carbon::parse($b->dateFinPolice)->format('d/m/Y') }}
Collège
{{ $b->libelleCollege ?: 'STANDARD' }}
Couverture{{ 100 - $b->ticketModerateur }}%
N° Bénéficiaire{{ $b->numeroBeneficiaire }}
Type Pièce{{ Str::limit($naturePieceLabel, 20) }}
N° Identification{{ $b->numeroPiece ?: 'NON RENSEIGNÉ' }}
@empty
Aucun bénéficiaire trouvé.
@endforelse
@if ($beneficiaires->total() > 0)
{{ $beneficiaires->total() }} PROFILS
@if (isset($idAdherent)) {!! $beneficiaires->appends(['idAdherent' => $idAdherent])->onEachSide(1)->links() !!} @elseif(isset($idCollege)) {!! $beneficiaires->appends(['idCollege' => $idCollege])->onEachSide(1)->links() !!} @elseif(isset($idPolice)) {!! $beneficiaires->appends(['idPolice' => $idPolice])->onEachSide(1)->links() !!} @else {!! $beneficiaires->onEachSide(1)->links() !!} @endif
@endif