Skip to content

Add ability to order menu items#119

Merged
pvk05 merged 4 commits intocybernetisk:developmentfrom
nihodi:menu-ordering
Apr 14, 2026
Merged

Add ability to order menu items#119
pvk05 merged 4 commits intocybernetisk:developmentfrom
nihodi:menu-ordering

Conversation

@nihodi
Copy link
Copy Markdown
Member

@nihodi nihodi commented Feb 5, 2026

Closes #118

Pretty quick and dirty; there is essentially no error handling if something goes wrong when ordering the items. Categories cannot be ordered yet (somewhat fixed in db8ab8f).

image The "UP"/"DOWN" buttons on the left are used to order the items.

IMPORTANT

This snippet of SQL needs to be run after migrating the database for it to behave correctly: UPDATE MenuProduct SET ordering=id WHERE ordering IS NULL;

@nihodi nihodi requested a review from pvk05 February 5, 2026 10:53
@nihodi nihodi added the enhancement New feature or request label Feb 5, 2026
Comment on lines +8 to +10
export async function PATCH(
req: NextRequest
) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

personally felt like PATCH made the most sense, but it's not like it really matters

Copy link
Copy Markdown
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.

Looks good

@pvk05 pvk05 merged commit 016a727 into cybernetisk:development Apr 14, 2026
pvk05 added a commit that referenced this pull request Apr 14, 2026
Co-Authored-By: Niklas Dietzel <niklas@dietzel.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants