delete edare id from rahdaran
This commit is contained in:
@@ -35,8 +35,11 @@ const EditController = ({ row, mutate, openEditDialog, setOpenEditDialog }) => {
|
||||
|
||||
const submitForm = async (result) => {
|
||||
setSubmitting(true);
|
||||
const bound = result.bound.getLatLngs();
|
||||
let area = bound.map((ring) => ring.map((latlng) => [latlng.lat, latlng.lng]));
|
||||
const latlngs = result.bound.getLatLngs();
|
||||
|
||||
const normalized = result.bound_type === "polygon" ? latlngs : [latlngs];
|
||||
|
||||
const area = normalized.map((ring) => ring.map(({ lat, lng }) => [lat, lng]));
|
||||
await requestServer(`${UPDATE_REQUEST_MISSION}/${row.original.id}`, "post", {
|
||||
data: {
|
||||
explanation: result.explanation,
|
||||
|
||||
Reference in New Issue
Block a user