- Normal mode (non-conf) now sets min=0.01 for kg/l, min=1 for g/ml
- +/- buttons use unit-aware steps: 0.01 for small kg/l values, 0.1 for
values <1, 0.5 for values >=1 (instead of fixed 0.5)
- Same fix applied to recipe use form
- Allows inputting e.g. 0.07kg (70g) when product is tracked in kg
- cleanupObsoleteBringItems() now much more conservative:
* Only removes items matching a known DB product (preserves manual additions)
* Only removes if the product has current_qty > 0 (has stock)
* AND item is no longer flagged by smart shopping
- Added logOperation() — stores all Bring! operations in localStorage '_opLog'
(bring_auto_add, bring_cleanup, bring_found, bring_manual_remove)
Capped at 200 entries, each with timestamp + action + details
- All Bring! add/remove paths now log their operations
- Products bought only once (buy_count=1) and out of stock are skipped entirely
(not enough history to predict repurchase need, e.g. piadelle)
- usesPerMonth for items tracked 7-30 days now normalized instead of using raw count
- usesPerMonth for items tracked <7 days halved to avoid inflation
- Critical urgency now requires buy_count >= 2
- cleanupObsoleteBringItems(): one-time per session, removes items from Bring!
that the updated smart shopping algorithm no longer considers relevant
- Cross-references shoppingItems vs smartShoppingItems using exact + token match
- Shows toast with count of removed items
- Called alongside autoAddCriticalItems after loading smart shopping data
- Rileva automaticamente durate nel testo dello step (minuti, ore, secondi,
mezz'ora, un quarto d'ora, qualche minuto, un paio di minuti, ecc.)
- Mostra countdown grande con Avvia/Pausa/Reset
- Ultimi 30 secondi in arancione, scaduto in rosso pulsante
- Allo scadere: vibrazione + TTS 'Tempo scaduto!'
- Timer continua a contare in overtime (+00:XX) dopo lo zero
- Timer si resetta automaticamente cambiando step o chiudendo
- renderShoppingItems: raggruppamento per reparto (sezioni), ordinamento
per urgenza+frequenza, sfondo con gradiente colore urgenza
- renderSmartShopping: stesso raggruppamento per reparto in tab previsione
- Modalità Cucina: overlay fullscreen nero, step per step con navigazione,
TTS italiano via Web Speech API, pulsante 'Usa' ingredienti per step
- CSS: modal z-index 600 in cooking-mode-active per sovrapposizione corretta
- Counter nei tab aggiornati dinamicamente
- Auto-aggiunta prodotti CRITICI a Bring! al caricamento (1x per sessione)
- Badge urgenza e frequenza sugli item in lista (cross-ref smart shopping)
- Tag locali per item (Urgente/Priorità/Verificare) con menu dropdown
- Ordinamento automatico per frequenza utilizzo (item più usati in cima)
- Tap su un item → scanner barcode, con banner 'Trovato! Rimuovi dalla lista'
- Fix pctLeft: usa max(1, qty) come fallback refQty per evitare falsi alert
- Fix daysLeft capped a 365gg per pulire stringhe di previsione
- Back button on action page → torna a shopping se aperto da lista
- 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)
- 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
- 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
- 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
- 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
- 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
- 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