fix(orion): compact validation result and signature layout

This commit is contained in:
Schubert Ferenc 2026-07-12 12:47:59 +02:00
parent e9e46f2cb4
commit 9a90a4938e
3 changed files with 41 additions and 21 deletions

View file

@ -83,8 +83,10 @@ class CoverComponent(ReportComponent):
'<p class="cover-subtitle">Funktions- und Leistungsqualifikation Klein-Sterilisator</p>' '<p class="cover-subtitle">Funktions- und Leistungsqualifikation Klein-Sterilisator</p>'
f'<p class="cover-subtitle">{text(context.customer.name)}</p>' f'<p class="cover-subtitle">{text(context.customer.name)}</p>'
f"{rows}" f"{rows}"
'<div class="cover-closing">'
f"{validation_result_box(validation.result)}" f"{validation_result_box(validation.result)}"
'<div class="signature-grid"><div>Unterschrift technische Validierung</div><div>Unterschrift Auftraggeber</div></div>' '<div class="signature-block"><div class="signature-line"></div><div class="signature-label">Unterschrift technische Validierung</div></div>'
"</div>"
"</section>" "</section>"
) )

View file

@ -135,7 +135,7 @@ body {
.cover-page { .cover-page {
page: cover; page: cover;
min-height: 245mm; min-height: 238mm;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
@ -151,7 +151,7 @@ body {
display: grid; display: grid;
gap: 18mm; gap: 18mm;
grid-template-columns: 1fr 55mm; grid-template-columns: 1fr 55mm;
margin-bottom: 18mm; margin-bottom: 14mm;
} }
.cover-logo { .cover-logo {
@ -186,20 +186,26 @@ h1 {
.cover-subtitle { .cover-subtitle {
color: #4F6A74; color: #4F6A74;
font-size: 14pt; font-size: 14pt;
margin: 0 0 9mm 0; margin: 0 0 6mm 0;
} }
.cover-page .definition-row { .cover-page .definition-row {
grid-template-columns: 36mm 1fr; grid-template-columns: 36mm 1fr;
padding: 1.4mm 0; padding: 1.2mm 0;
}
.cover-closing {
break-inside: avoid;
margin-top: 5mm;
page-break-inside: avoid;
} }
.result-box { .result-box {
border: 1.2mm solid #8A9498; border: .8mm solid #8A9498;
border-radius: 2mm; border-radius: 2mm;
break-inside: avoid; break-inside: avoid;
margin: 8mm 0; margin: 6mm 0;
padding: 7mm 8mm; padding: 5mm 7mm;
page-break-inside: avoid; page-break-inside: avoid;
text-align: center; text-align: center;
width: 100%; width: 100%;
@ -207,10 +213,10 @@ h1 {
.result-box__label { .result-box__label {
color: #4F5E63; color: #4F5E63;
font-size: 9.5pt; font-size: 9pt;
font-weight: 700; font-weight: 700;
letter-spacing: .06em; letter-spacing: .06em;
margin-bottom: 4mm; margin-bottom: 2.5mm;
} }
.result-box__value { .result-box__value {
@ -219,12 +225,12 @@ h1 {
} }
.result-box--cover { .result-box--cover {
margin-top: 7mm; margin: 0 0 7mm 0;
padding: 6mm 8mm; padding: 4.5mm 7mm;
} }
.result-box--cover .result-box__value { .result-box--cover .result-box__value {
font-size: 24pt; font-size: 21pt;
text-transform: uppercase; text-transform: uppercase;
} }
@ -261,17 +267,23 @@ h1 {
color: #2E3B40; color: #2E3B40;
} }
.signature-grid { .signature-block {
display: grid; break-inside: avoid;
grid-template-columns: 1fr 1fr; color: #6B7C85;
gap: 16mm; margin-top: 6mm;
margin-top: 11mm; page-break-inside: avoid;
width: 82mm;
} }
.signature-grid div { .signature-line {
border-top: 1px solid #6B7C85; border-top: 1px solid #6B7C85;
color: #6B7C85; height: 0;
padding-top: 3mm; margin-bottom: 2.5mm;
width: 82mm;
}
.signature-label {
font-size: 9pt;
} }
.chapter { .chapter {

View file

@ -920,6 +920,10 @@ def test_orion_result_boxes_render_on_cover_summary_and_results(tmp_path):
assert html.count("VALIDIERUNGSERGEBNIS") >= 3 assert html.count("VALIDIERUNGSERGEBNIS") >= 3
assert "BESTANDEN MIT AUFLAGEN" in html assert "BESTANDEN MIT AUFLAGEN" in html
assert "Bestanden mit Auflagen" in html assert "Bestanden mit Auflagen" in html
assert 'class="cover-closing"' in html
assert 'class="signature-block"' in html
assert "Unterschrift technische Validierung" in html
assert "Unterschrift Auftraggeber" not in html
assert html.index('id="cover"') < html.index("BESTANDEN MIT AUFLAGEN") assert html.index('id="cover"') < html.index("BESTANDEN MIT AUFLAGEN")
assert html.index('id="summary"') < html.index("Bestanden mit Auflagen") assert html.index('id="summary"') < html.index("Bestanden mit Auflagen")
assert html.index('id="results"') < html.rindex("Bestanden mit Auflagen") assert html.index('id="results"') < html.rindex("Bestanden mit Auflagen")
@ -929,6 +933,8 @@ def test_orion_result_box_css_prevents_page_breaks():
css = Path("app/modules/orion/templates/report.css").read_text(encoding="utf-8") css = Path("app/modules/orion/templates/report.css").read_text(encoding="utf-8")
assert ".result-box" in css assert ".result-box" in css
assert ".cover-closing" in css
assert ".signature-block" in css
assert "break-inside: avoid" in css assert "break-inside: avoid" in css
assert "page-break-inside: avoid" in css assert "page-break-inside: avoid" in css
assert "#EAF5EE" in css assert "#EAF5EE" in css