Time Unit List remaining columns

This commit is contained in:
karilint
2024-05-03 11:19:13 +03:00
committed by Arttu Kangas
parent f17d695a99
commit aecfa44c82
@@ -3,15 +3,6 @@ import { type MRT_ColumnDef } from 'material-react-table'
import { useGetAllTimeUnitsQuery } from '../../redux/timeUnitReducer'
import { TimeUnit } from '@/backendTypes'
import { TableView } from '../TableView/TableView'
import { Box, Tooltip } from '@mui/material'
const Cell = ({ renderedCellValue }: { renderedCellValue: React.ReactNode }) => (
<Tooltip title={renderedCellValue}>
<Box sx={{ maxWidth: '260px', '-webkit-mask-image': 'linear-gradient(90deg, #000 90%, transparent)' }}>
{renderedCellValue}
</Box>
</Tooltip>
)
export const TimeUnitTable = ({
selectorFn,
@@ -29,41 +20,26 @@ export const TimeUnitTable = ({
header: 'Time Unit Id',
size: 20,
},
/* {
accessorFn: ({ ref_authors }) => ref_authors.find(author => author.au_num === 1)?.author_surname ?? 'Not found',
Cell,
header: 'Author',
maxSize: 60,
},
*/
{
accessorKey: 'tu_display_name',
header: 'Time Unit',
// maxSize: 60,
},
/* {
accessorKey: 'title_primary',
Cell,
header: 'Title',
maxSize: 60,
},
{
accessorKey: 'journal_title',
Cell,
header: 'Journal',
maxSize: 60,
accessorKey: 'low_bound',
header: 'Lower Bound',
},
{
accessorKey: 'title_secondary',
header: 'Book Title',
Cell,
maxSize: 60,
accessorKey: 'up_bound',
header: 'Upper Bound',
},
{
accessorKey: 'ref_type.ref_type',
header: 'Type',
maxSize: 60,
},*/
accessorKey: 'seq_name',
header: 'Sequence',
},
{
accessorKey: 'rank',
header: 'Rank',
},
],
[]
)