@extends('reports.pdf.layout')
@section('title', $data['meta']['title'])
@php
$meta = $data['meta'];
$kpis = $data['kpis'];
$progression = $data['progression'];
$objectives = $data['objectives'];
$impact = $data['impact'];
$fmtNum = function ($v, $unit = '') {
if ($v === null) return '—';
$s = is_numeric($v) ? number_format((float) $v, 0, ',', ' ') : (string) $v;
return trim($s . ' ' . $unit);
};
// Stacked bar geometry.
$barW = 320; $barH = 160; $barPadX = 28; $barPadY = 22;
$maxV = 0;
foreach ($progression as $p) { $maxV = max($maxV, $p['thermique'] + $p['hybride'] + $p['electrique']); }
$maxV = max($maxV, 1);
$barCount = count($progression);
$barSlot = $barCount > 0 ? ($barW - 2 * $barPadX) / $barCount : 0;
$barWidth = $barSlot * 0.55;
@endphp
@section('content')
DADYCAR FLEET MANAGER
{{ $meta['title'] }}
Durabilité ESG
{{ $meta['code'] }}
Période : {{ $meta['period']['label'] }} · {{ $meta['site_label'] }} ·
{{ $meta['total_vehicles'] }} véhicules ·
Généré le {{ $meta['generated_at']->locale('fr')->isoFormat('D MMMM YYYY') }}
Indicateurs clés
VE
{{ $kpis['electric_count']['value'] }}{{ $kpis['electric_count']['unit'] }}
{{ $kpis['electric_count']['delta_label'] }}
Hybrides
{{ $kpis['hybrid_count']['value'] }}{{ $kpis['hybrid_count']['unit'] }}
{{ $kpis['hybrid_count']['delta_label'] }}
Objectif 2026
{{ $kpis['target_2026']['value'] }}{{ $kpis['target_2026']['unit'] }}
{{ $kpis['target_2026']['delta_label'] }}
Prochaine livraison
{{ $kpis['next_delivery']['value'] }}{{ $kpis['next_delivery']['unit'] }}
{{ $kpis['next_delivery']['delta_label'] }}
Progression de l'électrification
Thermique
Hybride
Électrique
Objectifs d'électrification
@foreach ($objectives as $o)
{{ $o['label'] }}
{{ $o['value'] }} — {{ $o['meta'] }}
@endforeach
Impact environnemental et financier (mensuel)
| Indicateur |
Valeur |
@foreach ($impact as $r)
| {{ $r['metric'] }} |
{{ $r['value'] }} |
@endforeach
@endsection