lynkedDispatch and territory map pages use same same status taxonomy also legend visible in lynked Dispatch now
This commit is contained in:
@@ -4,6 +4,9 @@ import L from 'leaflet';
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
import { useTheme } from '../../context/ThemeContext';
|
||||
import { DISPATCH_REPS, DISPATCH_RECOMMENDATIONS } from '../../data/mockStore';
|
||||
// Shared color taxonomy — same source of truth the Territory Map reads from,
|
||||
// so pin colors stay consistent across the app.
|
||||
import { REP_STATUS_COLORS, REP_STATUS_LABELS, URGENCY_COLORS } from '../../data/statusTaxonomy';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constants
|
||||
@@ -11,10 +14,6 @@ import { DISPATCH_REPS, DISPATCH_RECOMMENDATIONS } from '../../data/mockStore';
|
||||
const PLANO_CENTER = [33.055, -96.752];
|
||||
const DEFAULT_ZOOM = 12;
|
||||
|
||||
const REP_STATUS_COLORS = { available: '#10B981', en_route: '#3B82F6', busy: '#F59E0B' };
|
||||
const REP_STATUS_LABELS = { available: 'Available', en_route: 'En Route', busy: 'Busy' };
|
||||
const URGENCY_COLORS = { emergency: '#EF4444', high: '#F59E0B', standard: '#6B7280' };
|
||||
|
||||
// Storm polygon — northeast Plano, sweeping toward central
|
||||
const STORM_POLYGON = [
|
||||
[33.105, -96.745], [33.100, -96.695], [33.078, -96.682],
|
||||
@@ -360,8 +359,9 @@ const DispatchMapPanel = ({ selectedLead, dispatchLeads, reps = DISPATCH_REPS, s
|
||||
)}
|
||||
</MapContainer>
|
||||
|
||||
{/* ── Legend overlay — bottom-left ── */}
|
||||
<div className="absolute bottom-3 left-3 z-[1000] flex flex-col gap-1.5 pointer-events-none">
|
||||
{/* ── Legend overlay — top-left (kept in view; the desktop map is
|
||||
~1190px tall, so a bottom-anchored legend sat far below the fold) ── */}
|
||||
<div className="absolute top-3 left-3 z-[1000] flex flex-col gap-1.5 pointer-events-none">
|
||||
{/* Rep status legend */}
|
||||
<div className="rounded-xl border bg-white/90 dark:bg-zinc-900/85 backdrop-blur-md border-zinc-200/80 dark:border-white/[0.08] px-2.5 py-2 shadow-lg">
|
||||
<p className="text-[9px] font-black uppercase tracking-widest text-zinc-400 dark:text-zinc-500 mb-1.5">Reps</p>
|
||||
|
||||
Reference in New Issue
Block a user