Skip to content

Show order status and stops on the shipment's Orders tab (#325) - #335

Merged
Connor-Finn merged 3 commits into
mainfrom
tms/325-orders-tab
Oct 4, 2026
Merged

Connor-Finn merged 3 commits into
mainfrom
tms/325-orders-tab

Conversation

@Connor-Finn

Copy link
Copy Markdown
Collaborator

Part 3 of #325. Closes #325.

What changed

  • GET /api/v1/shipments/:id returns each linked order's status, delivery status, deliveredAt, service level, customer and drop stop.
  • The shipment's Orders tab shows them per order (delivery status badge, service level, "drops at stop N · location", delivered time), plus the shipment's service level.
  • Delivery status labels move to a shared frontend module (lib/orderDeliveryStatus.ts), used by the orders list too.
  • Customer portal: the shipment detail goes through scopeShipmentToCustomer, showing only the customer's own stops and items. With one customer per shipment this is a safeguard; it also covers shipments that mixed customers before that rule.

Testing

  • Full backend suite, frontend tests, tsc (backend and frontend) and lints pass.
  • Checked in the browser: Orders tab on a 3-stop shipment mid-journey and after completion.
  • Checked through the portal API as a seeded customer user: only that customer's stops and items are returned.

🤖 Generated with Claude Code

Connor-Finn and others added 3 commits October 4, 2026 10:49
Part 3 of #325. The shipment detail returns each linked order's status,
delivery status, deliveredAt, service level, customer and drop stop, and
the Orders tab shows them with the shipment's service level. Mixed-customer
LTL shipments show a customer count and group orders by customer. The
delivery status labels move to a shared frontend module used by the
orders list too.

The customer portal's shipment detail no longer shows a customer the
drop locations (consignee names and addresses) of other customers' freight
on a shared shipment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#325)

The stop filter from the previous commit still returned the full items list,
which on a mixed-customer LTL shipment includes other customers' order
numbers and goods, and the shipment's destination, which can be another
customer's consignee. scopeShipmentToCustomer now limits stops and items
to the customer's own freight and, when the destination is someone else's
drop, shows the customer's own last drop instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A shipment belongs to one customer now, so the Orders tab no longer groups
orders by customer or shows a customer count; each row shows its
customer. The portal scoping stays as a safeguard for shipments that mixed
customers before the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Connor-Finn
Connor-Finn merged commit 279f0b1 into main Oct 4, 2026
@Connor-Finn
Connor-Finn deleted the tms/325-orders-tab branch October 4, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TMS: Keep orders in step with their shipment

1 participant