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