Commit a5e831ef authored by Matija Obreza's avatar Matija Obreza
Browse files

Filter by full species name (not just epithet)

parent 53edc0d5
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
}, },
"taxa": { "taxa": {
"genus": "Genus", "genus": "Genus",
"species": "Species", "species": "Specific epithet",
"subtaxa": "Subtaxa" "subtaxa": "Subtaxa"
}, },
"owner": { "owner": {
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
}, },
"taxonomy": { "taxonomy": {
"genus": "Genus", "genus": "Genus",
"species": "Species", "species": "Specific epithet",
"genusSpecies": "Species",
"subtaxa": "Subtaxon" "subtaxa": "Subtaxon"
}, },
"sgsv": "Backup in SGSV", "sgsv": "Backup in SGSV",
...@@ -524,7 +525,7 @@ ...@@ -524,7 +525,7 @@
}, },
"taxonomy": "Taxonomy", "taxonomy": "Taxonomy",
"genus": "Genus", "genus": "Genus",
"species": "Species", "species": "Specific epithet",
"doi": "DOI", "doi": "DOI",
"sampStat": "Biological status of accession", "sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage", "storageType": "Type of germplasm storage",
...@@ -664,7 +665,8 @@ ...@@ -664,7 +665,8 @@
"instituteCode": "Institute code", "instituteCode": "Institute code",
"taxonomy": "Taxonomy", "taxonomy": "Taxonomy",
"genus": "Genus", "genus": "Genus",
"species": "Species", "genusSpecies": "Species",
"species": "Specific epithet",
"doi": "DOI", "doi": "DOI",
"sampStat": "Biological status of accession", "sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage", "storageType": "Type of germplasm storage",
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
}, },
"taxonomy": "Taxonomy", "taxonomy": "Taxonomy",
"genus": "Genus", "genus": "Genus",
"species": "Species", "species": "Specific epithet",
"doi": "DOI", "doi": "DOI",
"sampStat": "Biological status of accession", "sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage", "storageType": "Type of germplasm storage",
...@@ -314,7 +314,8 @@ ...@@ -314,7 +314,8 @@
"instituteCode": "Institute code", "instituteCode": "Institute code",
"taxonomy": "Taxonomy", "taxonomy": "Taxonomy",
"genus": "Genus", "genus": "Genus",
"species": "Species", "genusSpecies": "Species",
"species": "Specific epithet",
"doi": "DOI", "doi": "DOI",
"sampStat": "Biological status of accession", "sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage", "storageType": "Type of germplasm storage",
......
...@@ -97,6 +97,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> { ...@@ -97,6 +97,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> {
case 'countryOfOrigin.code3': case 'countryOfOrigin.code3':
case 'taxonomy.genus': case 'taxonomy.genus':
case 'taxonomy.species': case 'taxonomy.species':
case 'taxonomy.genusSpecies':
case 'storage': case 'storage':
_.set(updatedFilter, property, _.concat(_.get(updatedFilter, property), term).filter(x => x != null)); _.set(updatedFilter, property, _.concat(_.get(updatedFilter, property), term).filter(x => x != null));
break; break;
...@@ -203,7 +204,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> { ...@@ -203,7 +204,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> {
<PropertiesCard propertiesList={ overviewsTerms.get('taxonomy.genus').map((term) => ({title: term.term, value: filterByTerm('taxonomy.genus', term, term.count) })) } title={ t(`accessions.common.overview.taxonomy genus`) } small propertyItemProps={ { numeric: true, classes: {propertiesRowLabel: 'font-italic'} } } /> <PropertiesCard propertiesList={ overviewsTerms.get('taxonomy.genus').map((term) => ({title: term.term, value: filterByTerm('taxonomy.genus', term, term.count) })) } title={ t(`accessions.common.overview.taxonomy genus`) } small propertyItemProps={ { numeric: true, classes: {propertiesRowLabel: 'font-italic'} } } />
} }
{ overviewsTerms && overviewsTerms.get('taxonomy.genusSpecies') && overviewsTerms.get('taxonomy.genusSpecies').length > 2 && { overviewsTerms && overviewsTerms.get('taxonomy.genusSpecies') && overviewsTerms.get('taxonomy.genusSpecies').length > 2 &&
<PropertiesCard propertiesList={ overviewsTerms.get('taxonomy.genusSpecies').map((term) => ({title: term.term, value: term.count })) } title={ t(`accessions.common.overview.taxonomy genusSpecies`) } small propertyItemProps={ { numeric: true, classes: {propertiesRowLabel: 'font-italic'} } } /> <PropertiesCard propertiesList={ overviewsTerms.get('taxonomy.genusSpecies').map((term) => ({title: term.term, value: filterByTerm('taxonomy.genusSpecies', term, term.count) })) } title={ t(`accessions.common.overview.taxonomy genusSpecies`) } small propertyItemProps={ { numeric: true, classes: {propertiesRowLabel: 'font-italic'} } } />
} }
{ overviewsTerms && overviewsTerms.get('sampStat') && overviewsTerms.get('sampStat').length > 2 && { overviewsTerms && overviewsTerms.get('sampStat') && overviewsTerms.get('sampStat').length > 2 &&
<PropertiesCard propertiesList={ overviewsTerms.get('sampStat') <PropertiesCard propertiesList={ overviewsTerms.get('sampStat')
......
...@@ -52,7 +52,20 @@ const AccessionFilters = ({handleSubmit, initialize, terms, crops, t, ...other}) ...@@ -52,7 +52,20 @@ const AccessionFilters = ({handleSubmit, initialize, terms, crops, t, ...other})
placeholder="Hordeum" placeholder="Hordeum"
classes={ {propertiesRowLabel: 'font-italic'} } classes={ {propertiesRowLabel: 'font-italic'} }
/> />
<StringArrFilter name="taxonomy.species" label={ t('accessions.common.species') } placeholder="vulgare"/> <StringArrFilter
name="taxonomy.genusSpecies"
terms={ terms && terms.get('taxonomy.genusSpecies') }
label={ t('accessions.common.genusSpecies') }
placeholder="Hordeum vulgare"
classes={ {propertiesRowLabel: 'font-italic'} }
/>
<StringArrFilter
name="taxonomy.species"
terms={ terms && terms.get('taxonomy.species') }
label={ t('accessions.common.species') }
placeholder="vulgare"
classes={ {propertiesRowLabel: 'font-italic'} }
/>
<StringFilter name="taxonomy.subtaxa" searchType="contains" label={ t('accessions.public.f.subtaxon') } placeholder=""/> <StringFilter name="taxonomy.subtaxa" searchType="contains" label={ t('accessions.public.f.subtaxon') } placeholder=""/>
</CollapsibleComponentSearch> </CollapsibleComponentSearch>
<CollapsibleComponentSearch title={ t('accessions.public.f.originOfMaterial') }> <CollapsibleComponentSearch title={ t('accessions.public.f.originOfMaterial') }>
......
...@@ -14,6 +14,7 @@ class TaxonomyFilter { ...@@ -14,6 +14,7 @@ class TaxonomyFilter {
public species?: string[]; public species?: string[];
public subtaxa?: StringFilter; public subtaxa?: StringFilter;
public version?: number[]; public version?: number[];
public genusSpecies?: string[];
} }
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
}, },
"taxa": { "taxa": {
"genus": "Genus", "genus": "Genus",
"species": "Species", "species": "Specific epithet",
"subtaxa": "Subtaxa" "subtaxa": "Subtaxa"
}, },
"owner": { "owner": {
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
}, },
"taxonomy": { "taxonomy": {
"genus": "Genus", "genus": "Genus",
"species": "Species", "species": "Specific epithet",
"genusSpecies": "Species",
"subtaxa": "Subtaxon" "subtaxa": "Subtaxon"
}, },
"sgsv": "Backup in SGSV", "sgsv": "Backup in SGSV",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment