fix: compound shopping names + auto-Bring on depletion + panna da cucina
1. shopping_name compound-phrase map (computeShoppingName) Add phraseMap checked against the full product name BEFORE the single-token keyword loop. Prevents 'pane grattugiato' → 'Pane', 'panna da cucina' → 'Panna', etc. Key new phrases: - pane/pan grattugiato → Pangrattato - panna da cucina / panna cucina / panna chef → Panna da cucina - fette biscottate → Fette biscottate - aceto balsamico / glassa balsamico → Aceto balsamico - latte condensato/evaporato/vegetale/di soia/mandorla/avena/riso/cocco → specific - prosciutto cotto → Prosciutto cotto - farina di riso/mais/integrale → specific - pasta fresca, zucchero di canna, acqua minerale/frizzante/gassata, brodo, … Also added single-token safety-net entries: 'grattugiato'/'grattato'/'pangrattato' → 'Pangrattato', 'biscottate' → 'Fette biscottate'. 2. DB migration (sqlite3 UPDATE) Re-classified 10 products that had wrong shopping_name: Pane grattugiato → Pangrattato Panna da cucina (×4) → Panna da cucina Fette biscottate (×2) → Fette biscottate Aceto balsamico (×3) → Aceto balsamico Cleared 2 stale Gemini cache entries. 3. showLowStockBringPrompt (app.js) When totalRemaining <= 0 (product fully depleted), skip the modal entirely. The backend already auto-adds to Bring! on depletion; the JS only asks as a fallback if that failed (fire-and-forget async, never blocks the UI). The afterCallback (e.g. move-remainder modal, navigate to dashboard) is called immediately without user interaction.
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
"405ea6ec33d54042d046599650f422ea": "Succo",
|
||||
"f624c420f14d8eff122c0bb395eb63da": "Snack Dolci",
|
||||
"92751fbb97923590c402bc7810778b36": "Biscotti",
|
||||
"0e342f4f977e814b2108e8e0475a57d5": "Aceto",
|
||||
"edd038513b2641005bd36884f90789c1": "Pane",
|
||||
"8727f7abcb66764b5eb3d1f036bc18b8": "Tè",
|
||||
"0eb53fe1a5d4d106eac47c8a81d1afe7": "Farina",
|
||||
"0ebada5597d1d166d0ed8f49500bfeba": "Verdure",
|
||||
|
||||
Reference in New Issue
Block a user