+ {buckets.map(({ hour, value }) => {
+ const now = hour === current
+ const later = current != null && hour > current
+ return (
+
+
+
0 ? 'bg-accent-soft' : 'bg-surface-2')}
+ style={{ height: value > 0 ? `${Math.max(4, (value / max) * 100)}%` : '3px' }} />
+
+
{hour}
+
+ )
+ })}
+
+ )
+}
+
+/** A label over a value, the overview's small figure. */
+export function Figure({ label, children, sub, className }) {
+ return (
+
+ {label}
+ {children}
+ {sub && {sub}}
+
+ )
+}
+
+/** Cash against card as one split bar with its legend. */
+export function SplitBar({ parts, hidden }) {
+ const total = parts.reduce((s, p) => s + p.value, 0)
+ if (!total) return null
+ return (
+
+
+ {parts.filter(p => p.value > 0).map(p =>
)}
+
+
+ {parts.filter(p => p.value > 0).map(p => (
+
+
+ {p.label}
+ {Math.round((p.value / total) * 100)}%
+
+ ))}
+
+
+ )
+}
diff --git a/manager_dashboard/src/pages/overview/tones.js b/manager_dashboard/src/pages/overview/tones.js
new file mode 100644
index 0000000..e849698
--- /dev/null
+++ b/manager_dashboard/src/pages/overview/tones.js
@@ -0,0 +1,16 @@
+// The overview's tones as whole Tailwind class names (plan step 6.2).
+// Tailwind needs whole class names in the source, so tones map to fixed strings.
+export const SOFT = {
+ accent: 'bg-accent-soft text-accent-ink',
+ success: 'bg-success-soft text-success-ink',
+ info: 'bg-info-soft text-info-ink',
+ warning: 'bg-warning-soft text-warning-ink',
+ danger: 'bg-danger-soft text-danger-ink',
+ neutral: 'bg-surface-2 text-ink-2',
+}
+export const SOLID = {
+ accent: 'bg-accent', success: 'bg-success', info: 'bg-info', warning: 'bg-warning', danger: 'bg-danger', neutral: 'bg-ink-3',
+}
+export const BORDER = {
+ accent: 'border-accent', success: 'border-success', info: 'border-info', warning: 'border-warning', danger: 'border-danger', neutral: 'border-line',
+}
diff --git a/manager_dashboard/tests/overview.test.mjs b/manager_dashboard/tests/overview.test.mjs
new file mode 100644
index 0000000..8d52b8c
--- /dev/null
+++ b/manager_dashboard/tests/overview.test.mjs
@@ -0,0 +1,137 @@
+// The overview's arithmetic and the online orders' steps (plan step 6.2).
+import { test } from 'node:test'
+import assert from 'node:assert/strict'
+import {
+ bookingBody, cashCheck, dayKpis, dayOrders, durationParts, hourBuckets, initials, itemKind, itemShown,
+ messageAcks, messageTargets, notesPreview, orderPairs, orderTotal, paymentTotals, printRetries, quickAmounts,
+ shiftCounts, shiftMoney, tableCards, tableName, tablesByZone, toneOf, TONES, venueWallClock,
+} from '../src/pages/overview/overviewLogic.js'
+import { onlineKind, onlineNextStep } from '../src/pages/online/onlineOrdersLogic.js'
+
+const item = (o = {}) => ({ status: 'active', unit_price: 3, price_adjustment: 0, quantity: 2, printed: true, ...o })
+
+test('an order total leaves out cancelled lines and counts by-hand changes', () => {
+ assert.equal(orderTotal([item(), item({ price_adjustment: -1 }), item({ status: 'cancelled' })]), 6 + 4)
+ assert.equal(orderTotal(), 0)
+})
+
+test('tables get their live order, state and waiting prints; KPIs add up', () => {
+ const tables = [{ id: 1, number: 1 }, { id: 2, label: 'Bar' }, { id: 3, number: 3 }]
+ const orders = [
+ { id: 10, table_id: 1, status: 'open', opened_at: '2026-11-18T09:00:00Z', items: [item({ printed: false })] },
+ { id: 11, table_id: 2, status: 'partially_paid', opened_at: '2026-11-18T11:00:00Z', items: [item({ paid_by: 4 })] },
+ { id: 12, table_id: 3, status: 'closed', opened_at: '2026-11-18T11:00:00Z', items: [item()] },
+ ]
+ const cards = tableCards(tables, orders)
+ assert.deepEqual(cards.map(c => c.state), ['open', 'partially_paid', 'free'])
+ assert.deepEqual(cards.map(c => c.pendingPrint), [true, false, false])
+ assert.equal(tableName(tables[0]), 'T1')
+ assert.equal(tableName(tables[1]), 'Bar')
+
+ const today = dayOrders(orders, '2026-11-18T10:00:00Z')
+ assert.deepEqual(today.map(o => o.id), [11, 12])
+ assert.equal(dayOrders(orders, null).length, 3)
+ const k = dayKpis({ cards, orders: today, shifts: [{ total_collected: 5 }, { total_collected: 7.5 }] })
+ assert.equal(k.revenue, 12)
+ assert.equal(k.avgTicket, 12) // one order with a paid line
+ assert.equal(k.occupied, 2)
+ assert.equal(k.free, 1)
+ assert.equal(Math.round(k.occupiedPct), 67)
+ assert.equal(k.collected, 12.5)
+})
+
+test('money per hour covers the usual hours and any hour with money', () => {
+ const hourOf = iso => new Date(iso).getUTCHours()
+ const b = hourBuckets(orderPairs([
+ { opened_at: '2026-11-18T08:30:00Z', items: [item()] },
+ { opened_at: '2026-11-18T12:10:00Z', items: [item(), item()] },
+ ]), hourOf)
+ assert.equal(b[0].hour, 8)
+ assert.equal(b.at(-1).hour, 23)
+ assert.equal(b.find(x => x.hour === 12).value, 12)
+ assert.equal(b.find(x => x.hour === 9).value, 0)
+ // a shift's bars: only the hours with money
+ assert.deepEqual(hourBuckets([['2026-11-18T19:00:00Z', 4]], hourOf, { from: 24, to: -1 }), [{ hour: 19, value: 4 }])
+})
+
+test('a shift\'s money, counts and its lines seen from the waiter', () => {
+ assert.deepEqual(shiftMoney({ starting_cash: 20, cash_sales: 30, card_sales: 10 }),
+ { cash: 30, card: 10, start: 20, total: 40, expected: 50, cashPct: 75, cardPct: 25 })
+ assert.equal(shiftMoney({}).cardPct, 0)
+ const summary = { orders: [
+ { table_id: 1, items: [{ status: 'paid', quantity: 2 }, { status: 'cancelled', quantity: 5 }] },
+ { table_id: 1, items: [{ status: 'paid', quantity: 1 }] },
+ { table_id: null, items: [] },
+ ] }
+ assert.deepEqual(shiftCounts(summary), { items: 3, tables: 1, orders: 3 })
+
+ const me = 7
+ assert.equal(itemKind({ status: 'paid', added_by_id: me, paid_by_id: me }, me), 'both')
+ assert.equal(itemKind({ status: 'paid', added_by_id: 2, paid_by_id: me }, me), 'paid')
+ assert.equal(itemKind({ status: 'paid', added_by_id: me, paid_by_id: 2 }, me), 'ordered')
+ assert.equal(itemKind({ status: 'active', added_by_id: me }, me), 'unpaid')
+ assert.equal(itemKind({ status: 'cancelled' }, me), 'cancelled')
+ assert.equal(itemKind({ status: 'active', added_by_id: 2 }, me), 'anomaly')
+ const card = { status: 'paid', added_by_id: me, paid_by_id: me, payment_method: 'card' }
+ assert.equal(itemShown(card, me, 'both', 'card'), true)
+ assert.equal(itemShown(card, me, 'both', 'cash'), false)
+ assert.equal(itemShown({ ...card, payment_method: null }, me, 'all', 'cash'), true) // no method = cash
+ assert.equal(itemShown({ status: 'cancelled' }, me, 'all', 'card'), true) // cancelled lines ignore the method
+ assert.equal(itemShown(card, me, 'unpaid', 'any'), false)
+})
+
+test('counting cash: short, over, even (to the cent)', () => {
+ assert.equal(cashCheck(null, 50), null)
+ assert.equal(cashCheck(NaN, 50), null)
+ assert.deepEqual(cashCheck(50, 50), { diff: 0, state: 'even' })
+ assert.deepEqual(cashCheck(45.5, 50), { diff: -4.5, state: 'short' })
+ assert.deepEqual(cashCheck(50.1, 50), { diff: 0.1, state: 'over' })
+ assert.deepEqual(quickAmounts(47.3), [47.3, 40, 50])
+ assert.deepEqual(quickAmounts(50), [50])
+})
+
+test('people: durations, initials, a steady tone', () => {
+ assert.deepEqual(durationParts(0, 95 * 60000), { h: 1, m: 35, mins: 95 })
+ assert.equal(durationParts(null), null)
+ assert.equal(initials('Maria Papadopoulou'), 'MP')
+ assert.equal(initials('nikos'), 'NI')
+ assert.equal(initials(''), '?')
+ assert.equal(toneOf('Maria'), toneOf('Maria'))
+ assert.ok(TONES.includes(toneOf('Giorgos')))
+})
+
+test('the day\'s payments, messages, notes, print retries', () => {
+ assert.deepEqual(paymentTotals([{ cash: 5, card: 2 }, { cash: 1, treat: 3 }]), { cash: 6, card: 2, transfer: 0, treat: 3, other: 0 })
+ const staff = [{ id: 1, nickname: 'Mary' }, { id: 2, username: 'nick' }]
+ assert.equal(messageTargets({ target_waiter_ids: '[]' }, staff), null)
+ assert.deepEqual(messageTargets({ target_waiter_ids: [1, 9] }, staff), ['Mary', '#9'])
+ assert.deepEqual(messageAcks({ target_waiter_ids: '[]', acked_by: '[1,2]' }, 2), { read: 2, of: 2, all: true })
+ assert.deepEqual(messageAcks({ target_waiter_ids: [1], acked_by: 'bad json' }, 2), { read: 0, of: 1, all: false })
+ const notes = [{ id: 1, is_pinned: true }, { id: 2 }, { id: 3 }, { id: 4 }, { id: 5 }]
+ const todos = [{ id: 9, priority: 'high' }, { id: 8, priority: 'high', is_done: true }, { id: 7, priority: 'low' }]
+ assert.deepEqual(notesPreview(notes, todos).map(x => `${x.kind}${x.id}`), ['note1', 'todo9', 'note2', 'note3', 'note4'])
+ assert.equal(printRetries({ print_jobs: [{ status: 'pending', retry_count: 2 }, { status: 'done', retry_count: 9 }] }), 2)
+ assert.equal(printRetries({}), 0)
+})
+
+test('bookings are typed in venue time', () => {
+ // 18 Nov 2026 10:00 UTC is 12:00 in Athens (EET, +2)
+ assert.equal(venueWallClock(new Date('2026-11-18T10:00:00Z'), 'Europe/Athens'), '2026-11-18T12:00')
+ assert.equal(venueWallClock(new Date('2026-07-01T23:30:00Z'), 'Europe/Athens'), '2026-07-02T02:30')
+ assert.deepEqual(bookingBody({ guest_name: ' Eleni ', party_size: '4', phone: ' ', email: '', note: 'window', table_id: 3, reserved_for: '2026-11-18T21:00' }),
+ { guest_name: 'Eleni', party_size: 4, phone: null, email: null, note: 'window', table_id: 3, reserved_for: '2026-11-18T21:00:00' })
+ const zones = tablesByZone([{ id: 1, group: { name: 'Garden' } }, { id: 2 }, { id: 3, group: { name: 'Garden' } }], 'No zone')
+ assert.deepEqual(zones.map(z => [z.zone, z.tables.map(t => t.id)]), [['Garden', [1, 3]], ['No zone', [2]]])
+})
+
+test('online orders move on step by step', () => {
+ const o = (status, type = 'takeaway') => ({ online_status: status, online_order_type: type })
+ assert.equal(onlineNextStep(o('pending_acceptance')), null) // accept / refuse first
+ assert.equal(onlineNextStep(o('accepted')), 'preparing')
+ assert.equal(onlineNextStep(o('preparing')), 'ready')
+ assert.equal(onlineNextStep(o('preparing', 'delivery')), 'out_for_delivery')
+ assert.equal(onlineNextStep(o('out_for_delivery', 'delivery')), 'delivered')
+ assert.equal(onlineNextStep(o('delivered')), null)
+ assert.equal(onlineKind(o('x', null)), 'dine_in')
+ assert.equal(onlineKind(o('x', 'delivery')), 'delivery')
+})
diff --git a/manager_dashboard/v2.json b/manager_dashboard/v2.json
index d2640ce..a452774 100644
--- a/manager_dashboard/v2.json
+++ b/manager_dashboard/v2.json
@@ -1,10 +1,9 @@
{
"_comment": "Plan step 6.1: what is on the v2 rules. `paths` (files or folders): `npm run lint` checks them, and tests/v2-guards.test.mjs refuses Greek and colour literals in them. `strict`: also no setState in effects (data loads with useLiveQuery / react-query). Each phase 6 step adds what it converted; 6.14 ends with `src`.",
"paths": [
- "src/shell", "src/live", "src/pages/platform", "src/pages/online", "src/pages/media", "src/pages/signage",
- "src/pages/staff", "src/pages/Settings/sections", "src/pages/LoginPage.jsx", "src/components/NotificationBell.jsx",
- "src/components/PhoneListener.jsx", "src/pages/PhonePage.jsx", "src/store/phoneStore.js", "src/components/UserMenuButton.jsx",
- "src/pages/reports/operations/LogsPanel.jsx", "src/api/client.js", "src/store/authStore.js", "src/main.jsx"
+ "src/shell", "src/live", "src/pages/platform", "src/pages/online", "src/pages/media", "src/pages/signage", "src/pages/staff", "src/pages/Settings/sections", "src/pages/LoginPage.jsx", "src/components/NotificationBell.jsx", "src/components/PhoneListener.jsx", "src/pages/PhonePage.jsx", "src/store/phoneStore.js", "src/components/UserMenuButton.jsx", "src/pages/reports/operations/LogsPanel.jsx", "src/api/client.js", "src/store/authStore.js", "src/main.jsx", "src/pages/overview", "src/hooks"
],
- "strict": ["src/live", "src/pages/staff/SessionsPage.jsx"]
+ "strict": [
+ "src/live", "src/pages/staff/SessionsPage.jsx", "src/pages/overview", "src/pages/online/OnlineOrdersPage.jsx", "src/hooks"
+ ]
}
diff --git a/packages/i18n/locales/el/manager.json b/packages/i18n/locales/el/manager.json
index 2f86ac8..3340dbb 100644
--- a/packages/i18n/locales/el/manager.json
+++ b/packages/i18n/locales/el/manager.json
@@ -573,7 +573,44 @@
"onlineOrders": {
"for": "Για {{when}}",
"asap": "Το συντομότερο",
- "priceDiff": "Χρεώθηκε {{charged}} online· με τις τωρινές τιμές του καταστήματος θα ήταν {{here}}. Ο πελάτης πληρώνει όσο χρεώθηκε."
+ "priceDiff": "Χρεώθηκε {{charged}} online· με τις τωρινές τιμές του καταστήματος θα ήταν {{here}}. Ο πελάτης πληρώνει όσο χρεώθηκε.",
+ "tab": {
+ "incoming": "Εισερχόμενες",
+ "active": "Ενεργές",
+ "history": "Ιστορικό"
+ },
+ "refresh": "Ανανέωση",
+ "empty": {
+ "incoming": "Δεν υπάρχουν εισερχόμενες παραγγελίες.",
+ "active": "Δεν υπάρχουν ενεργές παραγγελίες.",
+ "history": "Δεν υπάρχει ιστορικό παραγγελιών."
+ },
+ "kind": {
+ "delivery": "Delivery",
+ "takeaway": "Takeaway",
+ "dine_in": "Στο κατάστημα"
+ },
+ "status": {
+ "pending_acceptance": "Αναμονή",
+ "accepted": "Αποδεκτή",
+ "preparing": "Προετοιμασία",
+ "ready": "Έτοιμη",
+ "out_for_delivery": "Σε παράδοση",
+ "delivered": "Παραδόθηκε",
+ "rejected": "Απορρίφθηκε"
+ },
+ "next": {
+ "preparing": "Προετοιμασία",
+ "ready": "Έτοιμη",
+ "out_for_delivery": "Εξωτερική παράδοση",
+ "delivered": "Παραδόθηκε"
+ },
+ "total": "Σύνολο",
+ "accept": "Αποδοχή",
+ "reject": "Απόρριψη",
+ "rejectReason": "Λόγος απόρριψης (προαιρετικό)",
+ "rejectHint": "Τον βλέπει ο πελάτης.",
+ "rejectNow": "Επιβεβαίωση"
},
"feeProduct": {
"title": "Τα μεταφορικά στην απόδειξη",
@@ -1123,5 +1160,368 @@
"refresh": "Ενημέρωση τώρα",
"forget": "Αφαίρεση πόλης"
}
+ },
+ "overview": {
+ "back": "Άκυρο",
+ "close": "Κλείσιμο",
+ "save": "Αποθήκευση",
+ "loading": "Φόρτωση…",
+ "dayOpen": "Ημέρα ανοιχτή",
+ "dayClosed": "Ημέρα κλειστή",
+ "daySince": "από {{time}} · {{length}}",
+ "openDay": "Άνοιγμα ημέρας",
+ "dayOpened": "Η ημέρα άνοιξε",
+ "dayStats": "Στατιστικά ημέρας",
+ "closeDay": "Κλείσιμο ημέρας",
+ "dayClosedDone": "Η ημέρα έκλεισε",
+ "hideAmounts": "Απόκρυψη ποσών",
+ "showAmounts": "Εμφάνιση ποσών",
+ "locked": "Σύστημα κλειδωμένο",
+ "expired": "Η άδεια χρήσης έληξε",
+ "blockedHelp": "Η ημέρα δεν μπορεί να ανοίξει μέχρι να λυθεί αυτό.",
+ "revenueByHour": "Έσοδα ανά ώρα",
+ "duration": {
+ "m": "{{m}}λ",
+ "h": "{{h}}ω",
+ "hm": "{{h}}ω {{m}}λ"
+ },
+ "kpi": {
+ "revenue": "Έσοδα ημέρας",
+ "orders_one": "{{count}} παραγγελία",
+ "orders_other": "{{count}} παραγγελίες",
+ "avg": "μ.ο.",
+ "tables": "Τραπέζια σε χρήση",
+ "tablesSub": "{{free}} ελεύθερα · {{partly}} μερική πληρ.",
+ "shifts": "Βάρδιες ενεργές",
+ "collected": "Είσπραξη βαρδιών",
+ "collectedSub_one": "Σύνολο από {{count}} βάρδια",
+ "collectedSub_other": "Σύνολο από {{count}} βάρδιες",
+ "prints": "Εκκρεμείς εκτυπώσεις",
+ "printsSub": "Απαιτείται προσοχή"
+ },
+ "shifts": {
+ "title": "Βάρδιες σε εξέλιξη",
+ "start": "Έναρξη",
+ "none": "Κανένας σερβιτόρος σε βάρδια",
+ "onBreak": "Διάλειμμα · {{since}}",
+ "since": "από {{time}} · {{length}}",
+ "message": "Αποστολή μηνύματος",
+ "stats": "Στατιστικά βάρδιας",
+ "end": "Τέλος",
+ "startTitle": "Έναρξη βάρδιας",
+ "waiter": "Σερβιτόρος",
+ "pick": "Επιλέξτε…",
+ "pickWaiter": "Επιλέξτε σερβιτόρο",
+ "startCash": "Αρχικά μετρητά",
+ "startCashHint": "Τα ρέστα με τα οποία ξεκινά ο σερβιτόρος. Αφήστε το κενό αν δεν έχει.",
+ "badAmount": "Γράψτε ένα ποσό, π.χ. 50 ή 50,00",
+ "startNow": "Έναρξη",
+ "started": "Η βάρδια ξεκίνησε",
+ "ended": "Η βάρδια του/της {{name}} έκλεισε"
+ },
+ "shift": {
+ "running": "Σε εξέλιξη",
+ "closing": "Κλείσιμο",
+ "number": "Βάρδια #{{id}}",
+ "start": "Έναρξη",
+ "length": "Διάρκεια",
+ "tab": {
+ "overview": "Επισκόπηση",
+ "lines": "Λεπτομέρειες"
+ },
+ "expected": "Αναμενόμενο στο ταμείο",
+ "startCash": "Αρχικό ταμείο",
+ "startCashHint": "με τι ξεκίνησε",
+ "cashSales": "Μετρητά πωλήσεων",
+ "cashSalesHint": "είσπραξη σε μετρητά",
+ "turnover": "Συνολικός τζίρος",
+ "turnoverHint": "μετρητά + κάρτα",
+ "perHour": "Πωλήσεις ανά ώρα",
+ "items": "Είδη",
+ "tables": "Τραπέζια",
+ "orders": "Παραγγελίες",
+ "pay": "Αμοιβή",
+ "perHourRate": "{{rate}}/ώρα",
+ "notes": "Σημειώσεις (προαιρετικό)",
+ "notesHint": "π.χ. παρατηρήσεις για τη βάρδια, βλάβες, ελλείψεις…",
+ "handover": "Πόσα μετρητά παραδίδει ο σερβιτόρος;",
+ "counted": "Μετρητά που παραδίδονται",
+ "countedHint": "Συγκρίνεται με το αναμενόμενο. Αφήστε το κενό για να παραλείψετε τη μέτρηση.",
+ "exact": "Ακριβές",
+ "live": "Ζωντανή προβολή: η βάρδια συνεχίζεται",
+ "checkFirst": "Επιβεβαίωσε τα ποσά πριν το κλείσιμο",
+ "toHandover": "Παράδοση μετρητών",
+ "endNow": "Οριστικό κλείσιμο",
+ "noLines": "Δεν υπάρχουν αντικείμενα για αυτή τη βάρδια",
+ "order": "Παραγγελία #{{id}}",
+ "openedBy": "Άνοιξε: {{name}}",
+ "orderedBy": "Παρήγγειλε: {{name}}",
+ "paidTo": "Πληρώθηκε: {{name}}",
+ "kind": {
+ "all": "Όλα",
+ "both": "Πλήρης",
+ "paid": "Μόνο πληρώθηκε",
+ "ordered": "Μόνο παρήγγειλε",
+ "unpaid": "Ανοιχτό",
+ "cancelled": "Ακυρώθηκε",
+ "anomaly": "Πρόβλημα"
+ }
+ },
+ "cash": {
+ "even": "Ισοσκελισμένο",
+ "short": "Έλλειμμα",
+ "over": "Πλεόνασμα"
+ },
+ "pay": {
+ "any": "Κάθε τρόπος",
+ "cash": "Μετρητά",
+ "card": "Κάρτα",
+ "transfer": "Τρ. μεταφορά",
+ "treat": "Κεράστηκε",
+ "other": "Άλλο"
+ },
+ "tables": {
+ "title": "Τραπέζια τώρα",
+ "all": "Πλήρης εικόνα"
+ },
+ "tableState": {
+ "open": "Ανοιχτό",
+ "partially_paid": "Μερική πληρ.",
+ "paid": "Πληρωμένο",
+ "free": "Ελεύθερο"
+ },
+ "order": {
+ "title": "Τραπέζι {{table}}",
+ "sub": "Παραγγελία #{{id}} · από {{time}} · {{since}}",
+ "staff": "Προσωπικό",
+ "empty": "Κανένα αντικείμενο.",
+ "free": "ΔΩΡΕΑΝ",
+ "linePaid": "Πληρώθηκε",
+ "pay": "Πληρωμή",
+ "payAll": "Πληρωμή όλων",
+ "cancelLine": "Ακύρωση αντικειμένου",
+ "close": "Κλείσιμο",
+ "cancel": "Ακύρωση",
+ "printer": "Εκτυπωτής…",
+ "print": "Εκτύπωση",
+ "full": "Πλήρης εικόνα",
+ "paidDone": "Πληρώθηκε",
+ "lineCancelled": "Το αντικείμενο ακυρώθηκε",
+ "cancelled": "Η παραγγελία ακυρώθηκε",
+ "closed": "Η παραγγελία έκλεισε",
+ "printing": "Αποστολή στον εκτυπωτή…",
+ "confirm": {
+ "cancelItem": "Ακύρωση αντικειμένου;",
+ "cancelOrder": "Ακύρωση παραγγελίας;",
+ "close": "Κλείσιμο παραγγελίας;",
+ "cancelOrderBody": "Η παραγγελία θα ακυρωθεί οριστικά."
+ },
+ "printCancel": "Εκτύπωση ακύρωσης;",
+ "printCancelBody": "Θέλετε να σταλεί ακυρωτικό ticket στον εκτυπωτή;",
+ "printCancelNo": "Όχι, απλή ακύρωση",
+ "printCancelYes": "Ναι, εκτύπωση",
+ "event": {
+ "waiter_discount": "Έκπτωση",
+ "free_item_added": "Δωρεάν",
+ "modifier_applied": "Τροποποιητής"
+ }
+ },
+ "orderStatus": {
+ "open": "Ανοιχτή",
+ "partially_paid": "Μερικώς πληρωμένη",
+ "paid": "Πληρωμένη",
+ "closed": "Κλειστή",
+ "cancelled": "Ακυρωμένη"
+ },
+ "prints": {
+ "title": "Εκκρεμείς εκτυπώσεις",
+ "count_one": "{{count}} παραγγελία δεν έχει σταλεί",
+ "count_other": "{{count}} παραγγελίες δεν έχουν σταλεί",
+ "all": "Αποστολή όλων",
+ "retries_one": "{{count}} επανάληψη",
+ "retries_other": "{{count}} επαναλήψεις",
+ "lines_one": "{{count}} αντ. εκκρεμεί",
+ "lines_other": "{{count}} αντ. εκκρεμούν",
+ "open": "Λεπτομέρειες",
+ "print": "Εκτύπωση",
+ "done": "Εκτυπώθηκε επιτυχώς",
+ "failed": "Αποτυχία: {{printers}}"
+ },
+ "notes": {
+ "title": "Σημειώσεις & εργασίες",
+ "counts": "{{notes}} σημειώσεις · {{todos}} εκκρεμείς εργασίες"
+ },
+ "bookings": {
+ "upcoming": "Επερχόμενες",
+ "history": "Ιστορικό",
+ "new": "Νέα",
+ "noneUpcoming": "Καμία επερχόμενη κράτηση",
+ "noneHistory": "Κανένα ιστορικό",
+ "status": {
+ "requested": "Αίτημα online",
+ "pending": "Αναμονή",
+ "arrived": "Έφτασε",
+ "cancelled": "Ακυρώθηκε",
+ "no_show": "Δεν ήρθε",
+ "declined": "Απορρίφθηκε"
+ },
+ "edit": "Επεξεργασία",
+ "confirm": "Επιβεβαίωση",
+ "decline": "Απόρριψη",
+ "arrived": "Έφτασε",
+ "cancel": "Ακύρωση",
+ "declineTitle": "Απόρριψη κράτησης",
+ "declineDefault": "Δεν υπάρχει διαθεσιμότητα εκείνη την ώρα",
+ "reason": "Λόγος",
+ "reasonHint": "Τον βλέπει ο πελάτης.",
+ "newTitle": "Νέα κράτηση",
+ "editTitle": "Επεξεργασία κράτησης",
+ "name": "Όνομα",
+ "nameNeeded": "Εισάγετε όνομα",
+ "people": "Άτομα",
+ "peopleNeeded": "Τουλάχιστον 1",
+ "when": "Ημερομηνία & ώρα",
+ "whenHint": "Στην ώρα του καταστήματος.",
+ "inMinutes_one": "+{{count}}λ",
+ "inMinutes_other": "+{{count}}λ",
+ "inHours_one": "+{{count}}ω",
+ "inHours_other": "+{{count}}ω",
+ "inDays_one": "+{{count}} μέρα",
+ "inDays_other": "+{{count}} μέρες",
+ "table": "Τραπέζι (προαιρετικό)",
+ "noTable": "Χωρίς τραπέζι",
+ "noZone": "Χωρίς ζώνη",
+ "phone": "Τηλέφωνο",
+ "email": "Email",
+ "note": "Σημείωση",
+ "noteHint": "Εσωτερική σημείωση για το προσωπικό.",
+ "create": "Δημιουργία",
+ "created": "Η κράτηση δημιουργήθηκε",
+ "saved": "Αποθηκεύτηκε"
+ },
+ "messages": {
+ "title": "Μηνύματα",
+ "new": "Νέο",
+ "none": "Δεν υπάρχουν μηνύματα ακόμα",
+ "to": "Προς: {{who}} · {{time}}",
+ "everyone": "Όλοι",
+ "read": "{{read}}/{{of}} διαβάστηκε",
+ "readBy": "Πόσοι το διάβασαν",
+ "newTitle": "Νέο μήνυμα",
+ "toOne": "Μήνυμα σε {{name}}",
+ "recipients": "Παραλήπτες",
+ "allOfThem": "(όλοι)",
+ "tables": "Σχετικά τραπέζια (προαιρετικό)",
+ "quick": "Γρήγορα μηνύματα",
+ "text": "Μήνυμα",
+ "send": "Αποστολή",
+ "sent": "Εστάλη"
+ },
+ "day": {
+ "statsTitle": "Στατιστικά ημέρας",
+ "closeTitle": "Κλείσιμο εργάσιμης ημέρας",
+ "open": "Ημέρα ενεργή",
+ "closedState": "Κλειστή",
+ "openedAt": "Άνοιγμα {{time}}",
+ "tab": {
+ "money": "Επισκόπηση",
+ "staff": "Προσωπικό",
+ "zones": "Ζώνες",
+ "printers": "Εκτυπωτές",
+ "cash": "Ταμείο",
+ "checks": "Έλεγχοι"
+ },
+ "toCash": "Μέτρηση ταμείου",
+ "toChecks": "Προχωρήστε στους ελέγχους",
+ "revenue": "Συνολικά έσοδα",
+ "orders": "Παραγγελίες",
+ "items": "Αντικείμενα",
+ "waiters": "Σερβιτόροι",
+ "opened": "Άνοιγμα",
+ "closed": "Κλείσιμο",
+ "stillOpen": "Ημέρα ενεργή",
+ "sales": "Έσοδα",
+ "salesTotal": "Σύνολο πωλήσεων",
+ "onTabs": "Καρτέλες (μη εισπραχθέντα)",
+ "onTabsTip": "Πωλήσεις σε καρτέλες πελατών: μετράνε ως πωλήσεις, τα χρήματα έρχονται όταν εξοφληθεί η καρτέλα.",
+ "taken": "Καθαρά εισπραχθέντα",
+ "cogs": "Κόστος πωληθέντων",
+ "cogsKnown": "Κόστος καταγεγραμμένων",
+ "cogsTip": "Πόσο κόστισαν στο κατάστημα τα είδη που πουλήθηκαν, από τα κόστη των προϊόντων (όπως ήταν τη στιγμή της πώλησης).",
+ "uncosted_one": "{{count}} αντ. χωρίς κόστος ({{revenue}} έσοδα)",
+ "uncosted_other": "{{count}} αντ. χωρίς κόστος ({{revenue}} έσοδα)",
+ "gross": "Μικτό κέρδος",
+ "partial": "Μερικό: υπάρχουν αντ. χωρίς κόστος",
+ "labour": "Μισθοδοσία",
+ "labourCost": "Κόστος εργασίας (καταγεγρ.)",
+ "noRate_one": "{{count}} βάρδια χωρίς ωριαία αμοιβή",
+ "noRate_other": "{{count}} βάρδιες χωρίς ωριαία αμοιβή",
+ "waste": "Απόβλητα",
+ "wasteEntries_one": "{{count}} καταχώρηση",
+ "wasteEntries_other": "{{count}} καταχωρήσεις",
+ "expenses": "Έξοδα (σήμερα)",
+ "expensesTotal": "Σύνολο εξόδων",
+ "expensesPaid": "Πληρωμένα σήμερα",
+ "expensesDue": "Ακόμη οφείλονται",
+ "net": "Εκτιμώμενο καθαρό αποτέλεσμα",
+ "netHint": "Εισπράξεις − κόστος − μισθοί − απόβλητα − έξοδα",
+ "netTip": "Εκτίμηση: γνωρίζει μόνο τα κόστη και τους μισθούς που έχουν καταχωρηθεί στο σύστημα.",
+ "netPartial": "Μερικό: υπάρχουν άγνωστα κόστη",
+ "payments": "Κατανομή πληρωμών",
+ "drawer": "Ταμείο",
+ "drawerExpected": "Αναμενόμενο ταμείο",
+ "drawerExpectedTip": "Το αρχικό ταμείο συν όσα εισέπραξε το προσωπικό σε μετρητά.",
+ "drawerCounted": "Μετρημένο ταμείο",
+ "drawerDiff": "Διαφορά",
+ "noStaff": "Δεν βρέθηκαν σερβιτόροι",
+ "role": {
+ "waiter": "Σερβιτόρος",
+ "manager": "Διευθυντής"
+ },
+ "ordersOpened": "Παραγγελίες",
+ "tablesServed": "Εξ. τραπεζιών",
+ "itemsPaid": "Αντικ. εισπρ.",
+ "collected": "Είσπραξη",
+ "shiftStart": "Έναρξη βάρδιας",
+ "shiftEnd": "Λήξη βάρδιας",
+ "shiftRunning": "Βάρδια ενεργή",
+ "rate": "Μισθός / ώρα",
+ "payNow": "Μισθός (έως τώρα)",
+ "notTracked": "Δεν παρακολ.",
+ "startCash": "Αρχικά μετρητά",
+ "drawerNow": "Ταμείο τώρα",
+ "noZones": "Δεν βρέθηκαν ζώνες",
+ "perOrder": "Μ.Ο./παραγ.",
+ "noPrints": "Δεν βρέθηκαν δεδομένα εκτύπωσης",
+ "printedValue": "αξία εκτυπ.",
+ "jobs": "Εργασίες",
+ "jobsOk": "Επιτυχείς",
+ "jobsFailed": "Αποτυχίες",
+ "takings": "Σύνοψη εισπράξεων βάρδιας",
+ "staffTook": "Σύνολο εισπράξεων σερβιτόρων",
+ "openingCash": "Αρχικό ταμείο",
+ "countDrawer": "Μετρήστε το ταμείο: πόσα μετρητά υπάρχουν;",
+ "countHint": "Προαιρετικό. Αν παραλείψετε τη μέτρηση, η επαλήθευση δεν θα καταγραφεί.",
+ "cash": {
+ "even": "Το φυσικό ταμείο συμφωνεί με τις καταγεγραμμένες εισπράξεις.",
+ "short": "Το ταμείο έχει {{amount}} λιγότερα από το αναμενόμενο. Το κενό δεν αποδίδεται σε κάποιον σερβιτόρο συγκεκριμένα.",
+ "over": "Το ταμείο έχει {{amount}} περισσότερα από το αναμενόμενο."
+ },
+ "openTables": "Ανοιχτά τραπέζια",
+ "allClosed": "Όλα τα τραπέζια έχουν κλείσει",
+ "stillOpenTables_one": "{{count}} τραπέζι ακόμα ανοιχτό",
+ "stillOpenTables_other": "{{count}} τραπέζια ακόμα ανοιχτά",
+ "withUnpaid_one": "{{count}} με απλήρωτα αντικείμενα",
+ "withUnpaid_other": "{{count}} με απλήρωτα αντικείμενα",
+ "activeShifts": "Ενεργές βάρδιες",
+ "noShifts": "Δεν υπάρχουν ενεργές βάρδιες",
+ "shiftsWillEnd_one": "{{count}} βάρδια ακόμα ενεργή: θα κλείσει αυτόματα",
+ "shiftsWillEnd_other": "{{count}} βάρδιες ακόμα ενεργές: θα κλείσουν αυτόματα",
+ "ready": "Ο έλεγχος πέρασε: η ημέρα είναι έτοιμη να κλείσει.",
+ "unpaidWarning": "Προσοχή: υπάρχουν απλήρωτα αντικείμενα. Αν κλείσετε αναγκαστικά, τα απλήρωτα ποσά δεν θα καταγραφούν στις αναφορές.",
+ "autoClose": "Υπάρχουν ανοιχτά τραπέζια χωρίς απλήρωτα αντικείμενα. Θα κλείσουν αυτόματα.",
+ "forceClose": "Αναγκαστικό κλείσιμο",
+ "closeNow": "Κλείσε ημέρα"
+ }
}
}
diff --git a/packages/i18n/locales/en/manager.json b/packages/i18n/locales/en/manager.json
index 8355fbc..68d3e1e 100644
--- a/packages/i18n/locales/en/manager.json
+++ b/packages/i18n/locales/en/manager.json
@@ -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"
+ }
}
}
diff --git a/packages/i18n/src/format.js b/packages/i18n/src/format.js
index 6efd642..76e7a8b 100644
--- a/packages/i18n/src/format.js
+++ b/packages/i18n/src/format.js
@@ -51,7 +51,8 @@ export function createFormatters({ language = 'en', timeZone = DEFAULT_TIMEZONE,
if (!cache.has(k)) cache.set(k, make())
return cache.get(k)
}
- const dtf = (style, zone) => intl('dt', `${style}|${zone}`, () => {
+ // style: a DATE_STYLES name or an Intl options object (cached by its JSON)
+ const dtf = (style, zone) => intl('dt', `${typeof style === 'string' ? style : JSON.stringify(style)}|${zone}`, () => {
const options = typeof style === 'string' ? DATE_STYLES[style] : style
if (!options) throw new Error(`unknown date style "${style}"`)
return new Intl.DateTimeFormat(locale, { ...options, timeZone: zone })
@@ -61,7 +62,7 @@ export function createFormatters({ language = 'en', timeZone = DEFAULT_TIMEZONE,
function formatDateTime(value, style = 'datetime') {
if (typeof value === 'string' && DATE_ONLY.test(value)) return formatDate(value, style)
const d = toDate(value)
- return d ? dtf(typeof style === 'string' ? style : JSON.stringify(style), timeZone).format(d) : ''
+ return d ? dtf(style, timeZone).format(d) : ''
}
const formatTime = (value, style = 'time') => formatDateTime(value, style)
diff --git a/packages/i18n/tests/format.test.mjs b/packages/i18n/tests/format.test.mjs
index 088fde2..f7b5f2b 100644
--- a/packages/i18n/tests/format.test.mjs
+++ b/packages/i18n/tests/format.test.mjs
@@ -53,6 +53,12 @@ test('date-time styles use a 24-hour clock in both languages', () => {
assert.equal(en.formatTime('2026-07-01T16:05:09Z', 'timeSeconds'), '19:05:09')
})
+test('a style can also be Intl options (each cached on its own)', () => {
+ assert.equal(el.formatDateTime('2026-07-01T16:05:00Z', { hour: '2-digit', hourCycle: 'h23' }), '19')
+ assert.equal(en.formatDate('2026-07-01T16:05:00Z', { month: 'long' }), 'July')
+ assert.equal(en.formatDate('2026-07-01T16:05:00Z', { year: 'numeric' }), '2026')
+})
+
test('money and numbers per language', () => {
assert.equal(nbsp(el.formatMoney(1234.5)), '1.234,50 €')
assert.equal(en.formatMoney(1234.5), '€1,234.50')
diff --git a/tests/e2e/manager.mjs b/tests/e2e/manager.mjs
index cd9e54d..1038b2f 100644
--- a/tests/e2e/manager.mjs
+++ b/tests/e2e/manager.mjs
@@ -774,6 +774,98 @@ try {
(await chefRow.textContent().catch(() => '')).includes('Kitchen pass · Kitchen display'))
await o.screenshot({ path: path.join(OUT, 'manager-owner-flow.png'), fullPage: true })
+ // ── 6.2: the overview (open the day, a shift, a table, close the day), online orders ──
+ const ov = 'overview:'
+ if (await api('GET', '/api/business-day/current', { token: boss })) { // earlier steps' orders may have opened one
+ await api('POST', '/api/business-day/close', { token: boss, body: { force: true } })
+ }
+ await page.goto(`${APP}/dashboard`)
+ await page.getByTestId('overview').waitFor({ timeout: 15_000 })
+ const dayState = () => page.getByTestId('day-state').getAttribute('data-open')
+ r.check(`${ov} the landing page shows the day closed, the figures, the tables and the cards`, await dayState() === 'false'
+ && await page.getByTestId('kpis').count() === 1 && await page.getByTestId('table-chip').count() > 0 && await page.getByTestId('shifts-card').count() === 1)
+ await page.getByTestId('day-open').click()
+ await page.waitForFunction(() => document.querySelector('[data-testid="day-state"]')?.dataset.open === 'true', null, { timeout: 8000 }).catch(() => {})
+ r.check(`${ov} "Open the day" opens it`, await dayState() === 'true' && !!(await api('GET', '/api/business-day/current', { token: boss })))
+ const ovWaiter = (await api('GET', '/api/waiters/', { token: boss })).find(w => w.username === 'demo_maria')
+ await page.getByTestId('shift-start').click()
+ await page.getByTestId('shift-start-waiter').selectOption(String(ovWaiter.id))
+ await page.getByRole('dialog').getByLabel('Starting cash').fill('20,5')
+ await page.getByTestId('shift-start-confirm').click()
+ const ovRow = page.getByTestId('shift-row').filter({ hasText: ovWaiter.full_name })
+ r.check(`${ov} a shift started for a waiter with €20.50 (typed with a comma)`, await ovRow.waitFor({ timeout: 8000 }).then(() => true).catch(() => false)
+ && (await api('GET', '/api/shifts/?active_only=true', { token: boss })).shifts.some(s => s.waiter_id === ovWaiter.id && s.starting_cash === 20.5))
+ const freeTable = (await api('GET', '/api/tables/', { token: boss })).find(t => !t.open_order_id && !t.current_order_id)
+ const ovOrder = await api('POST', '/api/orders/', { token: await loginApi('demo_maria', { pin: '3302', client: 'waiter' }), body: { table_id: freeTable.id } })
+ const chip = page.locator(`[data-testid="table-chip"][data-state="open"]`).filter({ hasText: freeTable.label || `T${freeTable.number}` }).first()
+ r.check(`${ov} a table a waiter opens turns "open" by itself (live)`, await chip.waitFor({ timeout: 8000 }).then(() => true).catch(() => false))
+ await chip.click()
+ r.check(`${ov} the table opens its order at a glance`, await page.getByTestId('order-dialog').waitFor({ timeout: 8000 }).then(() => true).catch(() => false)
+ && (await page.getByRole('dialog').textContent()).includes(`#${ovOrder.id}`))
+ await page.screenshot({ path: path.join(OUT, 'manager-overview-order.png') })
+ await page.keyboard.press('Escape')
+ await ovRow.getByTestId('shift-stats').click()
+ await page.getByTestId('shift-dialog').waitFor({ timeout: 8000 }).catch(() => {})
+ r.check(`${ov} shift stats: €20.50 expected in the drawer`, (await page.getByTestId('shift-expected').textContent().catch(() => '')).includes('20.50'))
+ await page.keyboard.press('Escape')
+ await ovRow.getByTestId('shift-end').click()
+ await page.getByTestId('shift-next').click()
+ await page.getByTestId('shift-counted').fill('18')
+ r.check(`${ov} ending it: €18 handed over shows "short"`, await page.getByTestId('shift-check').getAttribute('data-state').catch(() => '') === 'short')
+ await page.screenshot({ path: path.join(OUT, 'manager-overview-shift.png') })
+ await page.getByTestId('shift-end-confirm').click()
+ await ovRow.waitFor({ state: 'detached', timeout: 8000 }).catch(() => {})
+ r.check(`${ov} …and the shift ends with the count kept`, await ovRow.count() === 0
+ && !(await api('GET', '/api/shifts/?active_only=true', { token: boss })).shifts.some(s => s.waiter_id === ovWaiter.id))
+ if (await page.getByTestId('booking-new').count()) {
+ await page.getByTestId('booking-new').click()
+ await page.getByTestId('booking-name').fill('Eleni E2E')
+ await page.getByRole('button', { name: '+1 h' }).click()
+ await page.getByTestId('booking-save').click()
+ const bookingRow = page.getByTestId('booking-row').filter({ hasText: 'Eleni E2E' })
+ const want = await page.evaluate(() => Date.now() + 3600_000)
+ const listed = await bookingRow.waitFor({ timeout: 8000 }).then(() => true).catch(() => false)
+ const saved = (await api('GET', '/api/reservations/?tab=upcoming', { token: boss })).find(b => b.guest_name === 'Eleni E2E')
+ r.check(`${ov} a booking "in 1 hour" is saved at that moment (venue time) and listed`, listed
+ && !!saved && Math.abs(new Date(/[zZ]|[+-]\d\d:?\d\d$/.test(saved.reserved_for) ? saved.reserved_for : `${saved.reserved_for}Z`).getTime() - want) < 3 * 60_000, saved?.reserved_for)
+ }
+ await page.getByTestId('day-stats').click()
+ await page.getByTestId('day-money').waitFor({ timeout: 8000 }).catch(() => {})
+ await page.screenshot({ path: path.join(OUT, 'manager-overview-day.png') })
+ r.check(`${ov} day stats: the money tab, then staff`, await page.getByTestId('day-net').count() === 1
+ && await page.getByTestId('day-tab-staff').click().then(() => page.getByTestId('day-staff').waitFor({ timeout: 5000 })).then(() => true).catch(() => false))
+ await page.keyboard.press('Escape')
+ // both languages
+ await page.getByTestId('user-menu').click()
+ await page.getByRole('menuitemradio', { name: 'Ελληνικά' }).click()
+ await page.waitForFunction(() => document.querySelector('[data-testid="tables-card"]')?.innerText.includes('Τραπέζια τώρα'), null, { timeout: 5000 }).catch(() => {})
+ r.check(`${ov} in Greek`, (await page.getByTestId('day-state').textContent()).includes('Ημέρα ανοιχτή') && (await page.getByTestId('tables-card').textContent()).includes('Τραπέζια τώρα'))
+ await page.screenshot({ path: path.join(OUT, 'manager-overview-el.png'), fullPage: true })
+ await page.getByTestId('user-menu').click()
+ await page.getByRole('menuitemradio', { name: 'English' }).click()
+ await page.waitForFunction(() => document.querySelector('[data-testid="tables-card"]')?.innerText.includes('Tables now'), null, { timeout: 5000 }).catch(() => {})
+ await page.screenshot({ path: path.join(OUT, 'manager-overview.png'), fullPage: true })
+ // close the day: the table is still open → the checks say so and the close is forced
+ await page.getByTestId('day-close').click()
+ await page.getByTestId('day-to-cash').click()
+ await page.getByTestId('day-counted').fill('0')
+ await page.getByTestId('day-to-checks').click()
+ r.check(`${ov} closing: the checks show the open table`, await page.getByTestId('check-tables').getAttribute('data-ok').catch(() => '') === 'false')
+ await page.getByTestId('day-close-confirm').click()
+ await page.waitForFunction(() => document.querySelector('[data-testid="day-state"]')?.dataset.open === 'false', null, { timeout: 8000 }).catch(() => {})
+ r.check(`${ov} …"Close the day" closes it and the open order with it`, await dayState() === 'false'
+ && !(await api('GET', '/api/business-day/current', { token: boss }))
+ && (await api('GET', `/api/orders/${ovOrder.id}`, { token: boss })).status === 'closed')
+
+ await api('PUT', '/api/platform/modules/connect_orders', { token: boss, body: { enabled: true } })
+ await page.goto(`${APP}/online-orders`)
+ await page.getByTestId('online-orders').waitFor({ timeout: 10_000 }).catch(() => {})
+ const noNew = await page.getByText('No new online orders.').waitFor({ timeout: 8000 }).then(() => true).catch(() => false)
+ await page.getByTestId('online-tab-history').click()
+ const past = await page.getByTestId('online-order').first().waitFor({ timeout: 8000 }).then(() => true).catch(() => false)
+ r.check(`${ov} online orders: nothing new; the history lists the earlier online orders`, noNew && past
+ && await page.locator('[data-testid="online-order"]:not([data-status="delivered"]):not([data-status="rejected"])').count() === 0)
+
r.check('live: the manager connection carries no token in its address (4.0)', managerWs.some(u => u.includes('/api/ws/')) && managerWs.filter(u => u.includes('/api/')).every(u => !/token=/.test(u)), managerWs.filter(u => u.includes('/api/')).join(' ')) // (Vite's own dev socket has its token)
r.check('no page errors', errors.length === 0, errors.slice(0, 3).join(' | '))
} finally {