feat(waiter): where each line came from; QR lines marked, the QR message opens the table (platform-v2 step 4.8b)

- order_items.source (Alembic 0025): waiter | counter | qr | online, set by the server
  (orders.add_priced_items: the phone / manager 'waiter', the counter 'counter'; the QR
  menu's lines 'qr', online orders 'online'; a split line keeps its source); lines of
  existing online orders backfilled 'online'; in the order's item output.
- Waiter: lines the guests sent from the QR menu (or an online order) carry a "📱 QR" /
  "🌐 Online" mark; the qr_order message's banner has "Open the table", and in the bell's
  list the message opens it.
- Tests: source per channel, migration 0025, QR placement marks 'qr'; waiter e2e +1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 09:59:57 +02:00
co-authored by Claude Opus 5.5
parent 198f8ff571
commit 1e8271e370
15 changed files with 124 additions and 9 deletions
+2
View File
@@ -25,6 +25,7 @@ class OrderItemInput(BaseModel):
price_adjustment: Optional[float] = None # on-the-fly price delta, applied at add-time
is_service_item: bool = False # priceless: print-once ephemeral; priced: saved as real item
course_id: Optional[int] = None
source: Optional[str] = None # set by the server (4.8): waiter | counter | qr | online
class AddItemsRequest(BaseModel):
@@ -64,6 +65,7 @@ class OrderItemOut(BaseModel):
paid_in_shift_id: Optional[int] = None
price_adjustment: float = 0.0
course_id: Optional[int] = None
source: Optional[str] = None # waiter | counter | qr | online (4.8); None = before 4.8
deal_id: Optional[int] = None
linked_item_id: Optional[int] = None
system_key: Optional[str] = None # a line the system added: "delivery_fee" (phase 3S, S.5)