@extends('layouts.app') @section('title', 'Tableau de bord') @section('styles') @endsection @section('content')
{{ $totalProduits }}
Produits ce mois
{{ $totalEvenements }}
Événements
{{ $alertesDLC }}
Alertes DLC
{{ $totalExports }}
Exports HACCP

Derniers produits

Scanner
@forelse($derniersProduits as $produit) @php $jours = $produit->dlc ? now()->diffInDays($produit->dlc, false) : 999; $dlcClass = $jours < 0 ? 'dlc-danger' : ($jours <= 3 ? 'dlc-warn' : 'dlc-ok'); $dlcLabel = $produit->dlc ? ($jours < 0 ? 'Expiré' : ($jours === 0 ? "Aujourd'hui" : 'DLC '.$produit->dlc->format('d/m'))) : 'Sans DLC'; @endphp
🍽️
{{ $produit->nom }}
Lot {{ $produit->numero_lot ?? '—' }} · {{ $produit->evenement->nom ?? 'Sans événement' }}
{{ $dlcLabel }}
@empty
Aucun produit enregistré.
Scanner votre premier produit →
@endforelse

Événements récents

@forelse($derniersEvenements as $evenement)
{{ $evenement->nom }}
{{ $evenement->date->format('d/m/Y') }} · {{ $evenement->lieu }}
{{ $evenement->produits_count }} produit(s) tracé(s)
@empty
Aucun événement créé.
@endforelse
@endsection @section('scripts')