@foreach($columns as $col)
{{-- Entete colonne --}}
{{ $col['label'] }}
{{ $col['count'] }}
@if($col['total_amount'] > 0)
{{ number_format($col['total_amount'], 0, ',', ' ') }} FCFA
@endif
{{-- Cards --}}
@forelse($col['leads'] as $lead)
@if($lead['company'])
{{ $lead['company'] }}
@endif
@if($lead['next_action_at'])
{{ $lead['is_overdue'] ? '!' : '' }} {{ $lead['next_action_at'] }}
@endif
@if($lead['deal_amount'])
{{ number_format($lead['deal_amount'], 0, ',', ' ') }} FCFA
@endif
@empty
Vide
@endforelse
@endforeach
{{-- Gagnes + Perdus --}}
@php
$wonCount = \App\Models\CommercialLead::where('pipeline_stage', 'closedwon')->count();
$lostCount = \App\Models\CommercialLead::where('pipeline_stage', 'closedlost')->count();
@endphp
Gagnes
{{ $wonCount }}
Perdus
{{ $lostCount }}