@extends('layouts.dashboard') @section('title', 'Portefeuille') @section('page-title', '') @push('styles') @endpush @section('content')

Portefeuille

Gérez vos clients

Gestion du Portefeuille

@forelse($clients ?? [] as $client) @empty @endforelse
Nom / Prénom Email Source Nombre de contrats actifs État du dossier Actions
{{ trim(($client->first_name ?? '') . ' ' . ($client->last_name ?? '')) ?: 'N/A' }}
{{ $client->email ?? 'N/A' }}
@php $currentSource = $client->source ?? 'Manuel'; @endphp @php $contractsRaw = $client->form_data['contracts'] ?? null; $contracts = is_array($contractsRaw) ? $contractsRaw : null; $activeContractsCount = 0; if (is_array($contracts)) { foreach ($contracts as $c) { if (($c['statut'] ?? 'resilie') === 'actif') $activeContractsCount++; } } else { $activeContractsCount = 0; } @endphp {{ $activeContractsCount }} @if($client->dossier_complet) Conforme @else Incomplet @endif

Aucun client trouvé

@endsection @push('scripts') @endpush