-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The frontend menu management system requires the ability to update and delete menu sections, but these endpoints are missing from the backend implementation.
Missing Endpoints
1. Update Menu Section
PUT /sections/:id
Expected request body:
{
"name": "string", // optional
"display_order": number // optional
}2. Delete Menu Section
DELETE /sections/:id
Should also delete all menu items within the section.
Current Backend Implementation
The backend currently only has:
POST /restaurants/{id}/menu/sections- Create sectionGET /restaurants/{id}/menu/sections- List sections
Frontend Code Expecting These
File: adminapp/src/services/menu.ts
- Line 41:
updateSection() - Line 53:
deleteSection()
Used in menu management interface:
File: adminapp/src/pages/MenuDashboard.tsx
- Line 267: Edit section functionality
- Line 273: Delete section with confirmation
Impact
- Cannot edit existing menu section names
- Cannot delete menu sections
- Users stuck with sections once created
- Menu organization is severely limited
Acceptance Criteria
- Implement
PUT /sections/:idendpoint - Implement
DELETE /sections/:idendpoint - Ensure proper authentication and authorization
- Validate that section belongs to user's restaurant
- Handle cascading delete of menu items when section is deleted
- Return appropriate response codes and error messages
Technical Implementation Notes
- DELETE should use database transaction to remove section and all items
- UPDATE should validate display_order conflicts
- Both endpoints should verify user has menu management permissions
Testing
If needed, I can test the edit and delete functionality using Chromium remote debugging to verify the UI interactions work correctly.
Related Issues
- Backend: Missing GET /restaurants/:id/menu endpoint for menu management #46 - Missing GET /restaurants/:id/menu endpoint
- Backend: Missing menu item CRUD endpoints (POST/PUT/DELETE /items/:id) #47 - Missing menu item CRUD endpoints
- Backend: Missing section reordering endpoint (POST /sections/reorder) #48 - Missing section reordering endpoint
Estimated Effort
2-3 hours
✅ COMPLETED - Implementation finished in PR #86
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working