fix issue

This commit is contained in:
natib21
2026-07-02 13:44:19 +00:00
parent 1869790eab
commit d8f1ed8899
5 changed files with 13 additions and 13 deletions

View File

@@ -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: "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>
)}

View File

@@ -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: "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>
)}

View File

@@ -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: "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>
)}

View File

@@ -355,9 +355,9 @@ const FirstMilePage = () => {
});
const { data: vehiclesData } = useQuery({
queryKey: ["vehicles", "list"],
queryKey: ["vehicles", "free"],
queryFn: async () => {
const res = await vehiclesService.getAll({ status: "ACTIVE" });
const res = await vehiclesService.getAll({ status: "FREE" });
return res.data;
},
});

View File

@@ -339,9 +339,9 @@ const LastMilePage = () => {
});
const { data: vehiclesData } = useQuery({
queryKey: ["vehicles", "list"],
queryKey: ["vehicles", "free"],
queryFn: async () => {
const res = await vehiclesService.getAll({ status: "ACTIVE" });
const res = await vehiclesService.getAll({ status: "FREE" });
return res.data;
},
});