- core/sales_points.py: in_store, in_store_takeaway, qr_table, online_takeaway, online_delivery, online_preorder (+ old channel names mapped). - Alembic 0017: orders.sales_point (backfilled), products.sold_at (from digital_visible), digital_price/digital_discount -> item price modifiers for the QR menu and online, order_channel conditions -> sales points; drops the three digital columns. - Every order records its sales point; the pricing engine's channel is it; items not sold there are refused (order.not_sold_here, pos.line_invalid not_sold_here). - POS menu: only what the counter sells, prices per counter sales point; the screen shows the order type's products and prices. Waiter app asks for in-person products. - Cloud snapshot: products sold by the customer apps, priced by the engine. - Manager: product "Where it's sold" tab; pricing condition shows sales points. - Products API, catalogue export/import carry sold_at. - Tests: test_sales_points.py (8, incl. the migration), access +1, terminal +1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
1.1 KiB
JavaScript
19 lines
1.1 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 })
|
|
// <Can perm="…" fallback={…}> · <RequireModule module="…">
|
|
//
|
|
// SALES_POINTS, IN_PERSON, DIGITAL where an order is sold (phase 3S)
|
|
//
|
|
// UI hiding only: the backend checks every request (CS-14).
|
|
|
|
export { AccessProvider } from './AccessProvider.jsx'
|
|
export { useAccess, useModule, useCan, can } 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'
|