diff --git a/src/components/CustomDataGrid.tsx b/src/components/CustomDataGrid.tsx index 897394a..17b9922 100644 --- a/src/components/CustomDataGrid.tsx +++ b/src/components/CustomDataGrid.tsx @@ -12,7 +12,7 @@ interface CustomDataGridProps extends DataGridProps { resource?: string // Add this prop } -const DEV_FIELDS = ['id', 'code', 'country_code', 'city_id', 'carrier_id', 'main_color', 'left_color', 'right_color', 'logo', 'slogan', 'filename', 'arms', 'thumbnail'] as const +const DEV_FIELDS = ['id', 'code', 'country_code', 'city_id', 'carrier_id', 'main_color', 'left_color', 'right_color', 'logo', 'slogan', 'filename', 'arms', 'thumbnail', 'route_sys_number', 'governor_appeal', 'scale_min', 'scale_max', 'rotate', 'center_latitude', 'center_longitude'] as const export const CustomDataGrid = ({hasCoordinates = false, columns = [], resource, ...props}: CustomDataGridProps) => { // const isDev = import.meta.env.DEV diff --git a/src/pages/route/create.tsx b/src/pages/route/create.tsx index 086a673..66f1849 100644 --- a/src/pages/route/create.tsx +++ b/src/pages/route/create.tsx @@ -113,6 +113,104 @@ export const RouteCreate = () => { name="path" placeholder="[[1.1, 2.2], [2.1, 4.5]]" /> + + + + + + + + + + + + + + ) diff --git a/src/pages/route/edit.tsx b/src/pages/route/edit.tsx index 00cde89..2582ecd 100644 --- a/src/pages/route/edit.tsx +++ b/src/pages/route/edit.tsx @@ -124,6 +124,104 @@ export const RouteEdit = () => { /> )} /> + + + + + + + + + + + + + + {routeId && ( diff --git a/src/pages/route/list.tsx b/src/pages/route/list.tsx index 5fb1902..364d046 100644 --- a/src/pages/route/list.tsx +++ b/src/pages/route/list.tsx @@ -44,7 +44,70 @@ export const RouteList = () => { field: 'route_number', headerName: 'Номер маршрута', type: 'string', - minWidth: 170, + minWidth: 150, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'route_sys_number', + headerName: 'Системный номер маршрута', + type: 'string', + minWidth: 120, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'governor_appeal', + headerName: 'Обращение губернатора', + type: 'number', + minWidth: 120, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'scale_min', + headerName: 'Масштаб (мин)', + type: 'number', + minWidth: 120, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'scale_max', + headerName: 'Масштаб (макс)', + type: 'number', + minWidth: 120, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'rotate', + headerName: 'Поворот', + type: 'number', + minWidth: 120, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'center_latitude', + headerName: 'Центр. широта', + type: 'number', + minWidth: 120, + display: 'flex', + align: 'left', + headerAlign: 'left', + }, + { + field: 'center_longitude', + headerName: 'Центр. долгота', + type: 'number', + minWidth: 120, display: 'flex', align: 'left', headerAlign: 'left', @@ -56,6 +119,7 @@ export const RouteList = () => { display: 'flex', align: 'left', headerAlign: 'left', + minWidth: 120, flex: 1, renderCell: ({value}) => {value ? 'прямое' : 'обратное'}, },