{{-- API Keys Overview Partial --}}
{{-- API Keys List --}}
{{ __('Clés API') }}
@forelse($this->apiKeysWithSummaries as $apiKey) @empty @endforelse
{{ __('Nom') }} {{ __('Source') }} {{ __('Filtres') }} {{ __('Commandes') }} {{ __('Leads') }} {{ __('Conversion') }} {{ __('Revenus') }} {{ __('Statut') }} {{ __('Actions') }}
{{ $apiKey['name'] }} @if($apiKey['user']) {{ $apiKey['user'] }} @endif
@if($apiKey['source']) {{ $apiKey['source'] }} @else - @endif @if($apiKey['has_filters']) @else @endif {{ $apiKey['active_orders'] }}/{{ $apiKey['total_orders'] }} {{ number_format($apiKey['total_leads']) }} ({{ number_format($apiKey['billable_leads']) }}) @php $rate = $apiKey['conversion_rate']; $rateColor = $rate >= 60 ? 'success' : ($rate >= 40 ? 'warning' : 'danger'); @endphp {{ $rate }}% {{ number_format($apiKey['revenue'], 2) }} € @if($apiKey['active']) @else @endif
{{ __('Aucune clé API trouvée') }}
{{-- Top Performing API Keys --}}
{{ __('Meilleures performances') }}
@forelse($this->topPerformingApiKeys as $index => $apiKey)
@php $rankBgClass = match($index) { 0 => 'bg-warning text-white', 1 => 'bg-secondary text-white', 2 => 'bg-dark text-white', default => 'bg-light text-muted', }; @endphp
{{ $index + 1 }}
{{ $apiKey->name }} {{ $apiKey->total_leads }} {{ __('leads') }}
@php $rate = $apiKey->conversion_rate; $rateColor = $rate >= 60 ? 'success' : ($rate >= 40 ? 'warning' : 'danger'); @endphp {{ $rate }}%
@empty
{{ __('Pas assez de données') }}
@endforelse