updates on the dispatch page
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 = ({
|
||||
>
|
||||
<div className="zone-order-card-head">
|
||||
<div
|
||||
className={`zone-order-num ${isTimeMode ? 'is-time-rank' : ''}`}
|
||||
title={isTimeMode ? `Delivered #${idx + 1} in this trip` : `Planned step ${o.step || idx + 1}`}
|
||||
className="zone-order-num"
|
||||
title={`Planned step ${o.step || idx + 1}`}
|
||||
>
|
||||
{displayNum}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user