feat: update station names
This commit is contained in:
@@ -99,7 +99,7 @@ export const LinkedItems = <
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle1" fontWeight="bold">
|
<Typography variant="subtitle1" fontWeight="bold">
|
||||||
Привязанные станции
|
Привязанные остановки
|
||||||
</Typography>
|
</Typography>
|
||||||
</AccordionSummary>
|
</AccordionSummary>
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ const LinkedItemsContentsInner = <
|
|||||||
|
|
||||||
{linkedItems.length === 0 && !isLoading && (
|
{linkedItems.length === 0 && !isLoading && (
|
||||||
<Typography color="textSecondary" textAlign="center" py={2}>
|
<Typography color="textSecondary" textAlign="center" py={2}>
|
||||||
Станции не найдены
|
Остановки не найдены
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export function Widgets() {
|
|||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
>
|
>
|
||||||
<Typography variant="h6" sx={{ color: "#fff" }}>
|
<Typography variant="h6" sx={{ color: "#fff" }}>
|
||||||
Станция
|
Остановка
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export const StationCreatePage = observer(() => {
|
|||||||
navigate("/station");
|
navigate("/station");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error creating station:", error);
|
console.error("Error creating station:", error);
|
||||||
toast.error("Ошибка при создании станции");
|
toast.error("Ошибка при создании остановки");
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export const StationEditPage = observer(() => {
|
|||||||
toast.success("Остановка успешно обновлена");
|
toast.success("Остановка успешно обновлена");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error updating station:", error);
|
console.error("Error updating station:", error);
|
||||||
toast.error("Ошибка при обновлении станции");
|
toast.error("Ошибка при обновлении остановки");
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ export const StationEditPage = observer(() => {
|
|||||||
minHeight: "60vh",
|
minHeight: "60vh",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LoadingSpinner message="Загрузка данных станции..." />
|
<LoadingSpinner message="Загрузка данных остановки..." />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export const StationListPage = observer(() => {
|
|||||||
|
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="flex justify-between items-center mb-10">
|
<div className="flex justify-between items-center mb-10">
|
||||||
<h1 className="text-2xl">Станции</h1>
|
<h1 className="text-2xl">Остановки</h1>
|
||||||
{canWriteStations && (
|
{canWriteStations && (
|
||||||
<CreateButton label="Создать остановки" path="/station/create" />
|
<CreateButton label="Создать остановки" path="/station/create" />
|
||||||
)}
|
)}
|
||||||
@@ -222,7 +222,7 @@ export const StationListPage = observer(() => {
|
|||||||
slots={{
|
slots={{
|
||||||
noRowsOverlay: () => (
|
noRowsOverlay: () => (
|
||||||
<Box sx={{ mt: 5, textAlign: "center", color: "text.secondary" }}>
|
<Box sx={{ mt: 5, textAlign: "center", color: "text.secondary" }}>
|
||||||
{isLoading ? <CircularProgress size={20} /> : "Нет станций"}
|
{isLoading ? <CircularProgress size={20} /> : "Нет остановок"}
|
||||||
</Box>
|
</Box>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export const StationPreviewPage = observer(() => {
|
|||||||
minHeight: "60vh",
|
minHeight: "60vh",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LoadingSpinner message="Загрузка данных станции..." />
|
<LoadingSpinner message="Загрузка данных остановки..." />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ class RouteStore {
|
|||||||
saveRouteStations = async (routeId: number, stationId: number) => {
|
saveRouteStations = async (routeId: number, stationId: number) => {
|
||||||
const { language } = languageStore;
|
const { language } = languageStore;
|
||||||
|
|
||||||
// Получаем актуальные данные станции с сервера
|
|
||||||
const stationResponse = await languageInstance(language).get(
|
const stationResponse = await languageInstance(language).get(
|
||||||
`/station/${stationId}`
|
`/station/${stationId}`
|
||||||
);
|
);
|
||||||
@@ -108,7 +107,6 @@ class RouteStore {
|
|||||||
(station) => station.id === stationId
|
(station) => station.id === stationId
|
||||||
);
|
);
|
||||||
|
|
||||||
// Формируем данные для отправки: все поля станции + отредактированные offset
|
|
||||||
const dataToSend: any = {
|
const dataToSend: any = {
|
||||||
station_id: stationId,
|
station_id: stationId,
|
||||||
offset_x: editedStationData?.offset_x ?? fullStationData.offset_x ?? 0,
|
offset_x: editedStationData?.offset_x ?? fullStationData.offset_x ?? 0,
|
||||||
|
|||||||
@@ -555,7 +555,6 @@ class StationsStore {
|
|||||||
) => {
|
) => {
|
||||||
const { language } = languageStore;
|
const { language } = languageStore;
|
||||||
|
|
||||||
// Получаем данные станции для текущего языка
|
|
||||||
const response = await languageInstance(language).get(`/station/${id}`);
|
const response = await languageInstance(language).get(`/station/${id}`);
|
||||||
const stationData = response.data as Station;
|
const stationData = response.data as Station;
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export const EditStationTransfersModal = observer(
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography variant="caption" color="text.secondary">
|
<Typography variant="caption" color="text.secondary">
|
||||||
Станции / Редактировать пересадки
|
Остановки / Редактировать пересадки
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="h6">Редактирование пересадок</Typography>
|
<Typography variant="h6">Редактирование пересадок</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user