Commit Graph
113 Commits
Author SHA1 Message Date
bonaminandClaude Opus 5.5 244e93f827 feat(manager): the floor plan editor reworked; Management -> Tables on the page rule; area colours
- Floor editor: one toolbar over the map and the panels (grid on / off, grid resolution Ultra high
  ... Very low, edit the shape, Fit width / Whole plan, undo, save), panels top-aligned and sticky.
- The floor's shape: a '+' on the edge under the pointer, press to add a corner (and drag it);
  resting on a corner shows a bubble to remove it (never below 3).
- Areas: resize handles on the sides and corners, a colour (pastel, see-through; floor_items.color,
  migration 0041), the name repeated in the corner when tables cover it (live maps too).
- Labels can be clicked again after they're placed (transparent fill, not none).
- Management -> Tables: <Page> with the tabs above (?tab=), the list as a container, toolbar
  buttons one height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:17:45 +02:00
bonaminandClaude Opus 5.5 476c55abc0 feat(manager): products on the page rule, a wide product editor, alternate prices per sales point
- Products: the categories and the list as two containers side by side (the tree sticky), the
  toolbar on the shared controls (search, filters, list/grid, New all one height), archive /
  delete red in a container.
- Product editor: a wide dialog (Dialog size=wide: ~88% of a 16:9 screen, capped on ultrawides),
  the shared tab strip (no up/down scrollbar), one name and description with a language switch
  above them, unit (modern dropdown) and price on one row, 'Edit alternate prices' under Where
  it's sold (the product's own price per sales point: default / set / +- amount / +- %, rounding).
- Pricing: shared tabs in the address, a new 'Order channel prices' tab (rules per product,
  category or sales point, multi-select, the most precise wins).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:11:35 +02:00
bonaminandClaude Opus 5.5 f3fc3340d2 feat(manager): online ordering settings in tabs beside Test an order; expense lines and documents
- Online orders -> Settings: takeaway / delivery / any time side by side (wrapping, with room),
  the days of the week apart; fee rules, delivery areas and fee settings (the fee line) as tabs
  on the left, Test an order on the right; a rule's switch at the far right, equal padding,
  'Order price from' / 'Total items count from' in the rule editor.
- Expenses: the dialog lists what was bought (quantity, price before VAT, VAT; they make the
  total, with net / VAT / total) and keeps documents (attach a PDF or photo, open, remove;
  picked for a new expense, uploaded when it's saved); a paperclip in the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:57:58 +02:00
bonaminandClaude Opus 5.5 5915177c82 feat(manager): UI review pass 2 (first part): QR codes print alone, staff and permissions, tabs, schedule, prep zones, sessions
- Tables -> QR codes: Print all codes prints only the codes, as cards to cut out (PrintArea).
- Staff: coloured row actions (edit accent, zones blue, block orange / unblock green, delete red);
  permissions drawer wider, help tips right after the text, section titles quiet and ruled, more
  room between sections.
- Tabs: an open tab's charged / paid / owed larger, charges and payments further apart.
- Schedule: the header on PageHeader, the person / hour switch a Segmented as tall as the buttons.
- Prep zones: the dialog wider, the name explained (the internal name; staff see the one below).
- Management -> Sessions (was 'Signed in now') moved last.
- Map labels: Fit width / Whole map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:48:59 +02:00
bonaminandClaude Opus 5.5 6f4ab23582 feat(manager): design pass 1 — every page on <Page>, shared toolbars, fees under Online orders, QR codes under Tables, day stats reworked
From the owner's page-by-page review (2026-11-20):
- every page root is <Page> (scrolls, fills 1080p, 16:9 centred on
  ultrawides); not yet: products, management/tables, stock (next pass)
- /dashboard: more padding in cards (p-card), quieter secondary text,
  11px uppercase labels everywhere (text-overline)
- day stats: xl dialog, "● Day running · Opened …" as text, the six
  figures in equal boxes, "On tabs" in the payments bar, shared Tabs
- /tables: Segmented List / Map / QR codes (?view=; /online/qr redirects),
  filter chips + zones multi-select at one height, the card itself opens
  the table (button removed), cards ~20% wider
- /online-orders: shared Tabs with Settings (= the old /online/fees page,
  which redirects to ?tab=settings); orders fill the width
- contacts, customers, expenses: PageHeader + Toolbar + SearchInput +
  multi-select Dropdowns (kinds; statuses, categories); table cells
  vertically centred; the Spent tip opens on hover
- filterCards / filterContacts / filterExpenses take several values
  (unit tests added)
- docs/DESIGN.md: the design language (CS-20 in the pack README)
- tests/e2e/manager_layout.mjs: the page rule at 1920x1080 and 3440x1440;
  manager.mjs and manager_look.mjs follow the moved pages

Verified: manager build + lint (0 errors), unit tests (manager 99, ui 24,
i18n 31, api 25, access 8), i18n guard, manager_layout.mjs all passed,
manager.mjs 228 checks all passed. Not checked: the waiter app and the
terminal by eye (they only get the muted ink-2 token).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 11:23:30 +02:00
bonaminandClaude Opus 5.5 2b44d55f81 feat(ui,manager): looks: light / dark / device, palettes and styles, chosen in the manager's profile menu (platform-v2 step 6.15)
- @xenia/ui theme.js: a look = mode (light | dark | system) + palette (data-palette) + style (data-style); applyLook /
  getStoredLook (per device), 'system' resolved with matchMedia and followed live, so a palette is just a light and a
  dark token block; applyTheme kept for older callers (keeps palette and style)
- tokens.css: 'Palettes' (first: Nord, light + dark, every colour and the nav rail) and 'Styles' (first: sharp: small
  corners, 1.5px borders, flat cards); --x-border-width used by every component and Tailwind's 'border'
- contrast test: every palette in both modes (+ the nav rail); it caught the default rail's active item at 3.7:1 -> 5.5:1
- manager: the saved look applied at start (was light only); profile menu -> Look: Light / Dark / Device, Colours
  (Xenia, Nord), Shapes (Rounded, Sharp), applied at once and kept on this device
- e2e: manager_look.mjs (every page in light and dark, no large near-white area in dark, contact sheets; 'nord-sharp'
  adds that look; in run-all), manager.mjs 'look:' (dark at once, kept after a reload, Device follows the device)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:30:24 +02:00
bonaminandClaude Opus 5.5 f383060bad feat(ui): the QR card shared in @xenia/ui/qr (platform-v2 step 6.14c)
- QrCode (a QR on a light tile, optional caption; framed or not) in packages/ui, on its own subpath so only
  the apps that show one need qrcode.react (an optional peer); x-qr styles keep the code dark on light in dark themes
- used by the terminal's customer display, the manager's online-ordering link, table QR codes and Settings' pairing QR
  (four copies of the same markup gone)
- the money pad and the order line row stay where they are: the manager's payment is the phones' cash / card choice
  (no cash given, change or split) and its order lines are not the counter's cart lines, so neither has a second user;
  the signage slides keep their own QR (inline styles scaled to the TV)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:11:34 +02:00
bonaminandClaude Opus 5.5 294b769850 feat(manager): the setup wizard and the shell on v2; all of src on the v2 rules (platform-v2 step 6.14b)
- setup wizard (src/pages/setup): welcome (pick the language: the wizard switches at once), the owner's account, the venue
  (kind, name, staff language, time zone), an optional lock-screen PIN, finish -> sign in; English and Greek
- shell (src/shell): AppLayout (license banner in both languages, header, lock button, idle lock / sign-out), Sidebar on a
  new 'nav' token set in @xenia/ui (light + dark), ProfileDialog (name, username, password, 4-6 digit PIN), licenseContext;
  App.jsx loads the session and the setup state with react-query (no setState in effects); the header's dead search box gone
- Management -> Tables -> List (src/pages/tables, was TablesConfigTab): zones as tabs (drag to reorder), zone name / prefix /
  colour, add many numbered on, a table's name (6 chars) / zone / seats, twice-used names flagged, off / on / delete,
  pick several to move, rename in a series or delete (says how many failed)
- the old src/ui kit, layouts/, components/Sidebar + EditProfileModal, the 'primary' palette and the .btn/.card/.input classes deleted;
  NotificationBell / UserMenuButton on tokens; @xenia/ui: nav tokens, 'scrim' in the Tailwind preset
- v2.json paths = src (the guards cover all of it); npm run lint = eslint src; argsIgnorePattern for components in JSX
- tests: shell.test.mjs (3), e2e setup.mjs (new: a fresh install through the wizard in Greek to the overview, in run-all),
  manager.mjs 'tables list' (zone, 3 tables, rename series, profile PIN, rail tokens)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:01:23 +02:00
bonaminandClaude Opus 5.5 f6fcfb7736 feat(manager): every settings tab on v2 (platform-v2 step 6.14a)
- Settings: tabs in the address (?tab=), Fiscal only with the fiscal app, Appearance only with the waiter app
- General: version / update / license / state / uptime, the local network (address by hand or found, the pairing QR),
  what is set up, export / import of the catalogue and the tables (a wrong file refused, two confirmations), support lock
- Sign-in & security: idle lock / sign-out (seconds..hours, warning when sign-out comes first), recovery codes
- Operation: role permissions, waiters' own shifts and takings, card payments, tables and orders, courses (add, rename,
  colour, order), quick notes, table flags (emoji, colour, white/black text, on/off), quick messages, send the QR menu now
- Appearance: the waiter app's table-card colours per state, light and dark, flash, colour picker with opacity, reset
- Fiscal: on/off, driver, folders with a reachability check, clerk / card terminal numbers, receipt end lines, VAT groups
- Development: pretend printing
- dropped: the v1 'automatic store schedule' switches (kept in the browser only, nothing read them) and the second time-zone card
- backend: JSON settings must be JSON (validation.setting_value); fiscal folders are plain paths (were typed json)
- venue colour data in sections/venueColours.js (guard DATA); store/tableColourStore and Settings/tabs deleted
- tests: settings.test.mjs (5), test_settings_json.py, e2e manager.mjs 'settings v2' (12 checks)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:41:14 +02:00
bonaminandClaude Opus 5.5 bde125bf09 feat(manager): customers, throwaways, stock and notes on v2 (platform-v2 step 6.13b)
- CRM -> Customers: search ignoring case and Greek accents (and part of the phone), visits / spent / last visit,
  the card (contact, notes, open tab, every visit with what was on a tab), new/edit/remove
- Inventory -> Throwaways: log (product, quantity with a comma, reason, note) with its cost, today's list (delete today only),
  a period's totals by reason and product, every entry; Inventory -> Stock: an honest 'not available yet'
- Notes: notes (pinned first, edit in place) and to-dos (urgent first, done folded away, who did it kept)
- backend: crm.manage / inventory.manage / notes.use (the customer search also with the dashboard key, for orders);
  spending counted by services/sales.py (refunds off, tab lines in); null clears a field; names/notes not blank, priorities checked;
  waste ?date_from=&date_to= venue dates; the Greek reason labels left the API; live customers.changed / waste.changed / notes.changed
- the overview's notes card needs notes.use and refreshes live
- tests: test_customers_waste_notes.py (4), crm.test.mjs (3), e2e manager.mjs (customers, throwaways, notes, stock, Greek)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 18:36:27 +02:00
bonaminandClaude Opus 5.5 07c9a0aecf feat: tabs in the books (platform-v2 step 6.13c, KI-018; owner 2026-11-19: every movement recorded)
- a line on a customer's tab is sold, not paid: services/sales.py counts tabbed lines as sold (on_tab apart)
- TabEntry / TabPayment record the business day and the shift of whoever did it (Alembic 0037, rows backfilled with their day);
  services/tab_books.py: per shift and per day, on tabs and tab money received (cash / card / other, who, in a shift or not)
- shift: tab cash goes in the drawer (net_to_deliver, the counted difference, total_collected), tab card in the card total;
  items paid other ways (transfer, on the house) are recorded apart and no longer counted as drawer cash;
  'activity': orders, items made / paid / put on a tab with values
- day summary: per person put on tabs and tab money received, every tab payment with who took it, the part taken outside shifts (in no drawer);
  the day's money: paid, on tabs, sold, paid on tabs, money taken (it used to subtract tabs from paid sales)
- Today: on tabs, paid on tabs; Staff -> Cash handover: paid on tabs; the shift dialog: made / paid / on a tab / paid on tabs
- fix: a line put on a tab was charged without its price change (a discount)
- tests: test_tab_books.py (the done-when), overview unit, e2e manager.mjs (the day records the tab payments; Today shows them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 16:32:25 +02:00
bonaminandClaude Opus 5.5 93c0dd7d9c feat(manager): expenses, the supplier book and tabs on v2 (platform-v2 step 6.13a)
- Finance -> Expenses: still owed, late, filters, new/edit (supplier picked or added there), pay in parts, details with payments, delete
- CRM -> Contacts: the supplier book with what each one is owed
- Finance -> Tabs: open (who owes most first) / settled, charges and payments, pay (cash/card/other), close, forgive
- backend: expenses.manage / tabs.manage (the list also reports.view, a customer's tabs also crm.manage, put-on-tab needs tabs.manage);
  payment <= due (expense.over_due), total >= paid (expense.below_paid), categories/kinds/methods checked, null clears a field;
  live events expenses.changed / tabs.changed; GET /api/expenses ?from=&to= venue dates (the report uses it); tab_status=settled
- fix: an expense with a due date failed to save (naive date refused by D-11)
- @xenia/i18n/number subpath; tests: test_finance.py (6), finance.test.mjs (5), e2e manager.mjs finance flow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:54:21 +02:00
bonaminandClaude Opus 5.5 6bdf0bdd79 feat: the staff, cancellations/discounts, technical, prep zones and expenses reports on v2; reports all on v2 (platform-v2 step 6.12c)
- Reports -> Staff (src/pages/reports/staff): shifts (pay, collected, to hand
  over, the counted difference, cancellations; a shift opens the overview's
  shift dialog; the owner deletes one), cash handover (starting cash, cash,
  card, refunds, to hand over, counted), sales by person (orders, units,
  cancellations, hours, sales net of refunds, per hour, share; ranked) - the
  v1 activity and leaderboard views merged into it
- Reports -> Cancellations and discounts (src/pages/reports/misc), with totals
  per person; Technical (printing: tickets, failed, printed first time, per
  printer, every ticket with its error, the receipt-printer summary; logs for
  the owner) - v1 printer history + printer health merged
- Prep zones report (per zone: items, value, products, orders; per-zone Excel
  downloads built in the browser with the server's Excel rules; print a zone)
  and Expenses report (period, status, category; split by category or
  supplier; payments) - its categories now match what Finance saves (the v1
  report listed categories that never existed)
- kit: csvText() / download(); PrintDialog modes for the printer summary
- v1 report kit (reports/shared) and every v1 report view deleted;
  src/pages/reports is v2 (all but LogsPanel strict)
- tests: reports.test.mjs (+1), e2e manager.mjs (every report opens, a shift's
  details, the ranking)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:19:49 +02:00
bonaminandClaude Opus 5.5 7767bdb728 feat: the venue and products reports on v2 (platform-v2 step 6.12b)
- Reports -> Venue (src/pages/reports/store): business days (revenue/profit
  trend, each day's times, orders, revenue, fees, refunds, cost, profit; a day
  opens with its orders and shifts, a shift opens the overview's shift dialog;
  the owner corrects a closing time, deletes an empty day or a shift), orders
  (filters by status, person, table; per-order products / fees / refunds),
  busy times (by hour, by weekday of the business date), trends (days, weeks,
  months, the 7-day average), tables (time at the table, per visit, revenue)
- Reports -> Products (src/pages/reports/products): products (units, revenue,
  refunded, cost, profit, margin, waste, share; top 10 by revenue, units or
  profit) and categories (share bars, profit share)
- kit: PrintDialog (receipt printer, summary / full, or print the page),
  TrendChart and BarList on tokens (no chart animation), printBody()
- access: deleting a business day or a shift (which erases its orders) is
  owner-only (core.settings.manage; was any dashboard user)
- v1 StorePage, ProductsReportPage and their seven views removed
- tests: reports.test.mjs (+1), e2e manager.mjs (every tab, a day, products
  revenue = the backend's, Greek)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:06:20 +02:00
bonaminandClaude Opus 5.5 4df59c33ef feat: one way to count sales in every report; exports for Excel; the report kit and Today on v2 (platform-v2 step 6.12a)
- services/sales.py: sold = active + paid lines; a line's value net of what
  was refunded of it; system lines (the delivery fee) counted apart as fees;
  cost/profit with has_gap. Products, categories, tables, traffic, revenue
  trends, business days (list and current), per-waiter sales, order history
  totals and the printed products/categories/tables reports all use it (they
  used to differ: closed-only vs all orders, fee as a product, refunds never
  subtracted)
- the overview's day summary values lines with their price change (discounts
  were valued at full price)
- services/csv_export.py: UTF-8 BOM, times in venue time with the zone in the
  header, ';' and decimal commas for a Greek venue (',' and '.' otherwise);
  every report export uses it; orders export has products / fees / refunded
- fix: /api/reports/shift/orders with business_day_id crashed (no window)
- manager: src/pages/reports/kit (page with tabs, period picker, panels,
  figures, sortable table, export button, order dialog reusing the order
  page's parts, hour chart on tokens) and reports/today on it; v1 Today removed
- tests: test_sales_accounting.py (a day with a fee and a partial refund adds
  up the same in every report), test_reports_export.py (Excel format),
  reports.test.mjs, e2e manager.mjs (Today, order dialog, export, Greek)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 08:51:13 +02:00
bonaminandClaude Opus 5.5 6643614ff6 feat: staff and the schedule on v2; managers give staff passwords (platform-v2 step 6.11, KI-014)
- staff: PUT /api/waiters/{id}/password (set, change, or take away; 6+ chars)
  so the password sign-in mode works for everyone; PUT /{id}/pin with the PIN in
  the body (was in the address: reset-pin?pin= removed); PINs 4-6 digits when
  adding; a password can be given when adding; has_password on staff; editing
  clears emptied fields and keeps usernames unique; delete only without history
  (orders, items, shifts) and never yourself
- schedule: times checked (schedule.bad_time), one person's overlapping shifts
  refused (schedule.overlap, past midnight understood), everyone active can be
  scheduled (the kitchen too), changes need core.staff.manage
- manager: src/pages/staff (list with search and filters, person dialog with
  photo, PIN / password dialog, zones) and src/pages/schedule (by person, by
  hour with opening hours, shift dialog with clash check, view settings kept in
  the browser); the never-used "automatic start/close" switches dropped; v1
  StaffTab and SchedulePage removed; ApprovalsPage loads with useLiveQuery
- tests: test_staff_v2.py (done-when on a paired screen), staff.test.mjs, e2e
  manager.mjs (add, password, sign-in on a paired till, a shift and a clash)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 08:05:01 +02:00
bonaminandClaude Opus 5.5 f31bdf42aa feat: printing problems shown and handled; printing set-up on v2 (platform-v2 step 6.10)
- a ticket that doesn't print is a problem for whoever sent it and the managers:
  GET /api/print-problems (the order, table, dishes, printer, since when, tries,
  last error, who sent it) and three ways out: print again, send to another
  printer, handled (services/print_problems.py; print_jobs.resolved_by /
  redirected_to, Alembic 0036); live event print.problems from the print paths
- phone: the red printer button opens the problems sheet, the table page warns
  (usePrintProblems replaces the 8 s poll); counter POS: a red button under the
  modes with the shared panel (@xenia/ordering PrintProblemsPanel + pure rules);
  manager: a card on the overview (top), the Tables page and the order page
- manager: Settings -> Printing (printers with reachability, test print, network
  scan; ticket layout + test ticket, beep, fonts with previews, dot leader,
  dividers) and Management -> Prep zones (cards + zone dialog with the ticket
  language, printers, copies, sorting, category order, kitchen screen) rebuilt in
  src/pages/printing; v1 PrintFontsTab, PrepZonesConfigPage, PendingPrints and
  /api/orders/pending-prints removed
- access: printer add/edit/delete/scan need core.settings.manage, prep zone
  changes catalog.menu.manage (were any dashboard user)
- tests: test_print_problems.py, @xenia/ordering printProblems, manager
  printing.test.mjs, e2e print_problems.mjs (done-when) + manager.mjs printing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:40:07 +02:00
bonaminandClaude Opus 5.5 070c9cf625 feat: tables and orders in the manager on v2 (platform-v2 step 6.9)
- manager: new pages/orders/ (Tables page cards + quick actions, order page with
  lines, multi-select pay/discount/cancel/tab, staff + customer, price changes,
  history, the menu + cart beside it); a free table opens a new order on first
  Send; v1 TablesPage, OrderDetailPage, DesktopOrderingTab, ManagerOrderDrawer
  and PaymentMethodModal removed
- ordering by line id like the phones: GET /api/orders/menu (the counter's
  product shape, in-store prices); the product dialog, cart rules and quote hook
  move to packages/ordering (@xenia/ordering), shared by counter, menu tablet,
  manager
- close follows orders.close_with_unpaid (pay first, or write off after saying
  so) on the order page and the overview's quick view; paying asks cash or card
- a confirmed booking can keep its table ahead (manager, phones, counter):
  POST /api/connect/bookings/{id}/table, reservations create/PATCH; refused with
  reservation.table_kept within 2 h of another booking
- tests: test_manager_ordering.py, online bookings +2, manager orders.test.mjs,
  @xenia/ordering, e2e manager.mjs (take, change, pay-first close, RESERVED)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:58:46 +02:00
bonaminandClaude Opus 5.5 f4aae6abbc feat: the table map (platform-v2 step 6.8, D-31)
- floor_plans / floor_items (0035), tables' plan_id + width/height/rotation/shape;
  /api/floor-plans (set-up, catalog.tables.manage, floor_plans.changed) and
  /api/floor-plans/live (each table's state, guests, waiters, time; zone rule)
- @xenia/floorplan: the drawing (Floor, Item, TableShape, FloorView) and its geometry
  (grid snap in whole cells, outlines, chairs), tested
- manager: Management -> Tables -> Floor plans (editor: drag, grid, irregular floor,
  walls/bar/labels/areas, background picture), Tables page List / Map
- counter POS: Tables List / Map; waiter: Map mode, the list stays the default
- tests: test_floor_plans.py, floor + geometry unit tests, manager/waiter/terminal e2e

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 17:00:45 +02:00
bonaminandClaude Opus 5.5 fd3254aa31 feat: pricing on v2 (platform-v2 step 6.7)
- manager src/pages/pricing: price rules, price groups, deals, discounts on the tokens,
  English and Greek; the rules as data in pricingLogic.js (tests/pricing.test.mjs)
- routers/pricing: set-up needs pricing.manage, broadcasts pricing.changed; incomplete
  conditions refused (pricing.bad_condition); venue discount settings saved again (the
  date-as-text bug) with empty = no limit (pricing.bad_limit), old "None" tolerated
- nav: Offers & pricing needs pricing.manage
- tests: test_pricing_setup.py (a happy-hour rule prices a counter quote), manager.mjs e2e

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:40:51 +02:00
bonaminandClaude Opus 5.5 c1af7770cf 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>
2026-11-18 14:42:37 +02:00
bonaminandClaude Opus 5.5 e395d99704 feat(menu): the menu in English and Greek (platform-v2 step 6.4, D-29)
- 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>
2026-11-18 10:47:03 +02:00
bonaminandClaude Opus 5.5 5048f82a4c feat(manager): products and categories on v2, a product in several categories, allergens (platform-v2 step 6.3)
- Management/ProductsTab + ProductFormModal (3.1k lines) → src/pages/products/: category tree,
  list/grid, toolbar + filters (search folds accents and Latin letters), bulk actions, category
  dialogs; the editor in editor/ (details, sold at, cost, fiscal; the waiter's choices).
  Arithmetic in productsLogic.js / editor/formLogic.js (tests/products.test.mjs).
- Several categories per product with a main one (D-23): edited in the editor, "also in" on the
  rows, each category's list ordered on its own (drag or up/down → PUT /reorder with category_id);
  bulk "move to" / "also list in". The waiter's picker now shows a product in every category.
- Allergens: products.allergens (Alembic 0032, core/allergens.py: 14 EU, contains | may_contain,
  catalog.allergen), in the API, POS menu, menu tablet, catalogue bundles and the cloud snapshot
  (C-2); @xenia/access allergens.js + <Allergens> shown on the phone, the counter, the tablet.
- Bell: only the newest load sets the list (an older answer could hide a live notification).
- e2e: manager (two categories, order per category, allergens), terminal / menu tablet / waiter
  (allergens shown); media saves by test id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:04:35 +02:00
bonaminandClaude Opus 5.5 8a02173450 feat(manager): the overview, online orders and the day summary on v2 (platform-v2 step 6.2)
- DashboardPage (2.8k lines) → src/pages/overview/: OverviewPage + cards (shifts, tables,
  pending prints, notes, bookings, messages) and dialogs (order at a glance, shift review /
  end with the cash handover, day summary with cash count and checks); arithmetic in
  overviewLogic.js (tests/overview.test.mjs). Data via useLiveQuery: orders and tables
  live, day and shifts every 15 s. Bookings typed in venue time; decline reason in a dialog.
- OnlineOrdersPage → src/pages/online/ on react-query + live events; unused API helpers dropped.
- WorkdaySummaryModal → overview/DaySummaryDialog + DaySummaryTabs.
- Every text in manager.json (en + el, 342 keys); tokens only; v2.json adds overview, hooks.
- Backend: business day open/close answer only with codes (license.locked, license.expired,
  business_day.orders_open); XeniaError's v1 `detail` removed.
- @xenia/i18n: formatDateTime with Intl options threw "unknown date style" (fixed, tested).
- e2e manager.mjs: open the day, a shift (start, stats, end short), a live table, a booking,
  day stats, Greek, close the day (forced), online orders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 09:01:51 +02:00
bonaminandClaude Opus 5.5 2dc5da446e feat: foundations for the manager conversion (platform-v2 step 6.1)
- Backend: every HTTPException in routers/ is an error code now (260 raises, ~105 new codes,
  texts in en + el); XeniaError(detail=...) keeps the three v1-shaped answers old pages read;
  bad / unknown tokens answer auth.session_ended; test_errors refuses new HTTPExceptions.
- Manager: v2.json is the list of pages on the v2 rules: scripts/lint.mjs lints them,
  tests/v2-guards.test.mjs refuses Greek and colour literals, `strict` paths make
  set-state-in-effect an error.
- src/live/useLiveQuery.js (react-query + live events + refresh on reconnect); Signed in now
  uses it.
- Dead manager files removed (3.1k lines unreachable from main.jsx).
- Tests: backend 544 passed, manager unit 33, run-all (no Android) passed (manager's live
  bell check passed on a rerun).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:31:36 +02:00
bonaminandClaude Opus 5.5 b5361e10ca feat(media): video versions: still frame + a version every screen plays (platform-v2 5.4e)
- services/video.py: background worker (one video at a time, low priority) makes a still
  frame (thumb/card/full WebP) and, when needed, play.mp4 (H.264+AAC, <=1920 px, HDR
  tone-mapped, faststart); the original is kept. Media.processing/progress (migration 0031,
  existing videos queued). ffmpeg from the pinned imageio-ffmpeg wheel; none = as uploaded.
- MOV (video/quicktime) accepted; /api/media/file/<sha>/play served with ranges.
- Signage plays the version (poster = still frame) and tells the screens playing it when ready.
- Manager library: still frames in the grid, preparing progress, status in the details.
- Tests: test_video.py (8), backend 541 passed; e2e media/signage/stack new checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 02:10:22 +02:00
bonaminandClaude Opus 5.5 f8d0d29d8f feat: call a waiter from a menu tablet at a table (platform-v2 step 5.7b)
- backend: menu tablet device config `table` (ref, validated against active
  tables) and `call_waiter`; GET /api/menu-tablet/menu gives the table and
  whether it can call; POST /api/menu-tablet/call sends a `table_call` staff
  message ("Table 5: the guests call a waiter.", venue language) to the table's
  waiters (its open order's, else the zone's), at most once a minute per tablet
  (menu_tablet.call_too_soon with the seconds left; menu_tablet.no_table).
- terminal: "Call a waiter" only on a tablet at a table; "A waiter is on the
  way to table 5", then a countdown before it can call again; a failed call
  says to ask at the counter.
- waiter: the call shows with its own look and "Open the table".
- manager: tables as the choices of a device setting.
- tests: backend +2 (535 → 533 passed total), e2e menu_tablet.mjs +3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 00:04:39 +02:00
bonaminandClaude Opus 5.5 6c982e3139 feat(manager): signage screens, schedules, the message of the day and the weather's town (platform-v2 step 5.6c)
Signage gets tabs:
- Screens: every paired signage TV with what it plays (a playlist, or a
  schedule that wins over it), its shape and rotation, a warning when a
  playlist was made for the other shape; a link to pair one in Devices.
- Schedules: lines (a playlist on days / between hours that may pass midnight /
  between dates, with a priority) and the playlist for the rest of the time;
  "now: …" per schedule; the screens on it.
- Message and weather: the message of the day for every screen; the
  weather's town from a search (°C / °F), now / fetched at, "no forecast"
  when the server can't reach the service, fetch now, remove; says the
  weather needs internet and the widget hides without it.
- e2e signage.mjs +6 (message saved, weather section, choosing a playlist and
  turning the picture move the TV, a schedule built in the manager plays what
  it picks now); a crash is reported as a failed check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 23:20:44 +02:00
bonaminandClaude Opus 5.5 5f6b51fb8b feat(manager): the menu board editor and widgets (platform-v2 step 5.6b)
- Menu board: everything or chosen whole categories (sub-categories
  included, new products join) plus single products found by search; hide a
  product from the board (and show it again); the board's own order with
  arrows on what the server resolved (categories and products; boardOrder
  writes it); a badge per product; grouping, headings, photos, descriptions,
  whose prices (a sales point or none), sold out crossed out or hidden,
  columns, products per page (or as many as fit), seconds per page; colours,
  font, size, background.
- Widgets (text and menu slides): logo, venue name, date (long / short),
  clock (seconds), message of the day (or its own text), QR code (ordering /
  QR menu / a link + caption), weather (1-3 days, says it needs internet);
  where (corners, bars) and size.
- The preview stays in view while the settings scroll.
- @xenia/signage: the venue clock's Intl call names its time zone where the
  i18n guard reads it.
- tests: manager signage.test.mjs +1; e2e signage.mjs builds a menu board in
  the editor (categories, a single product, the order, a badge, hiding, a
  clock) and checks what was saved and resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:16:49 +02:00
bonaminandClaude Opus 5.5 152388321e feat(manager): the signage editor: playlists, the timeline, slides with a live preview, templates (platform-v2 step 5.6a)
Management → Signage: playlists (name, landscape / portrait, default
transition, duplicate, delete with the screens it plays on); the timeline
(drag or arrows to reorder, duplicate, remove, on / off, time and when it
shows at a glance, a round's total time); a slide's settings (name, seconds or
a video to its end, transition, days / hours / dates, the picture or video,
fit, text, alignment, font, colour, size, background colour or photo with
darkening; a menu board's title, columns and colours) with a live preview drawn
by @xenia/signage at 1920 × 1080 and scaled down; new slides empty or from
templates (promotion, announcement, happy hour 17-19, welcome, menu board,
video); a warning on the slide and its card when a picture or video doesn't
fit the playlist's shape. Unit tests (4), e2e signage.mjs builds a playlist in
the manager and the TV plays it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:59:33 +02:00
bonaminandClaude Opus 5.5 314e9c2457 refactor: @xenia/signage: the slides and the player's logic shared by the terminal and the manager (platform-v2 step 5.6a)
The signage slides (SlideView, TextSlide, MenuSlide, Widgets) and the pure
logic (schedule pick, slide windows, menu pages) move from the terminal into
packages/signage, so the manager's previews draw a slide exactly as the TV
does. Sizes are container units (cqmin) instead of viewport units: a slide
draws inside any box with container-type: size (frameStyle sets it on the
TV). Tests move with it (10). Dockerfiles copy its package.json; both apps'
Tailwind content include it; run-all runs its tests. Signage e2e and the
compose stack passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:59:33 +02:00
bonaminandClaude Opus 5.5 0d766d3c86 feat(backend): signage schedules: which playlist plays when, switching by itself (platform-v2 step 5.4d)
- signage_schedules (Alembic 0030): entries {playlist, days, hours (may pass
  midnight), dates, priority} and a fallback playlist. A screen's `schedule`
  (ref) wins over its single playlist.
- services/signage_schedule.pick (pure): highest priority, then the most
  specific (dates > days > hours), then the later entry; no match → fallback.
- GET /api/signage/screen with a schedule: the schedule (with the venue's time
  zone) and every playlist in it, `playlist` = the one playing now, so the
  player can switch while the server is down.
- schedule_worker (signage module, 30 s) tells a screen when its pick changes.
- /api/signage/schedules CRUD (playing now, the screens on it); deleting a
  playlist takes it out of schedules; changes reach screens through schedules.
- Devices page: a signage screen's Schedule.
- tests: test_signage_schedule.py (6); 526 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:47:33 +02:00
bonaminandClaude Opus 5.5 a2d9e55222 feat(manager): built-in collection in the Media page and picker; signage screen settings in Devices (platform-v2 step 5.4a)
Media page and picker filter Everything / Your own / Built-in; built-in items
are marked and can't be renamed or deleted. The Devices page offers the
playlists for a signage screen (with its orientation and rotation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:35:13 +02:00
bonaminandClaude Opus 5.5 6d84e43330 feat(manager): customer display looks: several, a default, one per display; pictures from the library (platform-v2 step 5.3)
Settings → Customer display lists the looks (default starred, how many
displays each), edits one (logo / picture with MediaField, the slideshow's
pictures picked several at a time, reordered, removed), new look (empty or a
copy), make default, delete, and "Which display shows which look". The Devices
page offers the looks for a display's Idle screen. MediaPicker: `multiple`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:50:52 +02:00
bonaminandClaude Opus 5.5 e09056a7a4 feat(manager): Media page, photo field for products and categories (platform-v2 step 5.2)
- Management → Media (src/pages/media/): every picture and video, search,
  pictures / videos, batch upload (many files or drop on the page) with a
  result per file, details (preview, display name, kind, resolution, length,
  file size, uploaded file, when / who, the sizes made, what uses it, delete
  off while used).
- MediaField: upload on the spot (into the library and set at once), pick
  from the library (MediaPicker, which can also upload), remove; after an
  upload on the spot "Name it after the product / category" renames it in
  Latin letters. Used by the product editor and the category dialog.
- nav: `anyPerm` (any of the keys that manage pictures); the route guard uses
  the same rule. Product rows have test ids.
- @xenia/i18n: latin() (Greek to Latin, the way venues write it) + tests.
- tests: manager media.test.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:57:50 +02:00
bonaminandClaude Opus 5.5 24971533a0 fix(proxy): accept uploads up to 250 MB in every nginx hop
nginx's default client_max_body_size is 1 MB, so a phone photo (3-5 MB)
uploaded as a product image or customer-display image was refused with
413 before it reached the backend. The proxy (both copies, CS-5) and the
waiter, manager and terminal images now allow 250 MB; the backend checks
the real limits (media library: 20 MB pictures, 200 MB videos, step 5.1).
All five configs pass `nginx -t`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:22:26 +02:00
bonaminandClaude Opus 5.5 198f8ff571 feat(waiter): close with unpaid items as a setting, combine lines, seats (platform-v2 step 4.8a)
The owner's choices for 4.8 (2026-11-18), all configurable:
- Setting orders.close_with_unpaid (default off): when off, the server refuses to close
  an order with unpaid items (pos.order_unpaid) and the phone's CLOSE takes the payment
  first ("instant-pay close"); when on, CLOSE confirms and the items stay unpaid. Manager
  Settings → Operation, next to "auto-close after full payment" (unchanged).
- POST /api/orders/{id}/items/combine: unpaid lines of the same item (choices, note,
  price, course, kitchen state; no discount / deal / tab) become one line; the phone
  offers "Combine into one line" for selected lines or a grouped line. The grouping
  views (identical / same item) stay as they were.
- Seats: the table's seats next to its name on the cards (waiter Settings → Layout, on by
  default) and in the guests dialog, where more guests than seats only shows a hint.
- The table screen's last English-only labels (ADD, PAY, CLOSE, ACTIONS, SERVED, CLEAR,
  ALL) are keys too.
- Tests: test_close_and_combine.py (5), waiter e2e +5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:54:37 +02:00
bonaminandClaude Opus 5.5 beb53c65bb feat(waiter): the look on the shared tokens; the venue's colour (platform-v2 step 4.6)
- The waiter's --bg/--text/--accent… are made of @xenia/ui tokens: light / dark (user
  menu) and the venue's accent reach every screen; the 751 colour literals in
  waiter_pwa/src became tokens (by hue family and lightness), hex-alpha suffixes became
  fade() (color-mix), fixing 'var(--accent)18' tints that never showed.
- @xenia/ui: new `special` (violet: offers, discounts, deals; contrast-tested) and
  `on-colour` tokens.
- Setting venue.theme (teal | amber | blue | violet | rose, default amber), bootstrap
  venue.theme, manager Settings → Venue → Colour; the waiter sets data-venue-theme and
  the theme before the first render.
- Guard tests/no-colours.test.mjs; tests/e2e/waiter_look.mjs (every page light + dark,
  side-by-side compare page); waiter e2e +3; backend test_venue_theme.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:08:39 +02:00
bonaminandClaude Opus 5.5 8e0a786bbc feat(ordering): orders priced by the server (platform-v2 step 4.4)
The waiter app (and the manager's ordering tab) send what was chosen, by id; the
server prices it with the counter's code. No app sends a price any more.

- POST /api/orders/{id}/items takes `lines` (pos_cart's line + course_id,
  price_adjustment, is_service_item): sales point checked first, refusals name the
  product and line (order.line.*, order.not_sold_here); prices or selected_options in a
  line -> order.line.client_price, the old `items` shape -> order.lines_required; a
  by-hand price change needs ordering.prices.modify or a manager's approval (audited
  PRICE_SET_BY_HAND). add_priced_items is the one writer of priced items (pos too).
- POST /api/orders/quote: the cart's total before sending; /api/pos/quote shares
  pos_cart.quote().
- pos_cart: a preference set left out takes its default; a set at its free default
  isn't stored; a default that costs is charged (the waiter never sent it: fixed);
  an extra's sub-choice is charged per extra (the counter charged it once: fixed).
- @xenia/api lines.js: lineFromOptions / wireLine / estimate / LineError.
- Waiter: lines on send; cart total from the quote ("≈ estimate" offline); summary
  shows the same prices; offline orders queued by id, priced on sync, refused lines
  shown on a "Δεν στάλθηκαν" sheet (no empty order opened); dead ItemOptionsModal gone.
- Tests: test_order_lines.py (14), lines.test.mjs, waiter e2e +6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 03:35:03 +02:00
bonaminandClaude Opus 5.5 8abe4d92d3 feat(waiter): what a waiter may do comes from permission keys (platform-v2 step 4.3)
- Payments: ordering.orders.close checked on pay/close and the counter POS
  (waiters have it by default, owner decision); pay-offline always recorded.
- The venue switches waiter_cancellations / price_adjust / revert are gone:
  ordering.orders.cancel, ordering.prices.modify and the new
  ordering.payments.revert (overridable) decide; moves/split/transfer/merge
  need ordering.orders.open; discounts pricing.discounts.apply; chat chat.use.
- Venue role defaults: role_permissions (Alembic 0024), role_template(role, db),
  GET/PUT /api/waiters/roles/{role}/permissions applying the change to everyone
  with the role; manager Settings -> Operation -> "What each role may do".
  0024 also grants the new key to existing owners and store managers.
- Bootstrap `approvable`; @xenia/access useAllowed(key) -> yes/approve/no.
  The waiter shows each action by key, "with a manager's approval (PIN)" where
  allowed; GET /api/orders/cancel-permissions removed.
- Tests: test_waiter_keys.py (11), access allowed(), waiter.mjs +5, manager.mjs +3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 00:54:08 +02:00
bonaminandClaude Opus 5.5 f85894a72e refactor(connect): one live connection, no token in any address (SSE removed)
Plan step 4.0. Owner (2026-11-17): no phone in use needs to keep working, so no
compatibility path.
- Removed the SSE channel: routers/sse.py (/api/sse/stream, which still accepted a JWT whose
  session had ended — a signed-out phone could keep listening), services/sse_bus.py (every
  backend module now calls services/ws_bus.broadcast_sync directly), waiter useSSE.js.
- Credentials only in the first frame: the waiter's useWebSocket and the manager's
  LiveProvider send {token} there like the terminal; routers/ws.py no longer reads ?token=
  (a token in a URL ends up in proxy and server logs).
- Waiter: SSEContext → LiveContext (LiveProvider, useLiveContext, liveAlive, the
  'live-event' / 'live-reconnected' window events), dead SSE compat code removed.
- Tests: a token in the address is refused, /api/sse/stream is 404; e2e browser (3 delivery
  modes) and manager assert no token in the live connection's address. Android taps now
  wait for their element (the fixed sleeps made the suite flaky, KI-009).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:49:21 +02:00
bonaminandClaude Opus 5.5 dabe807ce0 feat(connect): caller ID as an integration: calls on the signed-in live connection, matched on the server
Plan step 3.5.
- The public /api/phone/ws socket is removed (anyone on the LAN could listen to every
  caller). GET /api/phone/call-event stays public for the Grandstream UCM but is LAN-only in
  the proxy (the 443 blocks' LAN-only location now covers it, in nginx-proxy/nginx.conf and
  install.sh), with an optional shared secret (setting caller_id.secret → &key=).
- Calls are logged (phone_calls, migration 0023), matched to a customer on the server
  (services/caller_id.py: Greek number rules moved from the manager) and published as
  `call_incoming` {call_id, at, number, ext, customer card: visits, spent, last 3 orders} to
  users with caller_id.use and to the counter POS screens. GET /api/phone/calls (the log),
  GET /api/customers/lookup?phone=. Calls older than a minute don't pop up (replays).
- Manager: PhoneListener on the live connection and the shared Dialog (no more downloading
  every customer to match); Integrations → Caller ID shows the server's log live and the UCM
  Action URL. Counter: CallPopup with "New takeaway sale".
- Tests: tests/test_caller_id.py (10), terminal unit test, e2e terminal and manager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:06:39 +02:00
bonaminandClaude Opus 5.5 88a9703902 feat(terminal): the customer display, with an idle screen each venue designs
Plan step 3.4. Owner (2026-11-16): the idle screen is configurable per venue.
- routers/customer_display.py (module customer_display, /api/display): the counter POS
  pushes its state (POST /api/display/state: idle | cart | paid with lines, total, paid,
  change); only the displays linked to that POS get `display.state`; the last state is kept
  in memory for a display that reconnects (GET /api/display/state). pos_counter's device
  scope includes customer_display.state.
- The idle screen: setting customer_display.idle (name, logo, logo + name, blank, one
  image, slideshow, QR code to the online ordering / QR menu / any link; a line of text;
  dark or light); images uploaded to /app/data/display_media (JPG/PNG/WebP/GIF ≤ 5 MB,
  random names, served publicly on the LAN); a change sends `display.settings` to every
  display. New key customer_display.manage (owners, store managers; migration 0022).
- Terminal: CustomerDisplayApp (cart with a large total, "Thank you" with the change for
  12 s, the venue's idle screen, its theme), logic.js (unit-tested); the POS pushes from the
  sale cart and the payment dialog (tables, online orders too) via useDisplay().
  qrcode.react added to the terminal (already in the workspace).
- Manager: Settings → Customer display (style cards, venue name, text, look, slide seconds,
  QR target/link/caption, image upload/pick/order/delete).
- Tests: tests/test_customer_display.py (3), terminal display.test.mjs (3); e2e terminal
  (linked vs unlinked display, < 1 s, paid, QR and slideshow idle screens), manager (the
  settings tab).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 08:34:05 +02:00
bonaminandClaude Opus 5.5 18d580d87c feat(manager): the venue's online ordering link and QR code on the Online ordering page
Plan phase 3S, step S.99.
- GET /api/connect/fees returns `links` {order, menu}: the ordering app and QR menu
  addresses, from the cloud's apps_url (heartbeat) and the site id.
- Manager: "Your ordering link" card (OrderingLink.jsx) on Online ordering: the address, its
  QR code, copy / open / print, to share or put on the website and window.
- Pack README: routers/fees.py row.
- Tests: the link (backend), the card (manager e2e).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 01:36:02 +02:00
bonaminandClaude Opus 5.5 652e6a26af feat(connect): the QR menu at the table: one code per table, orders straight onto the table
Plan phase 3S, step S.7.
- tables.qr_token (migration 0021): a random token per active table; services/table_qr.py
  (tokens, rotate, the snapshot's `qr` with the tokens' sha256 only, the code's link from the
  cloud's apps_url); setting connect_menu.table_ordering (read-only by default).
- /api/connect/qr (connect_menu.manage): the codes, ordering on/off, a new code per table or
  for all; table and QR changes push the menu at once (MENU_PATHS).
- Pull: a QR order with a table id goes onto the table's open order or a new one
  (services/qr_orders.py): items at the cloud's prices, kitchen tickets, KDS, order_updated
  (the waiters' phones and the counter), a `qr_order` message to the order's waiters or the
  table's zone waiters; audit QR_ORDER (a repeated pull adds nothing); the cloud is told
  "accepted" (the guest's page: in the kitchen). No usable table or no open day → the counter
  gets it as before. Waiter app: the message's look.
- Manager: Online → Table QR codes (/online/qr): ordering switch, the menu link, a QR card
  per table (print all), new code per table / for all.
- Heartbeat: apps_url kept in the license state.
- Tests: tests/test_qr_table.py (5); e2e qr_table.mjs (a real cloud and venue: table 5's
  code → two dishes on table 5's order, KDS, live event, the guest's page; a forged code
  refused; a new code kills the old one), in run-all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 01:26:55 +02:00
bonaminandClaude Opus 5.5 70c8f2bb57 feat(connect): table bookings from the online ordering app; food fired to the kitchen before arrival
Plan phase 3S, step S.6.
- Pull: "reservation" / "preorder" orders become Reservations waiting for an answer
  (status "requested"; services/online_reservations.py), with the food ordered ahead kept on
  the booking (items_json at the cloud's prices, the site's price check) — no order yet.
  Migration 0020 (reservations: online_order_cloud_id, online_ref, items_json, total,
  online_price_diff, fire_at, order_id, response_note).
- Confirm → the food's fire time = booking time − fire minutes (setting); the fire worker
  (connect_orders, every 20 s) turns the food into an order at that time (needs an open
  business day; waits otherwise): kitchen tickets, KDS (reference and time). Early arrival
  fires at once. Seating moves the order to the table (refused if the table has an open
  order). Decline / cancel / no-show with a reason. Every step mirrored to the cloud.
- Found: the KDS filter dropped every online order without an online status (SQL NULL in
  NOT(a AND b)) — made NULL-safe.
- Counter: Online → Bookings (requests first, then upcoming), BookingPanel (confirm,
  decline with reasons, food and when it goes to the kitchen, seat at a free table, cancel,
  no-show); the Online badge and chime count booking requests.
- Manager: Online ordering → Table bookings settings (on, food ahead, hours, slot, notice,
  days ahead, party size, fire minutes); the dashboard's reservations card confirms /
  declines online requests; the reservations router delegates online bookings' status steps.
- Tests: tests/test_online_bookings.py (8), unit tests (terminal, manager), e2e: order app
  (book with food → the venue confirms), terminal (request → confirm → the two dishes reach
  the KDS at the fire time, not before → seated), manager (booking settings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:31:44 +02:00
bonaminandClaude Opus 5.5 0ca700279a feat(connect): the site side of online orders: fee line, customer's time, price check
Plan phase 3S, step S.5.
- Pull: an online order keeps the customer's time (orders.requested_for, None = as soon as
  possible) and delivery area; quick options are stored in the site's entry shape; items get
  their cost snapshot.
- The delivery fee is its own order line: a system product (products.system_key
  "delivery_fee", lifecycle "system", sold nowhere; services/system_products.py), created on
  first use in the venue's language with the VAT group most products use. Added printed and
  served, so kitchen tickets and the KDS never see it; paid at the counter with the items,
  counted in the shift, on the fiscal receipt with its VAT group. Never listed in the
  catalogue (products list, export, edit endpoints → 404) and never added by hand.
- Price check (services/online_check.py): each line priced as the snapshot prices it, at the
  order's time, and the fee through the same engine with the site's rules and the cloud's
  area id; differences kept on orders.online_price_diff and shown. The customer pays what
  the cloud charged.
- Counter: time chip (or as soon as possible), area, fee line, price warning; takeaway is
  its own kind (was shown as "at the venue") and finishes as "collected". KDS cards show the
  online reference and the time; kitchen tickets print the reference, the type and the time.
- Manager: Online ordering → "The fee on the receipt" (name, VAT group;
  PUT /api/connect/fees/fee-product, fees.vat_group_unknown); the online orders page shows
  the time, area and price warning.
- Migration 0019. Tests: tests/test_online_site_side.py (6), terminal unit test, e2e
  (terminal: fee, time, warning, paid in full; manager: fee line settings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:38:25 +02:00
bonaminandClaude Opus 5.5 8ea44d71aa 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>
2026-11-15 13:39:13 +02:00
bonaminandClaude Opus 5.5 9bfe54554d feat: delivery areas and fee rules with "test an order" (platform-v2 3S, S.3)
- models/fees.py + Alembic 0018: delivery_areas, fee_rules; key connect_orders.fees
  (owner, store manager; existing ones get it).
- services/fees.py: the pure engine (set / add / % / free / minimum, conditions: sales
  points, areas, products total, item count, days, time incl. past midnight, stop), the
  same file as the cloud's; tests/fixtures/fee_cases.json shared, plus a test that the
  cloud copy is identical.
- routers/fees.py at /api/connect/fees: areas and rules CRUD (validated), order, preview.
- Snapshot carries fees + the venue's time zone; a change to products, pricing or fees
  pushes the menu within ~5 s (middleware -> cloud_sync.request_menu_push).
- Manager: Online -> Delivery fees page (@xenia/ui): rules in order with words for each,
  areas with postcodes, "Test an order"; en/el texts; feesLogic.js unit-tested.
- Tests: test_fees.py (39), manager unit +5, manager.mjs +7 on the real page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:28:29 +02:00
bonaminandClaude Opus 5.5 ffeb2b45cb feat: the menu snapshot carries a price per sales point; pulled orders keep the cloud's sales point and table (platform-v2 3S, S.2)
- services/cloud_sync.menu_snapshot(db) (split out of the push, tested): sold_at + prices
  per customer-app sales point from the pricing engine; digital_price = the QR menu's.
- store_online_orders: sales_point from the cloud (older clouds: from the type), takeaway
  orders typed takeaway, the QR menu's table in front of the customer's note.
- manager e2e: waits for the live connection (html[data-live]) instead of a fixed 1.5 s,
  and for the server to record "read" (two timing races seen in a full run).
- Tests: +2 in test_sales_points.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:38:46 +02:00