species-table expansion

This commit is contained in:
Eero Antikainen
2024-09-25 13:53:01 +03:00
parent 79720aa638
commit 93e7d15fa8
3 changed files with 52 additions and 1 deletions
+6
View File
@@ -15,6 +15,12 @@ export const getAllSpecies = async () => {
species_name: true,
unique_identifier: true,
taxonomic_status: true,
common_name: true,
sp_author: true,
strain: true,
gene: true,
body_mass: true,
brain_mass: true,
sp_status: true,
},
})
+6
View File
@@ -131,6 +131,12 @@ export type Species = {
species_name: string
unique_identifier: string
taxonomic_status: string
common_name: string | null
sp_author: string | null
strain: string | null
gene: string | null
body_mass: number | null
brain_mass: number | null
sp_status: boolean | null
}
@@ -59,13 +59,52 @@ export const SpeciesTable = ({ selectorFn }: { selectorFn?: (id: Species) => voi
header: 'Taxonomic Status',
size: 20,
},
{
accessorKey: 'common_name',
header: 'Common Name',
size: 20,
},
{
accessorKey: 'sp_author',
header: 'Author',
size: 20,
},
{
accessorKey: 'strain',
header: 'Strain',
size: 20,
},
{
accessorKey: 'gene',
header: 'Gene',
size: 20,
},
{
accessorKey: 'body_mass',
header: 'Body Mass',
size: 20,
},
{
accessorKey: 'brain_mass',
header: 'Brain Mass',
size: 20,
},
{
accessorKey: 'sp_status',
header: 'Status',
}
],
[]
)
const visibleColumns = {
name: false,
id: false,
common_name: false,
sp_author: false,
strain: false,
gene: false,
body_mass: false,
brain_mass: false,
}
return (