From 4538d04972ba874ded91c96829423687aee932f5 Mon Sep 17 00:00:00 2001 From: Daniel Allaire Date: Tue, 2 Jun 2026 00:44:36 -0400 Subject: [PATCH] Reequilibrer rapport de rencontre --- backend/app/routers/reunions.py | 31 +++++++++++++++++-------------- frontend/src/pages/ModePapier.jsx | 17 ++++++++--------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/backend/app/routers/reunions.py b/backend/app/routers/reunions.py index ab50705..e0cb8f9 100644 --- a/backend/app/routers/reunions.py +++ b/backend/app/routers/reunions.py @@ -141,13 +141,15 @@ async def _html_rapport_rencontre(reunion: Reunion, membre, db: AsyncSession) -> css = """ @page { size: letter; margin: 0.55in 0.65in; } body { font-family: Arial, 'DejaVu Sans', sans-serif; color: #111; font-size: 10pt; } - .header { text-align: center; margin: 12pt 0 40pt; } - .groupe { font-size: 21pt; font-weight: 400; margin-bottom: 16pt; } - .district { font-size: 16pt; margin-bottom: 18pt; } + .header { text-align: center; margin: 8pt 0 28pt; } + .groupe { font-size: 20pt; font-weight: 400; margin-bottom: 8pt; } + .district { font-size: 14pt; margin-bottom: 6pt; } + .adresse { font-size: 9.5pt; margin-bottom: 16pt; color: #333; } h1 { font-size: 14pt; font-weight: 500; letter-spacing: 0; margin: 0; } - .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18pt 18pt; } + .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14pt 16pt; } .field { break-inside: avoid; } .field.full { grid-column: 1 / -1; } + .field.span2 { grid-column: span 2; } .box { border: 1pt solid #222; min-height: 27pt; @@ -157,33 +159,34 @@ async def _html_rapport_rencontre(reunion: Reunion, membre, db: AsyncSession) -> overflow: hidden; } .label { font-style: italic; font-size: 8.5pt; margin: 4pt 0 0 1pt; } - .short .box { min-height: 24pt; } - .theme .box { min-height: 58pt; } - .medium .box { min-height: 58pt; } - .deep .box { min-height: 95pt; } - .notes .box { min-height: 150pt; } + .short .box { min-height: 23pt; } + .theme .box { min-height: 54pt; } + .medium .box { min-height: 70pt; } + .tall .box { min-height: 86pt; } + .notes .box { min-height: 132pt; } .footer { margin-top: 10pt; color: #777; font-size: 7.5pt; text-align: center; } """ groupe_nom = groupe.nom if groupe and groupe.nom else "Groupe" district = f"District {groupe.district}" if groupe and groupe.district else "District" + adresse = groupe.adresse_local if groupe and groupe.adresse_local else "" + nouveaux_jetons = "\n\n".join([texte for texte in ["Nouveau(x):", jetons_texte] if texte]) html = f"""
{escape(groupe_nom)}
{escape(district)}
+
{escape(adresse)}

RÉUNION HEBDOMADAIRE

{bloc("DATE ( AAAA / MM / JJ)", reunion.date_reunion.date().isoformat(), "short")} {bloc("PRÉSENCES", "", "short")} - {bloc("SALLE & CAFÉ", groupe.adresse_local if groupe else "", "short")} {bloc("ANIMATION", animateur.prenom if animateur else "", "short")} {bloc("THÈME DE LA DISCUSSION", reunion.theme or "", "full theme")} - {bloc("NOUVEAU(X)", "", "medium")} - {bloc("ANNIVERSAIRES / JETONS", jetons_texte, "medium")} + {bloc("NOUVEAU(X) / ANNIVERSAIRES / JETONS", nouveaux_jetons, "span2 medium")} {bloc("COLLECTE", collecte_texte, "short")} - {bloc("DÉPENSES", "", "deep")} - {bloc("VENTES (Littérature)", ventes_lit_texte, "short")} + {bloc("VENTES (Littérature)", ventes_lit_texte, "span2 short")} {bloc("VENTES (Jetons)", ventes_jetons_texte, "short")} + {bloc("DÉPENSES", "", "full tall")} {bloc("NOTES", notes_texte, "full notes")}
diff --git a/frontend/src/pages/ModePapier.jsx b/frontend/src/pages/ModePapier.jsx index d24c9cf..c5f16ce 100644 --- a/frontend/src/pages/ModePapier.jsx +++ b/frontend/src/pages/ModePapier.jsx @@ -34,6 +34,7 @@ function htmlFormulaire(type, groupe) {

${nomGroupe}

${district}

+ ${lieu ? `
${lieu}
` : ''}

${titre}

`; const sections = { @@ -42,15 +43,13 @@ function htmlFormulaire(type, groupe) {
${bloc('DATE ( AAAA / MM / JJ)', '', 'short')} ${bloc('PRÉSENCES', '', 'short')} - ${bloc('SALLE & CAFÉ', lieu, 'short')} ${bloc('ANIMATION', '', 'short')} ${bloc('THÈME DE LA DISCUSSION', '', 'full theme')} - ${bloc('NOUVEAU(X)', '', 'medium')} - ${bloc('ANNIVERSAIRES / JETONS', '', 'medium')} + ${bloc('NOUVEAU(X) / ANNIVERSAIRES / JETONS', '', 'span2 medium')} ${bloc('COLLECTE', '', 'short')} - ${bloc('DÉPENSES', '', 'deep')} - ${bloc('VENTES (Littérature)', '', 'short')} + ${bloc('VENTES (Littérature)', '', 'span2 short')} ${bloc('VENTES (Jetons)', '', 'short')} + ${bloc('DÉPENSES', '', 'full tall')} ${bloc('NOTES', '', 'full notes')}
`, assemblee: ` @@ -70,10 +69,10 @@ function htmlFormulaire(type, groupe) { return `${nomGroupe} - ${type} ${sections[type]}`;