Restructure food suggestion data and builder logic

This commit is contained in:
2026-04-13 17:55:11 +02:00
parent 6c7c1f01c9
commit 305440a6b2
5 changed files with 820 additions and 67 deletions
+22
View File
@@ -19,10 +19,21 @@ from .constants import (
DEFAULT_CATEGORIES,
ENERGY_DENSITY_LABELS,
ENERGY_DENSITY_OPTIONS,
FOOD_ROLE_DESCRIPTIONS,
FOOD_ROLE_LABELS,
FOOD_ROLE_OPTIONS,
ITEM_KIND_LABELS,
ITEM_KIND_SINGULAR_LABELS,
MEAL_STYLE_LABELS,
MEAL_STYLE_OPTIONS,
MEAL_TYPE_LABELS,
MEAL_TYPE_OPTIONS,
NOTIFICATION_CHANNEL_OPTIONS,
PROTEIN_PREFERENCE_LABELS,
PROTEIN_PREFERENCE_OPTIONS,
ROLE_LABELS,
SUGGESTION_PRIORITY_LABELS,
SUGGESTION_PRIORITY_OPTIONS,
SUGGESTION_STYLE_LABELS,
SUGGESTION_STYLE_OPTIONS,
VISIBILITY_DESCRIPTIONS,
@@ -140,11 +151,22 @@ def create_app() -> Flask:
"builder_labels": BUILDER_LABELS,
"builder_descriptions": BUILDER_DESCRIPTIONS,
"builder_options": BUILDER_OPTIONS,
"food_role_labels": FOOD_ROLE_LABELS,
"food_role_descriptions": FOOD_ROLE_DESCRIPTIONS,
"food_role_options": FOOD_ROLE_OPTIONS,
"suggestion_priority_labels": SUGGESTION_PRIORITY_LABELS,
"suggestion_priority_options": SUGGESTION_PRIORITY_OPTIONS,
"daypart_suggestions": DAYPARTS,
"energy_density_options": ENERGY_DENSITY_OPTIONS,
"energy_density_labels": ENERGY_DENSITY_LABELS,
"meal_type_options": MEAL_TYPE_OPTIONS,
"meal_type_labels": MEAL_TYPE_LABELS,
"meal_style_options": MEAL_STYLE_OPTIONS,
"meal_style_labels": MEAL_STYLE_LABELS,
"suggestion_style_options": SUGGESTION_STYLE_OPTIONS,
"suggestion_style_labels": SUGGESTION_STYLE_LABELS,
"protein_preference_options": PROTEIN_PREFERENCE_OPTIONS,
"protein_preference_labels": PROTEIN_PREFERENCE_LABELS,
"visibility_labels": VISIBILITY_LABELS,
"visibility_descriptions": VISIBILITY_DESCRIPTIONS,
"role_labels": ROLE_LABELS,