fix(dict-vsp): ширины колонок как в test — grid-раскладка не должна менять вид справочника

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andrey Epifancev 2026-10-29 12:10:47 +04:00
parent b0de763259
commit bf64fa0dc6

View File

@ -34,9 +34,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'system_code',
header: 'Код РФ',
size: 110,
minSize: 90,
maxSize: 140,
size: 100,
minSize: 50,
maxSize: 100,
Cell: ({ cell }) => (
<Typography variant='body2' component='div' sx={{ fontWeight: 'medium' }}>
{cell.getValue() || '-'}
@ -48,9 +48,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'registration_number',
header: 'Регистрационный номер ВСП',
size: 250,
minSize: 200,
maxSize: 300,
size: 180,
minSize: 150,
maxSize: 200,
Cell: ({ cell }) => (
<Typography variant='body2' component='div' sx={{ fontWeight: 'medium' }}>
{cell.getValue() || '-'}
@ -62,9 +62,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'regional_branch',
header: 'Региональный филиал/ССП',
size: 230,
minSize: 180,
maxSize: 300,
size: 186,
minSize: 100,
maxSize: 200,
Cell: ({ cell }) => <Typography variant='body2'>{cell.getValue() || '-'}</Typography>,
enableColumnActions: false,
enableSorting: false,
@ -82,9 +82,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'address',
header: 'Адрес объекта',
size: 300,
size: 250,
minSize: 200,
maxSize: 500,
maxSize: 350,
Cell: ({ cell }) => <Typography variant='body2'>{cell.getValue() || '-'}</Typography>,
enableColumnActions: false,
enableSorting: false,
@ -92,9 +92,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'approved_format',
header: 'Утверждённый формат',
size: 190,
minSize: 160,
maxSize: 240,
size: 159,
minSize: 120,
maxSize: 180,
Cell: ({ cell }) => <Typography variant='body2'>{cell.getValue() || '-'}</Typography>,
enableColumnActions: false,
enableSorting: false,
@ -102,9 +102,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'open_date',
header: 'Дата открытия ВСП',
size: 180,
minSize: 150,
maxSize: 220,
size: 138,
minSize: 110,
maxSize: 150,
Cell: ({ cell }) => {
const date = cell.getValue();
return <Typography variant='body2'>{date ? new Date(date).toLocaleDateString('ru-RU') : '-'}</Typography>;
@ -115,9 +115,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'close_date',
header: 'Дата закрытия ВСП',
size: 180,
minSize: 150,
maxSize: 220,
size: 137,
minSize: 110,
maxSize: 150,
Cell: ({ cell }) => {
const date = cell.getValue();
return <Typography variant='body2'>{date ? new Date(date).toLocaleDateString('ru-RU') : '-'}</Typography>;
@ -128,9 +128,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'placement_type',
header: 'Форма расположения ВСП',
size: 220,
minSize: 180,
maxSize: 260,
size: 170,
minSize: 140,
maxSize: 200,
Cell: ({ cell }) => <Typography variant='body2'>{cell.getValue() || '-'}</Typography>,
enableColumnActions: false,
enableSorting: false,
@ -138,9 +138,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'staff_count',
header: 'Штатная численность ВСП',
size: 230,
minSize: 190,
maxSize: 270,
size: 170,
minSize: 140,
maxSize: 200,
Cell: ({ cell }) => {
const value = cell.getValue();
return <Typography variant='body2'>{value !== undefined && value !== null ? value : '-'}</Typography>;
@ -161,9 +161,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'rent_contract_num',
header: 'Номер договора',
size: 150,
minSize: 130,
maxSize: 200,
size: 130,
minSize: 110,
maxSize: 160,
Cell: ({ cell }) => <Typography variant='body2'>{cell.getValue() || '-'}</Typography>,
enableColumnActions: false,
enableSorting: false,
@ -171,9 +171,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'rent_end_date',
header: 'Дата окончания договора',
size: 230,
minSize: 190,
maxSize: 270,
size: 150,
minSize: 130,
maxSize: 170,
Cell: ({ cell }) => {
const date = cell.getValue();
return <Typography variant='body2'>{date ? new Date(date).toLocaleDateString('ru-RU') : '-'}</Typography>;
@ -184,9 +184,9 @@ const TableDictVsp = ({ data, onEditClick, onAddClick, onExportClick, loading =
{
accessorKey: 'notes',
header: 'Примечания',
size: 300,
minSize: 200,
maxSize: 500,
size: 200,
minSize: 150,
maxSize: 300,
Cell: ({ cell }) => (
<Typography variant='body2' sx={{ whiteSpace: 'pre-wrap' }}>
{cell.getValue() || '-'}