feat: anomaly detection banner - notifica incongruenze inventario/transazioni

- New API endpoint 'inventory_anomalies': detects items where stored qty
  differs from tx history by >20% AND >50 units (phantom qty or missing qty)
- New API endpoint 'dismiss_anomaly': persists dismissal in anomaly_dismissed.json
- Banner system: new 'anomaly' type shown in dashboard alert banner
  with 'Correggi' (opens edit) and 'Ok, ignora' (dismisses) buttons
- CSS: banner-anomaly style (orange gradient)
- Fix: lo zucchero azzerato (175g fantasma rimossi), aggiunto a Bring!
This commit is contained in:
dadaloop82
2026-04-21 12:34:54 +00:00
parent 234cae14bc
commit f4a62ef496
4 changed files with 157 additions and 3 deletions
+6
View File
@@ -4525,6 +4525,12 @@ body {
background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
border-color: #8b5cf6;
}
.alert-banner.banner-anomaly {
background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
border-color: #ea580c;
}
.banner-anomaly .alert-banner-title { color: #9a3412; }
.banner-anomaly .alert-banner-counter .banner-dot.active { background: #ea580c; }
.alert-banner-inner {
display: flex;
align-items: flex-start;