feat: ordering from the menu tablet at a table (platform-v2 step 6.6, D-30)
- tablet_orders (0034) + services/tablet_orders.py: venue rules (menu_tablet.ordering) with
per-tablet overrides: kitchen or waiter confirms first, no open order open/refuse, limits
(items per order, of one dish, time between orders)
- /api/menu-tablet: quote, order, order/{id}, bill (see + ask), requests accept/decline, ordering
- terminal: Add to the order (POS ProductDialog), cart, note, send, live status, the bill
- waiter: TabletRequests on the table page, tablet_order message theme with Open the table
- manager: Settings -> Menu tablets
- tests: test_tablet_orders.py, menu-tablet unit, menu_tablet.mjs e2e (the done-when)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { useState } from 'react'
|
||||
import { useCan, useModule } from '@xenia/access'
|
||||
import { useTranslation } from '@xenia/i18n'
|
||||
import CustomerDisplaySettings from './sections/CustomerDisplaySettings'
|
||||
import MenuTabletSettings from './sections/MenuTabletSettings'
|
||||
import VenueSettings from './sections/VenueSettings'
|
||||
import AppInfoTab from './tabs/AppInfoTab'
|
||||
import ColoursTab from './tabs/ColoursTab'
|
||||
@@ -12,7 +13,7 @@ import DevelopmentTab from './tabs/DevelopmentTab'
|
||||
import FiscalTab from './tabs/FiscalTab'
|
||||
import { TabGroup } from '../../ui/Tabs'
|
||||
|
||||
const TABS = ['app-info', 'venue', 'customer-display', 'security', 'operation', 'colours', 'print-fonts', 'fiscal', 'development']
|
||||
const TABS = ['app-info', 'venue', 'customer-display', 'menu-tablets', 'security', 'operation', 'colours', 'print-fonts', 'fiscal', 'development']
|
||||
|
||||
export default function SettingsPage() {
|
||||
const { t } = useTranslation('manager')
|
||||
@@ -21,7 +22,11 @@ export default function SettingsPage() {
|
||||
const displayOn = useModule('customer_display')
|
||||
const displayKey = useCan('customer_display.manage')
|
||||
const display = displayOn && displayKey
|
||||
const tabs = TABS.filter(id => id !== 'customer-display' || display).map(id => ({ id, label: t(`settings.tabs.${id}`) }))
|
||||
// guests ordering from the menu tablets (6.6): where there are tablets and the user sets them up
|
||||
const tabletOn = useModule('menu_tablet')
|
||||
const tabletKey = useCan('menu_tablet.manage')
|
||||
const tablets = tabletOn && tabletKey
|
||||
const tabs = TABS.filter(id => (id !== 'customer-display' || display) && (id !== 'menu-tablets' || tablets)).map(id => ({ id, label: t(`settings.tabs.${id}`) }))
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-full min-h-0">
|
||||
@@ -30,6 +35,7 @@ export default function SettingsPage() {
|
||||
{activeTab === 'app-info' && <AppInfoTab />}
|
||||
{activeTab === 'venue' && <div className="max-w-3xl"><VenueSettings /></div>}
|
||||
{activeTab === 'customer-display' && display && <div className="max-w-4xl"><CustomerDisplaySettings /></div>}
|
||||
{activeTab === 'menu-tablets' && tablets && <div className="max-w-3xl"><MenuTabletSettings /></div>}
|
||||
{activeTab === 'security' && <SecurityTab />}
|
||||
{activeTab === 'operation' && <OperationTab />}
|
||||
{activeTab === 'colours' && <ColoursTab />}
|
||||
|
||||
Reference in New Issue
Block a user