feat : export Excel et stats par tranche d'âge sur l'inventaire bovin
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled

- Dépendance phpoffice/phpspreadsheet
- Endpoint GET /bovines/inventory-export : XLSX coloré, header figé, auto-filter, tri birthDate ASC
- Endpoint GET /bovines/inventory-stats : comptes par tranche d'âge (>=24, 22-24, 20-22)
- Bouton Excel à gauche du titre (style icône-only, même design que le bouton impression)
- Légende visuelle avec cartes bordées coloriées
- Ajustement seuils couleurs des lignes en -300 (base) / -400 (hover)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 15:19:57 +02:00
parent bde59bf9ee
commit 9038d1726a
8 changed files with 824 additions and 88 deletions

View File

@@ -211,9 +211,9 @@ const formatDate = (date: string | null) => {
const rowClass = (item: BovineData): string => {
if (item.ageMonths === null || item.ageMonths === undefined) return ''
if (item.ageMonths >= 24) return 'bg-violet-200 hover:bg-violet-300'
if (item.ageMonths >= 22) return 'bg-red-200 hover:bg-red-300'
if (item.ageMonths >= 20) return 'bg-orange-200 hover:bg-orange-300'
if (item.ageMonths >= 24) return 'bg-violet-300 hover:bg-violet-400'
if (item.ageMonths >= 22) return 'bg-red-300 hover:bg-red-400'
if (item.ageMonths >= 20) return 'bg-orange-300 hover:bg-orange-400'
return ''
}