N-FIN-31: set column sizes to definition

This commit is contained in:
Markus Thielker 2024-03-16 23:56:17 +01:00
parent 557d898981
commit e60561ffc0
No known key found for this signature in database
3 changed files with 8 additions and 0 deletions

View file

@ -25,6 +25,7 @@ export const columns = (
</svg> </svg>
); );
}, },
size: 65,
}, },
{ {
accessorKey: 'createdAt', accessorKey: 'createdAt',

View file

@ -17,6 +17,7 @@ export const columns = (
{ {
accessorKey: 'type', accessorKey: 'type',
header: 'Type', header: 'Type',
size: 100,
}, },
{ {
accessorKey: 'createdAt', accessorKey: 'createdAt',

View file

@ -18,6 +18,7 @@ export const columns = (
cell: ({row}) => { cell: ({row}) => {
return format(row.original.date, 'PPP'); return format(row.original.date, 'PPP');
}, },
size: 175,
}, },
{ {
accessorKey: 'amount', accessorKey: 'amount',
@ -28,6 +29,7 @@ export const columns = (
currency: 'EUR', currency: 'EUR',
}).format(row.getValue('amount') as number / 100); }).format(row.getValue('amount') as number / 100);
}, },
size: 70,
}, },
{ {
accessorKey: 'payorId', accessorKey: 'payorId',
@ -36,6 +38,7 @@ export const columns = (
const entity = entities.find((entity) => entity.id === row.original.payorId); const entity = entities.find((entity) => entity.id === row.original.payorId);
return entity?.name ?? '-'; return entity?.name ?? '-';
}, },
size: 200,
}, },
{ {
accessorKey: 'payeeId', accessorKey: 'payeeId',
@ -44,6 +47,7 @@ export const columns = (
const entity = entities.find((entity) => entity.id === row.original.payeeId); const entity = entities.find((entity) => entity.id === row.original.payeeId);
return entity?.name ?? '-'; return entity?.name ?? '-';
}, },
size: 200,
}, },
{ {
accessorKey: 'categoryId', accessorKey: 'categoryId',
@ -60,10 +64,12 @@ export const columns = (
</div> </div>
); );
}, },
size: 200,
}, },
{ {
accessorKey: 'note', accessorKey: 'note',
header: 'Note', header: 'Note',
size: 200,
}, },
{ {
id: 'actions', id: 'actions',