updated view in label preview

This commit is contained in:
Quality System Admin
2025-10-27 20:25:31 +02:00
parent d142129de6
commit a960285d59
15 changed files with 1889 additions and 685 deletions

View File

@@ -0,0 +1,807 @@
/* ==========================================================================
PRINT MODULE CSS - Dedicated styles for Labels/Printing Module
==========================================================================
This file contains all CSS for the printing module pages:
- print_module.html (main printing interface)
- print_lost_labels.html (lost labels printing)
- main_page_etichete.html (labels main page)
- upload_data.html (upload orders)
- view_orders.html (view orders)
========================================================================== */
/* ==========================================================================
LABEL PREVIEW STYLES
========================================================================== */
#label-preview {
background: #fafafa;
position: relative;
overflow: visible;
}
/* Label content rectangle styling */
#label-content {
position: absolute;
top: 65.7px;
left: 11.34px;
width: 227.4px;
height: 321.3px;
border: 1px solid #ddd;
background: white;
}
/* Barcode frame styling */
#barcode-frame {
position: absolute;
top: 387px;
left: 50%;
transform: translateX(calc(-50% - 20px));
width: 220px;
max-width: 220px;
height: 50px;
background: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
overflow: hidden;
border: none;
}
#barcode-display {
width: 100%;
height: 40px;
max-width: 220px;
}
#barcode-text {
font-size: 8px;
font-family: 'Courier New', monospace;
margin-top: 2px;
text-align: center;
font-weight: bold;
display: none;
}
/* Vertical barcode frame styling */
#vertical-barcode-frame {
position: absolute;
top: 50px;
left: 270px;
width: 321.3px;
height: 40px;
background: white;
display: flex;
align-items: center;
justify-content: center;
transform: rotate(90deg);
transform-origin: left center;
border: none;
}
#vertical-barcode-display {
width: 100%;
height: 35px;
}
#vertical-barcode-text {
position: absolute;
bottom: -15px;
font-size: 7px;
font-family: 'Courier New', monospace;
text-align: center;
font-weight: bold;
width: 100%;
display: none;
}
/* Allow JsBarcode to control SVG colors naturally - removed forced black styling */
/* ==========================================================================
PRINT MODULE TABLE STYLES
========================================================================== */
/* Enhanced table styling for print module tables */
.card.scan-table-card table.print-module-table.scan-table thead th {
border-bottom: 2px solid var(--print-table-border) !important;
background-color: var(--print-table-header-bg) !important;
color: var(--print-table-header-text) !important;
padding: 0.25rem 0.4rem !important;
text-align: left !important;
font-weight: 600 !important;
font-size: 10px !important;
line-height: 1.2 !important;
}
.card.scan-table-card table.print-module-table.scan-table {
width: 100% !important;
border-collapse: collapse !important;
background-color: var(--print-table-body-bg) !important;
}
.card.scan-table-card table.print-module-table.scan-table tbody tr:hover td {
background-color: var(--print-table-hover) !important;
cursor: pointer !important;
}
.card.scan-table-card table.print-module-table.scan-table tbody td {
background-color: var(--print-table-body-bg) !important;
color: var(--print-table-body-text) !important;
border: 1px solid var(--print-table-border) !important;
padding: 0.25rem 0.4rem !important;
}
.card.scan-table-card table.print-module-table.scan-table tbody tr.selected td {
background-color: var(--print-table-selected) !important;
color: white !important;
}
/* ==========================================================================
VIEW ORDERS TABLE STYLES (for print_lost_labels.html)
========================================================================== */
table.view-orders-table.scan-table {
margin: 0 !important;
border-spacing: 0 !important;
border-collapse: collapse !important;
width: 100% !important;
table-layout: fixed !important;
font-size: 11px !important;
}
table.view-orders-table.scan-table thead th {
height: 85px !important;
min-height: 85px !important;
max-height: 85px !important;
vertical-align: middle !important;
text-align: center !important;
white-space: normal !important;
word-wrap: break-word !important;
line-height: 1.3 !important;
padding: 6px 3px !important;
font-size: 11px !important;
background-color: var(--print-table-header-bg) !important;
color: var(--print-table-header-text) !important;
font-weight: bold !important;
text-transform: none !important;
letter-spacing: 0 !important;
overflow: visible !important;
box-sizing: border-box !important;
border: 1px solid var(--print-table-border) !important;
text-overflow: clip !important;
position: relative !important;
}
table.view-orders-table.scan-table tbody td {
padding: 4px 2px !important;
font-size: 10px !important;
text-align: center !important;
border: 1px solid var(--print-table-border) !important;
background-color: var(--print-table-body-bg) !important;
color: var(--print-table-body-text) !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
vertical-align: middle !important;
}
/* Column width definitions for view orders table */
table.view-orders-table.scan-table td:nth-child(1) { width: 50px !important; }
table.view-orders-table.scan-table td:nth-child(2) { width: 80px !important; }
table.view-orders-table.scan-table td:nth-child(3) { width: 80px !important; }
table.view-orders-table.scan-table td:nth-child(4) { width: 150px !important; }
table.view-orders-table.scan-table td:nth-child(5) { width: 70px !important; }
table.view-orders-table.scan-table td:nth-child(6) { width: 80px !important; }
table.view-orders-table.scan-table td:nth-child(7) { width: 75px !important; }
table.view-orders-table.scan-table td:nth-child(8) { width: 90px !important; }
table.view-orders-table.scan-table td:nth-child(9) { width: 70px !important; }
table.view-orders-table.scan-table td:nth-child(10) { width: 100px !important; }
table.view-orders-table.scan-table td:nth-child(11) { width: 90px !important; }
table.view-orders-table.scan-table td:nth-child(12) { width: 70px !important; }
table.view-orders-table.scan-table td:nth-child(13) { width: 50px !important; }
table.view-orders-table.scan-table td:nth-child(14) { width: 70px !important; }
table.view-orders-table.scan-table td:nth-child(15) { width: 100px !important; }
table.view-orders-table.scan-table tbody tr:hover td {
background-color: var(--print-table-hover) !important;
}
table.view-orders-table.scan-table tbody tr.selected td {
background-color: var(--print-table-selected) !important;
color: white !important;
}
/* Remove unwanted spacing */
.report-table-card > * {
margin-top: 0 !important;
}
.report-table-container {
margin-top: 0 !important;
}
/* ==========================================================================
PRINT MODULE LAYOUT STYLES
========================================================================== */
/* Scan container layout */
.scan-container {
display: flex;
flex-direction: row;
gap: 20px;
width: 100%;
align-items: flex-start;
}
/* Label preview card styling */
.card.scan-form-card {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
min-height: 700px;
width: 330px;
flex-shrink: 0;
position: relative;
padding: 15px;
}
/* Data preview card styling */
.card.scan-table-card {
min-height: 700px;
width: calc(100% - 350px);
margin: 0;
}
/* View Orders and Upload Orders page specific layout - 25/75 split */
.card.report-form-card,
.card.scan-form-card {
min-height: 700px;
width: 25%;
flex-shrink: 0;
padding: 15px;
margin-bottom: 0; /* Remove bottom margin for horizontal layout */
}
.card.report-table-card,
.card.scan-table-card {
min-height: 700px;
width: 75%;
margin: 0;
padding: 15px;
}
/* Upload Orders specific table styling */
.card.scan-table-card table {
margin-bottom: 0;
}
/* Ensure proper scroll behavior for upload preview */
.card.scan-table-card[style*="overflow-y: auto"] {
/* Maintain scroll functionality while keeping consistent height */
max-height: 700px;
}
/* Label view title */
.label-view-title {
width: 100%;
text-align: center;
padding: 0 0 15px 0;
font-size: 18px;
font-weight: bold;
letter-spacing: 0.5px;
}
/* ==========================================================================
SEARCH AND FORM STYLES
========================================================================== */
/* Search card styling */
.search-card {
margin-bottom: 20px;
padding: 20px;
}
.search-field {
width: 100%;
max-width: 400px;
padding: 8px;
font-size: 14px;
border: 1px solid #ddd;
border-radius: 4px;
}
.quantity-field {
width: 100px;
padding: 8px;
font-size: 14px;
border: 1px solid #ddd;
border-radius: 4px;
}
.search-result-table {
margin-top: 15px;
margin-bottom: 15px;
}
/* ==========================================================================
BUTTON STYLES
========================================================================== */
.print-btn {
background-color: #28a745;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
.print-btn:hover {
background-color: #218838;
}
.print-btn:disabled {
background-color: #6c757d;
cursor: not-allowed;
}
/* ==========================================================================
REPORT TABLE CONTAINER STYLES
========================================================================== */
.report-table-card h3 {
margin: 0 0 15px 0 !important;
padding: 0 !important;
}
.report-table-card {
padding: 15px !important;
}
/* ==========================================================================
PRINT MODULE SPECIFIC LAYOUT ADJUSTMENTS
========================================================================== */
/* For print_lost_labels.html - Two-column layout */
.scan-container.lost-labels {
display: flex;
flex-direction: column;
gap: 0;
width: 100%;
}
.scan-container.lost-labels .search-card {
width: 100%;
max-height: 100px;
min-height: 70px;
display: flex;
align-items: center;
flex-wrap: wrap;
margin-bottom: 24px;
}
.scan-container.lost-labels .row-container {
display: flex;
flex-direction: row;
gap: 24px;
width: 100%;
align-items: flex-start;
}
/* ==========================================================================
PRINT OPTIONS STYLES
========================================================================== */
/* Print method selection */
.print-method-container {
margin-bottom: 15px;
}
.print-method-label {
font-size: 12px;
font-weight: 600;
color: #495057;
margin-bottom: 8px;
}
.form-check {
margin-bottom: 6px;
}
.form-check-label {
font-size: 11px;
line-height: 1.2;
}
/* Printer selection styling */
#qztray-printer-selection {
margin-bottom: 10px;
}
#qztray-printer-selection label {
font-size: 11px;
font-weight: 600;
color: #495057;
margin-bottom: 3px;
display: block;
}
#qztray-printer-select {
font-size: 11px;
padding: 3px 6px;
}
/* Print button styling */
#print-label-btn {
font-size: 13px;
padding: 8px 24px;
border-radius: 5px;
font-weight: 600;
}
/* QZ Tray info section */
#qztray-info {
width: 100%;
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid #e9ecef;
}
#qztray-info .info-box {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 6px;
padding: 10px;
text-align: center;
}
#qztray-info .info-text {
font-size: 10px;
color: #495057;
margin-bottom: 8px;
}
#qztray-info .download-link {
font-size: 10px;
padding: 4px 16px;
}
/* ==========================================================================
BADGE AND STATUS STYLES
========================================================================== */
.badge {
font-size: 9px;
padding: 2px 6px;
}
.badge-success {
background-color: #28a745;
color: white;
}
.badge-danger {
background-color: #dc3545;
color: white;
}
.badge-warning {
background-color: #ffc107;
color: #212529;
}
/* Status indicators */
#qztray-status {
font-size: 9px;
padding: 2px 6px;
}
/* ==========================================================================
RESPONSIVE DESIGN
========================================================================== */
@media (max-width: 1200px) {
.scan-container {
flex-direction: column;
gap: 15px;
}
.card.scan-form-card {
width: 100%;
}
.card.scan-table-card {
width: 100%;
}
/* View Orders and Upload Orders page responsive */
.card.report-form-card,
.card.scan-form-card {
width: 100%;
margin-bottom: 24px; /* Restore bottom margin for stacked layout */
}
.card.report-table-card,
.card.scan-table-card {
width: 100%;
}
}
@media (max-width: 992px) and (min-width: 769px) {
/* Tablet view - adjust proportions for better fit */
.card.report-form-card,
.card.scan-form-card {
width: 30%;
}
.card.report-table-card,
.card.scan-table-card {
width: 70%;
}
}
@media (max-width: 768px) {
.label-view-title {
font-size: 16px;
}
#label-preview {
width: 280px;
height: 400px;
}
#label-content {
width: 200px;
height: 290px;
}
.search-field {
max-width: 300px;
}
}
/* ==========================================================================
THEME SUPPORT (Light/Dark Mode)
========================================================================== */
/* CSS Custom Properties for Theme Support */
:root {
/* Light mode colors (default) */
--print-table-header-bg: #e9ecef;
--print-table-header-text: #000;
--print-table-body-bg: #fff;
--print-table-body-text: #000;
--print-table-border: #ddd;
--print-table-hover: #f8f9fa;
--print-table-selected: #007bff;
--print-card-bg: #fff;
--print-card-border: #ddd;
--print-search-field-bg: #fff;
--print-search-field-text: #000;
--print-search-field-border: #ddd;
}
/* Light mode theme variables */
body.light-mode {
--print-table-header-bg: #e9ecef;
--print-table-header-text: #000;
--print-table-body-bg: #fff;
--print-table-body-text: #000;
--print-table-border: #ddd;
--print-table-hover: #f8f9fa;
--print-table-selected: #007bff;
--print-card-bg: #fff;
--print-card-border: #ddd;
--print-search-field-bg: #fff;
--print-search-field-text: #000;
--print-search-field-border: #ddd;
}
/* Dark mode theme variables */
body.dark-mode {
--print-table-header-bg: #2a3441;
--print-table-header-text: #ffffff;
--print-table-body-bg: #2a3441;
--print-table-body-text: #ffffff;
--print-table-border: #495057;
--print-table-hover: #3a4451;
--print-table-selected: #007bff;
--print-card-bg: #2a2a2a;
--print-card-border: #555;
--print-search-field-bg: #333;
--print-search-field-text: #fff;
--print-search-field-border: #555;
}
/* Label Preview Theme Support */
body.light-mode #label-preview {
background: #fafafa;
border: none;
}
body.light-mode #label-content {
background: white;
border: 1px solid #ddd;
}
body.light-mode #barcode-frame,
body.light-mode #vertical-barcode-frame {
background: #ffffff;
border: 1px solid var(--print-card-border);
}
body.dark-mode #label-preview {
background: #2a2a2a;
border: none;
}
body.dark-mode #label-content {
background: #f8f9fa;
border: 1px solid #555;
}
body.dark-mode #barcode-frame,
body.dark-mode #vertical-barcode-frame {
background: #ffffff;
border: 1px solid var(--print-card-border);
}
/* Card Theme Support */
body.dark-mode .search-card,
body.dark-mode .card {
background-color: var(--print-card-bg);
border: 1px solid var(--print-card-border);
color: var(--print-table-body-text);
}
/* Search Field Theme Support */
body.dark-mode .search-field,
body.dark-mode .quantity-field {
background-color: var(--print-search-field-bg);
border: 1px solid var(--print-search-field-border);
color: var(--print-search-field-text);
}
/* Button Theme Support */
body.dark-mode .print-btn {
background-color: #28a745;
}
body.dark-mode .print-btn:hover {
background-color: #218838;
}
/* ==========================================================================
UTILITY CLASSES
========================================================================== */
.text-center {
text-align: center;
}
.font-weight-bold {
font-weight: bold;
}
.margin-bottom-15 {
margin-bottom: 15px;
}
.padding-10 {
padding: 10px;
}
.full-width {
width: 100%;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
/* ==========================================================================
DEBUG STYLES (can be removed in production)
========================================================================== */
.debug-border {
border: 2px solid red !important;
}
.debug-bg {
background-color: rgba(255, 0, 0, 0.1) !important;
}
/* ==========================================================================
PRINT MODULE SPECIFIC STYLES
========================================================================== */
/* Label preview container styling for print_module page */
.scan-form-card {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
min-height: 700px;
position: relative;
padding: 15px;
}
/* Label preview section */
#label-preview {
border: 1px solid #ddd;
padding: 10px;
position: relative;
background: #fafafa;
width: 100%;
max-width: 301px;
height: 434.7px;
margin: 0 auto;
}
/* Ensure label content scales properly in responsive layout */
@media (max-width: 1024px) {
#label-preview {
max-width: 280px;
height: 404px;
}
.scan-form-card {
padding: 10px;
}
}
@media (max-width: 768px) {
#label-preview {
max-width: 100%;
height: 350px;
}
.scan-form-card {
padding: 8px;
}
}
/* ==========================================================================
FORM CONTROLS FIX
========================================================================== */
/* Fix radio button styling to prevent oval display issues */
.form-check-input[type="radio"] {
width: 1rem !important;
height: 1rem !important;
margin-top: 0.25rem !important;
border: 1px solid #dee2e6 !important;
border-radius: 50% !important;
background-color: #fff !important;
appearance: none !important;
-webkit-appearance: none !important;
-moz-appearance: none !important;
}
.form-check-input[type="radio"]:checked {
background-color: #007bff !important;
border-color: #007bff !important;
background-image: radial-gradient(circle, #fff 30%, transparent 32%) !important;
}
.form-check-input[type="radio"]:focus {
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
outline: none !important;
}
.form-check {
display: flex !important;
align-items: flex-start !important;
margin-bottom: 0.5rem !important;
}
.form-check-label {
margin-left: 0.5rem !important;
cursor: pointer !important;
}