Repository navigation
Create shipments from orders on the create page (#328) - #337
Merged
Merged
Conversation
Part 2 of #328. "Create shipment" on an order and "Ship together" on the orders list open the create page with the orders attached (?orderIds=), shown in a new Orders card with an "Add order" search limited to orders that can join. The orders fill in customer, mode, route, stops and dates (lib/shipmentFromOrders): only empty fields are filled, dates widen, each drop becomes a stop, and nothing is locked any more. Saving is refused while the form no longer fits the orders, and every order is attached on save. A lane from the orders' origin to their last drop is preselected through the new GET /api/v1/lanes/between, preferring one whose stops cover the other drops; drops it doesn't cover become extra stops, with a warning. Otherwise the shipment gets a custom route. The Waypoints card is only shown for a custom route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The create page preselected any lane between the orders' origin and last drop, so an FTL-only lane could be suggested for LTL orders. Matching now keeps to lanes whose service level is the orders' or Both, as auto- assignment already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ship together on the orders list is disabled until two or more available orders are selected that can share one shipment (one customer, one origin, LTL); the reason is shown beside the button, so the create page never opens for a set it would refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of #328.
What changed
?orderIds=; the older?fromOrderId=still works). "Ship together" is only enabled for two or more available orders that can share a shipment (one customer, one origin, LTL), with the reason shown otherwise.frontend/src/lib/shipmentFromOrders.ts): orders fill empty fields, widen the dates, add each drop as a stop and turn on temperature/hazmat handling; nothing is locked any more. Saving is refused while the form no longer fits the orders, with the reasons listed.GET /api/v1/lanes/between), preferring one whose stops cover the other drops. Drops it doesn't cover become extra stops, with a warning. Otherwise the shipment gets a custom route.Testing
🤖 Generated with Claude Code