diff --git a/backend/src/services/occurrenceService.ts b/backend/src/services/occurrenceService.ts index 1681cbb4..c0c8afa0 100644 --- a/backend/src/services/occurrenceService.ts +++ b/backend/src/services/occurrenceService.ts @@ -329,8 +329,9 @@ export const getOccurrenceByCompositeKey = async (lid: number, speciesId: number loc_status: boolean | null loc_name: string country: string + order_name: string + family_name: string genus_name: string - family_name: string | null species_name: string unique_identifier: string | null dms_lat: string | null diff --git a/backend/src/services/queries/crossSearchQuery.ts b/backend/src/services/queries/crossSearchQuery.ts index 5bb28aad..91f9a501 100644 --- a/backend/src/services/queries/crossSearchQuery.ts +++ b/backend/src/services/queries/crossSearchQuery.ts @@ -83,8 +83,9 @@ export const generateOccurrenceDetailSql = (lid: number, speciesId: number) => { now_loc.min_age, now_loc.bfa_max, now_loc.bfa_min, - com_species.genus_name, + com_species.order_name, com_species.family_name, + com_species.genus_name, com_species.species_name, com_species.unique_identifier FROM now_ls diff --git a/frontend/src/components/Occurrence/OccurrenceDetails.tsx b/frontend/src/components/Occurrence/OccurrenceDetails.tsx index f1d4c265..9abaed93 100644 --- a/frontend/src/components/Occurrence/OccurrenceDetails.tsx +++ b/frontend/src/components/Occurrence/OccurrenceDetails.tsx @@ -96,7 +96,7 @@ export const OccurrenceDetails = () => { if (localityQueryError) return
Error loading locality data
if (occurrenceDataLoading || localityDataLoading || mutationLoading) return - const initialOccurrence = emptyOccurrence + const initialOccurrence: OccurrenceDetailsType = { ...emptyOccurrence } if (isNew) { initialOccurrence.lid = parseInt(localityId, 10) diff --git a/frontend/src/components/Occurrence/Tabs/OccurrenceCoreTab.tsx b/frontend/src/components/Occurrence/Tabs/OccurrenceCoreTab.tsx index 51cc7e3e..698f3752 100644 --- a/frontend/src/components/Occurrence/Tabs/OccurrenceCoreTab.tsx +++ b/frontend/src/components/Occurrence/Tabs/OccurrenceCoreTab.tsx @@ -107,7 +107,7 @@ export const OccurrenceCoreTab = ({ ['Family', editData.family_name], ['Genus', editData.genus_name], ['Species', editData.species_name], - ['Unique Identifier', editData.unique_identifier], + ['Unique Identifier', toText(editData.unique_identifier)], ['ID status', dropdown('id_status', idStatusOptions, 'ID status')], ['Additional Information', textField('orig_entry', { type: 'text' })], ['Source name', textField('source_name', { type: 'text' })], diff --git a/frontend/src/components/TableView/TableToolBar.tsx b/frontend/src/components/TableView/TableToolBar.tsx index d0410272..176fa900 100644 --- a/frontend/src/components/TableView/TableToolBar.tsx +++ b/frontend/src/components/TableView/TableToolBar.tsx @@ -201,25 +201,23 @@ export const TableToolBar = ({ return (
- {showContactButton && ( - - buttonText="Contact" noContext={true} /> + + {showContactButton && buttonText="Contact" noContext={true} />} + {showNewButton && ( + + )} + - {showNewButton && ( - - )} - - )} { - const { OccurrencesPage } = await import('../pages/OccurrencesPage') - return { Component: OccurrencesPage } - }, - }, { path: 'occurrence', lazy: async () => {