@extends('layouts.app') @section('title', 'Tableau de bord') @section('heading', 'Tableau de bord') @section('subheading', 'Vue d\'ensemble de votre activité · '.now()->translatedFormat('l d F Y')) @section('actions') ➕ Nouveau devis 🏢 Nouveau client @endsection @section('content') {{-- Indicateurs principaux --}}
{{-- CA mensuel --}} {{-- Objectif commercial --}} @php $pct = $goal > 0 ? min(100, round($kpis['revenue']/$goal*100)) : 0; @endphp
{{ $pct }}% de l'objectif

{{ eur($kpis['revenue']) }} / {{ eur($goal) }}

@php $max = max(1, max($funnel)); @endphp @foreach(['brouillon'=>'Brouillons','envoye'=>'Envoyés','accepte'=>'Acceptés','refuse'=>'Refusés'] as $k=>$lbl)
{{ $lbl }}{{ $funnel[$k] }}
@endforeach
{{-- Alertes --}}
@forelse($overdueInvoices as $inv) {{ $inv->number }} · {{ $inv->client?->company }} {{ eur($inv->balance()) }} @empty @endforelse @forelse($upcomingRenewals as $c) {{ $c->number }} · {{ $c->client?->company }} {{ $c->end_date?->format('d/m/Y') }} @empty @endforelse
@push('scripts') @endpush @endsection