This commit is contained in:
natib21
2026-07-02 10:33:32 +00:00
parent 4e4d81479b
commit 4519a1d75d
2 changed files with 10 additions and 9 deletions

View File

@@ -471,11 +471,11 @@ const FirstMilePage = () => {
paidBookings.filter(
(booking) => {
if (existingFirstMileBookingIds.has(booking.id)) return false;
return (
booking.tradeDirection === "EXPORT" ||
(booking.firstMilePickupAddress?.trim() ?? false) ||
booking.serviceType?.includesFirstMile
);
if (booking.paymentStatus !== "PAID") return false;
if (booking.tradeDirection !== "EXPORT") return false;
const hasPickupAddress = booking.firstMilePickupAddress?.trim() ?? false;
const includesFirstMile = booking.serviceType?.includesFirstMile ?? false;
return hasPickupAddress || includesFirstMile;
},
),
[existingFirstMileBookingIds, paidBookings],