fix: Add route-station link area

This commit is contained in:
2025-06-16 12:26:19 +03:00
parent 32a7cb44d1
commit d415441af8
8 changed files with 570 additions and 119 deletions

View File

@@ -515,6 +515,7 @@ class CreateSightStore {
console.log("Sight created with ID:", newSightId);
// Optionally: this.clearCreateSight(); // To reset form after successful creation
this.needLeaveAgree = false;
return newSightId;
};

View File

@@ -346,6 +346,8 @@ class EditSightStore {
// body: this.sight.zh.left.body,
// }
// );
this.needLeaveAgree = false;
};
getLeftArticle = async (id: number) => {

View File

@@ -80,8 +80,8 @@ class RouteStore {
editRouteData = {
carrier: "",
carrier_id: 0,
center_latitude: 0,
center_longitude: 0,
center_latitude: "",
center_longitude: "",
governor_appeal: 0,
id: 0,
path: [] as number[][],
@@ -99,10 +99,11 @@ class RouteStore {
};
editRoute = async (id: number) => {
const response = await authInstance.patch(
`/route/${id}`,
this.editRouteData
);
const response = await authInstance.patch(`/route/${id}`, {
...this.editRouteData,
center_latitude: parseFloat(this.editRouteData.center_latitude),
center_longitude: parseFloat(this.editRouteData.center_longitude),
});
runInAction(() => {
this.route[id] = response.data;