mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
fix
This commit is contained in:
@@ -469,9 +469,14 @@ const FirstMilePage = () => {
|
||||
const firstMileEligiblePaidBookings = useMemo(
|
||||
() =>
|
||||
paidBookings.filter(
|
||||
(booking) =>
|
||||
booking.tradeDirection === "EXPORT" &&
|
||||
!existingFirstMileBookingIds.has(booking.id),
|
||||
(booking) => {
|
||||
if (existingFirstMileBookingIds.has(booking.id)) return false;
|
||||
return (
|
||||
booking.tradeDirection === "EXPORT" ||
|
||||
(booking.firstMilePickupAddress?.trim() ?? false) ||
|
||||
booking.serviceType?.includesFirstMile
|
||||
);
|
||||
},
|
||||
),
|
||||
[existingFirstMileBookingIds, paidBookings],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user