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 @@
},
"taxa": {
"genus": "Genus",
"species": "Species",
"species": "Specific epithet",
"subtaxa": "Subtaxa"
},
"owner": {
......@@ -77,7 +77,8 @@
},
"taxonomy": {
"genus": "Genus",
"species": "Species",
"species": "Specific epithet",
"genusSpecies": "Species",
"subtaxa": "Subtaxon"
},
"sgsv": "Backup in SGSV",
......@@ -524,7 +525,7 @@
},
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"species": "Specific epithet",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
......@@ -664,7 +665,8 @@
"instituteCode": "Institute code",
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"genusSpecies": "Species",
"species": "Specific epithet",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
......
......@@ -172,7 +172,7 @@
},
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"species": "Specific epithet",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
......@@ -314,7 +314,8 @@
"instituteCode": "Institute code",
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"genusSpecies": "Species",
"species": "Specific epithet",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
......
......@@ -97,6 +97,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> {
case 'countryOfOrigin.code3':
case 'taxonomy.genus':
case 'taxonomy.species':
case 'taxonomy.genusSpecies':
case 'storage':
_.set(updatedFilter, property, _.concat(_.get(updatedFilter, property), term).filter(x => x != null));
break;
......@@ -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'} } } />
}
{ 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 &&
<PropertiesCard propertiesList={ overviewsTerms.get('sampStat')
......
......@@ -52,7 +52,20 @@ const AccessionFilters = ({handleSubmit, initialize, terms, crops, t, ...other})
placeholder="Hordeum"
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=""/>
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title={ t('accessions.public.f.originOfMaterial') }>
......
......@@ -14,6 +14,7 @@ class TaxonomyFilter {
public species?: string[];
public subtaxa?: StringFilter;
public version?: number[];
public genusSpecies?: string[];
}
......
......@@ -66,7 +66,7 @@
},
"taxa": {
"genus": "Genus",
"species": "Species",
"species": "Specific epithet",
"subtaxa": "Subtaxa"
},
"owner": {
......@@ -77,7 +77,8 @@
},
"taxonomy": {
"genus": "Genus",
"species": "Species",
"species": "Specific epithet",
"genusSpecies": "Species",
"subtaxa": "Subtaxon"
},
"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