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:
@@ -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": "Κλείσε ημέρα"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user