diff --git a/src/app/(app)/collection-map/page.tsx b/src/app/(app)/collection-map/page.tsx index f6eee90..af9dd2a 100644 --- a/src/app/(app)/collection-map/page.tsx +++ b/src/app/(app)/collection-map/page.tsx @@ -62,7 +62,7 @@ import { pinMarker, unassignedPoolPin, } from "@/components/leaflet-markers"; -import { splitSupplierBucket } from "./pin-model"; +import { splitSupplierBucket, aggregateDriverStatus } from "./pin-model"; import { DriverCardSection, LegendCard, @@ -868,9 +868,15 @@ function StopPopupBody({ map.closePopup(); onAssign(row); }; + const popupStatus = aggregateDriverStatus(stop.items); return (

{stop.supplierName}

+ {popupStatus.collected > 0 && ( +

+ {popupStatus.collected} of {popupStatus.total} collected +

+ )}
{stop.items.length} stop{stop.items.length === 1 ? "" : "s"}