Commit Graph

102 Commits

Author SHA1 Message Date
Quality App System
d45dc1dab1 docs: Add comprehensive settings page analysis and improvements
- Add detailed settings page analysis report (settings.md)
- Document identified security vulnerabilities and code quality issues
- Provide prioritized improvement recommendations
- Document permission and access control issues
- Add testing checklist for validation
- Track modifications to settings.py, routes.py, and settings.html templates
2026-01-23 22:54:11 +02:00
Quality App System
a23d2174fc Fix: Add cache-busting version parameter to JavaScript files
- Added ?v=3 to script.js and ?v=2 to storage-utils.js
- Forces browsers to reload the fixed JavaScript files
- Resolves cached script.js with duplicate safeStorage declaration
2026-01-19 21:46:31 +02:00
Quality App System
04a37501ec Fix: FG scan form submission hang and add theme toggle functionality
- Added isAutoSubmitting flag to prevent duplicate validation during auto-submit
- Clear all custom validity states before form submission
- Skip duplicate validation in submit handler when auto-submitting
- Added theme toggle functionality directly to fg_scan page (since script.js is excluded)
- Enhanced logging for debugging form submission flow

This fixes the issue where the form would hang and not send data to the database when defect code was auto-submitted.
2026-01-19 21:14:44 +02:00
Quality App System
ce9563794a Fix: Add truncate-table endpoint and improve dark mode visibility for usernames
- Added missing /api/maintenance/truncate-table endpoint to fix 404 error
- Fixed dark mode visibility issue for usernames in Current Users table
- Added explicit color styling for username strong tags in both light and dark modes
2026-01-15 19:43:46 +02:00
Quality App System
95383e36f2 Fix: Add safe localStorage wrapper and QZ Tray toggle feature
- Created storage-utils.js with safeStorage wrapper to prevent tracking prevention errors
- Updated script.js to use safeStorage for theme persistence
- Added conditional QZ Tray connection based on 'Enable Scan to Boxes' toggle
- Fixed 404 error by removing non-existent /api/backup/path endpoint call
- Enhanced fg_scan.html to disable QZ Tray and socket connections when toggle is off
- Prevents console errors when browser tracking prevention blocks localStorage access
2026-01-15 19:26:42 +02:00
Quality App System
13d93d8a14 updated fg_scan to enable print only is requested 2026-01-15 18:57:48 +02:00
Quality App Developer
96f4258d6a Fix CP code auto-complete: pad suffix to 4 digits for 15-char total (CP00002042-4 → CP00002042-0004) 2026-01-09 14:51:31 +02:00
Quality App Developer
8faf5cd9fe Update backup system and settings UI
- Improved backup path handling for Docker environments
- Changed default backup type to data-only for scheduled backups
- Updated settings.html with enhanced backup management UI
- Replaced 'Drop Table' with 'Truncate Table' functionality
  - Clear data while preserving structure and triggers
  - Changed from danger zone styling (red) to caution styling (orange)
  - Added clear confirmation dialog with table name verification
- Added upload backup file functionality
- Improved backup schedule management with edit/toggle/delete
- Updated styling and dark mode support
- Removed old backup metadata files
2026-01-09 10:51:43 +02:00
Quality App Developer
749c461d63 integrate: FG Scan documentation into help system
- Add fg_scan.md to documentation routes mapping
- Add FG Scan link to help viewer navigation menu
- Add floating help button to fg_scan.html page
- Documentation now accessible from both:
  * Floating help button (📖) on fg_scan page
  * Help navigation menu in documentation viewer
2026-01-04 22:15:57 +02:00
Quality App System
5a423b3704 Add Set Boxes Locations page with status management and remove company branding from labels
- Renamed Store Articles card to Set Boxes Locations on warehouse main page
- Created new mobile-optimized page with two tabs for box location management:
  - Tab 1: Assign box to location (scan box, change status to closed, assign location)
  - Tab 2: Move box from location (scan location, list boxes, move to new location)
- Added box status management (open/closed) with status change button
- Enforced rule: only closed boxes can be assigned to locations
- Moved API logic to warehouse.py module:
  - search_box_by_number()
  - assign_box_to_location()
  - search_location_with_boxes()
  - move_box_to_new_location()
  - change_box_status()
- Added API routes in routes.py as thin wrappers
- Aligned page theme colors with application Bootstrap theme
- Added dark mode support for the new page
- Added Warehouse Main button to page header
- Removed 'INNOFA ROMANIA SRL' branding from:
  - Print module label preview and PDF generation
  - Print lost labels page
  - pdf_generator.py PDF creation function
2025-12-27 19:47:32 +02:00
Quality App System
9a2e21796e Implement professional PDF-based label printing for boxes and locations
- Replace ZPL/image-based printing with ReportLab PDF generation
- Box labels: 8cm x 5cm landscape with 'BOX Nr:' header and CODE128 barcode
- Location labels: 8cm x 5cm landscape with 'Location nr:' header and CODE128 barcode
- Add /generate_box_label_pdf endpoint using same approach as print_module
- Update FG scan quick box creation to use PDF printing with default printer
- Switch from CDN QZ Tray to local patched version for pairing-key auth
- Improve error handling and logging throughout printing workflow
- Fix import issues (add mm unit to warehouse.py)
- Optimize barcode size and spacing for better readability
2025-12-26 22:28:29 +02:00
Quality App Developer
d09bf34e85 Fix superadmin access control and modal aria-hidden warning
- Implement role normalization system to handle role name variants (superadmin, super_admin, administrator)
- Add session persistence configuration (PERMANENT_SESSION_LIFETIME = 7 days)
- Add modules JSON column to users database table schema
- Update setup script with backward compatibility check for modules column
- Fix user_management_simple route to properly fetch and display modules
- Resolve modal aria-hidden accessibility warning by managing focus on close button
- All changes deployed and tested successfully
2025-12-26 20:08:54 +02:00
Quality App Developer
a8824d6f69 updated code 2025-12-25 22:45:22 +02:00
ske087
3d5e468a28 Improve FG scan page UX and integrate scan-to-boxes with QZ Tray printing
- Redesigned scan card layout: 500px width with horizontal label-input layout
- Reduced spacing and optimized for no scrolling (700px max-height)
- Added auto-advance between fields when valid data is entered
- Integrated scan-to-boxes popup with warehouse box assignment
- Added QZ Tray printing to Quick Box Creation button
- Box labels now print automatically after creation in scan workflow
- Fixed warehouse blueprint URL prefix registration (/warehouse)
- Updated manage_boxes to return JSON for AJAX requests
- Improved error message grid layout to maintain form alignment
2025-12-18 21:53:56 +02:00
ske087
1a3e26d86d updated to set boxes , and updated to fill boxes 2025-12-10 22:30:52 +02:00
ske087
1e5572a5e9 aded main dashboard button on header 2025-12-10 19:45:13 +02:00
ske087
c7f5203aa7 Add boxes/crates management system to warehouse module
- Created boxes_crates table with 8-digit auto-generated box numbers
- Added manage_boxes route and full CRUD operations
- Implemented box status tracking (open/closed)
- Added location assignment functionality
- Integrated QZ Tray printing with barcode labels
- Created manage_boxes.html with table, preview, and print features
- Added 'Manage Boxes/Crates' card to warehouse main page
- Boxes can be created without location and assigned later
- Includes delete functionality for admin/management roles
- Added box statistics display
2025-12-07 00:31:41 +02:00
ske087
5905c693e6 udpdated vier and checked some documentation 2025-12-01 23:48:09 +02:00
ske087
41f9caa6ba Improve maintenance & backup UI with per-table operations
- Enhanced maintenance card with dark mode support
- Added system storage information display (logs, database, backups)
- Implemented per-table backup and restore functionality
- Added database table management with drop capability
- Restructured backup management UI with split layout:
  - Quick action buttons for full/data-only backups
  - Collapsible per-table backup/restore section
  - Split schedule creation (1/3) and active schedules list (2/3)
- Fixed database config loading to use mariadb module
- Fixed SQL syntax for reserved 'rows' keyword
- Removed System Information card
- All database operations use correct config keys from external_server.conf
2025-11-29 20:23:40 +02:00
ske087
7912885046 User management and module improvements
- Added daily_mirror module to permissions system
- Fixed user module management - updates now work correctly
- Implemented dashboard module filtering based on user permissions
- Fixed warehouse create_locations page (config parser and delete)
- Implemented POST-Redirect-GET pattern to prevent duplicate entries
- Added application license system with validation middleware
- Cleaned up debug logging code
- Improved user module selection with fetch API instead of form submit
2025-11-29 14:16:36 +02:00
ske087
d070db0052 Fix print_lost_labels compact styling and production data import
- Added compact table styling to print_lost_labels page (smaller fonts, reduced padding)
- Fixed production data import missing fields (production_order_line, line_number)
- Added better error handling and logging for Excel file imports
- Skip empty rows in production data import
- Log all columns and columns with data for debugging
2025-11-26 21:59:03 +02:00
ske087
c38b5d7b44 Add Daily Mirror interactive dashboard with charts and pivot tables
- Created comprehensive dashboard with Chart.js visualizations
- Added API endpoint /api/dashboard_data for aggregated data
- Implemented weekly tracking for orders, production, and deliveries
- Added interactive pivot table for customer × week analysis
- Fixed collation issues in database joins
- Includes 4 summary cards with key metrics
- Charts display orders, production finished, and deliveries by week
- Click-to-expand data tables for detailed view
- Time range filter (4-52 weeks)
- Data sources: scanfg_orders (finished), dm_orders, dm_deliveries
2025-11-25 00:09:19 +02:00
ske087
5de2584b27 Fix FG quality page: Display OK for quality code 0, export CSV with 0 value 2025-11-13 04:26:46 +02:00
ske087
2ce918e1b3 Docker deployment improvements: fixed backup/restore, sticky headers, quality code display 2025-11-13 02:40:36 +02:00
Quality System Admin
f1ff492787 updated / print module / keypairing options 2025-11-06 20:37:19 +02:00
Quality System Admin
c91b7d0a4d Fixed the scan error and backup problems 2025-11-05 21:25:02 +02:00
Quality System Admin
9c19379810 updated backups solution 2025-11-03 22:18:56 +02:00
Quality System Admin
1ade0b5681 updated documentation folder 2025-11-03 21:17:10 +02:00
Quality System Admin
7fd4b7449d Major UI/UX improvements and help system implementation
 New Features:
- Implemented comprehensive help/documentation system with Markdown support
- Added floating help buttons throughout the application
- Created modular CSS architecture for better maintainability
- Added theme-aware help pages (light/dark mode support)

🎨 UI/UX Improvements:
- Implemented 25%/75% card layout consistency across printing module pages
- Fixed barcode display issues (removed black rectangles, proper barcode patterns)
- Enhanced print method selection with horizontal layout (space-saving)
- Added floating back button in help pages
- Improved form controls styling (radio buttons, dropdowns)

🔧 Technical Enhancements:
- Modularized CSS: Created print_module.css with 779 lines of specialized styles
- Enhanced base.css with floating button components and dark mode support
- Updated routes.py with help system endpoints and Markdown processing
- Fixed JsBarcode integration with proper CDN fallback
- Removed conflicting inline styles from templates

📚 Documentation:
- Created dashboard.md with comprehensive user guide
- Added help viewer template with theme synchronization
- Set up documentation image system with proper Flask static serving
- Implemented docs/images/ folder structure

🐛 Bug Fixes:
- Fixed barcode positioning issues (horizontal/vertical alignment)
- Resolved CSS conflicts between inline styles and modular CSS
- Fixed radio button oval display issues
- Removed borders from barcode frames while preserving label info borders
- Fixed theme synchronization between main app and help pages

📱 Responsive Design:
- Applied consistent 25%/75% layout across print_module, print_lost_labels, upload_data, view_orders
- Added responsive breakpoints for tablet (30%/70%) and mobile (stacked) layouts
- Improved mobile-friendly form layouts and button sizing

The application now features a professional, consistent UI with comprehensive help system and improved printing module functionality.
2025-11-03 18:48:56 +02:00
Quality System Admin
c96039542d updated control access 2025-10-16 02:36:32 +03:00
Quality System Admin
50c791e242 cleaning structure 2025-10-16 01:42:59 +03:00
Quality System Admin
aaf6f2b32f updated database deployment and views 2025-10-12 00:22:45 +03:00
Quality System Admin
d264bcdca9 feat: Major system improvements and production deployment
 New Features:
- Added view_orders route with proper table display
- Implemented CSV upload with preview workflow and date parsing
- Added production WSGI server configuration with Gunicorn
- Created comprehensive production management scripts

🔧 Bug Fixes:
- Fixed upload_data route column mapping for actual CSV structure
- Resolved print module database queries and template rendering
- Fixed view orders navigation routing (was pointing to JSON API)
- Corrected barcode display width constraints in print module
- Added proper date format parsing for MySQL compatibility

🎨 UI/UX Improvements:
- Updated view_orders template with theme-compliant styling
- Hidden barcode text in print module preview for cleaner display
- Enhanced CSV upload with two-step preview-then-save workflow
- Improved error handling and debugging throughout upload process

🚀 Production Infrastructure:
- Added Gunicorn WSGI server with proper configuration
- Created systemd service for production deployment
- Implemented production management scripts (start/stop/status)
- Added comprehensive logging setup
- Updated requirements.txt with production dependencies

📊 Database & Data:
- Enhanced order_for_labels table compatibility
- Fixed column mappings for real CSV data structure
- Added proper date parsing and validation
- Improved error handling with detailed debugging

🔧 Technical Debt:
- Reorganized database setup documentation
- Added proper error handling throughout upload workflow
- Enhanced debugging capabilities for troubleshooting
- Improved code organization and documentation
2025-10-11 23:31:32 +03:00
05394697a0 updated validation and auto submit 2025-10-10 22:49:57 +03:00
e257f6be18 updated to scan module 2025-10-09 01:10:05 +03:00
b8e85180c7 updated to scrol betwen the rows in the card 2025-10-09 00:41:32 +03:00
b0e17b69e7 lets add settings new to css 2025-10-09 00:34:52 +03:00
scheianu ionut
a8811b94b7 Major updates: Setup environment, database, permissions and admin access
- Created virtual environment and installed requirements
- Set up MariaDB database with user 'sa' and database 'recticel'
- Created order_for_labels table for printing functionality
- Implemented role-based permissions system with admin role
- Added admin access to print label modules and etichete functionality
- Fixed template routing issues in main_page_etichete.html
- Updated app to run on port 8781 with network access (0.0.0.0)
- Added systemd service file for background deployment
- Created installation documentation
2025-10-07 22:07:06 +03:00
957c8eca4d moved to test environment 2025-10-05 14:32:47 -04:00
cb8a48e58f import locations to bulk 2025-10-05 09:58:33 +03:00
97b9ae9fe2 centered preview in the create location page 2025-10-05 09:40:03 +03:00
16641193de updated printing solutions 2025-10-05 09:29:37 +03:00
f105da2012 made the print lost label page 2025-10-04 17:17:07 +03:00
e1438a476b update views and orders 2025-10-04 09:37:10 +03:00
395433d4c3 created module saved preview ptinting 2025-10-02 20:09:30 +03:00
415e378ab4 Fix modal display with inline styles
The CSS class 'show' was being overridden by global styles causing display:block instead of display:flex. Using inline style.display='flex' to force the modal to show properly with flexbox centering.

Changes:
- Added modal.style.display = 'flex' when showing modal
- Added modal.style.display = 'none' when hiding modal
- Added debug logging for inline style verification
- This ensures modal displays regardless of CSS conflicts
2025-10-02 18:13:37 +03:00
6a184ce191 Fix modal display issue - add debugging and async/await
- Made print button handler async and await handleQZTrayPrint
- Added console.log debugging to track modal element and class changes
- This should fix the modal not appearing during print operations
2025-10-02 18:06:32 +03:00
dc337b6505 Add enhanced print controller with pause/resume and error recovery
Features:
- Real-time progress modal with visual progress bar and counter
- Detailed event log with timestamps and color-coded status
- Pause/Resume functionality for checking printer/paper
- Reprint Last button for damaged labels
- Cancel button for emergency stops
- Automatic error detection and recovery
- Auto-pause on print failures (paper out/jam)
- Automatic retry of failed labels after resume
- Smart state management tracking current/last/failed labels
- Sequential label numbering maintained through errors
- Database update only on successful completion
- Proper modal display with .show class toggle
2025-10-02 18:01:55 +03:00
7dc688d972 it prints 2025-10-02 02:00:40 +03:00
b2b225049d Fix .gitignore, add secure pairing key route, and fix template errors 2025-10-01 20:46:46 +03:00