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

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