Compare commits

..

6 Commits

Author SHA1 Message Date
gitea-actions
9115699f96 chore: bump version to v0.0.96
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m28s
2026-05-05 12:10:57 +00:00
178b4e4eee fix : wording
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
2026-05-05 14:10:31 +02:00
gitea-actions
fbc8365405 chore: bump version to v0.0.95
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m24s
2026-05-05 09:27:04 +00:00
4561467532 feat(pdf) : refonte en-tête rapport poids case - étape 3
All checks were successful
Auto Tag Develop / tag (push) Successful in 8s
Footer scindé en deux tableaux Traitements (Date/Antibiotique/Dose/Observation
avec lignes Grippe/Antéro/Antibiotiques/Déparasitage) et Rappel (Date/Dose/
Observation), espacés. Sous-titre POIDS PAR MOIS et marge sous le bandeau
PROVENANCE/RACE réduits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 11:26:31 +02:00
c441420522 feat(pdf) : refonte en-tête rapport poids case - étape 2
Inversion du sens de lecture du tableau principal : colonnes mois en ordre
inverse, fixes (date naissance, poids, n° travail) à droite. Tri des bovins
par n° de travail croissant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 10:53:25 +02:00
ba9ea2de71 feat(pdf) : refonte en-tête rapport poids case - étape 1
PROVENANCE et RACE sur la même ligne, chiffres à gauche des cases vides,
CASE N° XX en dessous. Polices ajustées à 18px.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 10:34:15 +02:00
4 changed files with 161 additions and 111 deletions

View File

@@ -1,2 +1,2 @@
parameters: parameters:
app.version: '0.0.94' app.version: '0.0.96'

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="flex items-center justify-start gap-10"> <div class="flex items-center justify-start gap-10">
<Icon @click="router.push('/')" name="gg:arrow-left-o" size="44" class="cursor-pointer text-primary-500"/> <Icon @click="router.push('/')" name="gg:arrow-left-o" size="44" class="cursor-pointer text-primary-500"/>
<h1 class="text-3xl font-bold uppercase text-primary-500">listes des réceptions finie</h1> <h1 class="text-3xl font-bold uppercase text-primary-500">liste des réceptions finies</h1>
</div> </div>
<div class="px-[86px]"> <div class="px-[86px]">

View File

@@ -91,6 +91,22 @@ final readonly class BuildingCaseWeightsReportProvider implements ProviderInterf
]; ];
} }
usort($rows, static function (array $a, array $b): int {
$aw = (string) ($a['workNumber'] ?? '');
$bw = (string) ($b['workNumber'] ?? '');
if ('' === $aw && '' === $bw) {
return 0;
}
if ('' === $aw) {
return 1;
}
if ('' === $bw) {
return -1;
}
return (int) $aw <=> (int) $bw;
});
$monthHeaders = $this->buildMonthHeaders($firstArrivalDate, $headerBreedCode); $monthHeaders = $this->buildMonthHeaders($firstArrivalDate, $headerBreedCode);
$dompdf = new Dompdf(); $dompdf = new Dompdf();

View File

@@ -139,10 +139,10 @@
} }
.main .sub-title { .main .sub-title {
font-size: 16px; font-size: 13px;
font-weight: 700; font-weight: 700;
letter-spacing: 0; letter-spacing: 0;
padding: 8px; padding: 4px;
} }
.main .base { .main .base {
@@ -203,94 +203,79 @@
<h1 style="color: red; text-align: center; width: 100%; font-size: 36px"> <h1 style="color: red; text-align: center; width: 100%; font-size: 36px">
Arrivage du {{ firstArrivalDate ?? '-' }} Arrivage du {{ firstArrivalDate ?? '-' }}
</h1> </h1>
<table style="width:100%; border-collapse:collapse; table-layout:fixed; margin-bottom: 16px"> <table style="width:100%; border-collapse:collapse; table-layout:fixed; margin-bottom: 4px">
<colgroup>
{# 28 colonnes ≈ 3.571% chacune #}
{% for _ in 0..27 %}<col style="width:3.571%">{% endfor %}
</colgroup>
<tr> <tr>
<td style="width:40%; vertical-align:top; padding-right:2mm; border:0;"> <td style="border:0; text-align:left; font-weight:700; font-size: 18px;" colspan="4">PROVENANCE</td>
<table style="width:100%; border-collapse:collapse; table-layout:fixed;">
<tr>
<td style="border: 0; height: 20px"></td>
</tr>
<tr>
<td style="font-weight:700; text-align: left; border: none; font-size: 24px">CASE N° {{ buildingCase.caseNumber ?? '' }}</td>
</tr>
</table>
</td>
<td style="width:60%; vertical-align:top; padding-left:2mm; border:0;"> {# Paire 1 : chiffre + case vide #}
<table class="header-right-free" style="width:100%; border-collapse:collapse; table-layout:fixed;"> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; font-size: 11px; padding:0;">1</td>
<tr> <td style="border:1px solid #2b2b2b;"></td>
<td style="border:0; text-align:center; font-weight:700; height: 20px;" colspan="5"></td> <td style="border:0;"></td>
<td style="border:0;" colspan="2"></td> {# Paire 2 #}
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; height: 20px;">1</td> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; font-size: 11px; padding:0;">2</td>
<td style="border:0; height: 20px;"></td> <td style="border:1px solid #2b2b2b;"></td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; height: 20px;">2</td> <td style="border:0;"></td>
<td style="border:0; height: 20px;"></td> {# Paire 3 #}
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; height: 20px;">3</td> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; font-size: 11px; padding:0;">3</td>
<td style="border:0; height: 20px;"></td> <td style="border:1px solid #2b2b2b;"></td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; height: 20px;">4</td> <td style="border:0;"></td>
<td style="border:0;" colspan="2"></td> {# Paire 4 #}
</tr> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700; font-size: 11px; padding:0;">4</td>
<tr> <td style="border:1px solid #2b2b2b;"></td>
<td style="border:0; text-align:left; font-weight:700; font-size: 24px; width:40%; height: 20px;" colspan="5">PROVENANCE</td>
<td style="border:0;" colspan="2"></td> {# Espacement entre PROVENANCE et RACE (1 col, RACE commence plus tôt) #}
<td style="border:1px solid #2b2b2b;"></td> <td style="border:0;"></td>
<td style="border:0;"></td>
<td style="border:1px solid #2b2b2b;"></td> {# Bloc RACE #}
<td style="border:0;"></td> <td style="border:0; text-align:left; font-weight:700; font-size: 18px;" colspan="2">RACE</td>
<td style="border:1px solid #2b2b2b;"></td> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="2">LIMOUSIN</td>
<td style="border:0;"></td> <td style="border:1px solid #2b2b2b;"></td>
<td style="border:1px solid #2b2b2b;"></td> <td style="border:0;"></td>
<td style="border: 0; width: 20%;" colspan="2"></td> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="2">CHAROLAIS</td>
</tr> <td style="border:1px solid #2b2b2b;"></td>
<tr> <td style="border:0;"></td>
<td style="border: 0; height: 20px" colspan="16"></td> <td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;">AUTRE</td>
</tr> <td style="border:1px solid #2b2b2b;"></td>
<tr>
<td style="border: 0; text-align:left; font-weight:700; font-size: 24px" colspan="3">RACE</td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="3">LIMOUSIN</td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="1"></td>
<td style="border: 0; text-align:center; font-weight:700;" colspan="1"></td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="3">CHAROLAIS</td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="1"></td>
<td style="border: 0; text-align:center; font-weight:700;" colspan="1"></td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="2">Autre</td>
<td style="border:1px solid #2b2b2b; text-align:center; font-weight:700;" colspan="1"></td>
</tr>
</table>
</td>
</tr> </tr>
</table> </table>
<div style="font-weight:700; text-align:left; font-size: 18px; margin-bottom: 16px;">
CASE N° {{ buildingCase.caseNumber ?? '' }}
</div>
<!-- ========================= <!-- =========================
TABLEAU PRINCIPAL TABLEAU PRINCIPAL
========================= --> ========================= -->
<table class="main"> <table class="main">
<thead> <thead>
<tr> <tr>
<th rowspan="4" class="head-big" style="width:5%">N° de<br>travail</th> {% for month in monthHeaders|default([])|reverse %}
<th rowspan="4" class="head-big" style="width:5%">N° de<br>travail</th>
<th rowspan="4" class="head-big head-big-weight" style="width:4%">Poids<br>(kg)</th>
<th rowspan="4" class="head-big" style="width:7%">Date de<br>naissance</th>
{% for month in monthHeaders|default([]) %}
<th class="month" style="width:6.58%">{{ month.name }}</th> <th class="month" style="width:6.58%">{{ month.name }}</th>
{% endfor %} {% endfor %}
<th rowspan="4" class="head-big" style="width:7%">Date de<br>naissance</th>
<th rowspan="4" class="head-big head-big-weight" style="width:4%">Poids<br>(kg)</th>
<th rowspan="4" class="head-big" style="width:5%">N° de<br>travail</th>
<th rowspan="4" class="head-big" style="width:5%">N° de<br>travail</th>
</tr> </tr>
<tr> <tr>
{% for month in monthHeaders|default([]) %} {% for month in monthHeaders|default([])|reverse %}
<th class="days">{{ month.days }}</th> <th class="days">{{ month.days }}</th>
{% endfor %} {% endfor %}
</tr> </tr>
<tr> <tr>
<th class="days">Foin</th>
<th class="days">Foin</th>
<th colspan="{{ monthHeaders|length -2 }}" class="sub-title">POIDS PAR MOIS</th> <th colspan="{{ monthHeaders|length -2 }}" class="sub-title">POIDS PAR MOIS</th>
<th class="days">Foin</th>
<th class="days">Foin</th>
</tr> </tr>
<tr> <tr>
{% for month in monthHeaders|default([]) %} {% for month in monthHeaders|default([])|reverse %}
<th class="base"> <th class="base">
{% if month.baseValue is defined %} {% if month.baseValue is defined %}
{{ month.baseValue|round(0, 'common') }} kg {{ month.baseValue|round(0, 'common') }} kg
@@ -303,27 +288,28 @@
</thead> </thead>
<tbody> <tbody>
{# 11 lignes comme dans ton code (0..10) #} {# 13 lignes comme dans ton code (0..12) #}
{% for i in 0..12 %} {% for i in 0..12 %}
{% set row = rows[i] ?? null %} {% set row = rows[i] ?? null %}
{% set baseWeight = row ? (row.receivedWeight ?? null) : null %} {% set baseWeight = row ? (row.receivedWeight ?? null) : null %}
<tr class="data-row"> <tr class="data-row">
<td class="row-work"></td> {% for idx in 0..(monthCount > 0 ? monthCount - 1 : 0) %}
<td class="row-work">{{ row ? (row.workNumber ?? '') : '' }}</td> {% set reversedIdx = (monthCount - 1) - idx %}
<td class="row-weight">{{ baseWeight ?? '' }}</td> {% set projectedWeight = row and row.projectedWeights is defined ? (row.projectedWeights[reversedIdx] ?? null) : null %}
<td class="row-month"{% if reversedIdx < 4 %} style="background:#e0e0e0;"{% endif %}>
{{ projectedWeight is not null ? projectedWeight|round(0, 'common') : '' }}
</td>
{% endfor %}
<td class="row-birth"> <td class="row-birth">
{% if row and row.birthDate %} {% if row and row.birthDate %}
{% set birthParts = row.birthDate|split('/') %} {% set birthParts = row.birthDate|split('/') %}
{{ birthParts|length == 3 ? birthParts[1] ~ '/' ~ birthParts[2] : row.birthDate }} {{ birthParts|length == 3 ? birthParts[1] ~ '/' ~ birthParts[2] : row.birthDate }}
{% endif %} {% endif %}
</td> </td>
{% for idx in 0..(monthCount > 0 ? monthCount - 1 : 0) %} <td class="row-weight">{{ baseWeight ?? '' }}</td>
{% set projectedWeight = row and row.projectedWeights is defined ? (row.projectedWeights[idx] ?? null) : null %} <td class="row-work">{{ row ? (row.workNumber ?? '') : '' }}</td>
<td class="row-month"{% if loop.index0 < 4 %} style="background:#e0e0e0;"{% endif %}> <td class="row-work"></td>
{{ projectedWeight is not null ? projectedWeight|round(0, 'common') : '' }}
</td>
{% endfor %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@@ -331,41 +317,89 @@
<!-- ========================= <!-- =========================
FOOTER (traitements / vaccins) FOOTER (traitements / vaccins)
========================= --> ========================= -->
<table class="footer" style="border-collapse:collapse; margin-top: 32px"> <table style="width:100%; border:0; border-collapse:collapse; table-layout:fixed; margin-top: 12px">
<tr> <tr>
<td style="height: 20px; border: 0" colspan="4"></td> <td style="border:0; padding:0; width:49%; vertical-align:top;">
<td style="font-weight: 700" colspan="2">Grippe</td> <table class="footer" style="border-collapse:collapse; width:100%; table-layout:fixed;">
<td style="font-weight: 700" colspan="2">Protivity</td> <tr>
</tr> <td style="font-weight: 700; height: 20px" colspan="10">Traitements</td>
<tr> </tr>
<td style="height: 20px">Date</td> <tr>
<td>Antibiotique</td> <td style="height: 20px" colspan="2">Date</td>
<td>Date</td> <td colspan="2"></td>
<td>Antero</td> <td>Dose</td>
<td>Date</td> <td colspan="5">Observation</td>
<td>Intranasale</td> </tr>
<td>Date</td> <tr>
<td>Rappel 30 jours</td> <td style="height: 20px" colspan="2"></td>
</tr> <td colspan="2">Grippe</td>
<tr> <td></td>
<td style="height: 20px"></td> <td colspan="5"></td>
<td></td> </tr>
<td></td> <tr>
<td></td> <td style="height: 20px" colspan="2"></td>
<td></td> <td colspan="2">Antéro</td>
<td></td> <td></td>
<td></td> <td colspan="5"></td>
<td></td> </tr>
</tr> <tr>
<tr> <td style="height: 20px" colspan="2"></td>
<td style="height: 20px"></td> <td colspan="2">Antibiotiques</td>
<td></td> <td></td>
<td></td> <td colspan="5"></td>
<td></td> </tr>
<td></td> <tr>
<td></td> <td style="height: 20px" colspan="2"></td>
<td></td> <td colspan="2">Déparasitage</td>
<td></td> <td></td>
<td colspan="5"></td>
</tr>
<tr>
<td style="height: 20px" colspan="2"></td>
<td colspan="2"></td>
<td></td>
<td colspan="5"></td>
</tr>
</table>
</td>
<td style="border:0; padding:0; width:2%;"></td>
<td style="border:0; padding:0; width:49%; vertical-align:top;">
<table class="footer" style="border-collapse:collapse; width:100%; table-layout:fixed;">
<tr>
<td style="font-weight: 700; height: 20px" colspan="10">Rappel</td>
</tr>
<tr>
<td style="height: 20px" colspan="2">Date</td>
<td>Dose</td>
<td colspan="7">Observation</td>
</tr>
<tr>
<td style="height: 20px" colspan="2"></td>
<td></td>
<td colspan="7"></td>
</tr>
<tr>
<td style="height: 20px" colspan="2"></td>
<td></td>
<td colspan="7"></td>
</tr>
<tr>
<td style="height: 20px" colspan="2"></td>
<td></td>
<td colspan="7"></td>
</tr>
<tr>
<td style="height: 20px" colspan="2"></td>
<td></td>
<td colspan="7"></td>
</tr>
<tr>
<td style="height: 20px" colspan="2"></td>
<td></td>
<td colspan="7"></td>
</tr>
</table>
</td>
</tr> </tr>
</table> </table>
</div> </div>