fix: Print report showing blank preview and wasted first page

The print CSS was hiding all .card elements, which contained the
actual results content. Replaced with compact print-friendly styles:
summary cards display as an inline row, redundant stock summary is
hidden, and spacing is tightened throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 14:37:13 -05:00
parent 69b282aaf3
commit 1ccdeb6817
2 changed files with 62 additions and 8 deletions

View File

@@ -60,7 +60,7 @@ else
}
<!-- Overall Summary Cards -->
<div class="row mb-4">
<div class="row mb-4 print-summary">
<div class="col-md-3 col-6 mb-3">
<div class="card text-center">
<div class="card-body">
@@ -96,7 +96,7 @@ else
</div>
<!-- Stock Summary -->
<div class="row mb-4">
<div class="row mb-4 print-stock-summary">
<div class="col-md-6 mb-3">
<div class="card border-success">
<div class="card-header bg-success text-white">

View File

@@ -258,19 +258,73 @@
font-size: 8pt;
}
.alert {
/* Compact summary: inline row instead of big cards */
.print-summary {
display: flex !important;
flex-wrap: nowrap !important;
gap: 0 !important;
margin-bottom: 0.5rem !important;
border: 1px solid #ccc;
padding: 0.4rem 0.75rem !important;
}
.print-summary > div {
flex: 1 !important;
max-width: none !important;
width: auto !important;
margin: 0 !important;
padding: 0 !important;
}
.print-summary .card {
border: none !important;
background: none !important;
box-shadow: none !important;
}
.print-summary .card-body {
padding: 0 !important;
display: flex;
align-items: baseline;
gap: 0.3rem;
}
.print-summary h2 {
font-size: 11pt !important;
margin: 0 !important;
}
.print-summary p {
font-size: 8pt !important;
margin: 0 !important;
}
/* Hide redundant stock summary (shown per-material) */
.print-stock-summary {
display: none !important;
}
/* General card print styles */
.card {
display: none !important;
border: 1px solid #ccc !important;
break-inside: avoid;
page-break-inside: avoid;
}
h1:not(.report-header h1) {
display: none !important;
.card-header {
background-color: #f0f0f0 !important;
}
.text-muted:not(.cut-list-report .text-muted) {
display: none !important;
.badge {
border: 1px solid #999;
}
/* Reduce spacing */
.mb-4 {
margin-bottom: 0.5rem !important;
}
.mb-3 {
margin-bottom: 0.25rem !important;
}
}