Commit Graph

207 Commits

Author SHA1 Message Date
dadaloop82 5b11ab6493 📦 Backup database automatico - 2026-03-28 03:00 2026-03-28 03:00:01 +00:00
dadaloop82 dac1465c45 📦 Backup database automatico - 2026-03-27 03:00 2026-03-27 03:00:01 +00:00
dadaloop82 21e93a5546 📦 Backup database automatico - 2026-03-26 03:00 2026-03-26 03:00:01 +00:00
dadaloop82 df391df150 📦 Backup database automatico - 2026-03-25 03:00 2026-03-25 03:00:01 +00:00
dadaloop82 0835bc8b84 📦 Backup database automatico - 2026-03-21 03:00 2026-03-21 03:00:01 +00:00
dadaloop82 3037d64664 📦 Backup database automatico - 2026-03-20 03:00 2026-03-20 03:00:01 +00:00
dadaloop82 11a703d274 20260319a: Auto-refresh recipe archive after save, Bring spec uses product name not brand 2026-03-19 13:18:35 +00:00
dadaloop82 b8528f79a9 📦 Backup database automatico - 2026-03-19 03:00 2026-03-19 03:00:01 +00:00
dadaloop82 dae4c4d435 20260318b: Fix countdown bar color - was using non-existent CSS variable 2026-03-18 06:33:04 +00:00
dadaloop82 4536decfaf 20260318a: Bump cache busters 2026-03-18 06:16:11 +00:00
dadaloop82 3e284da7ad 📦 Backup database automatico - 2026-03-18 03:00 2026-03-18 03:00:01 +00:00
dadaloop82 9517225d32 20260317e: Persist recipe ingredient used state to DB 2026-03-17 14:18:25 +00:00
dadaloop82 66e175e863 20260317d: Auto-dismiss move modal after 15s with progress bar countdown 2026-03-17 14:15:16 +00:00
dadaloop82 7cc557d4df 20260317c: Torta->Dolce, Bring specification with brand for product variants 2026-03-17 13:55:30 +00:00
dadaloop82 d1df6a6862 20260317b: Replace Comfort Food with Priorita cose aperte in recipe options 2026-03-17 12:06:14 +00:00
dadaloop82 9491cf0e0b 20260317a: Replace Break Mattutino/Spuntino Serale with Torta/Succo di Frutta in recipe meals 2026-03-17 06:28:42 +00:00
dadaloop82 c154f94b05 📦 Backup database automatico - 2026-03-17 03:00 2026-03-17 03:00:01 +00:00
dadaloop82 b4b68d6579 20260316i: Low-stock Bring prompt after use
- API returns total_remaining, product_name, unit, default_qty after use
- isLowStock() detects when inventory is running low (pz<=2, conf<=1, weight/vol<=25% of default)
- After using a product, if low stock detected, shows prompt asking to add to Bring shopping list
- Works in main USE form, USE ALL, and recipe ingredient USE
- Prompt chains properly: low-stock then move-after-use (if applicable)
- Skips prompt when product is fully depleted (already auto-added to Bring)
2026-03-16 14:59:55 +00:00
dadaloop82 1d8fb55f58 20260316h: Recipe ingredient USE popup with qty/location controls
- Clicking 'Usa' on a recipe ingredient now opens a modal popup instead of
  directly consuming. Shows location selector, quantity controls (+/- buttons),
  conf/sub-unit mode, and 'Usa TUTTO' option.
- Quantity is pre-filled with the recipe's suggested amount
- Auto-selects location with opened package
- After use, shows move-after-use modal (stays on recipe page, not dashboard)
- Separate recipe-context move functions (showRecipeMoveModal, confirmRecipeMove)
- Modal overlay z-index 250 to appear above recipe dialog
2026-03-16 12:42:12 +00:00
dadaloop82 134e5dfa4e 20260316g: Fix conf anomaly detection + auto-split opened packages
- Fixed isSuspiciousDefaultQty: for conf products, checks package_unit thresholds
  (375g is fine for g-max=10000, not checked against conf-max=50)
- Auto-split on use: when using from a conf product with whole+fractional qty,
  automatically separates whole confs from opened part
  e.g. Panna 2.6conf → use 5g → 2conf (sealed) + 0.56conf (opened)
- Move modal now moves only the opened row (via opened_id)
- Use query prefers fractional rows (opened packages) first
- Non-conf products still get standard move-after-use behavior
2026-03-16 08:07:17 +00:00
dadaloop82 5ca809b31f 20260316f: Fix Cracker integrali default_qty (500→16) + detect absurd package sizes
- Fixed Cracker integrali default_quantity from 500 to 16 (was weight in grams, should be pieces)
- Review system now also flags products with absurd default_quantity (package size)
  e.g. a 'pz' product claiming 500pz per package gets flagged as '📦 Conf. sospetta'
- Uses same QTY_THRESHOLDS max values for detection
2026-03-16 08:01:58 +00:00
dadaloop82 74d99a11bf 20260316e: Fix quick recipe + use from opened packages first
- Quick recipe: prompt now specifies 1 persona, excludes freezer products
- USE form: auto-selects location with opened package as default
  (deducts from already-opened packages before sealed ones)
- Move-after-use modal verified working (shows after partial use)
2026-03-16 07:59:56 +00:00
dadaloop82 4d9fd8638e 20260316d: Sort dashboard sections - opened by remaining qty asc, expiring/expired already correct 2026-03-16 07:51:05 +00:00
dadaloop82 c6a3ae6e63 20260316c: Dashboard quick recipe button + waste chart
- Added 'Ricetta veloce' button between stat cards and expired section
  (navigates to chat and auto-asks Gemini for a recipe with expiring products)
- Added waste vs consumption mini chart between expiring and opened sections
  (horizontal bar showing used/wasted ratio from last 30 days)
- API: getStats() now returns used_30d and wasted_30d counts
- Cache busters updated to 20260316c
2026-03-16 07:49:10 +00:00
dadaloop82 eb5ee60dd7 Sposta prodotto dopo l'uso + fix prodotti aperti
- Dopo aver usato un prodotto, se rimane quantità mostra modal con opzione
  di spostarlo in un'altra posizione (es. dispensa→frigo dopo apertura)
- La scadenza viene ricalcolata per la nuova posizione
- Fix marmellata: default_quantity era 0 → non appariva tra prodotti aperti
- Auto-set default_quantity al primo add per prodotti g/ml/kg/l senza pkg size
- Versione: 20260316b
2026-03-16 06:48:48 +00:00
dadaloop82 458206b39f Rimuovi sezione 'Sposta il resto' dal form USA
Lo spostamento si fa già cambiando la posizione nell'edit inventario.
Rimossa UI duplicata e relative funzioni JS.
- Versione: 20260316a
2026-03-16 06:38:04 +00:00
dadaloop82 d0ecbff5bc 📦 Backup database automatico - 2026-03-16 03:00 2026-03-16 03:00:01 +00:00
dadaloop82 68dd7810f0 Fix ricalcolo scadenza per freezer e sotto vuoto
- selectPurchaseType: non usa più date hardcoded, ricalcola sempre in base
  alla posizione e stato sotto vuoto corrente
- Edit inventario: cambiare posizione o toggle sotto vuoto ricalcola la scadenza
- Spostamento prodotto: ricalcola scadenza per la nuova posizione
- Fix DB: fusi di pollo freezer 120gg, Bel Paese vacuum 21gg, Speck vacuum 75gg
- Versione: 20260315j
2026-03-15 19:15:22 +00:00
dadaloop82 dc9785c160 Estendi 'Prodotti Aperti' a tutti i tipi (g, ml, l, pz, non solo conf)
- Query SQL ora rileva prodotti aperti per tutte le unità dove la quantità
  non è multiplo della dimensione confezione (soglia 2% per evitare errori arrot.)
- Frontend: rendering differente per conf (X conf + rimanente) e altri (Xg / Yg)
- Versione: 20260315i
2026-03-15 19:05:03 +00:00
dadaloop82 e2942d73f2 USA: possibilità di spostare il prodotto in altra posizione dopo l'uso 2026-03-15 18:44:53 +00:00
dadaloop82 f9910c99b5 Fix USA: mostra solo posizioni dove il prodotto esiste (previene 'not found') 2026-03-15 18:37:10 +00:00
dadaloop82 8f1a2b785f Scadenza: freezer estende durata, sotto vuoto formaggi potenziato, ricalcolo al cambio posizione 2026-03-15 18:15:09 +00:00
dadaloop82 4239e0b204 🫙 Sotto vuoto: flag per estendere scadenza prodotti conservati sotto vuoto 2026-03-15 18:09:38 +00:00
dadaloop82 3f0f27e938 Multipack→conf pre-fill (2x200g→2 conf da 200g) + modifica inventario da action page 2026-03-15 17:58:11 +00:00
dadaloop82 b90fe409d6 Sempre modificabile nome/marca prodotto: bottone ✏️ sulla preview 2026-03-15 17:51:22 +00:00
dadaloop82 067a4acb5c Add: mostra totale aggiornato nel toast + auto-rimuovi da Bring dopo acquisto 2026-03-15 17:47:29 +00:00
dadaloop82 17fdc993a5 Bring: non inviare marca/quantità, usa solo nomi generici catalogo. Puliti 27 articoli. 2026-03-15 17:19:36 +00:00
dadaloop82 7e3a3701e6 📦 Backup database automatico - 2026-03-15 03:00 2026-03-15 03:00:01 +00:00
dadaloop82 a960c05ee2 📦 Backup database automatico - 2026-03-14 03:00 2026-03-14 03:00:01 +00:00
dadaloop82 bd1e5d950f Prodotti aperti: mostra solo conf con capacità nota (latte, panna ecc.) 2026-03-13 15:15:46 +00:00
dadaloop82 cb3d3a56bb Fix cache: forza invalidazione cache per fix display confezioni non-conf 2026-03-13 15:13:48 +00:00
dadaloop82 f64423296b Prodotti aperti: includi anche non-conf con quantità parziale (19 prodotti) 2026-03-13 15:10:17 +00:00
dadaloop82 948e851b71 Dashboard: sezione Prodotti Aperti (conf parzialmente usate) 2026-03-13 15:02:27 +00:00
dadaloop82 ac76d02cb6 Fix validazione input: allinea min con step per sub-unità (50g ora funziona) 2026-03-13 14:56:35 +00:00
dadaloop82 6c9fade761 Fix display confezioni parziali: mostra '1 conf da 1L + 800ml' invece di arrotondare a 2 2026-03-13 14:50:08 +00:00
dadaloop82 38c8914fea Fix step sub-unità: L ora step 0.1, ml step 50, g step 10 2026-03-13 14:46:12 +00:00
dadaloop82 3733adf2e9 Confezioni: permetti uso parziale in sub-unità (ml, g) con switch unità 2026-03-13 14:42:39 +00:00
dadaloop82 9062c498de Svuota campo ricerca inventario/prodotti al cambio pagina 2026-03-13 14:34:34 +00:00
dadaloop82 e300f56c52 Modifica prodotto: rimossa immagine rotta dal form 2026-03-13 14:24:42 +00:00
dadaloop82 c76ffd731e Aggiungi bottone MODIFICA nella pagina azione prodotto esistente 2026-03-13 14:23:15 +00:00