feat(manager): the venue's online ordering link and QR code on the Online ordering page

Plan phase 3S, step S.99.
- GET /api/connect/fees returns `links` {order, menu}: the ordering app and QR menu
  addresses, from the cloud's apps_url (heartbeat) and the site id.
- Manager: "Your ordering link" card (OrderingLink.jsx) on Online ordering: the address, its
  QR code, copy / open / print, to share or put on the website and window.
- Pack README: routers/fees.py row.
- Tests: the link (backend), the card (manager e2e).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 01:36:02 +02:00
co-authored by Claude Opus 5.5
parent 652e6a26af
commit 18d580d87c
8 changed files with 66 additions and 1 deletions
@@ -168,3 +168,11 @@ def test_kitchen_ticket_shows_the_reference_and_the_time(db, menu):
assert _place(order, "None") == "ORD-0605"
order.requested_for = None
assert _online_meta(order)[1] == ("For:", "As soon as possible")
def test_the_venues_ordering_link(client, owner_h, monkeypatch):
from services import cloud_sync
monkeypatch.setitem(cloud_sync.license_state, "apps_url", "https://menu.example.com")
monkeypatch.setattr(cloud_sync.settings, "SITE_ID", "taverna-1")
links = client.get("/api/connect/fees", headers=owner_h).json()["links"]
assert links == {"order": "https://menu.example.com/order/taverna-1", "menu": "https://menu.example.com/menu/taverna-1"}