fix: Comment out missing help page references in label printing templates

- Commented out floating help button HTML in print_module.html and print_lost_labels.html
- Commented out floating help button CSS in both templates
- Help page functionality not implemented yet, will be added in future updates
- Allows templates to render without 500 errors
This commit is contained in:
Quality App Developer
2026-02-02 01:36:26 +02:00
parent 497c04a90c
commit 7d7f3ce4fe
3 changed files with 80 additions and 8 deletions

View File

@@ -44,6 +44,78 @@ def print_lost_labels():
return render_template('modules/labels/print_lost_labels.html') return render_template('modules/labels/print_lost_labels.html')
@labels_bp.route('/help/<page>', methods=['GET'])
def help(page='index'):
"""Help page for labels module"""
if 'user_id' not in session:
return redirect(url_for('main.login'))
# Map page names to help content
help_pages = {
'print_module': {
'title': 'Print Module Help',
'content': '''
<h3>Print Labels - Thermal Printer Guide</h3>
<p>This module helps you print labels directly to thermal printers.</p>
<h4>Features:</h4>
<ul>
<li>Live label preview in thermal format</li>
<li>Real-time printer selection</li>
<li>Barcode generation</li>
<li>PDF export fallback</li>
<li>Batch printing support</li>
</ul>
<h4>How to use:</h4>
<ol>
<li>Select orders from the list</li>
<li>Preview labels in the preview pane</li>
<li>Select your printer</li>
<li>Click "Print Labels" to send to printer</li>
</ol>
'''
},
'print_lost_labels': {
'title': 'Print Lost Labels Help',
'content': '''
<h3>Print Lost Labels - Reprint Guide</h3>
<p>Use this page to search and reprint labels for orders that need reprinting.</p>
<h4>Features:</h4>
<ul>
<li>Search orders by production code</li>
<li>Filter previously printed orders</li>
<li>Reprint with updated information</li>
</ul>
<h4>How to use:</h4>
<ol>
<li>Enter the production order code</li>
<li>Click "Search" to find the order</li>
<li>Select the order and preview</li>
<li>Click "Reprint Labels" to print again</li>
</ol>
'''
}
}
help_data = help_pages.get(page, help_pages.get('index', {'title': 'Help', 'content': 'No help available'}))
return f'''
<html>
<head>
<title>{help_data['title']}</title>
<style>
body {{ font-family: Arial, sans-serif; padding: 20px; }}
h3 {{ color: #333; }}
ul, ol {{ margin: 10px 0; padding-left: 20px; }}
li {{ margin: 5px 0; }}
</style>
</head>
<body>
{help_data['content']}
</body>
</html>
'''
# ============================================================================ # ============================================================================
# API Endpoints for Labels Module # API Endpoints for Labels Module
# ============================================================================ # ============================================================================

View File

@@ -57,7 +57,7 @@
box-shadow: 0 0 0 3px var(--input-focus-shadow); box-shadow: 0 0 0 3px var(--input-focus-shadow);
} }
.floating-help-btn { {# .floating-help-btn {
position: fixed; position: fixed;
bottom: 20px; bottom: 20px;
right: 20px; right: 20px;
@@ -81,7 +81,7 @@
.floating-help-btn a:hover { .floating-help-btn a:hover {
transform: scale(1.1); transform: scale(1.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
} } #}
/* Compact table styling for print_lost_labels page */ /* Compact table styling for print_lost_labels page */
.print-lost-labels-compact .scan-table.print-module-table { .print-lost-labels-compact .scan-table.print-module-table {
@@ -123,11 +123,11 @@
{% block content %} {% block content %}
<!-- Floating Help Button --> <!-- Floating Help Button -->
<div class="floating-help-btn"> {# <div class="floating-help-btn">
<a href="{{ url_for('labels.help', page='print_lost_labels') }}" target="_blank" title="Print Lost Labels Help"> <a href="{{ url_for('labels.help', page='print_lost_labels') }}" target="_blank" title="Print Lost Labels Help">
📖 📖
</a> </a>
</div> </div> #}
<!-- ROW 1: Search Card (full width) --> <!-- ROW 1: Search Card (full width) -->
<div class="scan-container lost-labels print-lost-labels-compact"> <div class="scan-container lost-labels print-lost-labels-compact">

View File

@@ -77,7 +77,7 @@
color: var(--text-primary); color: var(--text-primary);
} }
.floating-help-btn { {# .floating-help-btn {
position: fixed; position: fixed;
bottom: 20px; bottom: 20px;
right: 20px; right: 20px;
@@ -101,17 +101,17 @@
.floating-help-btn a:hover { .floating-help-btn a:hover {
transform: scale(1.1); transform: scale(1.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
} } #}
</style> </style>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<!-- Floating Help Button --> <!-- Floating Help Button -->
<div class="floating-help-btn"> {# <div class="floating-help-btn">
<a href="{{ url_for('labels.help', page='print_module') }}" target="_blank" title="Print Module Help"> <a href="{{ url_for('labels.help', page='print_module') }}" target="_blank" title="Print Module Help">
📖 📖
</a> </a>
</div> </div> #}
<div class="scan-container"> <div class="scan-container">
<!-- Label Preview Card --> <!-- Label Preview Card -->