feat: §6 Gruppo B residuo — pannello macros, esclusioni granulari, achievement
- Plan: pannello macros laterale "oggi" con consumati/pianificati vs target (kcal/P/F/C). Sticky su lg, in-flow su mobile. Profile/derived ora include kcalTarget e i macro target (BMR aggiustato per condizioni e diet history). - Preferenze: nuova sezione "Ingredienti specifici da evitare" con ricerca debounced sul catalogo (cap 50). Schema Preferences.bannedIngredientIds + matchmaking che scarta ricette contenenti ingredient bandito (test unit). - Achievement: tabella Achievement (userId+key unique), 4 traguardi iniziali (first_weigh_in, first_plan, first_fast_complete, ten_meals_consumed). Service idempotente eval+persist agganciato a 4 trigger (weight POST, plan POST, fast PATCH→COMPLETED, slot consumed). Push notification best-effort all'unlock. Pannello badge nel profilo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3b895191f5
commit
d17c5ef869
29 files changed
+1048
-86
No files matched your search
@@ -53,6 +53,9 @@ export const preferencesPatchSchema = z
|
||||
sessionMinutes: z.coerce.number().int().min(10).max(240).nullable().optional(),
|
||||
// Pasti/giorno preferiti. Il fastingProtocol ha precedenza.
|
||||
mealsPerDay: z.coerce.number().int().min(1).max(4).nullable().optional(),
|
||||
// PRD §6 — esclusioni granulari su singoli ingredient. Cap a 50 per evitare
|
||||
// di soffocare il matchmaking (in pratica più di così è una dieta diversa).
|
||||
bannedIngredientIds: z.array(z.string().min(1).max(120)).max(50).optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
Reference in new issue
Block a user