Compare commits

..

18 Commits

Author SHA1 Message Date
b87c398977 new updates 2025-10-10 22:53:04 +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
c99ff70da7 updated to do 2025-10-09 00:37:10 +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
c7266c32ee Add custom QZ Tray fork with pairing key authentication
- Custom fork of QZ Tray 2.2.x with certificate validation bypassed
- Implemented pairing key (HMAC) authentication as replacement
- Modified files: PrintSocketClient.java (certificate check disabled)
- New files: PairingAuth.java, PairingConfigDialog.java
- Excluded build artifacts (out/, lib/javafx*) from repository
- Library JARs included for dependency management
2025-10-02 02:27:45 +03:00
621 changed files with 68698 additions and 584 deletions

6
.gitignore vendored Normal file → Executable file
View File

@@ -3,10 +3,14 @@ recticel/
.venv/
__pycache__/
app/__pycache__/
tray/
jdk-11.0.20-full/
jdk-11.0.21+9-jre/
jre-11-windows.zip
# QZ Tray build artifacts (keep source code, ignore builds)
tray/out/
tray/lib/javafx*
tray/js/node_modules
# Ignore generated or local files
backup/backup/

0
VS code/App.config Normal file → Executable file
View File

0
VS code/ApplicationEvents.vb Normal file → Executable file
View File

0
VS code/Form1.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form1.resx Normal file → Executable file
View File

0
VS code/Form1.vb Normal file → Executable file
View File

0
VS code/Form10.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form10.resx Normal file → Executable file
View File

0
VS code/Form10.vb Normal file → Executable file
View File

0
VS code/Form11.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form11.resx Normal file → Executable file
View File

0
VS code/Form11.vb Normal file → Executable file
View File

0
VS code/Form12.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form12.resx Normal file → Executable file
View File

0
VS code/Form12.vb Normal file → Executable file
View File

0
VS code/Form13.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form13.resx Normal file → Executable file
View File

0
VS code/Form13.vb Normal file → Executable file
View File

0
VS code/Form14.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form14.resx Normal file → Executable file
View File

0
VS code/Form14.vb Normal file → Executable file
View File

0
VS code/Form15.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form15.resx Normal file → Executable file
View File

0
VS code/Form15.vb Normal file → Executable file
View File

0
VS code/Form16.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form16.resx Normal file → Executable file
View File

0
VS code/Form16.vb Normal file → Executable file
View File

0
VS code/Form17.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form17.resx Normal file → Executable file
View File

0
VS code/Form17.vb Normal file → Executable file
View File

0
VS code/Form18.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form18.resx Normal file → Executable file
View File

0
VS code/Form18.vb Normal file → Executable file
View File

0
VS code/Form2.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form2.resx Normal file → Executable file
View File

0
VS code/Form2.vb Normal file → Executable file
View File

0
VS code/Form3.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form3.resx Normal file → Executable file
View File

0
VS code/Form3.vb Normal file → Executable file
View File

0
VS code/Form4.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form4.resx Normal file → Executable file
View File

0
VS code/Form4.vb Normal file → Executable file
View File

0
VS code/Form5.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form5.resx Normal file → Executable file
View File

0
VS code/Form5.vb Normal file → Executable file
View File

0
VS code/Form6.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form6.resx Normal file → Executable file
View File

0
VS code/Form6.vb Normal file → Executable file
View File

0
VS code/Form7.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form7.resx Normal file → Executable file
View File

0
VS code/Form7.vb Normal file → Executable file
View File

0
VS code/Form8.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form8.resx Normal file → Executable file
View File

0
VS code/Form8.vb Normal file → Executable file
View File

0
VS code/Form9.Designer.vb generated Normal file → Executable file
View File

0
VS code/Form9.resx Normal file → Executable file
View File

0
VS code/Form9.vb Normal file → Executable file
View File

0
VS code/Management_Resurse_Companie.vbproj Normal file → Executable file
View File

0
VS code/Management_Resurse_Companie.vbproj.user Normal file → Executable file
View File

0
VS code/Management_resurse_companie.sln Normal file → Executable file
View File

0
VS code/UpgradeLog.htm Normal file → Executable file
View File

25
app.log Normal file
View File

@@ -0,0 +1,25 @@
nohup: ignoring input
* Serving Flask app 'app'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8781
* Running on http://192.168.0.132:8781
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: 869-443-054
172.18.0.2 - - [07/Oct/2025 22:03:14] "GET /quality HTTP/1.1" 200 -
172.18.0.2 - - [07/Oct/2025 22:03:19] "GET /logout HTTP/1.1" 302 -
172.18.0.2 - - [07/Oct/2025 22:03:19] "GET / HTTP/1.1" 200 -
172.18.0.2 - - [07/Oct/2025 22:03:19] "GET /static/logo_login.jpg HTTP/1.1" 304 -
172.18.0.2 - - [07/Oct/2025 22:03:24] "POST / HTTP/1.1" 302 -
172.18.0.2 - - [07/Oct/2025 22:03:24] "GET /dashboard HTTP/1.1" 200 -
172.18.0.2 - - [07/Oct/2025 22:03:30] "GET /logout HTTP/1.1" 302 -
172.18.0.2 - - [07/Oct/2025 22:03:30] "GET / HTTP/1.1" 200 -
172.18.0.2 - - [07/Oct/2025 22:03:34] "POST / HTTP/1.1" 302 -
172.18.0.2 - - [07/Oct/2025 22:03:34] "GET /dashboard HTTP/1.1" 200 -
172.18.0.2 - - [07/Oct/2025 22:03:38] "GET /logout HTTP/1.1" 302 -
172.18.0.2 - - [07/Oct/2025 22:03:38] "GET / HTTP/1.1" 200 -
172.18.0.2 - - [07/Oct/2025 22:03:56] "POST / HTTP/1.1" 302 -
172.18.0.2 - - [07/Oct/2025 22:03:56] "GET /dashboard HTTP/1.1" 200 -

0
backup/db_test.html Normal file → Executable file
View File

0
backup/print_module copy.html Normal file → Executable file
View File

1844
backup/print_module.htmlold 3.bak Executable file

File diff suppressed because it is too large Load Diff

0
backup/print_module_backup.html Normal file → Executable file
View File

0
backup/print_module_clean.html Normal file → Executable file
View File

File diff suppressed because it is too large Load Diff

0
external_database_settings Normal file → Executable file
View File

152
py_app/CSS_MODULAR_GUIDE.md Normal file
View File

@@ -0,0 +1,152 @@
# CSS Modular Structure Guide
## Overview
This guide explains how to migrate from a monolithic CSS file to a modular CSS structure for better maintainability and organization.
## New CSS Structure
```
app/static/css/
├── base.css # Global styles, header, buttons, theme
├── login.css # Login page specific styles
├── dashboard.css # Dashboard and module cards
├── warehouse.css # Warehouse module styles
├── etichete.css # Labels/etiquette module styles (to be created)
├── quality.css # Quality module styles (to be created)
└── scan.css # Scan module styles (to be created)
```
## Implementation Strategy
### Phase 1: Setup Modular Structure ✅
- [x] Created `css/` directory
- [x] Created `base.css` with global styles
- [x] Created `login.css` for login page
- [x] Created `warehouse.css` for warehouse module
- [x] Updated `base.html` to include modular CSS
- [x] Updated `login.html` to use new structure
### Phase 2: Migration Plan (Next Steps)
1. **Extract module-specific styles from style.css:**
- Etiquette/Labels module → `etichete.css`
- Quality module → `quality.css`
- Scan module → `scan.css`
2. **Update templates to use modular CSS:**
```html
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/module-name.css') }}">
{% endblock %}
```
3. **Clean up original style.css:**
- Remove extracted styles
- Keep only legacy/common styles temporarily
- Eventually eliminate when all modules migrated
## Template Usage Pattern
### Standard Template Structure:
```html
{% extends "base.html" %}
{% block title %}Page Title{% endblock %}
{% block head %}
<!-- Include module-specific CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/module-name.css') }}">
<!-- Page-specific overrides -->
<style>
/* Only use this for page-specific customizations */
</style>
{% endblock %}
{% block content %}
<!-- Page content -->
{% endblock %}
```
## CSS Loading Order
1. `base.css` - Global styles, header, buttons, theme
2. `style.css` - Legacy styles (temporary, for backward compatibility)
3. Module-specific CSS (e.g., `warehouse.css`)
4. Inline `<style>` blocks for page-specific overrides
## Benefits of This Structure
### 1. **Maintainability**
- Easy to find and edit module-specific styles
- Reduced conflicts between different modules
- Clear separation of concerns
### 2. **Performance**
- Only load CSS needed for specific pages
- Smaller file sizes per page
- Better caching (module CSS rarely changes)
### 3. **Team Development**
- Different developers can work on different modules
- Less merge conflicts in CSS files
- Clear ownership of styles
### 4. **Scalability**
- Easy to add new modules
- Simple to deprecate old styles
- Clear migration path
## Migration Checklist
### For Each Template:
- [ ] Identify module/page type
- [ ] Extract relevant styles to module CSS file
- [ ] Update template to include module CSS
- [ ] Test styling works correctly
- [ ] Remove old styles from style.css
### Current Status:
- [x] Login page - Fully migrated
- [x] Warehouse module - Partially migrated (create_locations.html updated)
- [ ] Dashboard - CSS created, templates need updating
- [ ] Etiquette module - Needs CSS extraction
- [ ] Quality module - Needs CSS extraction
- [ ] Scan module - Needs CSS extraction
## Example: Migrating a Template
### Before:
```html
{% block head %}
<style>
.my-module-specific-class {
/* styles here */
}
</style>
{% endblock %}
```
### After:
1. Move styles to `css/module-name.css`
2. Update template:
```html
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/module-name.css') }}">
{% endblock %}
```
## Best Practices
1. **Use semantic naming:** `warehouse.css`, `login.css`, not `page1.css`
2. **Keep base.css minimal:** Only truly global styles
3. **Avoid deep nesting:** Keep CSS selectors simple
4. **Use consistent naming:** Follow existing patterns
5. **Document changes:** Update this guide when adding new modules
## Next Steps
1. Extract etiquette module styles to `etichete.css`
2. Update all etiquette templates to use new CSS
3. Extract quality module styles to `quality.css`
4. Extract scan module styles to `scan.css`
5. Gradually remove migrated styles from `style.css`
6. Eventually remove `style.css` dependency from `base.html`

View File

@@ -0,0 +1,263 @@
# Enhanced Print Controller - Features & Usage
## Overview
The print module now includes an advanced Print Controller with real-time monitoring, error detection, pause/resume functionality, and automatic reprint capabilities for handling printer issues like paper jams or running out of paper.
## Key Features
### 1. **Real-Time Progress Modal**
- Visual progress bar showing percentage completion
- Live counter showing "X / Y" labels printed
- Status messages updating in real-time
- Detailed event log with timestamps
### 2. **Print Status Log**
- Timestamped entries for all print events
- Color-coded status messages:
- **Green**: Successful operations
- **Yellow**: Warnings and paused states
- **Red**: Errors and failures
- Auto-scrolling to show latest events
- Scrollable history of all print activities
### 3. **Control Buttons**
#### **⏸️ Pause Button**
- Pauses printing between labels
- Useful for:
- Checking printer paper level
- Inspecting print quality
- Loading more paper
- Progress bar turns yellow when paused
#### **▶️ Resume Button**
- Resumes printing from where it was paused
- Appears when print job is paused
- Progress bar returns to normal green
#### **🔄 Reprint Last Button**
- Available after each successful print
- Reprints the last completed label
- Useful when:
- Label came out damaged
- Print quality was poor
- Label fell on the floor
#### **❌ Cancel Button**
- Stops the entire print job
- Shows how many labels were completed
- Progress bar turns red
- Database not updated on cancellation
### 4. **Automatic Error Detection**
- Detects when a label fails to print
- Automatically pauses the job
- Shows error message in log
- Progress bar turns red
- Prompts user to check printer
### 5. **Automatic Recovery**
When a print error occurs:
1. Job pauses automatically
2. Error is logged with timestamp
3. User checks and fixes printer issue (refill paper, clear jam)
4. User clicks "Resume"
5. Failed label is automatically retried
6. If retry succeeds, continues with next label
7. If retry fails, user can cancel or try again
### 6. **Smart Print Management**
- Tracks current label being printed
- Remembers last successfully printed label
- Maintains list of failed labels
- Prevents duplicate printing
- Sequential label numbering (CP00000777/001, 002, 003...)
## Usage Instructions
### Normal Printing Workflow
1. **Start Print Job**
- Select an order from the table
- Click "Print Label (QZ Tray)" button
- Print Controller modal appears
2. **Monitor Progress**
- Watch progress bar fill (green)
- Check "X / Y" counter
- Read status messages
- View timestamped log entries
3. **Completion**
- All labels print successfully
- Database updates automatically
- Table refreshes to show new status
- Modal closes automatically
- Success notification appears
### Handling Paper Running Out Mid-Print
**Scenario**: Printing 20 labels, paper runs out after label 12
1. **Detection**
- Label 13 fails to print
- Controller detects error
- Job pauses automatically
- Progress bar turns red
- Log shows: "✗ Label 13 failed: Print error"
- Status: "⚠️ ERROR - Check printer (paper jam/out of paper)"
2. **User Action**
- Check printer
- See paper is empty
- Load new paper roll
- Ensure paper is feeding correctly
3. **Resume Printing**
- Click "▶️ Resume" button
- Controller automatically retries label 13
- Log shows: "Retrying label 13..."
- If successful: "✓ Label 13 printed successfully (retry)"
- Continues with labels 14-20
- Job completes normally
### Handling Print Quality Issues
**Scenario**: Label 5 of 10 prints too light
1. **During Print**
- Wait for label 5 to complete
- "🔄 Reprint Last" button appears
- Click button
- Label 5 reprints with current settings
2. **Adjust & Continue**
- Adjust printer darkness setting
- Click "▶️ Resume" if paused
- Continue printing labels 6-10
### Manual Pause for Inspection
**Scenario**: Want to check label quality mid-batch
1. Click "⏸️ Pause" button
2. Progress bar turns yellow
3. Remove and inspect last printed label
4. If good: Click "▶️ Resume"
5. If bad:
- Click "🔄 Reprint Last"
- Adjust printer settings
- Click "▶️ Resume"
### Emergency Cancellation
**Scenario**: Wrong order selected or major printer malfunction
1. Click "❌ Cancel" button
2. Printing stops immediately
3. Log shows labels completed (e.g., "7 of 25")
4. Progress bar turns red
5. Modal stays open for 2 seconds
6. Warning notification appears
7. Database NOT updated
8. Can reprint the order later
## Technical Implementation
### Print Controller State
```javascript
{
isPaused: false, // Whether job is paused
isCancelled: false, // Whether job is cancelled
currentLabel: 0, // Current label number being printed
totalLabels: 0, // Total labels in job
lastPrintedLabel: 0, // Last successfully printed label
failedLabels: [], // Array of failed label numbers
orderData: null, // Order information
printerName: null // Selected printer name
}
```
### Event Log Format
```
[17:47:15] Starting print job: 10 labels
[17:47:15] Printer: Thermal Printer A
[17:47:15] Order: CP00000777
[17:47:16] Sending label 1 to printer...
[17:47:16] ✓ Label 1 printed successfully
```
### Error Detection
- Try/catch around each print operation
- Errors trigger automatic pause
- Failed label number recorded
- Automatic retry on resume
### Progress Calculation
```javascript
percentage = (currentLabel / totalLabels) * 100
```
### Color States
- **Green**: Normal printing
- **Yellow**: Paused (manual or automatic)
- **Red**: Error or cancelled
## Benefits
1.**Prevents Wasted Labels**: Automatic recovery from errors
2.**Reduces Operator Stress**: Clear status and easy controls
3.**Handles Paper Depletion**: Auto-pause and retry on paper out
4.**Quality Control**: Easy reprint of damaged labels
5.**Transparency**: Full log of all print activities
6.**Flexibility**: Pause anytime for inspection
7.**Safety**: Cancel button for emergencies
8.**Accuracy**: Sequential numbering maintained even with errors
## Common Scenarios Handled
| Issue | Detection | Solution |
|-------|-----------|----------|
| Paper runs out | Print error on next label | Auto-pause, user refills, resume |
| Paper jam | Print error detected | Auto-pause, user clears jam, resume |
| Poor print quality | Visual inspection | Reprint last label |
| Wrong order selected | User realizes mid-print | Cancel job |
| Need to inspect labels | User decision | Pause, inspect, resume |
| Label falls on floor | Visual observation | Reprint last label |
| Printer offline | Print error | Auto-pause, user fixes, resume |
## Future Enhancements (Possible)
- Printer status monitoring (paper level, online/offline)
- Print queue for multiple orders
- Estimated time remaining
- Sound notifications on completion
- Email/SMS alerts for long jobs
- Print history logging to database
- Batch printing multiple orders
- Automatic printer reconnection
## Testing Recommendations
1. **Normal Job**: Print 5-10 labels, verify all complete
2. **Paper Depletion**: Remove paper mid-job, verify auto-pause and recovery
3. **Pause/Resume**: Manually pause mid-job, wait, resume
4. **Reprint**: Print job, reprint last label multiple times
5. **Cancel**: Start job, cancel after 2-3 labels
6. **Error Recovery**: Simulate error, verify automatic retry
## Browser Compatibility
- Chrome/Edge: ✅ Fully supported
- Firefox: ✅ Fully supported
- Safari: ✅ Fully supported
- Mobile browsers: ⚠️ Desktop recommended for QZ Tray
## Support
For issues or questions:
- Check browser console for detailed error messages
- Verify QZ Tray is running and connected
- Check printer is online and has paper
- Review print status log in modal
- Restart QZ Tray if connection issues persist

View File

@@ -0,0 +1,133 @@
# Mobile-Responsive Login Page
## Overview
The login page has been enhanced with comprehensive mobile-responsive CSS to provide an optimal user experience across all device types and screen sizes.
## Mobile-Responsive Features Added
### 1. **Responsive Breakpoints**
- **Tablet (≤768px)**: Column layout, optimized logo and form sizing
- **Mobile (≤480px)**: Enhanced touch targets, better spacing
- **Small Mobile (≤320px)**: Minimal padding, compact design
- **Landscape (height ≤500px)**: Horizontal layout for landscape phones
### 2. **Layout Adaptations**
#### Desktop (>768px)
- Side-by-side logo and form layout
- Large logo (90vh height)
- Fixed form width (600px)
#### Tablet (≤768px)
- Vertical stacked layout
- Logo height reduced to 30vh
- Form width becomes responsive (100%, max 400px)
#### Mobile (≤480px)
- Optimized touch targets (44px minimum)
- Increased padding and margins
- Better visual hierarchy
- Enhanced shadows and border radius
#### Small Mobile (≤320px)
- Minimal padding to maximize space
- Compact logo (20vh height)
- Reduced font sizes where appropriate
### 3. **Touch Optimizations**
#### iOS/Safari Specific
- `font-size: 16px` on inputs prevents automatic zoom
- Proper touch target sizing (44px minimum)
#### Touch Device Enhancements
- Active states for button presses
- Optimized image rendering for high DPI screens
- Hover effects disabled on touch devices
### 4. **Accessibility Improvements**
- Proper contrast ratios maintained
- Touch targets meet accessibility guidelines
- Readable font sizes across all devices
- Smooth transitions and animations
### 5. **Performance Considerations**
- CSS-only responsive design (no JavaScript required)
- Efficient media queries
- Optimized image rendering for retina displays
## Key CSS Features
### Flexible Layout
```css
.login-page {
display: flex;
flex-direction: column; /* Mobile */
justify-content: center;
}
```
### Responsive Images
```css
.login-logo {
max-height: 25vh; /* Mobile */
max-width: 85vw;
}
```
### Touch-Friendly Inputs
```css
.form-container input {
padding: 12px;
font-size: 16px; /* Prevents iOS zoom */
min-height: 44px; /* Touch target size */
}
```
### Landscape Optimization
```css
@media screen and (max-height: 500px) and (orientation: landscape) {
.login-page {
flex-direction: row; /* Back to horizontal */
}
}
```
## Testing Recommendations
### Device Testing
- [ ] iPhone (various sizes)
- [ ] Android phones (various sizes)
- [ ] iPad/Android tablets
- [ ] Desktop browsers with responsive mode
### Orientation Testing
- [ ] Portrait mode on all devices
- [ ] Landscape mode on phones
- [ ] Landscape mode on tablets
### Browser Testing
- [ ] Safari (iOS)
- [ ] Chrome (Android/iOS)
- [ ] Firefox Mobile
- [ ] Samsung Internet
- [ ] Desktop browsers (Chrome, Firefox, Safari, Edge)
## Browser Support
- Modern browsers (ES6+ support)
- iOS Safari 12+
- Android Chrome 70+
- Desktop browsers (last 2 versions)
## Performance Impact
- **CSS Size**: Increased by ~2KB (compressed)
- **Load Time**: No impact (CSS only)
- **Rendering**: Optimized for mobile GPUs
- **Memory**: Minimal additional usage
## Future Enhancements
1. **Dark mode mobile optimizations**
2. **Progressive Web App (PWA) features**
3. **Biometric authentication UI**
4. **Loading states and animations**
5. **Error message responsive design**

0
py_app/PRINT_PROGRESS_FEATURE.md Normal file → Executable file
View File

0
py_app/__pycache__/run.cpython-312.pyc Normal file → Executable file
View File

0
py_app/app/__init__.py Normal file → Executable file
View File

BIN
py_app/app/__pycache__/order_labels.cpython-312.pyc Normal file → Executable file

Binary file not shown.

0
py_app/app/db_create_scripts/add_email_column.py Normal file → Executable file
View File

View File

View File

View File

View File

View File

0
py_app/app/db_create_scripts/create_roles_table.py Normal file → Executable file
View File

0
py_app/app/db_create_scripts/create_scan_1db.py Normal file → Executable file
View File

View File

@@ -0,0 +1,41 @@
import mariadb
# Database connection credentials
# (reuse from create_scan_1db.py or update as needed)
db_config = {
"user": "trasabilitate",
"password": "Initial01!",
"host": "localhost",
"database": "trasabilitate_database"
}
try:
conn = mariadb.connect(**db_config)
cursor = conn.cursor()
print("Connected to the database successfully!")
# Create the scanfg_orders table (same structure as scan1_orders)
create_table_query = """
CREATE TABLE IF NOT EXISTS scanfg_orders (
Id INT AUTO_INCREMENT PRIMARY KEY,
operator_code VARCHAR(4) NOT NULL,
CP_full_code VARCHAR(15) NOT NULL UNIQUE,
OC1_code VARCHAR(4) NOT NULL,
OC2_code VARCHAR(4) NOT NULL,
CP_base_code VARCHAR(10) GENERATED ALWAYS AS (LEFT(CP_full_code, 10)) STORED,
quality_code INT(3) NOT NULL,
date DATE NOT NULL,
time TIME NOT NULL,
approved_quantity INT DEFAULT 0,
rejected_quantity INT DEFAULT 0
);
"""
cursor.execute(create_table_query)
print("Table 'scanfg_orders' created successfully!")
conn.commit()
cursor.close()
conn.close()
except mariadb.Error as e:
print(f"Error connecting to the database: {e}")

0
py_app/app/db_create_scripts/create_triggers.py Normal file → Executable file
View File

View File

@@ -0,0 +1,73 @@
import mariadb
# Database connection credentials
db_config = {
"user": "trasabilitate",
"password": "Initial01!",
"host": "localhost",
"database": "trasabilitate_database"
}
# Connect to the database
try:
conn = mariadb.connect(**db_config)
cursor = conn.cursor()
print("Connected to the database successfully!")
# Delete old triggers if they exist
try:
cursor.execute("DROP TRIGGER IF EXISTS increment_approved_quantity_fg;")
print("Old trigger 'increment_approved_quantity_fg' deleted successfully.")
except mariadb.Error as e:
print(f"Error deleting old trigger 'increment_approved_quantity_fg': {e}")
try:
cursor.execute("DROP TRIGGER IF EXISTS increment_rejected_quantity_fg;")
print("Old trigger 'increment_rejected_quantity_fg' deleted successfully.")
except mariadb.Error as e:
print(f"Error deleting old trigger 'increment_rejected_quantity_fg': {e}")
# Create corrected trigger for approved_quantity in scanfg_orders
create_approved_trigger_fg = """
CREATE TRIGGER increment_approved_quantity_fg
BEFORE INSERT ON scanfg_orders
FOR EACH ROW
BEGIN
IF NEW.quality_code = 000 THEN
SET NEW.approved_quantity = (
SELECT COUNT(*)
FROM scanfg_orders
WHERE CP_base_code = NEW.CP_base_code AND quality_code = 000
) + 1;
SET NEW.rejected_quantity = (
SELECT COUNT(*)
FROM scanfg_orders
WHERE CP_base_code = NEW.CP_base_code AND quality_code != 000
);
ELSE
SET NEW.approved_quantity = (
SELECT COUNT(*)
FROM scanfg_orders
WHERE CP_base_code = NEW.CP_base_code AND quality_code = 000
);
SET NEW.rejected_quantity = (
SELECT COUNT(*)
FROM scanfg_orders
WHERE CP_base_code = NEW.CP_base_code AND quality_code != 000
) + 1;
END IF;
END;
"""
cursor.execute(create_approved_trigger_fg)
print("Trigger 'increment_approved_quantity_fg' created successfully for scanfg_orders table!")
# Commit changes and close the connection
conn.commit()
cursor.close()
conn.close()
print("\n✅ All triggers for scanfg_orders table created successfully!")
print("The approved_quantity and rejected_quantity will now be calculated automatically.")
except mariadb.Error as e:
print(f"Error connecting to the database or creating triggers: {e}")

View File

View File

Some files were not shown because too many files have changed in this diff Show More