From e3ca4a20526b10e176b5d1e876e0536b515b8f50 Mon Sep 17 00:00:00 2001 From: mhmjalali Date: Sat, 13 Jun 2026 06:13:17 +0330 Subject: [PATCH] complete transportation page --- .../RowActions/Allocation/Form/index.jsx | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx b/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx index c35018d..be001cc 100644 --- a/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx +++ b/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx @@ -14,16 +14,10 @@ import MachinesDialog from "./MachinesDialog"; import Reject from "./Reject"; import SelectBox from "@/core/components/SelectBox"; import { Controller, useForm } from "react-hook-form"; +import RouteDetail from "../../RouteDetail"; +import ShowRoute from "../../RouteDetail/ShowRoute"; const AllocationForm = ({ row, mutate, setOpenAllocationDialog }) => { - const latLngs = useMemo(() => { - return row.area.coordinates.map(([lng, lat]) => [lat, lng]); - }, [row.area.coordinates]); - - const bound = useMemo( - () => (row.area.type === "polygon" ? L.polygon(latLngs) : L.polyline(latLngs)), - [row.area.type, latLngs] - ); const requestServer = useRequest({ notificationSuccess: true }); const [machine, setMachine] = useState(); const [driver, setDriver] = useState(); @@ -180,10 +174,32 @@ const AllocationForm = ({ row, mutate, setOpenAllocationDialog }) => { )} - - - - + + {row.encoded_route ? ( + + + + ) : ( + + مختصات برای این ماموریت در دسترس نمیباشد + + )}