refactor taxonStatusOptions, add comment and author fields to editingForm inside locality -> species tab, and update Species type

This commit is contained in:
juhanikat
2025-09-08 10:57:46 +03:00
parent 4b07fe0bcf
commit 7e6c62aff0
4 changed files with 15 additions and 11 deletions
@@ -129,6 +129,8 @@ export const SpeciesTab = () => {
{ name: 'suborder_or_superfamily_name', label: 'Suborder or Superfamily' },
{ name: 'unique_identifier', label: 'Unique Identifier', required: true },
{ name: 'taxonomic_status', label: 'Taxon status' },
{ name: 'sp_comment', label: 'Comment' },
{ name: 'sp_author', label: 'Author' },
]
if (!mode.read && !speciesData) return <CircularProgress />
@@ -1,7 +1,7 @@
import { SpeciesDetailsType, Species } from '@/shared/types'
import { ArrayFrame, HalfFrames } from '@/components/DetailView/common/tabLayoutHelpers'
import { useDetailContext } from '@/components/DetailView/Context/DetailContext'
import { emptyOption } from '@/components/DetailView/common/misc'
import { taxonStatusOptions } from '@/util/taxonStatusOptions'
import { Box } from '@mui/material'
import { SelectingTable } from '@/components/DetailView/common/SelectingTable'
import { useGetAllSpeciesQuery } from '@/redux/speciesReducer'
@@ -49,16 +49,6 @@ export const TaxonomyTab = () => {
</Box>
)
const taxonStatusOptions = [
emptyOption,
'family attrib of genus uncertain',
'genus attrib of species uncertain',
'informal species',
'species validity uncertain',
'taxonomic validity uncertain',
'NOW synonym',
]
const classification = [
[
'Class',
+1
View File
@@ -332,6 +332,7 @@ export type Species = {
locomo2: string | null
locomo3: string | null
sp_comment: string | null
sp_author: string | null
}
export type RegionDetails = Prisma.now_reg_coord & { now_reg_coord_people: Array<RegionCoordinator> } & {
+11
View File
@@ -0,0 +1,11 @@
import { emptyOption } from '@/components/DetailView/common/misc'
export const taxonStatusOptions = [
emptyOption,
'family attrib of genus uncertain',
'genus attrib of species uncertain',
'informal species',
'species validity uncertain',
'taxonomic validity uncertain',
'NOW synonym',
]