mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 19:30:57 +00:00
feat(warehouse): fetch all PAID bookings in one call, classified IMPORT/EXPORT by route
- eligibleBookings(direction?) now returns all import+export bookings when direction omitted (DOMESTIC excluded); per-direction filter preserved for backward compatibility - GET /warehouse-inventory/eligible-bookings (no query) returns the combined set - Frontend: single shared useEligibleBookings() query; both Receive tabs filter client-side by route-derived direction, so only one HTTP request fires Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,8 @@ function EligibleTab({
|
||||
onChanged?: () => void;
|
||||
}) {
|
||||
const { toast } = useToast();
|
||||
const { data: rows = [], isLoading } = useEligibleBookings(direction, enabled);
|
||||
const { data: allRows = [], isLoading } = useEligibleBookings(enabled);
|
||||
const rows = useMemo(() => allRows.filter((r) => r.direction === direction), [allRows, direction]);
|
||||
const bulkReceive = useBulkReceive();
|
||||
const loadPassed = useLoadPassedExport();
|
||||
const [selected, setSelected] = useState<Set<string>>(new Set());
|
||||
|
||||
Reference in New Issue
Block a user