fix: Restructure print_module layout - label preview on left side
- Changed main container to flexbox layout with gap - Left column: Fixed width (400px) for label preview card - Right column: Flexible width for data preview table - Label preview now positioned on left as in original app - Data table fills remaining space on the right - Responsive flexbox layout preserves functionality
This commit is contained in:
@@ -113,26 +113,28 @@
|
|||||||
</a>
|
</a>
|
||||||
</div> #}
|
</div> #}
|
||||||
|
|
||||||
<div class="scan-container">
|
<div class="scan-container" style="display: flex; gap: 15px; flex-wrap: nowrap;">
|
||||||
<!-- Label Preview Card -->
|
<!-- Left Column: Label Preview (Fixed width ~400px) -->
|
||||||
<div class="card scan-form-card">
|
<div style="flex-shrink: 0; width: 400px;">
|
||||||
<div class="label-view-title" style="width: 100%; text-align: center; padding: 0 0 15px 0; font-size: 18px; font-weight: bold; letter-spacing: 0.5px;">Label View</div>
|
<!-- Label Preview Card -->
|
||||||
|
<div class="card scan-form-card">
|
||||||
<!-- Pairing Keys Section - Only show dropdown if multiple keys exist -->
|
<div class="label-view-title" style="width: 100%; text-align: center; padding: 0 0 15px 0; font-size: 18px; font-weight: bold; letter-spacing: 0.5px;">Label View</div>
|
||||||
<div style="width: 100%; text-align: center; margin-bottom: 15px;">
|
|
||||||
<!-- Dropdown for multiple keys (hidden by default) -->
|
<!-- Pairing Keys Section - Only show dropdown if multiple keys exist -->
|
||||||
<div id="client-select-container" style="display: none; margin-bottom: 8px;">
|
<div style="width: 100%; text-align: center; margin-bottom: 15px;">
|
||||||
<label for="client-select" style="font-size: 11px; font-weight: 600; display: block; margin-bottom: 4px;">Select Printer/Client:</label>
|
<!-- Dropdown for multiple keys (hidden by default) -->
|
||||||
<select id="client-select" class="form-control form-control-sm" style="width: 85%; margin: 0 auto; font-size: 11px;"></select>
|
<div id="client-select-container" style="display: none; margin-bottom: 8px;">
|
||||||
|
<label for="client-select" style="font-size: 11px; font-weight: 600; display: block; margin-bottom: 4px;">Select Printer/Client:</label>
|
||||||
|
<select id="client-select" class="form-control form-control-sm" style="width: 85%; margin: 0 auto; font-size: 11px;"></select>
|
||||||
|
</div>
|
||||||
|
<!-- Manage Keys Button - Only visible for superadmin -->
|
||||||
|
{% if session.role == 'superadmin' %}
|
||||||
|
<a href="{{ url_for('main.download_extension') }}" class="btn btn-info btn-sm" target="_blank" style="font-size: 11px; padding: 4px 12px;">🔑 Manage Keys</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<!-- Manage Keys Button - Only visible for superadmin -->
|
|
||||||
{% if session.role == 'superadmin' %}
|
<!-- Label Preview Section -->
|
||||||
<a href="{{ url_for('main.download_extension') }}" class="btn btn-info btn-sm" target="_blank" style="font-size: 11px; padding: 4px 12px;">🔑 Manage Keys</a>
|
<div id="label-preview" style="padding: 10px; position: relative; background: #fafafa; width: 301px; height: 434.7px; margin: 0 auto;">
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Label Preview Section -->
|
|
||||||
<div id="label-preview" style="padding: 10px; position: relative; background: #fafafa; width: 301px; height: 434.7px;">
|
|
||||||
<!-- Label content rectangle -->
|
<!-- Label content rectangle -->
|
||||||
<div id="label-content" style="position: absolute; top: 65.7px; left: 11.34px; width: 227.4px; height: 321.3px; background: white;">
|
<div id="label-content" style="position: absolute; top: 65.7px; left: 11.34px; width: 227.4px; height: 321.3px; background: white;">
|
||||||
<!-- Top row content: Company name (removed) -->
|
<!-- Top row content: Company name (removed) -->
|
||||||
@@ -299,13 +301,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Data Preview Card -->
|
|
||||||
<div class="card scan-table-card">
|
<!-- Right Column: Data Preview (Flexible width) -->
|
||||||
<h3>Data Preview (Unprinted Orders)</h3>
|
<div style="flex: 1; min-width: 0;">
|
||||||
<button id="check-db-btn" class="btn btn-primary mb-3">Load Orders</button>
|
<!-- Data Preview Card -->
|
||||||
<div class="report-table-container">
|
<div class="card scan-table-card">
|
||||||
<table class="scan-table print-module-table">
|
<h3>Data Preview (Unprinted Orders)</h3>
|
||||||
|
<button id="check-db-btn" class="btn btn-primary mb-3">Load Orders</button>
|
||||||
|
<div class="report-table-container">
|
||||||
|
<table class="scan-table print-module-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@@ -331,6 +336,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- JavaScript Libraries -->
|
<!-- JavaScript Libraries -->
|
||||||
|
|||||||
Reference in New Issue
Block a user