fix: amélioré layout table versions avec boutons actions

- Augmenté largeur colonne Actions: 100px → 200px
- Optimisé largeurs: Version 200px→180px, Date 120px→140px
- Ajouté flexWrap et gap réduit (0.3) pour boutons
- Hauteur minimum cellules actions: 64px
- Style compact pour bouton Comparer (minWidth auto)
This commit is contained in:
2025-07-24 08:17:33 +04:00
parent c9cf8dcdff
commit b6320806c1
+16 -4
View File
@@ -29,18 +29,18 @@ import {filterVersions, getFilterStats} from '@/lib/version-utils.js'
const columns = [
{
width: 200,
width: 180,
label: 'Version',
dataKey: 'name',
},
{
width: 120,
width: 140,
label: 'Créée le',
dataKey: 'date_created',
numeric: true,
},
{
width: 100,
width: 200,
label: 'Actions',
dataKey: 'actions',
}
@@ -108,12 +108,23 @@ function rowContent({
<TableCell
key={column.dataKey}
align={column.numeric || false ? 'right' : 'left'}
sx={{
minHeight: column.dataKey === 'actions' ? 64 : 'auto',
verticalAlign: 'middle'
}}
>
{column.dataKey === 'date_created'
? formatDate(row[column.dataKey], 'Pp')
: (column.dataKey === 'actions'
? (
<Box sx={{display: 'flex', gap: 0.5, alignItems: 'center'}}>
<Box sx={{
display: 'flex',
gap: 0.3,
alignItems: 'center',
flexWrap: 'wrap',
justifyContent: 'flex-start'
}}
>
<CopyButton
content={row.delta?.contenu || row.name || ''}
label='Copier le contenu'
@@ -138,6 +149,7 @@ function rowContent({
size='small'
variant='outlined'
color='primary'
sx={{minWidth: 'auto', px: 1}}
onClick={() => handleButtonClick(row.id)}
>
Comparer