- 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>
23 lines
1.0 KiB
Python
23 lines
1.0 KiB
Python
"""Module manifest — see core/modules/model.py and APPS_PLATFORM §4."""
|
|
from core.modules.model import Module, Mount, Perm, SettingDef
|
|
|
|
MODULE = Module(
|
|
key='connect_orders',
|
|
kind='feature',
|
|
name='Online orders',
|
|
description='Orders placed from the QR menu, pulled from the cloud.',
|
|
depends=('ordering', 'connect_menu'),
|
|
permissions=(
|
|
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'),
|
|
),
|
|
workers=('services.cloud_sync:order_pull_worker',),
|
|
)
|