fix: QR menu branding fields — display name, header image, empty-to-hide

- menu_display_name is now separate from the site's internal name (was
  incorrectly showing the sysadmin-only site name on the public menu).
- Header image now resolves against the cloud API origin instead of
  the menu-app's own origin, fixing the broken-image icon.
- Tagline/blurb/hours now genuinely hide when cleared: the sysadmin
  save handler was converting empty fields to null, which the PUT
  endpoint's exclude_none silently drops instead of clearing.
- Added a settable blurb (EN/GR) below the tagline, previously
  hardcoded ("Fresh seasonal plates, served with care.").
- Collapsed hours from two fields (EN/GR) to one — opening hours don't
  vary by language.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 10:44:28 +03:00
parent f5736b85cb
commit a73f081ca1
7 changed files with 101 additions and 59 deletions

View File

@@ -39,9 +39,10 @@ def get_menu(site_slug: str, db: Session = Depends(get_db)):
data = json.loads(snapshot.snapshot_json)
data["menu_mode"] = site.menu_mode
data["restaurant"] = {
"name": site.name,
"name": site.menu_display_name,
"tagline": {"en": site.menu_tagline_en, "gr": site.menu_tagline_gr},
"hours": {"en": site.menu_hours_en, "gr": site.menu_hours_gr},
"blurb": {"en": site.menu_blurb_en, "gr": site.menu_blurb_gr},
"hours": site.menu_hours,
"headerImageUrl": site.menu_header_image_url,
}
return data