diff --git a/src/pages/nearle/dispatch/Dispatch.css b/src/pages/nearle/dispatch/Dispatch.css index 82b7197..45b0cd0 100644 --- a/src/pages/nearle/dispatch/Dispatch.css +++ b/src/pages/nearle/dispatch/Dispatch.css @@ -2285,30 +2285,16 @@ color: #10b981; } -/* Time-mode visual cues on individual order cards. Numbered badge - switches from "planned step N" to "delivered #N inside this trip" - when sort mode is `time`. Emerald (delivered family) signals - "ranked by completion," distinguishing it from the planned step. */ -.dispatch-container .zone-order-num.is-time-rank { - background: #ecfdf5; - color: #047857; - box-shadow: inset 0 0 0 1.5px #6ee7b7; -} - /* Cards whose order isn't yet delivered, while time-sort is active. These are pushed to the end of the trip list (MAX_SAFE_INTEGER sort key) — the muted styling tells the operator "not yet delivered" - at a glance without reading every status pill. */ + at a glance without reading every status pill. The numbered badge + itself stays in its planned-step styling so the dispatched identity + stays readable; only the surrounding card dims. */ .dispatch-container .zone-order-card.is-pending-time { opacity: 0.72; } -.dispatch-container .zone-order-card.is-pending-time .zone-order-num.is-time-rank { - background: #f8fafc; - color: #64748b; - box-shadow: inset 0 0 0 1.5px #cbd5e1; -} - .dispatch-container .step-wrap { padding: 16px; } diff --git a/src/pages/nearle/dispatch/Dispatch.js b/src/pages/nearle/dispatch/Dispatch.js index 6c1cb9c..30a2454 100644 --- a/src/pages/nearle/dispatch/Dispatch.js +++ b/src/pages/nearle/dispatch/Dispatch.js @@ -3820,14 +3820,13 @@ const Dispatch = ({ const profit = parseFloat(o.profit || 0); const isLoss = profit < 0; const estMeters = calculateEstMeters(focusedRider.id, o); - // Badge number: - // planned mode → planned step (o.step), so a - // reordered list still surfaces the dispatched - // step number on each card. - // time mode → completion sequence inside the - // trip (1 = delivered first). Undelivered rows - // sort to the end so their idx+1 is the highest. - const displayNum = isTimeMode ? idx + 1 : (o.step || idx + 1); + // Badge number is ALWAYS the planned step (o.step) + // — the same number regardless of sort mode. Time + // mode only reorders the cards; the badge keeps + // its dispatched identity so operators can still + // map a card on screen back to "step 3 of the + // planned route" without mental translation. + const displayNum = o.step || idx + 1; // "Not yet delivered" indicator for time mode — we // pushed these rows to the end via MAX_SAFE_INTEGER // sort key, but a visual cue makes that obvious @@ -3855,8 +3854,8 @@ const Dispatch = ({ >
{displayNum}