feat(backend): the menu tablet's menu (platform-v2 step 5.7a)

GET /api/menu-tablet/menu for a paired menu tablet: categories in the
catalogue's order (sub-categories after their parent, one category and its
sub-categories when the tablet is set so), each with its products in its own
order (a product in several categories shows in each), the products once with
name, description, tags, photo, the price of the tablet's sales point (or none)
and availability; sold-out hidden when set; the venue's name and the tablet's
settings. Device config: view, photos, descriptions, group, theme, prices of,
sold out, category, search, languages, idle reset (texts in both languages).
Menu changes send menu_tablet.changed to every tablet (main.py, with signage).
tests: test_menu_tablet.py (4); 531 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 23:44:42 +02:00
co-authored by Claude Opus 5.5
parent 6c982e3139
commit 2a6640fe5c
6 changed files with 397 additions and 6 deletions
+3 -1
View File
@@ -112,12 +112,14 @@ async def _menu_change_push(request, call_next):
def _signage_menu_changed() -> None:
"""The signage screens showing a menu board read it again (plan step 5.4b)."""
"""The signage screens showing a menu board (5.4b) and the menu tablets (5.7a) read their menu again."""
try:
from routers.menu_tablet import menu_changed as tablet_menu_changed
from routers.signage import menu_changed as signage_menu_changed
db = SessionLocal()
try:
signage_menu_changed(db)
tablet_menu_changed(db) # the menu tablets read their menu again (5.7a)
finally:
db.close()
except Exception as e: # never breaks the request that changed the menu