Discard items left in their pickup box past a 15-minute window

An item's pickup window starts when it goes into its box. Once it runs
out, the item is discarded without a refund and the box is freed; a box
that's open at that moment is left alone. With no scheduler yet, reads,
box actions and the kitchen simulation check for expired items first.

The order card shows a live countdown under "Ready for pickup" and a
"Not picked up in time" banner once discarded. Also bounces the lock
icon and animates the pickup button's label changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 23:26:37 +02:00
co-authored by Claude Opus 5.5
parent 440f9e5696
commit 6fc315a5f2
13 changed files with 1248 additions and 38 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ _Avoid_: Store, location (as a separate multi-tenant concept — this project ha
The single restaurant concept (menu, name, branding) served by one Kitchen. One Brand per Kitchen — not a separate entity shared across multiple kitchens.
**Order**:
A customer's placed, paid request, containing one or more Order Items. An Order is complete once every Order Item within it has reached a terminal state — picked up or cancelled. (A fully-cancelled Order is still "complete": there is no separate status for that outcome.)
A customer's placed, paid request, containing one or more Order Items. An Order is complete once every Order Item within it has reached a terminal state — picked up, cancelled, or discarded. (A fully-cancelled Order is still "complete": there is no separate status for that outcome.)
**Charge**:
The single payment transaction covering an Order's full total, created once at placement time. Can be partially refunded multiple times over the Order's life — once per Order Item that gets cancelled — rather than each Order Item carrying its own separate payment.
@@ -50,7 +50,7 @@ A capability label on a Machine (e.g. "oven", "grill", "assembly") describing wh
The set of Preparation Steps awaiting a Machine carrying a given Machine Tag, ordered by turn. When such a Machine becomes idle, it takes the next eligible Step from that Tag's Queue.
**Pickup Box**:
A numbered locker at a Kitchen that a ready Order Item is placed in for the customer to collect. Each ready Order Item gets the lowest-numbered free box; if none is free, it waits for the next one to free up. The customer opens the box from their Order and closes it again after taking the item out — closing the box is what marks the Order Item picked up and frees the box.
A numbered locker at a Kitchen that a ready Order Item is placed in for the customer to collect. Each ready Order Item gets the lowest-numbered free box; if none is free, it waits for the next one to free up. The customer opens the box from their Order and closes it again after taking the item out — closing the box is what marks the Order Item picked up and frees the box. The customer has 15 minutes from when the item goes into the box (the pickup window); after that the item is discarded and the box freed, with no refund. A box that is open when the window runs out isn't emptied, since its customer is taking the item out.
_Avoid_: Counter, shelf (the box is a lockable compartment the customer operates themselves)
**Operator**: