diff --git a/src/app/(app)/collection-map/page.tsx b/src/app/(app)/collection-map/page.tsx index 783fcf6..dd3160e 100644 --- a/src/app/(app)/collection-map/page.tsx +++ b/src/app/(app)/collection-map/page.tsx @@ -306,7 +306,6 @@ export default function CollectionMapPage() { // single planning session; Leaflet caches tiles client-side so // repeat zoom/pan into the same region is free. const [trafficEnabled, setTrafficEnabled] = useState(false); - const [enabledDriverIds, setEnabledDriverIds] = useState>(new Set()); const [allUsers, setAllUsers] = useState([]); const [zoom, setZoom] = useState(10); @@ -633,15 +632,6 @@ export default function CollectionMapPage() { return Array.from(map.values()).sort((a, b) => a.name.localeCompare(b.name)); }, [items, driverMap]); - const toggleDriver = (id: string) => { - setEnabledDriverIds((cur) => { - const next = new Set(cur); - if (next.has(id)) next.delete(id); - else next.add(id); - return next; - }); - }; - /* -- render -------------------------------------------------------------- */ const stopCount = stopsWithCoords.reduce((s, x) => s + x.items.length, 0); @@ -881,79 +871,6 @@ export default function CollectionMapPage() { {/* Sidebar */}
- {/* Drivers */} - - - - - Drivers - - {enabledDriverIds.size === 0 - ? `all ${driversWithItems.length}` - : `${enabledDriverIds.size}/${driversWithItems.length}`} - - - - - {driversWithItems.length === 0 ? ( -

No drivers assigned for this day yet.

- ) : ( - driversWithItems.map((d) => { - const active = enabledDriverIds.size === 0 || enabledDriverIds.has(d.id); - // Match the map pin exactly: stable per-driver index from the - // sorted driversWithItems list, mapped through DRIVER_PALETTE. - // So driver A's red swatch in the sidebar == driver A's red - // pin on the map. No rainbow-collision with CLUSTER_PALETTE. - const swatch = - DRIVER_PALETTE[driverIndexFor(driversWithItems, d.id)]; - return ( - - ); - }) - )} - {enabledDriverIds.size > 0 && ( - - )} -
-
- {/* Missing-coord suppliers */} {suppliersWithoutCoords.length > 0 && (