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

Conversation

michael-genson
Copy link
Collaborator

@michael-genson michael-genson commented Nov 27, 2024

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) fixed now that it's merged.

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 fixed.

Testing

(fill-in or delete this section)

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

@michael-genson
Copy link
Collaborator Author

Merged this with main now that the cocktail builder is in and updated the logic as needed

@@ -22,7 +22,6 @@
}
resetDialog();
"
:submit-disabled="isCreateDisabled"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was duplicated above somehow

Kuchenpirat
Kuchenpirat previously approved these changes Jan 13, 2025
Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

I think this is good to go, was more straight foreward than i expected an 2k line PR to be 😊

@michael-genson michael-genson enabled auto-merge (squash) January 13, 2025 15:24
@Kuchenpirat
Copy link
Collaborator

Kuchenpirat commented Jan 13, 2025

welp should have merged the ruff stuff afterwards.
There are a few conflicts now.

@michael-genson
Copy link
Collaborator Author

All good, it probably would've messed the ruff PR up anyway

@michael-genson michael-genson merged commit e9892ab into mealie-recipes:mealie-next Jan 13, 2025
13 checks passed
@michael-genson michael-genson deleted the feat/expand-relationships-to-households branch January 13, 2025 16:19
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