feat: add product selection step before meal planning

Inserts a new PlanProductsSheet as step 1 of the planning flow.
Users see their current products as a multi-select checklist (all
selected by default) before choosing the planning mode and dates.

- Empty state explains the benefit and offers "Add products" CTA
  while always allowing "Plan without products" to skip
- Selected product IDs flow through PlanMenuSheet →
  PlanDatePickerSheet → MenuService.generateForDates → backend
- Backend: added ProductIDs field to generate-menu request body;
  uses ListForPromptByIDs when set, ListForPrompt otherwise
- Backend: added Repository.ListForPromptByIDs (filtered SQL query)
- All 12 ARB locale files updated with planProducts* keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dbastrikin
2026-03-23 16:07:28 +02:00
parent b6c75a3488
commit b38190ff5b
33 changed files with 1007 additions and 77 deletions

View File

@@ -118,7 +118,9 @@
"noResultsForQuery": "Nada encontrado para \"{query}\"",
"@noResultsForQuery": {
"placeholders": {
"query": { "type": "String" }
"query": {
"type": "String"
}
}
},
"servingsLabel": "Porciones",
@@ -127,7 +129,9 @@
"planningForDate": "",
"@planningForDate": {
"placeholders": {
"date": { "type": "String" }
"date": {
"type": "String"
}
}
},
"markAsEaten": "Marcar como comido",
@@ -136,7 +140,6 @@
"generateWeekSubtitle": "La IA creará un menú con desayuno, comida y cena para toda la semana",
"generatingMenu": "Generando menú...",
"dayPlannedLabel": "Día planificado",
"planMenuButton": "Planificar comidas",
"planMenuTitle": "¿Qué planificar?",
"planOptionSingleMeal": "Una comida",
@@ -151,6 +154,16 @@
"planSelectMealType": "Tipo de comida",
"planSelectRange": "Seleccionar período",
"planGenerateButton": "Planificar",
"planGenerating": "Generando plan\u2026",
"planSuccess": "¡Menú planificado!"
"planGenerating": "Generando plan",
"planSuccess": "¡Menú planificado!",
"planProductsTitle": "Productos para el menú",
"planProductsSubtitle": "La IA tendrá en cuenta los productos seleccionados al generar recetas",
"planProductsEmpty": "No hay productos añadidos",
"planProductsEmptyMessage": "Añade productos que tengas en casa — la IA sugerirá recetas con lo que ya tienes",
"planProductsAddProducts": "Añadir productos",
"planProductsContinue": "Continuar",
"planProductsSkip": "Omitir selección de productos",
"planProductsSkipNoProducts": "Planificar sin productos",
"planProductsSelectAll": "Seleccionar todo",
"planProductsDeselectAll": "Deseleccionar todo"
}