From c0c6c81e745f7b05ac98dd284c900749e0e44297 Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 24 Apr 2026 09:50:39 +0200 Subject: [PATCH] =?UTF-8?q?feat=20:=20calcul=20de=20l'=C3=A2ge=20en=20mois?= =?UTF-8?q?=20c=C3=B4t=C3=A9=20back=20+=20colonne=20Age=20et=20alertes=20v?= =?UTF-8?q?isuelles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Champ ageMonths (int) ajouté à Bovine avec migration - Lifecycle PrePersist/PreUpdate pour maintenir la cohérence - Sync processor recalcule explicitement ageMonths à chaque passage (cron-friendly) - Colonne Age + rowClass côté front : rouge >= 24 mois, orange 22-24 mois - Util formatAgeLabel remplace le calcul client - Boutons pagination Prev/Next en français avec style bouton bordure primary - Colonnes Sexe/N° Travail réduites au profit de Bâtiment Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/components/ui/UiDataTable.vue | 17 ++++++---- frontend/pages/inventory.vue | 22 +++++++++++-- frontend/services/dto/bovine-data.ts | 1 + frontend/utils/bovine-age.ts | 10 ++++++ migrations/Version20260424074454.php | 31 +++++++++++++++++++ src/Entity/Bovine.php | 31 +++++++++++++++++++ .../Bovin/BovineSyncInventoryProcessor.php | 1 + 7 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 frontend/utils/bovine-age.ts create mode 100644 migrations/Version20260424074454.php diff --git a/frontend/components/ui/UiDataTable.vue b/frontend/components/ui/UiDataTable.vue index e385879..b3a4eee 100644 --- a/frontend/components/ui/UiDataTable.vue +++ b/frontend/components/ui/UiDataTable.vue @@ -19,7 +19,10 @@ v-for="(item, index) in paginatedItems" :key="item.id ?? index" class="grid gap-6 px-4 py-3 text-sm border-t border-slate-200" - :class="rowClickable ? 'hover:bg-slate-50 cursor-pointer' : ''" + :class="[ + rowClickable ? 'hover:bg-slate-50 cursor-pointer' : '', + rowClass ? rowClass(item) : '' + ]" :style="{ gridTemplateColumns: gridCols }" :role="rowClickable ? 'button' : undefined" :tabindex="rowClickable ? 0 : undefined" @@ -83,12 +86,12 @@