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

fix: Meal Plan Notes allow Submission Without Title/Note Text #4615

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

Conversation

Arshad561
Copy link

What type of PR is this?

  • bug

What this PR does / why we need it:

Currently, when creating a new meal planner, the user can attempt to create a meal without providing a meal recipe or title. This results in a 422 error from the server.

With this fix:

  • The "Create" button will be disabled if the meal recipe or title is empty.
  • This ensures a smoother user experience and prevents invalid submissions.

Before my change

Screenshot 2024-11-26 at 12 20 41 PM

After my change


Screenshot 2024-11-26 at 12 20 55 PM

Which issue(s) this PR fixes:

Fixes #2446

Special notes for your reviewer:

Please focus on the changes made to the validation logic for enabling/disabling the "Create" button and ensure that the edge cases for validation are covered.

Testing:

  • Tested the meal planner form to verify that the "Create" button is only enabled when:
    • A meal recipe is selected, or
    • A meal title is entered.
  • Attempted to submit invalid data (empty fields) to confirm that the button remains disabled.

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.

[nightly] - Meal Plan Notes allow Submission Without Title/Note Text, but Return 422
1 participant