12 Commits

Author SHA1 Message Date
Quality App Developer
6029a2b98e Fix barcode format and improve scannability
- Changed sequential numbering from slash to hyphen format (TEST-ORD-004-0001)
- Increased horizontal barcode bar width from 0.25mm to 0.30mm for better scanning
- Increased vertical barcode bar width from 0.15mm to 0.30mm for reliable readability
- Changed from 3-digit to 4-digit padding for piece numbers (0001 instead of 001)
- Removed aggressive scaling that was distorting barcode bars
- Barcodes now use optimal settings for thermal printers and handheld scanners
2026-02-15 17:57:45 +02:00
Quality App Developer
2b6be2ba49 Fix QZ Tray library loading and add pairing keys API endpoint
- Fix QZ Tray library loading errors (net::ERR_NAME_NOT_RESOLVED) by switching from CDN to local static file
- Add /labels/api/pairing-keys endpoint to fetch valid printer pairing keys
- Update print_labels.html to use local js/qz-tray.js
- Update print_lost_labels.html to use local js/qz-tray.js
- Update print_lost_labels_new.html to use correct path js/qz-tray.js
- Update fg_scan.html to use local js/qz-tray.js
- API returns active pairing keys from qz_pairing_keys table for printer selection
2026-02-15 13:19:19 +02:00
Quality App Developer
d5b043c762 Fix Docker build and add labels test data
- Fix Docker build issues:
  * Add missing system dependencies (build-essential, python3-dev, libpq-dev)
  * Fix requirements.txt formatting (separate Flask-Session and openpyxl)
  * Update openpyxl version to 3.1.5 (3.10.0 was invalid)
- Set proper folder permissions for Docker write access (app/ and data/)
- Add comprehensive test data for labels module:
  * 8 sample orders (TEST-ORD-001 through TEST-ORD-008)
  * Mix of printed/unprinted orders for testing
  * Various product types, customers, and delivery dates
  * Ready for QZ Tray printing functionality testing
- Include test data generation scripts for future use
- Application now fully containerized and ready for labels/printing testing
2026-02-15 12:05:20 +02:00
Quality App Developer
78033a498a Add import labels functionality to labels module
- Created import_labels.py with CSV and Excel file processing
- Implemented validation for order rows and date format handling
- Added import-labels route with preview and save functionality
- Created import_labels.html template with new app UI styling
- Added import card to labels module index
- Added openpyxl to requirements.txt for Excel support
2026-02-10 13:28:35 +02:00
Quality App Developer
e53e3acc8e Implement print labels module with PDF generation, QZ Tray integration, and theme support
- Migrate print_labels.html and print_lost_labels.html to standalone pages with header and theme toggle
- Implement dark/light theme support using data-theme attribute and CSS variables
- Add PDF generation endpoints for single and batch label printing
- Copy pdf_generator.py from original app with full label formatting (80mm x 105mm)
- Fix data response handling to correctly access data.orders from API endpoints
- Synchronize table text sizes across both print pages
- Remove help buttons from print pages
- Database column rename: data_livrara → data_livrare for consistency
- Update routes to use correct database column names
- Add 7 test orders to database (4 unprinted, 3 printed)
- Implement QZ Tray integration with PDF fallback for label printing
- All CSS uses theme variables for dark/light mode synchronization
2026-02-04 23:57:51 +02:00
Quality App Developer
572b5af570 updated app 2026-02-04 10:54:00 +02:00
Quality App Developer
4784d1395c fix: Add inline styles to barcode frames for correct positioning
- Added inline styles to #barcode-frame div:
  * position: absolute; bottom: 10px; left: 11.34px
  * width: 227.4px; z-index: 5; text-align: center
- Added inline styles to #barcode-display SVG:
  * display: block; margin: 0 auto; height: 50px
- Added inline styles to #vertical-barcode-frame div:
  * position: absolute; right: 0; top: 65.7px
  * width: 32px; height: 321.3px; z-index: 5
  * display: flex; align-items: center; justify-content: center
- Added inline styles to #vertical-barcode-display SVG:
  * width: 100%; height: auto; transform: rotate(-90deg)
- Inline styles take precedence over CSS rules
- Ensures barcodes are positioned at bottom and right of label
2026-02-02 02:19:21 +02:00
Quality App Developer
834bcc808a fix: Improve barcode positioning in label preview
- Repositioned #barcode-frame to bottom (10px from bottom, left: 11.34px)
- Set barcode-frame width to 227.4px (label content width)
- Added SVG height styling for horizontal barcode (50px)
- Repositioned #vertical-barcode-frame to right side (right: 0)
- Set vertical barcode frame dimensions (32px width, 321.3px height)
- Added SVG rotation for vertical barcode (-90 degrees)
- Improved flexbox centering for vertical barcode
2026-02-02 02:13:48 +02:00
Quality App Developer
6dc5885b74 fix: Add barcode positioning CSS for label preview
- Added CSS for #barcode-frame: positioned at bottom center, width 227.4px
- Added CSS for #vertical-barcode-frame: positioned on right side, vertical orientation
- Barcode frames use absolute positioning within the label preview
- Horizontal barcode at bottom of label
- Vertical barcode on right side with 90-degree rotation
2026-02-02 01:51:15 +02:00
Quality App Developer
b2ac1fad5b 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
2026-02-02 01:42:41 +02:00
Quality App Developer
7d7f3ce4fe 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
2026-02-02 01:36:26 +02:00
Quality App Developer
2f6bb5d029 feat: Migrate label printing module from legacy app
- Created labels module with complete structure in app/modules/labels/
- Implemented print_module.py with database functions:
  * get_unprinted_orders_data() - Retrieve unprinted orders from database
  * get_printed_orders_data() - Retrieve printed orders from database
  * update_order_printed_status() - Mark orders as printed
  * search_orders_by_cp_code() - Search orders by production code
- Created routes.py with Flask Blueprint and API endpoints:
  * GET /labels/ - Module home page with feature launchers
  * GET /labels/print-module - Main label printing interface
  * GET /labels/print-lost-labels - Lost label reprinting interface
  * GET /labels/api/unprinted-orders - API for unprinted orders
  * GET /labels/api/printed-orders - API for printed orders
  * POST /labels/api/search-orders - Search orders API
  * POST /labels/api/update-printed-status/<id> - Update status API
- Migrated HTML templates from legacy app with theme support:
  * print_module.html - Thermal label printing with QZ Tray integration
  * print_lost_labels.html - Lost label search and reprint interface
  * Added comprehensive CSS variables for dark/light mode theming
  * Preserved all original JavaScript functionality for printing
- Created index.html module home page with feature launchers
- Registered labels blueprint in app/__init__.py with /labels prefix
- Added 'Label Printing' module card to dashboard with print icon

All functionality preserved from original implementation:
- QZ Tray thermal printer integration
- JsBarcode barcode generation (horizontal + vertical)
- PDF export fallback
- Session-based authentication for all routes
- Database integration with proper error handling
2026-02-02 01:18:54 +02:00