{{-- Header --}}

{{ $title }}

{{-- View Mode Toggle --}}
{{-- Filter Toggle --}} @if(Auth::user()->is_bo) {{-- Commission Calculator --}} {{-- Add Referral --}} {{-- --}} @else {{-- Invite Referral --}} @endif
{{-- Filters Panel --}}
@if(Auth::user()->is_bo)
@endif
@if($filterPeriod === 'custom')
@endif
@if(!empty($selectedItems) && Auth::user()->is_bo)
{{ count($selectedItems) }} sélectionnés
@endif
{{-- Commission Calculation Results --}} @if(session()->has('commission_calculation')) @php $calculation = session('commission_calculation'); @endphp
Calcul des commissions de parrainage
Période: {{ $calculation['start_date'] }} - {{ $calculation['end_date'] }}
Total des commissions calculées: {{ number_format($calculation['total_commission'], 2) }}€

Période {{ $calculation['period'] === 'monthly' ? 'mensuelle' : 'annuelle' }} @if($calculation['month']) - {{ $this->months[$calculation['month']] }} {{ $calculation['year'] }} @else - {{ $calculation['year'] }} @endif

@if(!empty($calculation['commissions']))
Détail par parrain
@foreach($calculation['commissions'] as $commission) @endforeach
Parrain Filleul Nb dossiers Commission totale Actions
{{ $commission['plan_count'] }} {{ number_format($commission['total_commission'], 2) }}€
Détail des dossiers financés
@foreach($commission['plan_details'] as $detail) @endforeach
Dossier Montant crédit Taux commission Commission Date débloquage
#{{ $detail['project_ref'] }} {{ number_format($detail['credit_amount'], 2) }}€ {{ $detail['commission_rate'] }}% {{ number_format($detail['commission_amount'], 2) }}€ {{ $detail['funded_at']->format('d/m/Y') }}
@else
Aucune commission trouvée pour cette période.
@endif
@endif {{-- Main Content --}}
@if($viewMode === 'overview') {{-- Overview Mode --}}
{{-- Stats Cards --}}
{{-- Total Overview Card --}}
Total
{{ $stats['total'] }}
{{-- Pending Card --}}
En attente
{{ $stats['pending'] }} {{ $stats['pending_rate'] }}%
{{-- Contacted Card --}}
Contactés
{{ $stats['contacted'] }} {{ $stats['contact_rate'] }}%
{{-- Converted Card --}}
Convertis
{{ $stats['converted'] }} {{ $stats['converted_rate'] }}%
{{-- Registered Card --}}
Inscrits
{{ $stats['registered'] }} {{ $stats['conversion_rate'] }}%
{{-- Rejected Card --}}
Rejetés
{{ $stats['rejected'] }} {{ $stats['rejected_rate'] }}%
{{-- Timeline Chart --}}
Évolution des parrainages
@if(!empty($timelineStats))
{{-- Chart Bars Section --}}
@foreach($timelineStats as $index => $stat)
{{-- Chart Bars Container --}}
{{-- Total Bar --}}
{{-- Value Label on Bar --}} @if($stat['total'] > 0) {{ $stat['total'] }} @endif
{{-- Registered Bar --}}
{{-- Value Label on Bar --}} @if($stat['registered'] > 0) {{ $stat['registered'] }} @endif
{{-- Month/Year Label --}}
{{ $stat['month'] }}
@endforeach
{{-- Legend at Bottom --}}
Total
Inscrits
@else

Aucune donnée disponible

@endif
{{-- Recent Activity --}}
Activité récente
@forelse($referrals->take(5) as $referral)
{{ $referral->referral_full_name }}
Parrainé par {{ $referral->sponsor->fullname }}
{{ $referral->status->label() }} {{ $referral->created_at->diffForHumans() }}
@if(Auth::user()->is_bo)
@endif
@empty

Aucune activité récente

@endforelse
@endif @if($viewMode === 'list') {{-- List Mode --}}
Liste des parrainages ({{ $referrals->total() }})
@if(Auth::user()->is_bo)
@endif
@if($referrals->count() > 0)
@if(Auth::user()->is_bo) @endif @if(Auth::user()->is_bo) @endif @if(Auth::user()->is_bo) @endif @foreach($referrals as $referral) @if(Auth::user()->is_bo) @endif @if(Auth::user()->is_bo) @endif @if(Auth::user()->is_bo) @endif @endforeach
ParrainFilleul(e) Email Entreprise Statut Date créationActions
{{ $referral->referral_email }} {{ $referral->referral_company ?? 'N/A' }} {{ $referral->status->label() }} {{ $referral->created_at->format('d/m/Y H:i') }}
{{-- Pagination --}}
{{ $referrals->links('vendor.livewire.modern-bootstrap') }}
@else
Aucun parrainage trouvé

{{ $search ? 'Essayez de modifier vos critères de recherche.' : 'Commencez par créer votre premier parrainage.' }}

@endif
@endif @if($viewMode === 'stats') {{-- Statistics Mode --}}
Statistiques détaillées
{{-- Performance Metrics --}}
Indicateurs de performance
{{ $stats['contact_rate'] }}%
Taux de contact
{{ $stats['contacted'] }}/{{ $stats['total'] }} contactés
{{ $stats['conversion_rate'] }}%
Taux de conversion
{{ $stats['registered'] }}/{{ $stats['total'] }} inscrits
{{-- Status Distribution --}}
Répartition par statut
@php $total = $stats['total']; $statuses = [ ['key' => 'pending', 'label' => 'En attente', 'color' => 'warning', 'count' => $stats['pending']], ['key' => 'contacted', 'label' => 'Contactés', 'color' => 'info', 'count' => $stats['contacted']], ['key' => 'converted', 'label' => 'Convertis', 'color' => 'primary', 'count' => $stats['converted']], ['key' => 'registered', 'label' => 'Inscrits', 'color' => 'success', 'count' => $stats['registered']], ['key' => 'rejected', 'label' => 'Rejetés', 'color' => 'danger', 'count' => $stats['rejected']], ]; @endphp @foreach($statuses as $status) @php $percentage = $total > 0 ? round(($status['count'] / $total) * 100, 1) : 0; @endphp
{{ $status['label'] }}
{{ $status['count'] }} ({{ $percentage }}%)
@endforeach
@endif
{{-- Commission Calculator Modal --}} @include('partials.user.referral-modal')
@push('styles') {{-- Custom Styles for Enhanced Timeline Chart --}} @endpush