From 8538fdac1afe315f130455303d26edfb01463baf Mon Sep 17 00:00:00 2001 From: Maciej Pienczyn Date: Mon, 30 Mar 2026 12:24:09 +0200 Subject: [PATCH] =?UTF-8?q?feat(membership):=20redesigned=20PDF=20?= =?UTF-8?q?=E2=80=94=20cleaner=20layout,=20no=20IP,=20workflow=20history?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed IP address from declaration box - Merged address + contact into one section (less sections = cleaner) - Removed duplicate company name (already in header) - Added workflow history section (review stages) - Wider spacing between sections (14pt), fields with subtle bottom border - Consent as grid with colored check icons - Description truncated to 800 chars - Larger, more readable header with company name prominent Co-Authored-By: Claude Opus 4.6 (1M context) --- templates/admin/membership_print.html | 278 +++++++++++++++----------- 1 file changed, 163 insertions(+), 115 deletions(-) diff --git a/templates/admin/membership_print.html b/templates/admin/membership_print.html index f3d0163..9ca5251 100644 --- a/templates/admin/membership_print.html +++ b/templates/admin/membership_print.html @@ -6,12 +6,8 @@ @page { size: A4; margin: 18mm 15mm 15mm 15mm; - @top-center { - content: ""; - } - @bottom-center { - content: ""; - } + @top-center { content: ""; } + @bottom-center { content: ""; } } body { @@ -26,68 +22,76 @@ /* Header */ .header { text-align: center; - margin-bottom: 12pt; - padding-bottom: 8pt; - border-bottom: 2pt solid #2E4872; + margin-bottom: 14pt; + padding-bottom: 10pt; + border-bottom: 2.5pt solid #2E4872; } .header h1 { - font-size: 15pt; + font-size: 16pt; color: #2E4872; - margin: 0 0 2pt 0; + margin: 0 0 4pt 0; letter-spacing: 0.5pt; } .header .subtitle { - font-size: 10pt; + font-size: 11pt; color: #333; - margin: 0; + margin: 0 0 6pt 0; + font-weight: 500; } .header .meta { - font-size: 8pt; - color: #666; - margin: 3pt 0 0; + font-size: 8.5pt; + color: #555; + margin: 0; + } + .header .company-name { + font-size: 12pt; + font-weight: 600; + color: #1a1a1a; + margin: 4pt 0; } /* Section */ .section { - margin-bottom: 8pt; + margin: 14pt 0 10pt 0; page-break-inside: avoid; } .section-title { - font-size: 10pt; + font-size: 11pt; font-weight: 600; color: #2E4872; - border-bottom: 1pt solid #2E4872; - padding-bottom: 2pt; - margin: 0 0 4pt 0; + border-bottom: 1.5pt solid #d0d7e3; + padding-bottom: 3pt; + margin: 0 0 8pt 0; } - /* Data grid */ + /* Data grid — airy layout */ .grid { display: grid; grid-template-columns: 1fr 1fr; - gap: 3pt 20pt; + gap: 8pt 24pt; } .grid-3 { grid-template-columns: 1fr 1fr 1fr; } .field { - margin-bottom: 2pt; + padding: 4pt 0; + border-bottom: 0.5pt solid #eee; } .field-label { font-size: 7pt; - color: #888; + color: #999; text-transform: uppercase; - letter-spacing: 0.3pt; - margin: 0; + letter-spacing: 0.4pt; + margin: 0 0 1pt 0; } .field-value { - font-size: 9pt; + font-size: 9.5pt; font-weight: 500; color: #1a1a1a; margin: 0; } .field-value.large { - font-size: 10pt; + font-size: 11pt; font-weight: 600; } @@ -96,68 +100,108 @@ display: inline-block; background: #e8f0fe; color: #1a56db; - padding: 1pt 8pt; - border-radius: 3pt; - font-size: 8pt; - margin: 1pt 2pt; + padding: 2pt 10pt; + border-radius: 4pt; + font-size: 8.5pt; + margin: 2pt 3pt; } /* Description */ .description { font-size: 8.5pt; - line-height: 1.5; + line-height: 1.6; color: #333; text-align: justify; + max-height: 140pt; + overflow: hidden; } /* Consent */ - .consent-row { + .consent-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 4pt 20pt; + } + .consent-item { display: flex; align-items: center; - gap: 4pt; - font-size: 8pt; - padding: 1pt 0; + gap: 6pt; + font-size: 9pt; + padding: 3pt 0; } - .check-yes { color: #16a34a; font-weight: bold; } - .check-no { color: #dc2626; font-weight: bold; } + .check-icon { + width: 14pt; + height: 14pt; + border-radius: 3pt; + display: flex; + align-items: center; + justify-content: center; + font-size: 9pt; + font-weight: bold; + } + .check-yes { background: #dcfce7; color: #16a34a; } + .check-no { background: #fee2e2; color: #dc2626; } /* Declaration box */ .declaration-box { border: 1pt solid #2E4872; - padding: 6pt 10pt; - margin-top: 6pt; - background: #f8fafc; - font-size: 8pt; + border-radius: 4pt; + padding: 8pt 12pt; + margin-top: 8pt; + background: #f0f4fa; + font-size: 9pt; + display: flex; + justify-content: space-between; } - .declaration-box .label { - font-weight: 600; + .declaration-box .label { font-weight: 600; color: #2E4872; } + .declaration-box .date { color: #555; } + + /* Workflow history */ + .workflow-item { + display: flex; + align-items: center; + gap: 8pt; + padding: 3pt 0; + font-size: 8.5pt; + border-bottom: 0.5pt solid #eee; + } + .workflow-date { + color: #888; + min-width: 80pt; + font-size: 7.5pt; + } + .workflow-action { + font-weight: 500; color: #2E4872; } + /* Signature */ + .signature-area { + margin-top: 36pt; + display: grid; + grid-template-columns: 1fr 1fr; + gap: 60pt; + } + .signature-block { text-align: center; } + .signature-line { + border-top: 0.5pt solid #666; + padding-top: 4pt; + font-size: 7.5pt; + color: #666; + } + .signature-dots { + height: 30pt; + } + /* Footer */ .footer { - margin-top: 20pt; - padding-top: 8pt; - border-top: 0.5pt solid #ccc; + margin-top: 16pt; + padding-top: 6pt; + border-top: 0.5pt solid #ddd; font-size: 7pt; - color: #999; + color: #aaa; text-align: center; } - - /* Signature line */ - .signature-area { - margin-top: 30pt; - display: grid; - grid-template-columns: 1fr 1fr; - gap: 40pt; - } - .signature-line { - border-top: 0.5pt solid #666; - padding-top: 3pt; - text-align: center; - font-size: 7pt; - color: #666; - } @@ -165,20 +209,17 @@

Izba Gospodarcza Norda Biznes

Deklaracja Przystąpienia do Izby nr {{ app.id }}

+

{{ app.company_name }}

- {{ app.company_name }} - | Data złożenia: {{ app.submitted_at.strftime('%d.%m.%Y, %H:%M') if app.submitted_at else 'brak' }} - | Status: {{ app.status_label }} + Data złożenia: {{ app.submitted_at.strftime('%d.%m.%Y, godz. %H:%M') if app.submitted_at else 'brak' }} +  •  Status: {{ app.status_label }}

+

Dane firmy

-
-

Nazwa firmy

-

{{ app.company_name }}

-

NIP

{{ app.nip or '---' }}

@@ -195,49 +236,33 @@

Forma prawna

{{ (app.registry_data.get('legal_form') or app.registry_data.get('forma_prawna')) if app.registry_data and app.registry_data is mapping else '---' }}

-
-

Źródło danych

-

{{ app.registry_source or '---' }}

-
+
-

Adres siedziby

+

Adres i dane kontaktowe

-

Ulica i numer

-

{{ (app.address_street or '') }}{% if app.address_number %} {{ app.address_number }}{% endif %}

-
-
-

Kod pocztowy i Miejscowość

-

{{ app.address_postal_code or '' }} {{ app.address_city or '---' }}

-
-
-
- -
-

Dane kontaktowe

-
-
-

Email

-

{{ app.email or '---' }}

+

Adres siedziby

+

{{ (app.address_street or '') }}{% if app.address_number %} {{ app.address_number }}{% endif %}, {{ app.address_postal_code or '' }} {{ app.address_city or '' }}

Telefon

{{ app.phone or '---' }}

-

Strona WWW

-

{{ app.website or '---' }}

+

Email

+

{{ app.email or '---' }}

-

Nazwa skrócona

-

{{ app.short_name or '---' }}

+

Strona WWW

+

{{ app.website or '---' }}

+

Delegaci do Walnego Zgromadzenia

@@ -256,6 +281,7 @@
+ {% if app.sections_labels %}

Sekcje tematyczne

@@ -265,48 +291,70 @@
{% endif %} + {% if app.description %}

Opis działalności

-

{{ app.description }}

+

{{ app.description[:800] }}{% if app.description|length > 800 %}...{% endif %}

{% endif %} +

Zgody i oświadczenia

- - + +{% if app.workflow_history %} +
+

Historia rozpatrywania

+ {% for event in app.workflow_history %} +
+ {{ event.timestamp if event.timestamp is string else event.get('timestamp', '') }} + {{ event.get('action_label', event.get('action', '')) }} + {% if event.get('comment') %} — {{ event.get('comment') }}{% endif %} +
+ {% endfor %} +
+{% endif %} + +
-
+
+
Podpis wnioskodawcy
-
+
+
Podpis osoby przyjmującej