Who should take a job: on-duty drivers ranked by distance and open stops, those who lack a needed skill or are full sorted last with the reason, load meters with status shape; a native modal dialog where arrow keys pick and Enter assigns.
Part of High Command Pro. The preview and props are open to everyone; installing it needs your license key. Set up your key · Pricing
$ npx shadcn@latest add @highcommand/assign-dialogCopies the source into your project and pulls in what it needs (4 other items). First time? Add the registry to components.json.
Who should take this job: on-duty drivers ranked by distance plus open stops (those who lack what the job needs, then full ones, sort last and say why), the best first and picked.
openrequiredboolean—Whether the dialog is open.
onOpenChangerequired(open: boolean) => void—Fires with false when the dialog closes (Escape, the close button, a click outside, or after an assignment).
jobrequiredJob | null—The job to place (nothing is shown without one).
driversrequiredreadonly DispatchDriver[]—The drivers to rank; off-duty ones are left out.
onAssignrequired(jobId: string, driverId: string) => void—Fires with the job id and the picked driver id when Assign is chosen; the dialog then closes.
distance(a: LngLat, b: LngLat) => numberdistanceMDistance for ranking; pass a road distance when you have one.
kmPerStopnumber—Km of detour one open stop is worth. Default 1.5.
limitnumber6How many drivers to show. Default 6.