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>
This commit is contained in:
2026-11-18 09:01:51 +02:00
co-authored by Claude Opus 5.5
parent 2dc5da446e
commit 8a02173450
32 changed files with 3161 additions and 4126 deletions
+401 -1
View File
@@ -573,7 +573,44 @@
"onlineOrders": {
"for": "For {{when}}",
"asap": "As soon as possible",
"priceDiff": "Charged {{charged}} online; at the venue's prices now it would be {{here}}. The customer pays what they were charged."
"priceDiff": "Charged {{charged}} online; at the venue's prices now it would be {{here}}. The customer pays what they were charged.",
"tab": {
"incoming": "New",
"active": "In progress",
"history": "History"
},
"refresh": "Refresh",
"empty": {
"incoming": "No new online orders.",
"active": "No orders in progress.",
"history": "No past orders."
},
"kind": {
"delivery": "Delivery",
"takeaway": "Takeaway",
"dine_in": "Eat in"
},
"status": {
"pending_acceptance": "Waiting",
"accepted": "Accepted",
"preparing": "Preparing",
"ready": "Ready",
"out_for_delivery": "Out for delivery",
"delivered": "Delivered",
"rejected": "Refused"
},
"next": {
"preparing": "Preparing",
"ready": "Ready",
"out_for_delivery": "Out for delivery",
"delivered": "Delivered"
},
"total": "Total",
"accept": "Accept",
"reject": "Refuse",
"rejectReason": "Reason (optional)",
"rejectHint": "The customer sees it.",
"rejectNow": "Refuse the order"
},
"feeProduct": {
"title": "The fee on the receipt",
@@ -1123,5 +1160,368 @@
"refresh": "Fetch now",
"forget": "Remove the town"
}
},
"overview": {
"back": "Back",
"close": "Close",
"save": "Save",
"loading": "Loading…",
"dayOpen": "Day open",
"dayClosed": "Day closed",
"daySince": "since {{time}} · {{length}}",
"openDay": "Open the day",
"dayOpened": "The day is open",
"dayStats": "Day stats",
"closeDay": "Close the day",
"dayClosedDone": "The day is closed",
"hideAmounts": "Hide amounts",
"showAmounts": "Show amounts",
"locked": "System locked",
"expired": "License expired",
"blockedHelp": "The day can't open until this is sorted out.",
"revenueByHour": "Revenue per hour",
"duration": {
"m": "{{m}} min",
"h": "{{h}} h",
"hm": "{{h}} h {{m}} min"
},
"kpi": {
"revenue": "Revenue today",
"orders_one": "{{count}} order",
"orders_other": "{{count}} orders",
"avg": "avg.",
"tables": "Tables in use",
"tablesSub": "{{free}} free · {{partly}} partly paid",
"shifts": "Shifts running",
"collected": "Taken by the shifts",
"collectedSub_one": "Total of {{count}} shift",
"collectedSub_other": "Total of {{count}} shifts",
"prints": "Waiting to print",
"printsSub": "Needs attention"
},
"shifts": {
"title": "Shifts running",
"start": "Start",
"none": "No waiter on shift",
"onBreak": "On a break · {{since}}",
"since": "since {{time}} · {{length}}",
"message": "Send a message",
"stats": "Shift stats",
"end": "End",
"startTitle": "Start a shift",
"waiter": "Waiter",
"pick": "Choose…",
"pickWaiter": "Choose a waiter",
"startCash": "Starting cash",
"startCashHint": "The change the waiter starts with. Leave it empty for none.",
"badAmount": "Type an amount, e.g. 50 or 50,00",
"startNow": "Start",
"started": "The shift started",
"ended": "{{name}}'s shift ended"
},
"shift": {
"running": "Running",
"closing": "Ending",
"number": "Shift #{{id}}",
"start": "Started",
"length": "Length",
"tab": {
"overview": "Overview",
"lines": "Details"
},
"expected": "Expected in the drawer",
"startCash": "Starting cash",
"startCashHint": "what it started with",
"cashSales": "Cash sales",
"cashSalesHint": "taken in cash",
"turnover": "Turnover",
"turnoverHint": "cash + card",
"perHour": "Sales per hour",
"items": "Items",
"tables": "Tables",
"orders": "Orders",
"pay": "Pay",
"perHourRate": "{{rate}} / hour",
"notes": "Notes (optional)",
"notesHint": "e.g. remarks about the shift, breakages, shortages…",
"handover": "How much cash does the waiter hand over?",
"counted": "Cash handed over",
"countedHint": "Compared with what was expected. Leave it empty to skip the count.",
"exact": "Exactly",
"live": "Live view: the shift goes on",
"checkFirst": "Check the amounts before ending",
"toHandover": "Cash handover",
"endNow": "End the shift",
"noLines": "Nothing in this shift yet",
"order": "Order #{{id}}",
"openedBy": "Opened by {{name}}",
"orderedBy": "Ordered by {{name}}",
"paidTo": "Paid to {{name}}",
"kind": {
"all": "All",
"both": "Complete",
"paid": "Only took the money",
"ordered": "Only ordered",
"unpaid": "Open",
"cancelled": "Cancelled",
"anomaly": "Problem"
}
},
"cash": {
"even": "Balanced",
"short": "Short",
"over": "Over"
},
"pay": {
"any": "Any method",
"cash": "Cash",
"card": "Card",
"transfer": "Bank transfer",
"treat": "On the house",
"other": "Other"
},
"tables": {
"title": "Tables now",
"all": "All tables"
},
"tableState": {
"open": "Open",
"partially_paid": "Partly paid",
"paid": "Paid",
"free": "Free"
},
"order": {
"title": "Table {{table}}",
"sub": "Order #{{id}} · since {{time}} · {{since}}",
"staff": "Staff",
"empty": "No items.",
"free": "FREE",
"linePaid": "Paid",
"pay": "Pay",
"payAll": "Pay everything",
"cancelLine": "Cancel this line",
"close": "Close",
"cancel": "Cancel",
"printer": "Printer…",
"print": "Print",
"full": "Full view",
"paidDone": "Paid",
"lineCancelled": "Line cancelled",
"cancelled": "Order cancelled",
"closed": "Order closed",
"printing": "Sent to the printer…",
"confirm": {
"cancelItem": "Cancel this line?",
"cancelOrder": "Cancel the order?",
"close": "Close the order?",
"cancelOrderBody": "The order will be cancelled for good."
},
"printCancel": "Print a cancellation?",
"printCancelBody": "Send a cancellation ticket to the printer?",
"printCancelNo": "No, just cancel",
"printCancelYes": "Yes, print",
"event": {
"waiter_discount": "Discount",
"free_item_added": "Free",
"modifier_applied": "Price change"
}
},
"orderStatus": {
"open": "Open",
"partially_paid": "Partly paid",
"paid": "Paid",
"closed": "Closed",
"cancelled": "Cancelled"
},
"prints": {
"title": "Waiting to print",
"count_one": "{{count}} order hasn't printed",
"count_other": "{{count}} orders haven't printed",
"all": "Print all",
"retries_one": "{{count}} retry",
"retries_other": "{{count}} retries",
"lines_one": "{{count}} line waiting",
"lines_other": "{{count}} lines waiting",
"open": "Details",
"print": "Print",
"done": "Printed",
"failed": "Didn't print: {{printers}}"
},
"notes": {
"title": "Notes & to-dos",
"counts": "{{notes}} notes · {{todos}} open to-dos"
},
"bookings": {
"upcoming": "Upcoming",
"history": "History",
"new": "New",
"noneUpcoming": "No upcoming bookings",
"noneHistory": "No history",
"status": {
"requested": "Online request",
"pending": "Waiting",
"arrived": "Arrived",
"cancelled": "Cancelled",
"no_show": "Didn't come",
"declined": "Declined"
},
"edit": "Edit",
"confirm": "Confirm",
"decline": "Decline",
"arrived": "Arrived",
"cancel": "Cancel",
"declineTitle": "Decline the booking",
"declineDefault": "No availability at that time",
"reason": "Reason",
"reasonHint": "The customer sees it.",
"newTitle": "New booking",
"editTitle": "Edit booking",
"name": "Name",
"nameNeeded": "Type the customer's name",
"people": "People",
"peopleNeeded": "At least 1",
"when": "Date & time",
"whenHint": "In the venue's time.",
"inMinutes_one": "+{{count}} min",
"inMinutes_other": "+{{count}} min",
"inHours_one": "+{{count}} h",
"inHours_other": "+{{count}} h",
"inDays_one": "+{{count}} day",
"inDays_other": "+{{count}} days",
"table": "Table (optional)",
"noTable": "No table",
"noZone": "No zone",
"phone": "Phone",
"email": "Email",
"note": "Note",
"noteHint": "For the staff only.",
"create": "Create",
"created": "Booking created",
"saved": "Saved"
},
"messages": {
"title": "Messages",
"new": "New",
"none": "No messages yet",
"to": "To: {{who}} · {{time}}",
"everyone": "Everyone",
"read": "{{read}}/{{of}} read",
"readBy": "How many have read it",
"newTitle": "New message",
"toOne": "Message to {{name}}",
"recipients": "Recipients",
"allOfThem": "(everyone)",
"tables": "About tables (optional)",
"quick": "Quick messages",
"text": "Message",
"send": "Send",
"sent": "Sent"
},
"day": {
"statsTitle": "Day stats",
"closeTitle": "Close the business day",
"open": "Day running",
"closedState": "Closed",
"openedAt": "Opened {{time}}",
"tab": {
"money": "Overview",
"staff": "Staff",
"zones": "Zones",
"printers": "Printers",
"cash": "Cash",
"checks": "Checks"
},
"toCash": "Count the drawer",
"toChecks": "On to the checks",
"revenue": "Revenue",
"orders": "Orders",
"items": "Items",
"waiters": "Waiters",
"opened": "Opened",
"closed": "Closed",
"stillOpen": "Day running",
"sales": "Revenue",
"salesTotal": "Total sales",
"onTabs": "On tabs (not taken yet)",
"onTabsTip": "Sales put on customers' tabs: they count as sales, the money comes when the tab is paid.",
"taken": "Net taken",
"cogs": "Cost of goods sold",
"cogsKnown": "Known cost",
"cogsTip": "What the sold items cost the venue, from the costs entered on the products (as they were at the sale).",
"uncosted_one": "{{count}} item without a cost ({{revenue}} revenue)",
"uncosted_other": "{{count}} items without a cost ({{revenue}} revenue)",
"gross": "Gross profit",
"partial": "Partial: some items have no cost",
"labour": "Wages",
"labourCost": "Labour cost (recorded)",
"noRate_one": "{{count}} shift without an hourly rate",
"noRate_other": "{{count}} shifts without an hourly rate",
"waste": "Thrown away",
"wasteEntries_one": "{{count}} entry",
"wasteEntries_other": "{{count}} entries",
"expenses": "Expenses (today)",
"expensesTotal": "Total expenses",
"expensesPaid": "Paid today",
"expensesDue": "Still owed",
"net": "Estimated net result",
"netHint": "Taken − costs − wages − waste − expenses",
"netTip": "An estimate: it only knows the costs and wages entered in the system.",
"netPartial": "Partial: some costs are unknown",
"payments": "Payments by method",
"drawer": "Drawer",
"drawerExpected": "Expected in the drawer",
"drawerExpectedTip": "The opening cash plus what the staff took in cash.",
"drawerCounted": "Counted",
"drawerDiff": "Difference",
"noStaff": "No staff found",
"role": {
"waiter": "Waiter",
"manager": "Manager"
},
"ordersOpened": "Orders",
"tablesServed": "Tables served",
"itemsPaid": "Items taken",
"collected": "Taken",
"shiftStart": "Shift start",
"shiftEnd": "Shift end",
"shiftRunning": "Shift running",
"rate": "Wage / hour",
"payNow": "Wage (so far)",
"notTracked": "Not tracked",
"startCash": "Starting cash",
"drawerNow": "Drawer now",
"noZones": "No zones found",
"perOrder": "Per order",
"noPrints": "No printing data",
"printedValue": "value printed",
"jobs": "Jobs",
"jobsOk": "Printed",
"jobsFailed": "Failed",
"takings": "What the shifts took",
"staffTook": "Taken by the staff",
"openingCash": "Opening cash",
"countDrawer": "Count the drawer: how much cash is in it?",
"countHint": "Optional. Without a count nothing is checked or recorded.",
"cash": {
"even": "The drawer matches what was taken.",
"short": "The drawer has {{amount}} less than expected. The gap isn't put on any one waiter.",
"over": "The drawer has {{amount}} more than expected."
},
"openTables": "Open tables",
"allClosed": "Every table is closed",
"stillOpenTables_one": "{{count}} table still open",
"stillOpenTables_other": "{{count}} tables still open",
"withUnpaid_one": "{{count}} with unpaid items",
"withUnpaid_other": "{{count}} with unpaid items",
"activeShifts": "Shifts running",
"noShifts": "No shift running",
"shiftsWillEnd_one": "{{count}} shift still running: it will end by itself",
"shiftsWillEnd_other": "{{count}} shifts still running: they will end by themselves",
"ready": "All checks passed: the day is ready to close.",
"unpaidWarning": "Some items are unpaid. If you force the close, the unpaid amounts won't be in the reports.",
"autoClose": "Some tables are open with nothing left to pay. They will be closed.",
"forceClose": "Force the close",
"closeNow": "Close the day"
}
}
}