feat(backend,terminal): online orders on the counter POS (platform-v2 step 3.3d)
- Counter POS gets an "Online" mode (module on + connect_orders.manage): New / In
progress / Finished, a chime on arrival (and every 30 s while one waits), badge,
toast in any mode; the order panel offers only the next step: accept / reject with
a reason, preparing, ready or out for delivery, then take the payment (shared
PaymentDialog, drawer, shift) and mark delivered/served.
- connect_orders router on v2 conventions: require(connect_orders.manage), error
codes online.not_found / online.status_changed, the cloud's step order enforced,
audit rows, GET /api/connect/orders/board. POS device scope gains connect_orders.*;
barista and barman get the key by default.
- Fixes: the KDS showed online orders before acceptance; accepting printed no
kitchen tickets; a pull whose synced mark failed stored the order twice
(store_online_orders skips known cloud ids); pulled orders lacked the business day
and delivery type; rejected orders kept active items; delivered sets closed_at/by.
- Online orders belong to holders of connect_orders.manage (_can_access_order), so
the counter pays them with POST /api/pos/orders/{id}/pay.
- Tests: test_pos_online.py (5), terminal unit +1, terminal.mjs +17 with a fake
cloud (pull, synced, status mirror); fixed a timing race in a 3.3c check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,5 +87,9 @@
|
||||
"table_not_yours": "{{table}} isn't in your zones. A manager can add the zone to your account.",
|
||||
"items_changed": "Some of these items were paid or cancelled in the meantime. Check the order and try again.",
|
||||
"order_unpaid": "Items still unpaid: {{count}}. Take the payment or cancel them first."
|
||||
},
|
||||
"online": {
|
||||
"not_found": "Online order {{order_id}} not found.",
|
||||
"status_changed": "This online order was changed on another screen in the meantime. Check where it is now."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,8 @@
|
||||
"mode": {
|
||||
"label": "Counter mode",
|
||||
"sale": "Sale",
|
||||
"tables": "Tables"
|
||||
"tables": "Tables",
|
||||
"online": "Online"
|
||||
},
|
||||
"tables": {
|
||||
"none": "No tables for you",
|
||||
@@ -290,6 +291,64 @@
|
||||
"card": "paid · card"
|
||||
},
|
||||
"readyItem": "ready"
|
||||
},
|
||||
"online": {
|
||||
"arrived_one": "New online order",
|
||||
"arrived_other": "{{count}} new online orders",
|
||||
"lists": {
|
||||
"incoming": "New",
|
||||
"in_progress": "In progress",
|
||||
"finished": "Finished"
|
||||
},
|
||||
"empty": {
|
||||
"incoming": "No new online orders",
|
||||
"in_progress": "Nothing in progress",
|
||||
"finished": "Nothing finished yet"
|
||||
},
|
||||
"emptyBody": "Orders from your QR menu show here at once, with a sound.",
|
||||
"pick": "Pick an order to see it",
|
||||
"type": {
|
||||
"delivery": "Delivery",
|
||||
"dine_in": "At the venue"
|
||||
},
|
||||
"status": {
|
||||
"pending_acceptance": "Waiting for an answer",
|
||||
"accepted": "Accepted",
|
||||
"preparing": "Preparing",
|
||||
"ready": "Ready",
|
||||
"out_for_delivery": "Out for delivery",
|
||||
"delivered": "Done",
|
||||
"rejected": "Rejected"
|
||||
},
|
||||
"waiting_one": "waiting {{count}} min",
|
||||
"waiting_other": "waiting {{count}} min",
|
||||
"accept": "Accept and send to the kitchen",
|
||||
"reject": "Reject",
|
||||
"to": {
|
||||
"preparing": "Start preparing",
|
||||
"ready": "Ready",
|
||||
"out_for_delivery": "Out for delivery"
|
||||
},
|
||||
"payAnd": {
|
||||
"delivered": "Take {{amount}} · delivered",
|
||||
"served": "Take {{amount}} · served"
|
||||
},
|
||||
"mark": {
|
||||
"delivered": "Mark as delivered",
|
||||
"served": "Mark as served"
|
||||
},
|
||||
"rejectTitle": "Reject this order?",
|
||||
"rejectBody": "The customer sees the reason on their order page.",
|
||||
"reason": "Reason",
|
||||
"reasons": {
|
||||
"busy": "We're too busy right now",
|
||||
"unavailable": "Some items aren't available",
|
||||
"closing": "We're closing",
|
||||
"area": "We don't deliver to this address",
|
||||
"other": "Other reason…"
|
||||
},
|
||||
"keep": "Keep it",
|
||||
"rejectConfirm": "Reject order"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user