mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
mile
This commit is contained in:
@@ -1552,11 +1552,12 @@ const LastMilePage = () => {
|
||||
label={i === 0 ? "Container no." : undefined}
|
||||
placeholder="Container number"
|
||||
value={row.containerNumber}
|
||||
onChange={(e) =>
|
||||
onChange={(e) => {
|
||||
const value = e.currentTarget.value;
|
||||
setVehicleRows((prev) =>
|
||||
prev.map((x, idx) => (idx === i ? { ...x, containerNumber: e.currentTarget.value } : x)),
|
||||
)
|
||||
}
|
||||
prev.map((x, idx) => (idx === i ? { ...x, containerNumber: value } : x)),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
{vehicleRows.length > 1 && (
|
||||
<ActionIcon
|
||||
@@ -1618,6 +1619,31 @@ const LastMilePage = () => {
|
||||
>
|
||||
<Stack gap="md">
|
||||
{activeRecord && <BookingInfo record={activeRecord} />}
|
||||
{activeRecord && (activeRecord.vehicleAssignments?.length ?? 0) > 0 && (
|
||||
<Card withBorder padding="md" radius="md">
|
||||
<Text fw={600} size="sm" mb="sm">Assigned vehicles</Text>
|
||||
<Stack gap="xs">
|
||||
{activeRecord.vehicleAssignments!.map((a) => {
|
||||
const v = a.vehicle;
|
||||
const label = v
|
||||
? [v.code, v.plateNumber].filter(Boolean).join(" · ")
|
||||
: a.vehicleId;
|
||||
return (
|
||||
<Group key={a.id} justify="space-between" wrap="nowrap">
|
||||
<Text size="sm">{label}</Text>
|
||||
{a.containerNumber ? (
|
||||
<Badge size="sm" variant="light" color="blue">
|
||||
{a.containerNumber}
|
||||
</Badge>
|
||||
) : (
|
||||
<Text size="xs" c="dimmed">No container no.</Text>
|
||||
)}
|
||||
</Group>
|
||||
);
|
||||
})}
|
||||
</Stack>
|
||||
</Card>
|
||||
)}
|
||||
{activeRecord && (
|
||||
<Card withBorder padding="md" radius="md">
|
||||
<Text fw={600} size="sm" mb="sm">Delivery steps</Text>
|
||||
|
||||
Reference in New Issue
Block a user