feat: per-site QR menu mode (order vs view-only) + editable branding

Adds a sysadmin-configurable toggle so sites can disable online ordering
on the public QR menu until it's fully supported, plus editable
tagline/hours and a header image (replacing the hardcoded "Our Menu"
placeholder) — all previously hardcoded frontend strings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 09:59:35 +03:00
parent 0cad6a76d3
commit d87540e08f
7 changed files with 358 additions and 39 deletions

View File

@@ -36,7 +36,15 @@ def get_menu(site_slug: str, db: Session = Depends(get_db)):
raise HTTPException(status_code=404, detail="No menu published yet")
import json
return json.loads(snapshot.snapshot_json)
data = json.loads(snapshot.snapshot_json)
data["menu_mode"] = site.menu_mode
data["restaurant"] = {
"name": site.name,
"tagline": {"en": site.menu_tagline_en, "gr": site.menu_tagline_gr},
"hours": {"en": site.menu_hours_en, "gr": site.menu_hours_gr},
"headerImageUrl": site.menu_header_image_url,
}
return data
# ── Internal (site API key) ───────────────────────────────────────────────────