feat: Add PWA support and consolidate CSS design system
- Add PWA manifest, icons (192x192, 512x512), and service worker - Register service worker in index.html with Apple mobile web app support - Consolidate CSS variables and design tokens documentation - Update PrimeVue overrides for consistent theming - Refactor data-entry components to use shared CSS patterns - Add frontend-style-auditor agent for style consistency checks - Minor OCR validation and job worker improvements - Update start-prod.sh configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -238,7 +238,7 @@ class PaymentSumRule(ValidationRule):
|
||||
return ValidationResult(
|
||||
is_valid=False,
|
||||
confidence_penalty=0.4,
|
||||
message=f"Payment sum {payment_sum:.2f} RON ≠ Total {total:.2f} RON (diff: {diff:.2f} RON). Consider auto-correction.",
|
||||
message=f"Payment sum {payment_sum:.2f} RON != Total {total:.2f} RON (diff: {diff:.2f} RON). Consider auto-correction.",
|
||||
severity="error"
|
||||
)
|
||||
|
||||
@@ -299,7 +299,7 @@ class TVAEntriesSumRule(ValidationRule):
|
||||
return ValidationResult(
|
||||
is_valid=False,
|
||||
confidence_penalty=0.2,
|
||||
message=f"TVA entries sum {entries_sum:.2f} RON ≠ TVA total {tva_total:.2f} RON (diff: {diff:.2f} RON)",
|
||||
message=f"TVA entries sum {entries_sum:.2f} RON != TVA total {tva_total:.2f} RON (diff: {diff:.2f} RON)",
|
||||
severity="warning"
|
||||
)
|
||||
|
||||
@@ -783,7 +783,7 @@ class OCRValidationEngine:
|
||||
else:
|
||||
warnings.append(msg)
|
||||
|
||||
print(f" ❌ {msg}", flush=True)
|
||||
print(f" [X] {msg}", flush=True)
|
||||
|
||||
# Track confidence penalty for the relevant field based on rule
|
||||
if result.confidence_penalty > 0:
|
||||
@@ -797,7 +797,7 @@ class OCRValidationEngine:
|
||||
if f in extraction_result:
|
||||
confidence_adjustments[f] = result.confidence_penalty
|
||||
else:
|
||||
print(f" ✅ {rule.rule_name}: {result.message}", flush=True)
|
||||
print(f" [OK] {rule.rule_name}: {result.message}", flush=True)
|
||||
|
||||
# Step 2: Cross-field validation
|
||||
print("\n[Validation] Step 2: Cross-field validation...", flush=True)
|
||||
@@ -812,7 +812,7 @@ class OCRValidationEngine:
|
||||
else:
|
||||
warnings.append(msg)
|
||||
|
||||
print(f" ❌ {msg}", flush=True)
|
||||
print(f" [X] {msg}", flush=True)
|
||||
|
||||
# Track confidence penalty for the relevant field based on rule
|
||||
if result.confidence_penalty > 0:
|
||||
@@ -826,7 +826,7 @@ class OCRValidationEngine:
|
||||
if f in extraction_result:
|
||||
confidence_adjustments[f] = result.confidence_penalty
|
||||
else:
|
||||
print(f" ✅ {rule.rule_name}: {result.message}", flush=True)
|
||||
print(f" [OK] {rule.rule_name}: {result.message}", flush=True)
|
||||
|
||||
# Step 3: Inter-OCR consistency checks
|
||||
if light_result and medium_result:
|
||||
@@ -845,7 +845,7 @@ class OCRValidationEngine:
|
||||
if not result.is_valid:
|
||||
msg = f"[Inter-OCR] {result.message}"
|
||||
warnings.append(msg)
|
||||
print(f" ❌ {msg}", flush=True)
|
||||
print(f" [X] {msg}", flush=True)
|
||||
|
||||
# Store ratio for metadata
|
||||
ratio = max(
|
||||
@@ -854,7 +854,7 @@ class OCRValidationEngine:
|
||||
) / min(light_result["amount"], medium_result["amount"])
|
||||
inter_ocr_ratios["amount"] = ratio
|
||||
else:
|
||||
print(f" ✅ {result.message}", flush=True)
|
||||
print(f" [OK] {result.message}", flush=True)
|
||||
|
||||
# Determine if manual review is needed
|
||||
# Only flag for review if there are errors OR high-severity warnings
|
||||
|
||||
Reference in New Issue
Block a user