updated to scan module

This commit is contained in:
2025-10-09 01:10:05 +03:00
parent b8e85180c7
commit e257f6be18
7 changed files with 89 additions and 32 deletions

View File

@@ -7,7 +7,6 @@ from .models import User
from . import db
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
from flask import Blueprint, render_template, request, redirect, url_for, flash
import csv
from .warehouse import add_location
from app.settings import (
@@ -27,6 +26,12 @@ from .print_module import get_unprinted_orders_data
bp = Blueprint('main', __name__)
warehouse_bp = Blueprint('warehouse', __name__)
@bp.route('/main_scan')
def main_scan():
if 'role' not in session or session['role'] not in ['superadmin', 'admin', 'administrator', 'scan']:
flash('Access denied: Scan users only.')
return redirect(url_for('main.dashboard'))
return render_template('main_page_scan.html')
@bp.route('/', methods=['GET', 'POST'])
def login():
@@ -1143,8 +1148,6 @@ For support, contact your system administrator.
except Exception as e:
print(f"Error creating extension package: {e}")
import traceback
traceback.print_exc()
return jsonify({
'success': False,
'error': str(e)
@@ -1365,7 +1368,6 @@ Installation Time: ~5 minutes
Maintenance Required: Zero (auto-starts with Windows)
Ready to use immediately after installation!"""
zipf.writestr('INSTALLATION_README.txt', installation_readme)
files_added += 1
@@ -1425,7 +1427,7 @@ def create_zero_dependency_service_package():
if not os.path.exists(service_dir):
return jsonify({
'success': False,
'error': f'Windows service directory not found: {service_dir}'
'error': f'Windows service directory not found: {service_dir}'
}), 500
# Create static directory if it doesn't exist
@@ -1715,6 +1717,9 @@ This package contains EVERYTHING needed to run the Quality Print Service:
Quality Web App → Chrome Extension → Windows Service → Printer
```
**Printing Methods (automatic fallback):**
1. Adobe Reader (silent printing)
**Printing Methods (automatic fallback):**
1. Adobe Reader (silent printing)
2. SumatraPDF (if Adobe unavailable)