fix: jam/confiture opened shelf life in fridge 60→180 days
Both PHP and JS rules for opened confettura/marmellata in section G (fridge condiments) were returning 60 days — too short. An opened jar of jam lasts ~6 months in the fridge. Also: update README roadmap with comprehensive, grouped view matching the internal memory roadmap (high/medium/low/completed). Fixes: database.php line ~412, app.js line ~1707
This commit is contained in:
@@ -350,10 +350,35 @@ The application uses no build tools — edit files directly and refresh.
|
||||
|
||||
## 📋 Roadmap
|
||||
|
||||
- [ ] User authentication / multi-user support
|
||||
- [ ] Offline mode with service worker
|
||||
- [ ] Export/import inventory data
|
||||
- [ ] Notification system (Telegram, email) for expiring products
|
||||
### High Priority
|
||||
- [ ] **Cooking mode — 3D wheel JS** — swipe navigation, gyroscope tilt, haptic feedback
|
||||
- [ ] **Cooking mode — step timers** — auto-detect "X minutes" in recipe steps, countdown + alert
|
||||
- [ ] **Push notifications** — daily expiry alerts via PWA Service Worker + VAPID
|
||||
- [ ] **Quick search / quick-add bar** — always-visible search above the nav, PWA shortcuts
|
||||
|
||||
### Medium Priority
|
||||
- [ ] **Receipt OCR → bulk add** — photo of receipt → Gemini Vision → auto-fill inventory
|
||||
- [ ] **CSV/JSON export & import** — download/upload inventory from Settings
|
||||
- [ ] **Custom storage locations** — user-defined locations beyond Fridge/Freezer/Pantry
|
||||
- [ ] **Multi-user support** — PIN-based user distinction, action log with user label
|
||||
- [ ] **AI optimal purchase prediction** — suggest "buy X units of Y within Z days"
|
||||
- [ ] **Price history sparklines** — per-product price chart from the AI cache data
|
||||
|
||||
### Low Priority / Nice to Have
|
||||
- [ ] **Dark mode** — CSS custom properties are already structured to support it
|
||||
- [ ] **Full offline mode** — Service Worker cache to show inventory read-only when server is down
|
||||
- [ ] **French & Spanish translations** (`fr.json`, `es.json`)
|
||||
- [ ] **Swipe actions on inventory rows** — swipe left to use/discard, right to edit
|
||||
- [ ] **PHP unit tests** — PHPUnit coverage for shelf-life, price calc, and key helpers
|
||||
|
||||
### Completed ✅
|
||||
- ✅ AI price estimation in shopping list
|
||||
- ✅ Server heartbeat + offline banner
|
||||
- ✅ In-app bug reporter → automatic GitHub issue creation
|
||||
- ✅ Cooking mode (start, steps, 3D wheel CSS)
|
||||
- ✅ Kiosk ⚙️ Settings overlay button (replaces Android native button)
|
||||
- ✅ Adaptive consumption anomaly detection
|
||||
- ✅ CI/CD pipeline (PHP lint, JS lint, Docker build, Trivy security scan)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+1
-1
@@ -409,7 +409,7 @@ function estimateOpenedExpiryDaysPHP(string $name, string $category, string $loc
|
||||
if (preg_match('/\b(senape|mustard)\b/', $n)) return 90;
|
||||
if (preg_match('/salsa\s+di\s+soia|soy\s*sauce/', $n)) return 90;
|
||||
if (preg_match('/\b(tabasco|worcestershire|sriracha)\b/', $n)) return 180;
|
||||
if (preg_match('/confettura|marmellata/', $n)) return 60;
|
||||
if (preg_match('/confettura|marmellata/', $n)) return 180;
|
||||
if (preg_match('/nutella|cioccolat/', $n)) return 60;
|
||||
|
||||
// ── H: Category fallbacks ────────────────────────────────────────────
|
||||
|
||||
+1
-1
@@ -1704,7 +1704,7 @@ function estimateOpenedExpiryDays(product, location) {
|
||||
if (/\b(senape|mustard)\b/.test(name)) return 90;
|
||||
if (/salsa\s+di\s+soia|soy\s*sauce/.test(name)) return 90;
|
||||
if (/\b(tabasco|worcestershire|sriracha)\b/.test(name)) return 180;
|
||||
if (/confettura|marmellata/.test(name)) return 60;
|
||||
if (/confettura|marmellata/.test(name)) return 180;
|
||||
if (/nutella|cioccolat/.test(name)) return 60;
|
||||
|
||||
// ── H: Category fallbacks ────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user