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

@@ -28,7 +28,9 @@
"queuePosition": "Позиция {position}",
"@queuePosition": {
"placeholders": {
"position": { "type": "int" }
"position": {
"type": "int"
}
}
},
"processing": "Обрабатываем...",
@@ -116,7 +118,9 @@
"noResultsForQuery": "По запросу \"{query}\" ничего не найдено",
"@noResultsForQuery": {
"placeholders": {
"query": { "type": "String" }
"query": {
"type": "String"
}
}
},
"servingsLabel": "Порций",
@@ -125,7 +129,9 @@
"planningForDate": "Планирование на {date}",
"@planningForDate": {
"placeholders": {
"date": { "type": "String" }
"date": {
"type": "String"
}
}
},
"markAsEaten": "Отметить как съеденное",
@@ -134,7 +140,6 @@
"generateWeekSubtitle": "AI составит меню с завтраком, обедом и ужином на всю неделю",
"generatingMenu": "Генерируем меню...",
"dayPlannedLabel": "День запланирован",
"planMenuButton": "Спланировать меню",
"planMenuTitle": "Что запланировать?",
"planOptionSingleMeal": "1 приём пищи",
@@ -149,6 +154,16 @@
"planSelectMealType": "Приём пищи",
"planSelectRange": "Выберите период",
"planGenerateButton": "Запланировать",
"planGenerating": "Генерирую план\u2026",
"planSuccess": "Меню запланировано!"
"planGenerating": "Генерирую план",
"planSuccess": "Меню запланировано!",
"planProductsTitle": "Продукты для меню",
"planProductsSubtitle": "AI учтёт выбранные продукты при составлении рецептов",
"planProductsEmpty": "Продукты не добавлены",
"planProductsEmptyMessage": "Добавьте продукты, которые есть у вас дома — AI подберёт рецепты из того, что уже есть",
"planProductsAddProducts": "Добавить продукты",
"planProductsContinue": "Продолжить",
"planProductsSkip": "Пропустить выбор продуктов",
"planProductsSkipNoProducts": "Планировать без продуктов",
"planProductsSelectAll": "Выбрать все",
"planProductsDeselectAll": "Снять всё"
}