feat: online ordering settings (services, hours, preparation, slots) and the order app e2e (platform-v2 3S, S.4)
- connect_orders.ordering setting; GET/PUT /api/connect/fees/ordering (validated: services, hours per day incl. past midnight, preparation, slot minutes, days ahead, ASAP); pushed to the cloud with the menu (snapshot `ordering`). - Manager: the Online ordering page gains "Services and hours" (OrderingSettings.jsx; logic in feesLogic.js, unit-tested); nav label "Online ordering". - tests/e2e/order_app.mjs: a real cloud + the built order app in a phone-sized browser: takeaway and delivery placed, priced by the cloud (fee by area, minimum refused), the site moves the delivery to delivered and the page follows; a rejection with its reason; Greek. In run-all, with the order app's unit tests. - Tests: backend +1 (406), manager unit +1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Module manifest — see core/modules/model.py and APPS_PLATFORM §4."""
|
||||
from core.modules.model import Module, Mount, Perm
|
||||
from core.modules.model import Module, Mount, Perm, SettingDef
|
||||
|
||||
MODULE = Module(
|
||||
key='connect_orders',
|
||||
@@ -11,6 +11,9 @@ MODULE = Module(
|
||||
Perm('connect_orders.manage', 'Accept and manage online orders', roles=('owner', 'store_manager', 'staff_manager', 'barista', 'barman')),
|
||||
Perm('connect_orders.fees', 'Set delivery areas and fees', roles=('owner', 'store_manager')),
|
||||
),
|
||||
settings=(
|
||||
SettingDef('connect_orders.ordering', '{}', 'Online ordering (phase 3S): services offered, ordering hours, preparation and slot minutes, days ahead, as soon as possible. Edited on the Online ordering page.', type='json'),
|
||||
),
|
||||
routers=(
|
||||
Mount('routers.fees', '/api/connect/fees'),
|
||||
Mount('routers.connect_orders', '/api/connect'),
|
||||
|
||||
Reference in New Issue
Block a user