delete edare id from rahdaran

This commit is contained in:
2025-12-27 13:29:45 +03:30
parent 7a269ae8fb
commit e5ab3f75d0
8 changed files with 25 additions and 13 deletions

View File

@@ -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,