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:
@@ -247,8 +247,12 @@ def list_fees(db: Session = Depends(get_db), user=Depends(require(KEY))):
|
||||
from services import system_products
|
||||
fee_product = system_products.get(db, system_products.DELIVERY_FEE)
|
||||
db.commit()
|
||||
from config import settings
|
||||
from services.table_qr import apps_url, menu_url
|
||||
return {**fees_payload(db), "ordering": ordering_settings(db),
|
||||
"fee_product": {**system_products.out(fee_product), "vat_groups": _vat_groups(db)}}
|
||||
"fee_product": {**system_products.out(fee_product), "vat_groups": _vat_groups(db)},
|
||||
# the venue's ordering link (S.99): to share, print or put on the website
|
||||
"links": {"order": f"{apps_url()}/order/{settings.SITE_ID or ''}", "menu": menu_url()}}
|
||||
|
||||
|
||||
def _vat_groups(db) -> list[dict]:
|
||||
|
||||
Reference in New Issue
Block a user