mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +00:00
fix
This commit is contained in:
@@ -1037,11 +1037,17 @@ const FirstMilePage = () => {
|
|||||||
<Divider />
|
<Divider />
|
||||||
<Select
|
<Select
|
||||||
label="Vehicle"
|
label="Vehicle"
|
||||||
placeholder="Select a vehicle"
|
placeholder={vehicleOptions.length === 0 ? "No free vehicles" : "Select a vehicle"}
|
||||||
|
description={
|
||||||
|
vehicleOptions.length === 0
|
||||||
|
? "No free vehicles available — all vehicles are busy, in maintenance, or retired. Free up a vehicle in Fleet › Vehicles first."
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
data={vehicleOptions}
|
data={vehicleOptions}
|
||||||
value={vehicleValue}
|
value={vehicleValue}
|
||||||
onChange={setVehicleValue}
|
onChange={setVehicleValue}
|
||||||
searchable
|
searchable
|
||||||
|
disabled={vehicleOptions.length === 0}
|
||||||
/>
|
/>
|
||||||
<Group justify="flex-end" gap="sm">
|
<Group justify="flex-end" gap="sm">
|
||||||
<Button variant="default" onClick={closeAssign}>Cancel</Button>
|
<Button variant="default" onClick={closeAssign}>Cancel</Button>
|
||||||
@@ -1202,12 +1208,18 @@ const FirstMilePage = () => {
|
|||||||
<Divider />
|
<Divider />
|
||||||
<Select
|
<Select
|
||||||
label="Assign Vehicle (optional)"
|
label="Assign Vehicle (optional)"
|
||||||
placeholder="Select a vehicle"
|
placeholder={vehicleOptions.length === 0 ? "No free vehicles" : "Select a vehicle"}
|
||||||
|
description={
|
||||||
|
vehicleOptions.length === 0
|
||||||
|
? "No free vehicles available — you can still accept and assign a vehicle later."
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
data={vehicleOptions}
|
data={vehicleOptions}
|
||||||
value={acceptVehicleValue}
|
value={acceptVehicleValue}
|
||||||
onChange={setAcceptVehicleValue}
|
onChange={setAcceptVehicleValue}
|
||||||
searchable
|
searchable
|
||||||
clearable
|
clearable
|
||||||
|
disabled={vehicleOptions.length === 0}
|
||||||
/>
|
/>
|
||||||
<Group justify="space-between" gap="sm">
|
<Group justify="space-between" gap="sm">
|
||||||
<Button variant="subtle" onClick={() => setAcceptStep(1)}>← Back</Button>
|
<Button variant="subtle" onClick={() => setAcceptStep(1)}>← Back</Button>
|
||||||
|
|||||||
@@ -1095,12 +1095,18 @@ const LastMilePage = () => {
|
|||||||
<Divider />
|
<Divider />
|
||||||
<Select
|
<Select
|
||||||
label="Assign Vehicle (optional)"
|
label="Assign Vehicle (optional)"
|
||||||
placeholder="Select a vehicle"
|
placeholder={vehicleOptions.length === 0 ? "No free vehicles" : "Select a vehicle"}
|
||||||
|
description={
|
||||||
|
vehicleOptions.length === 0
|
||||||
|
? "No free vehicles available — you can still accept and assign a vehicle later."
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
data={vehicleOptions}
|
data={vehicleOptions}
|
||||||
value={acceptVehicleValue}
|
value={acceptVehicleValue}
|
||||||
onChange={setAcceptVehicleValue}
|
onChange={setAcceptVehicleValue}
|
||||||
searchable
|
searchable
|
||||||
clearable
|
clearable
|
||||||
|
disabled={vehicleOptions.length === 0}
|
||||||
/>
|
/>
|
||||||
<Group justify="space-between" gap="sm">
|
<Group justify="space-between" gap="sm">
|
||||||
<Button variant="subtle" onClick={() => setAcceptStep(1)}>← Back</Button>
|
<Button variant="subtle" onClick={() => setAcceptStep(1)}>← Back</Button>
|
||||||
@@ -1143,11 +1149,17 @@ const LastMilePage = () => {
|
|||||||
<Divider />
|
<Divider />
|
||||||
<Select
|
<Select
|
||||||
label="Vehicle"
|
label="Vehicle"
|
||||||
placeholder="Select a vehicle"
|
placeholder={vehicleOptions.length === 0 ? "No free vehicles" : "Select a vehicle"}
|
||||||
|
description={
|
||||||
|
vehicleOptions.length === 0
|
||||||
|
? "No free vehicles available — all vehicles are busy, in maintenance, or retired. Free up a vehicle in Fleet › Vehicles first."
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
data={vehicleOptions}
|
data={vehicleOptions}
|
||||||
value={vehicleValue}
|
value={vehicleValue}
|
||||||
onChange={setVehicleValue}
|
onChange={setVehicleValue}
|
||||||
searchable
|
searchable
|
||||||
|
disabled={vehicleOptions.length === 0}
|
||||||
/>
|
/>
|
||||||
<Group justify="flex-end" gap="sm">
|
<Group justify="flex-end" gap="sm">
|
||||||
<Button variant="default" onClick={closeAssign}>Cancel</Button>
|
<Button variant="default" onClick={closeAssign}>Cancel</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user