Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ability to filter by nutritional values for meal plan rules #4859

Open
wants to merge 2 commits into
base: mealie-next
Choose a base branch
from

Conversation

parumpum
Copy link
Contributor

@parumpum parumpum commented Jan 8, 2025

What this PR does / why we need it:

(REQUIRED)

Adds the ability to set meal plan queries for Calories, Protein, Fat, and Carbohydrates.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #2712

Testing

Manually tested some queries with recipes that matched and didn't match the nutritional criteria. Added unit test cases.

@parumpum parumpum changed the title feat: Add nutrition query filters feat: Add ability to filter by nutritional values for meal plan rules Jan 8, 2025
Copy link
Collaborator

@michael-genson michael-genson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good, one change that's preventing me from testing fully in the app

@@ -148,6 +148,27 @@ export default defineComponent({
label: i18n.tc("general.date-updated"),
type: "date",
},
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have to be snake_case otherwise they end up being invalid on the frontend

nutrition.carbohydrate_content, etc.

When I try adding this to my meal plan rules, and I go to edit the rule again, it gets removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants