rider status

This commit is contained in:
2026-09-22 11:13:15 +05:30
parent 19ed3585ff
commit cca3c50a89
21 changed files with 1389 additions and 41 deletions

View File

@@ -54,6 +54,7 @@ export function AutoAssignDrawer({
branches,
fleet,
assigned,
released,
onClose,
onDone,
}: {
@@ -63,6 +64,8 @@ export function AutoAssignDrawer({
/** Riders we know about, for the absentee picker and for naming. */
fleet: readonly RiderInfo[];
assigned: ReadonlySet<number>;
/** Orders whose delivery is dead — see `releasedFrom`. */
released?: ReadonlySet<number>;
onClose: () => void;
onDone: () => void;
}) {
@@ -114,7 +117,7 @@ export function AutoAssignDrawer({
// rest of the roster row matters for notifying, which happens after.
const rider = (fleet.find((r) => r.userid === proposal.userid) ??
({ userid: proposal.userid } as RiderInfo));
return buildDeliveries(rows, rider, branchOf, new Date(), assigned).drafts;
return buildDeliveries(rows, rider, branchOf, new Date(), assigned, released).drafts;
});
if (drafts.length === 0) {