feat: update route center calculating
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
} from "@mui/material";
|
||||
import { MediaViewer, VideoPreviewCard } from "@widgets";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { ArrowLeft, Copy, Save, Plus } from "lucide-react";
|
||||
import { ArrowLeft, Copy, Save, Plus, X } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
|
||||
@@ -102,10 +102,6 @@ export const RouteEditPage = observer(() => {
|
||||
toast.error("Заполните номер маршрута в Говорящем Городе");
|
||||
return;
|
||||
}
|
||||
if (!editRouteData.governor_appeal) {
|
||||
toast.error("Выберите статью для обращения к пассажирам");
|
||||
return;
|
||||
}
|
||||
|
||||
const validationResult = validateCoordinates(coordinates);
|
||||
if (validationResult !== true) {
|
||||
@@ -531,6 +527,21 @@ export const RouteEditPage = observer(() => {
|
||||
},
|
||||
}}
|
||||
/>
|
||||
{selectedArticle && (
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="error"
|
||||
onClick={() =>
|
||||
routeStore.setEditRouteData({
|
||||
governor_appeal: 0,
|
||||
})
|
||||
}
|
||||
startIcon={<X size={16} />}
|
||||
sx={{ minWidth: "auto", px: 2 }}
|
||||
>
|
||||
Сбросить
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant="outlined"
|
||||
onClick={() => setIsSelectArticleDialogOpen(true)}
|
||||
|
||||
Reference in New Issue
Block a user