mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 01:48:12 +00:00
Merge branch 'dev' of github.com:Tria-plc/edr-platform into contrat-backup2
This commit is contained in:
@@ -42,8 +42,8 @@ export function ContainerAllocationTable({
|
||||
);
|
||||
|
||||
const { data: vehicles = [], isLoading: vehiclesLoading } = useQuery({
|
||||
queryKey: ["vehicles", "active"],
|
||||
queryFn: () => vehiclesService.getAll({ status: "ACTIVE" }),
|
||||
queryKey: ["vehicles", "free"],
|
||||
queryFn: () => vehiclesService.getAll({ status: "ACTIVE", availability: "FREE" }),
|
||||
});
|
||||
|
||||
const vehicleOptions = useMemo(
|
||||
@@ -99,7 +99,7 @@ export function ContainerAllocationTable({
|
||||
<Stack gap="md">
|
||||
{vehicles.length === 0 && (
|
||||
<Alert icon={<AlertCircle size={16} />} color="yellow">
|
||||
No active vehicles available. Add vehicles before allocating containers.
|
||||
No free vehicles available. Free up or add vehicles before allocating containers.
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ export function FirstMileContainerAllocationTable({
|
||||
);
|
||||
|
||||
const { data: vehicles = [], isLoading: vehiclesLoading } = useQuery({
|
||||
queryKey: ["vehicles", "active"],
|
||||
queryFn: () => vehiclesService.getAll({ status: "ACTIVE" }),
|
||||
queryKey: ["vehicles", "free"],
|
||||
queryFn: () => vehiclesService.getAll({ status: "ACTIVE", availability: "FREE" }),
|
||||
});
|
||||
|
||||
const vehicleOptions = useMemo(
|
||||
@@ -99,7 +99,7 @@ export function FirstMileContainerAllocationTable({
|
||||
<Stack gap="md">
|
||||
{vehicles.length === 0 && (
|
||||
<Alert icon={<AlertCircle size={16} />} color="yellow">
|
||||
No active vehicles available. Add vehicles before allocating containers.
|
||||
No free vehicles available. Free up or add vehicles before allocating containers.
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ export function LastMileContainerAllocationTable({
|
||||
);
|
||||
|
||||
const { data: vehicles = [], isLoading: vehiclesLoading } = useQuery({
|
||||
queryKey: ["vehicles", "active"],
|
||||
queryFn: () => vehiclesService.getAll({ status: "ACTIVE" }),
|
||||
queryKey: ["vehicles", "free"],
|
||||
queryFn: () => vehiclesService.getAll({ status: "ACTIVE", availability: "FREE" }),
|
||||
});
|
||||
|
||||
const vehicleOptions = useMemo(
|
||||
@@ -99,7 +99,7 @@ export function LastMileContainerAllocationTable({
|
||||
<Stack gap="md">
|
||||
{vehicles.length === 0 && (
|
||||
<Alert icon={<AlertCircle size={16} />} color="yellow">
|
||||
No active vehicles available. Add vehicles before allocating containers.
|
||||
No free vehicles available. Free up or add vehicles before allocating containers.
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ export const formatFleetCell = (
|
||||
const getStatusColor = (st: string): string => {
|
||||
const s = st.toUpperCase();
|
||||
if (s === "ACTIVE" || s === "AVAILABLE") return "green";
|
||||
if (s === "FREE") return "teal";
|
||||
if (s === "BUSY") return "blue";
|
||||
if (s === "INACTIVE") return "gray";
|
||||
if (s === "SUSPENDED" || s === "OUT_OF_SERVICE") return "red";
|
||||
if (s === "MAINTENANCE" || s === "ON_LEAVE") return "orange";
|
||||
|
||||
Reference in New Issue
Block a user