mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-03 08:33:39 +00:00
Container Returns only ever offered the last-mile path: a booking reached the list once it had a truck assigned and warehouse inventory flagged as returning. Bookings that ship WITH equipment return had no way in, so the empties they owe were invisible until that path happened to fire. Adds GET /import-operations/empty-return-bookings — the containers a booking flagged is_return, carrying whichever of them already has an empty return recorded, grouped one row per booking and dropped from the list once nothing is pending. Covers both spellings of the booking's equipment_return (WITH_RETURN and the older RETURN) and skips bookings that never ship. Backoffice grows a "Bookings With Empty Container Return" card above the existing sections: pick the booking, tick the containers coming back, say where they landed, and each tick becomes an empty container return on that booking — which is what the Returned Containers table then advances. The existing last-mile, standalone and bulk flows are untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>