updates on the dispatch page
This commit is contained in:
@@ -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