Skip to content

Conversation

@nihodi
Copy link
Member

@nihodi nihodi commented Oct 22, 2025

Closes #49

Very work in progress. Not ready for review or merging yet.

TODO:

  • Input validation
  • Server side API validation
  • API Authentication
  • Make it look better
  • Ability to delete/remove items
  • Gluten free
  • Volunteer price?
  • Hidden
  • Remove support for uncategorized items
  • Add comments
  • Add link to menu from navbar?

Current implementation:

Volunteer view (slightly outdated):
image

Customer view:
image

nihodi added 30 commits October 2, 2025 23:12
the implementation details were quite ugly, and if desired, a category called "Uncategorized" could just be created
the problem was the form state being in multiple places that could de-sync (I think)
remedied this by hoisting all the state up to the `Product` and `NewProduct` respectively
@nihodi
Copy link
Member Author

nihodi commented Oct 31, 2025

I think this is ready for review now. Some implementation notes:

  1. There are changes to the database schema, including modifying the MenuProduct table, requiring a full drop of the current table. Notify me if this is not acceptable!
  2. There are no inputs for volunteer price, and it is not displayed on the menu yet, similar to the current menu.
  3. There is no support for products other than beverages.

@nihodi nihodi marked this pull request as ready for review October 31, 2025 11:22
@nihodi nihodi requested a review from pvk05 October 31, 2025 11:24
Copy link
Contributor

@Sebbben Sebbben left a comment

Choose a reason for hiding this comment

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

Overall looks really good.
There are two reoccuring problems in the api code i would like to be fixed.
Otherwise there are some small things, but all in all great work!

@nihodi
Copy link
Member Author

nihodi commented Nov 6, 2025

Just going to write down some improvements that could be implemented in the future (so I don't forget):

  • Better feedback when an item is updated/created/deleted (snackbar?).
  • Only enable inputs on the edit page if the user is an admin, as the API requests requires the admin role.
  • Better client-side error handling when updating the menu fails.
  • Some slightly lacking validation (e.g. category names have a max length of 45, but there are no checks).

@nihodi
Copy link
Member Author

nihodi commented Nov 6, 2025

Thanks for the review!
I implemented the error checking for the database transactions, though I personally think they are kinda useless as they are. If the error checking wasn't added, the API would still return a 500 Internal server error. The added error property isn't really that helpful right now.

Going to request a review of the new changes :)

@nihodi nihodi requested a review from Sebbben November 6, 2025 18:03
Copy link
Contributor

@Sebbben Sebbben left a comment

Choose a reason for hiding this comment

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

Think this is mostly ready to merge. I would like to create a new issue to add optimistic updates to the UI, but i dont feel it's a priority in this PR unless you really feel like implementing it right away

the mobile view might be getting somewhat crowded
Copy link
Member

@pvk05 pvk05 left a comment

Choose a reason for hiding this comment

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

This pr looks very good. There are only a few things i want to comment on. Only admins and boardmembers should be able to edit the menu. Because of this, there needs to be a role check on both the page and the endpoints used for editing. The link for the editing page can be placed on the board page.
I dont think it is necessary to display the volunteer price, so that is fine. The MenuProducts table has outdated products anyway, so it is fine to drop.
The most important thing is the role access permissions. When that is implemented, i think it can be merged.
Overall, very good work

@nihodi
Copy link
Member Author

nihodi commented Nov 12, 2025

Overall, very good work

:)
Hopefully good to go now. Thanks for the review!

@nihodi nihodi requested a review from pvk05 November 12, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants