Overview
Build the Menu Editor page inside the restaurant dashboard. This is the primary tool restaurant owners use to manage their food items day-to-day: adding new dishes, editing details, toggling availability, and reviewing what customers see.
Dependencies: Issue #181 (Food Item API) and Issue #182 (Upload pipeline).
Figma Reference
📐 Figma: [Menu editor — item list, add/edit modal, availability toggle, empty state — placeholder, link to be added by design lead]
Route
```
/dashboard/menu
```
Protected — requires authenticated user with an active restaurant.
Page Layout
Header
- Page title "Menu"
- "Add item" button (opens modal)
- Item count badge
Item List (table or card grid — follow Figma)
Columns:
| Column |
Notes |
| Image thumbnail |
48 × 48 px, fallback placeholder if no image |
| Name |
|
| Category |
|
| Price |
Formatted as currency (e.g. $12.50) — divide cents by 100 for display |
| Availability |
Toggle switch — calls PATCH immediately on change |
| Actions |
Edit (opens modal), Delete (confirmation prompt) |
- List is sorted by category, then name
- Show empty state illustration + "Add your first item" CTA when the list is empty
Add / Edit Modal
Triggered by "Add item" button or row edit action.
Fields:
- Name (required)
- Description (optional, textarea)
- Price (required, number input — user enters dollars, store as cents)
- Category (text input with autocomplete from existing categories in this restaurant)
- Dietary tags (multi-select from `DietaryTag` enum)
- Images (up to 5, using the `ImageUploader` component from the onboarding issue)
File Structure
```
apps/web/app/dashboard/menu/
page.tsx
MenuItemTable.tsx
MenuItemModal.tsx # Add / edit form in a modal
AvailabilityToggle.tsx # Inline toggle with optimistic update
```
Acceptance Criteria
State Management
Use React Query (or SWR) for list fetching and cache invalidation after mutations. Do not use a global store for this page.
API Calls
| Action |
Endpoint |
| Fetch items |
`GET /api/restaurants/:id/food-items?includeUnavailable=true` |
| Create item |
`POST /api/restaurants/:id/food-items` |
| Update item |
`PATCH /api/restaurants/:id/food-items/:itemId` |
| Delete item |
`DELETE /api/restaurants/:id/food-items/:itemId` |
| Upload image |
`POST /api/upload` |
Out of Scope
- Item customisation / modifiers (Sprint 4)
- Bulk operations beyond availability toggle (Sprint 6)
- CSV export (Sprint 6)
Overview
Build the Menu Editor page inside the restaurant dashboard. This is the primary tool restaurant owners use to manage their food items day-to-day: adding new dishes, editing details, toggling availability, and reviewing what customers see.
Dependencies: Issue #181 (Food Item API) and Issue #182 (Upload pipeline).
Figma Reference
Route
```
/dashboard/menu
```
Protected — requires authenticated user with an active restaurant.
Page Layout
Header
Item List (table or card grid — follow Figma)
Columns:
Add / Edit Modal
Triggered by "Add item" button or row edit action.
Fields:
File Structure
```
apps/web/app/dashboard/menu/
page.tsx
MenuItemTable.tsx
MenuItemModal.tsx # Add / edit form in a modal
AvailabilityToggle.tsx # Inline toggle with optimistic update
```
Acceptance Criteria
State Management
Use React Query (or SWR) for list fetching and cache invalidation after mutations. Do not use a global store for this page.
API Calls
Out of Scope