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: Move "on hand" and "last made" to household #4616

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

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • feature
  • bug

What this PR does / why we need it:

(REQUIRED)

This feature migrates food on-hand and tool on-hand to be configured per-household, as well as the recipe's "last made" property. The user experience is mostly the same,

(this plays nicely with the cocktail builder PR, although it may generate some merge conflicts).

While working on this PR I also uncovered/fixed a few existing issues:

  • Currently the orderBy param must be in snake case, while filters can be in either snake case or camel case. This PR fixes this by allowing camel case in the order by
  • When sorting by rating, we already correctly sort by the user's rating (rather than the global rating), however we didn't account for this in filters (i.e. if you included rating in a query filter, it would only use the global rating). This is fixed by this PR (since the same issue occurred using last made in a filter).

Which issue(s) this PR fixes:

(REQUIRED)

N/A

Special notes for your reviewer:

(fill-in or delete this section)

If this is merged before the cocktail builder, I will update that PR to use the new on hand properties. If the cocktail is merged before this, I will fix it in this PR.

Testing

(fill-in or delete this section)

Pulled up two browsers with users from different households, as well as a bunch of backend tests.

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.

1 participant