- backend: menu tablet device config `table` (ref, validated against active
tables) and `call_waiter`; GET /api/menu-tablet/menu gives the table and
whether it can call; POST /api/menu-tablet/call sends a `table_call` staff
message ("Table 5: the guests call a waiter.", venue language) to the table's
waiters (its open order's, else the zone's), at most once a minute per tablet
(menu_tablet.call_too_soon with the seconds left; menu_tablet.no_table).
- terminal: "Call a waiter" only on a tablet at a table; "A waiter is on the
way to table 5", then a countdown before it can call again; a failed call
says to ask at the counter.
- waiter: the call shows with its own look and "Open the table".
- manager: tables as the choices of a device setting.
- tests: backend +2 (535 → 533 passed total), e2e menu_tablet.mjs +3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
2.1 KiB
Python
39 lines
2.1 KiB
Python
"""Module manifest — see core/modules/model.py and APPS_PLATFORM §4."""
|
|
from core.modules.model import ConfigField, DeviceApp, Limit, Module, Mount, Perm
|
|
|
|
POINTS = ('in_store', 'in_store_takeaway', 'qr_table', 'online_takeaway', 'online_delivery', 'online_preorder', 'none')
|
|
|
|
MODULE = Module(
|
|
key='menu_tablet',
|
|
kind='app',
|
|
name='Menu tablet',
|
|
description="The venue's menu on a tablet: a quick price check for staff and a menu for guests (plan step 5.7a).",
|
|
depends=('catalog',),
|
|
permissions=(
|
|
Perm('menu_tablet.manage', 'Set up menu tablets', roles=('owner', 'store_manager')),
|
|
),
|
|
limits=(
|
|
Limit('devices', 'Number of menu tablets', free=0, licensed_default=1),
|
|
),
|
|
routers=(
|
|
Mount('routers.menu_tablet', '/api/menu-tablet'),
|
|
),
|
|
# How the menu looks on this tablet (owner 2026-11-17: views, photos, descriptions, grouping…)
|
|
device_app=DeviceApp(login_modes=('none',), scope=(), config=(
|
|
ConfigField('view', 'enum', default='expanded', choices=('compact', 'expanded', 'full'), group='look'),
|
|
ConfigField('photos', 'bool', default=True, group='look'),
|
|
ConfigField('descriptions', 'bool', default=True, group='look'),
|
|
ConfigField('group', 'bool', default=True, group='look'),
|
|
ConfigField('theme', 'enum', default='light', choices=('light', 'dark'), group='look'),
|
|
ConfigField('sales_point', 'enum', default='in_store', choices=POINTS, group='menu'),
|
|
ConfigField('sold_out', 'enum', default='strike', choices=('strike', 'hide'), group='menu'),
|
|
ConfigField('category', 'ref', default=None, choices_from='categories', group='menu'),
|
|
ConfigField('search', 'bool', default=True, group='use'),
|
|
ConfigField('languages', 'enum', default='both', choices=('both', 'el', 'en'), group='use'),
|
|
ConfigField('idle_seconds', 'int', default=120, choices=(0, 30, 60, 120, 300, 600), group='use'),
|
|
# A tablet on a table (5.7b): only then guests can call a waiter
|
|
ConfigField('table', 'ref', default=None, choices_from='tables', group='table'),
|
|
ConfigField('call_waiter', 'bool', default=True, group='table'),
|
|
)),
|
|
)
|