update locaomotive and fix wagon transfer issue

This commit is contained in:
Marshal
2026-07-27 20:34:14 +00:00
parent deadc59277
commit 496c66017f
23 changed files with 811 additions and 230 deletions

View File

@@ -41,7 +41,12 @@ export default function AvailableWagonsPanel({
const wagonsQuery = useQuery(
api.wagons.list.queryOptions({
input: {
filters: { status: Freight.WagonStatus.Available, currentYardId: yardId },
filters: {
status: Freight.WagonStatus.Available,
currentYardId: yardId,
// Loose wagons only — one already on another train cannot be coupled.
unassigned: true,
},
},
enabled: Boolean(yardId),
}),