mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-17 15:55:13 -05:00
feat(frontend): ✨ food filter and add back search dialog (#794)
* return ingredients and foods on summary * filter on foods * update search page to TS and comp-api * add additional search fields * feat(frontend): ✨ add back search dialog * update docs * formatting * update sidebar - remove dropdown Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -3,6 +3,7 @@ from typing import Any
|
||||
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
from mealie.db.models.recipe.ingredient import RecipeIngredient
|
||||
from mealie.db.models.recipe.recipe import RecipeModel
|
||||
from mealie.db.models.recipe.settings import RecipeSettings
|
||||
from mealie.schema.recipe import Recipe
|
||||
@@ -64,7 +65,11 @@ class RecipeDataAccessModel(AccessModel[Recipe, RecipeModel]):
|
||||
def summary(self, group_id, start=0, limit=99999) -> Any:
|
||||
return (
|
||||
self.session.query(RecipeModel)
|
||||
.options(joinedload(RecipeModel.recipe_category), joinedload(RecipeModel.tags))
|
||||
.options(
|
||||
joinedload(RecipeModel.recipe_category),
|
||||
joinedload(RecipeModel.tags),
|
||||
joinedload(RecipeModel.recipe_ingredient).options(joinedload(RecipeIngredient.food)),
|
||||
)
|
||||
.filter(RecipeModel.group_id == group_id)
|
||||
.offset(start)
|
||||
.limit(limit)
|
||||
|
||||
Reference in New Issue
Block a user