fix button #155
@ -4,6 +4,8 @@ import { exportBulkForms, exportSingleForm } from '../../utils/exportFile';
|
||||
import { ExportExitButton, ExportWithTextButton } from './Buttons/ButtonsActions';
|
||||
import { CardsSkeleton, TaskCardsSkeleton } from './Skeleton';
|
||||
|
||||
const exportButtonSx = { height: '2.5rem', minHeight: '2.5rem', whiteSpace: 'nowrap' };
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} props
|
||||
@ -97,19 +99,18 @@ export function PaginatedList({
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }}>
|
||||
{/* Верхняя панель с экспортом и дополнительными действиями */}
|
||||
{enableExport && (
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: '1rem', mb: '1rem' }}>
|
||||
<div>{filterActions}</div>
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', mb: '1rem' }}>
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', flexWrap: 'wrap', gap: '1rem', ml: 'auto' }}>
|
||||
{exportMode && (
|
||||
<Typography variant='body2' color='textSecondary'>
|
||||
<Typography variant='body2' color='textSecondary' sx={{ display: 'flex', alignItems: 'center', minHeight: '2.5rem', whiteSpace: 'nowrap' }}>
|
||||
Выделено {entityName}: {exportList.length}
|
||||
</Typography>
|
||||
)}
|
||||
<Box sx={{ flex: 1 }} />
|
||||
<Stack direction='row' spacing='0.5rem'>
|
||||
<Stack direction='row' spacing='0.5rem' alignItems='center'>
|
||||
{!exportMode ? (
|
||||
<>
|
||||
<ExportWithTextButton text='Пакетный экспорт' onClick={() => setExportMode(true)} sx={{ height: '2.5rem' }} />
|
||||
<ExportWithTextButton text='Пакетный экспорт' onClick={() => setExportMode(true)} sx={exportButtonSx} />
|
||||
{extraActions}
|
||||
</>
|
||||
) : (
|
||||
@ -118,9 +119,9 @@ export function PaginatedList({
|
||||
text='Экспортировать'
|
||||
onClick={handleBulkExport}
|
||||
disabled={exportList.length === 0}
|
||||
sx={{ height: '2.5rem' }}
|
||||
sx={exportButtonSx}
|
||||
/>
|
||||
<ExportExitButton onClick={() => setExportMode(false)} />
|
||||
<ExportExitButton onClick={() => setExportMode(false)} sx={exportButtonSx} />
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { Stack } from '@mui/material';
|
||||
import { HeaderSwitch } from '../../components/HeaderMenu/HeaderSwitch';
|
||||
import { PrimaryButton } from '../../components/common/Buttons/Buttons';
|
||||
import { TransitionSvg } from '../../components/common/icons/icons';
|
||||
@ -96,17 +95,15 @@ function DictsNavigatorPage() {
|
||||
<FeatureItem>Отслеживание метаданных филиалов</FeatureItem>
|
||||
<FeatureItem>Удобная табличная форма представления данных</FeatureItem>
|
||||
</FeatureList>
|
||||
<PrimaryButton sx={{ height: '2.75rem' }} onClick={handleNavigateToVSP}>
|
||||
<Stack
|
||||
<PrimaryButton
|
||||
sx={{
|
||||
gap: '.25rem',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}>
|
||||
<TransitionSvg />
|
||||
<p>Открыть справочник объектов</p>
|
||||
</Stack>
|
||||
height: '2.75rem',
|
||||
'& .MuiButton-startIcon': { alignItems: 'center', marginLeft: 0, marginRight: '0.375rem' },
|
||||
'& .MuiButton-startIcon svg': { display: 'block', flexShrink: 0 },
|
||||
}}
|
||||
startIcon={<TransitionSvg />}
|
||||
onClick={handleNavigateToVSP}>
|
||||
Открыть справочник объектов
|
||||
</PrimaryButton>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user