- products.translations / categories.translations (Alembic 0033, core/menu_languages.py: el + en,
name / description / quick options by their base name; catalog.translation). Empty = the text
as typed; no machine translation (owner).
- In the manager's product editor ("In English" / "In Greek", quick extras), the category dialog,
and a menu board's Language (signage MenuContent.language).
- Customer screens only: cloud snapshot names / descriptions per language (C-2), the menu tablet's
EL / EN switch the names (localize), signage boards; tickets, KDS, counter, phones keep the base.
- Catalogue bundles carry translations; @xenia/access menuLanguages.js (a backend test compares).
- e2e: manager (the other language saved), menu tablet (EN / EL names), QR table (English on
the menu, the base name on the kitchen's order, Greek page as typed).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
1.5 KiB
JavaScript
24 lines
1.5 KiB
JavaScript
// @xenia/access — what this venue has turned on and what the signed-in user may do,
|
|
// for every frontend (plan step 2.5, APPS_PLATFORM §5, §6, §9). React; imported from source.
|
|
//
|
|
// <AccessProvider client={client} token={token} i18n={i18n}> loads bootstrap, sets language,
|
|
// … mounts the manager-approval dialog
|
|
// useAccess() → { venue, user, permissions, modules, license, refresh }
|
|
// useModule('kds') · useCan('catalog.menu.manage') · useCan([a, b]) (any) · useCan([a, b], { all: true })
|
|
// useAllowed('ordering.orders.cancel') → 'yes' | 'approve' (a manager's PIN) | 'no' (4.3)
|
|
// <Can perm="…" fallback={…}> · <RequireModule module="…">
|
|
//
|
|
// SALES_POINTS, IN_PERSON, DIGITAL where an order is sold (phase 3S)
|
|
// ALLERGENS, allergenList, setAllergen the 14 EU allergens (6.3)
|
|
//
|
|
// UI hiding only: the backend checks every request (CS-14).
|
|
|
|
export { AccessProvider } from './AccessProvider.jsx'
|
|
export { useAccess, useModule, useCan, can, useAllowed, allowed } from './hooks.js'
|
|
export { Can, RequireModule, ModuleOff, NoAccess } from './guards.jsx'
|
|
export { OverrideHost } from './OverrideHost.jsx'
|
|
export { SALES_POINTS, IN_PERSON, DIGITAL, normalizeSalesPoints } from './salesPoints.js'
|
|
export { ALLERGENS, ALLERGEN_LEVELS, allergenList, nextAllergenLevel, setAllergen } from './allergens.js'
|
|
export { Allergens } from './Allergens.jsx'
|
|
export { MENU_LANGUAGES, translatedLanguages, inLanguage } from './menuLanguages.js'
|