feat: update route and station lists
This commit is contained in:
@@ -93,6 +93,23 @@ export const RouteListPage = observer(() => {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "route_sys_number",
|
||||||
|
headerName: "Номер трассы маршрута",
|
||||||
|
description: "Уникальный номер трассы маршрута, в т.ч. используемый системой \"Говорящий город\"",
|
||||||
|
flex: 1,
|
||||||
|
renderCell: (params: GridRenderCellParams) => {
|
||||||
|
return (
|
||||||
|
<div className="w-full h-full flex items-center">
|
||||||
|
{params.value ? (
|
||||||
|
params.value
|
||||||
|
) : (
|
||||||
|
<Minus size={20} className="text-red-500" />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "route_direction",
|
field: "route_direction",
|
||||||
headerName: "Направление",
|
headerName: "Направление",
|
||||||
@@ -170,6 +187,7 @@ export const RouteListPage = observer(() => {
|
|||||||
id: route.id,
|
id: route.id,
|
||||||
carrier_id: route.carrier_id,
|
carrier_id: route.carrier_id,
|
||||||
route_number: route.route_number,
|
route_number: route.route_number,
|
||||||
|
route_sys_number: route.route_sys_number,
|
||||||
route_direction: route.route_direction ? "Прямой" : "Обратный",
|
route_direction: route.route_direction ? "Прямой" : "Обратный",
|
||||||
route_name: route.route_name,
|
route_name: route.route_name,
|
||||||
}));
|
}));
|
||||||
@@ -204,6 +222,7 @@ export const RouteListPage = observer(() => {
|
|||||||
<DataGrid
|
<DataGrid
|
||||||
rows={rows}
|
rows={rows}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
onRowDoubleClick={(params) => canWriteRoutes && navigate(`/route/${params.row.id}/edit`)}
|
||||||
checkboxSelection={canWriteRoutes}
|
checkboxSelection={canWriteRoutes}
|
||||||
disableRowSelectionExcludeModel
|
disableRowSelectionExcludeModel
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ export const StationListPage = observer(() => {
|
|||||||
<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" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -170,6 +170,7 @@ export const StationListPage = observer(() => {
|
|||||||
<DataGrid
|
<DataGrid
|
||||||
rows={rows}
|
rows={rows}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
onRowDoubleClick={(params) => canWriteStations && navigate(`/station/${params.row.id}/edit`)}
|
||||||
checkboxSelection={canWriteStations}
|
checkboxSelection={canWriteStations}
|
||||||
disableRowSelectionExcludeModel
|
disableRowSelectionExcludeModel
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
|
|||||||
Reference in New Issue
Block a user