mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 01:55:41 +00:00
Merge pull request #449 from Tria-plc/freight/feature/first_mile_invoice
fix
This commit is contained in:
@@ -20,6 +20,7 @@ import type { ColumnDef } from "@edr/ui-common";
|
|||||||
import { DataTable, DataTableFooter, usePagination } from "@edr/ui-common";
|
import { DataTable, DataTableFooter, usePagination } from "@edr/ui-common";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
|
Autocomplete,
|
||||||
Badge,
|
Badge,
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
@@ -1307,17 +1308,21 @@ const FirstMilePage = () => {
|
|||||||
clearable
|
clearable
|
||||||
disabled={assignVehicleOptions.length === 0}
|
disabled={assignVehicleOptions.length === 0}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<Autocomplete
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
label={i === 0 ? "Container no." : undefined}
|
label={i === 0 ? "Container no." : undefined}
|
||||||
placeholder="Container number"
|
placeholder="Container number"
|
||||||
|
data={(activeRecord ? bookingContainerNumbers(activeRecord) : []).filter(
|
||||||
|
(n) =>
|
||||||
|
n === row.containerNumber ||
|
||||||
|
!vehicleRows.some((r, idx) => idx !== i && r.containerNumber === n),
|
||||||
|
)}
|
||||||
value={row.containerNumber}
|
value={row.containerNumber}
|
||||||
onChange={(e) => {
|
onChange={(value) =>
|
||||||
const value = e.currentTarget.value;
|
|
||||||
setVehicleRows((prev) =>
|
setVehicleRows((prev) =>
|
||||||
prev.map((x, idx) => (idx === i ? { ...x, containerNumber: value } : x)),
|
prev.map((x, idx) => (idx === i ? { ...x, containerNumber: value } : x)),
|
||||||
);
|
)
|
||||||
}}
|
}
|
||||||
/>
|
/>
|
||||||
{vehicleRows.length > 1 && (
|
{vehicleRows.length > 1 && (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import { DataTable, DataTableFooter, usePagination } from "@edr/ui-common";
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
Alert,
|
Alert,
|
||||||
|
Autocomplete,
|
||||||
Badge,
|
Badge,
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
@@ -1666,17 +1667,21 @@ const LastMilePage = () => {
|
|||||||
clearable
|
clearable
|
||||||
disabled={assignVehicleOptions.length === 0}
|
disabled={assignVehicleOptions.length === 0}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<Autocomplete
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
label={i === 0 ? "Container no." : undefined}
|
label={i === 0 ? "Container no." : undefined}
|
||||||
placeholder="Container number"
|
placeholder="Container number"
|
||||||
|
data={(activeRecord ? bookingContainerNumbers(activeRecord) : []).filter(
|
||||||
|
(n) =>
|
||||||
|
n === row.containerNumber ||
|
||||||
|
!vehicleRows.some((r, idx) => idx !== i && r.containerNumber === n),
|
||||||
|
)}
|
||||||
value={row.containerNumber}
|
value={row.containerNumber}
|
||||||
onChange={(e) => {
|
onChange={(value) =>
|
||||||
const value = e.currentTarget.value;
|
|
||||||
setVehicleRows((prev) =>
|
setVehicleRows((prev) =>
|
||||||
prev.map((x, idx) => (idx === i ? { ...x, containerNumber: value } : x)),
|
prev.map((x, idx) => (idx === i ? { ...x, containerNumber: value } : x)),
|
||||||
);
|
)
|
||||||
}}
|
}
|
||||||
/>
|
/>
|
||||||
{vehicleRows.length > 1 && (
|
{vehicleRows.length > 1 && (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
|
|||||||
Reference in New Issue
Block a user