Files
edr-platform/apps/edr-freight-api
Nathnael 2e5dadeee9 fix(reports): apply the trade scope to six unscoped reports
These reports resolved ctx.directions and never read it, so a user restricted
to one trade direction saw every row, and a user with no trade access — where
directions is [] and the rule is show nothing — saw all of them.

first-last-mile-bookings scopes on the booking's own direction; the other five
scope on ts.direction. global-logistics-wagons uses the fragment form so a log
row whose schedule is gone stays visible, which is the rule the other ledgers
apply to rows carrying no direction.

Also adds the missing soft-delete guards: b.deleted_at on the first/last mile
booking join, ts.deleted_at on the wagon-teu-utilization and
global-logistics-wagons schedule joins.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 08:01:20 +00:00
..
2026-06-29 13:00:55 +00:00
2026-05-12 16:50:18 +03:00
2026-08-15 08:53:24 +00:00
2026-08-12 07:57:20 +00:00
2026-07-16 01:05:57 +00:00
2026-05-12 15:17:16 +03:00