Backend:
- OrderItemInput accepts option objects {id,name,price_delta} instead of int IDs
- extra_cost from selected options added to unit_price snapshot
- GET /api/products/?all=true for manager (includes unavailable)
- PUT /api/products/{id} now replaces options, ingredients, preference_sets
- POST /api/products/{id}/image — persistent image upload to /app/data/product_images
- New models: ProductPreferenceSet, ProductPreferenceChoice, TableGroup
- tables: group_id FK, hard delete (?hard=true), batch create POST /api/tables/batch
- GET /api/tables/groups + POST/PUT/DELETE groups endpoints
- POST /api/auth/me endpoint for token rehydration
- Auto-migration on startup for new columns
PWA:
- AuthRehydrator: fetches /auth/me on load so isMyOrder works after page reload
- 401 response force-logs out (covers blocked waiters)
- ItemOptionsModal: uses extra_cost correctly, shows preferences as radio buttons
Manager:
- ProductsPage: shows unavailable products greyed out, category color picker + reorder,
full option/ingredient/preference editing, image upload
- TablesPage: table groups, auto-increment, deactivate vs hard delete, batch add
44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
services:
|
|
backend:
|
|
build: ./local_backend
|
|
ports:
|
|
- "8000:8000"
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./local_backend/.env
|
|
volumes:
|
|
- ./local_backend/pos.db:/app/pos.db
|
|
- ./local_backend/license_state.json:/app/license_state.json
|
|
- ./logo.png:/app/logo.png:ro
|
|
- ./data/product_images:/app/data/product_images
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
waiter_pwa:
|
|
image: node:20-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ./waiter_pwa:/app
|
|
ports:
|
|
- "5173:5173"
|
|
command: sh -c "npm install --legacy-peer-deps && npm run dev -- --host 0.0.0.0"
|
|
env_file:
|
|
- ./waiter_pwa/.env
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
manager_dashboard:
|
|
image: node:20-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ./manager_dashboard:/app
|
|
ports:
|
|
- "5174:5174"
|
|
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
|
|
env_file:
|
|
- ./manager_dashboard/.env
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|