feat(backend,waiter,manager): moves between tables and orders on the record
Owner 2026-11-23 (plan 6F.4). services/moves.py: every table transfer, lines moved and orders merged
is an order_moves row with its lines (order_move_items: line, quantity then); OrderItem.split_from_id
links a split part to its line, so a part carries the moves made before the split; combining moves
the removed lines' moves to the kept one. Alembic 0048: the tables, the column, and a backfill from
the audit notes written before (note='backfill'). A split part now also keeps the line's price change,
kitchen state, course, cost and names (it used to restart as pending at the menu price).
GET /api/orders/{id}/moves (the order's path, each line's); GET /api/reports/moves (+ export).
Waiter: a moved order's banner (T2 -> T5), moved lines marked, a line's Move history. Manager: the
order's Moves tab, each moved line's path, Reports -> Moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -104,3 +104,11 @@ export function flagsByTable(defs = [], assignments = []) {
|
||||
|
||||
/** Where a table's card goes: its order, or a new order at that table. */
|
||||
export const cardTarget = card => (card.order ? `/orders/${card.order.id}` : `/orders/new?table=${card.table.id}`)
|
||||
|
||||
/** "T2 → T5 → T7": the tables a moved order or line went through (6F.4; '—' for no table). */
|
||||
export function pathText(moves) {
|
||||
if (!moves?.length) return ''
|
||||
const stops = [moves[0].from_table || '—']
|
||||
for (const m of moves) stops.push(m.to_table || '—')
|
||||
return stops.join(' → ')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user