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