Commit 19e7f8df authored by Matija Obreza's avatar Matija Obreza

Merge branch 'ui-for-server-549' into 'master'

Accession Overview: filter by GRIN taxon

See merge request genesys-pgr/genesys-ui!724
parents 7801ef36 734cb1a9
......@@ -22,6 +22,8 @@ class TaxonomyFilter {
public taxonName?: StringFilter;
public overrides?: boolean;
public grin?: boolean;
public grinTaxonName?: string[];
public grinCurrentName?: string[];
}
......
......@@ -109,7 +109,9 @@
"species": "Specific epithet",
"genusSpecies": "Species",
"subtaxa": "Subtaxon",
"synonyms": "Synonyms"
"synonyms": "Synonyms",
"grinTaxonName": "GRIN taxon",
"grinCurrentName": "Current GRIN taxon"
},
"sgsv": "Backup in SGSV",
"mlsStatus": "MLS",
......
......@@ -45,6 +45,8 @@ class AccessionOverviewSection extends React.Component<IAccessionOverviewSection
case 'taxonomy.genus':
case 'taxonomy.species':
case 'taxonomy.genusSpecies':
case 'taxonomy.grinTaxonName':
case 'taxonomy.grinCurrentName':
case 'storage':
_.set(updatedFilter, property, _.concat(_.get(updatedFilter, property), term).filter((x) => x != null));
break;
......@@ -167,7 +169,7 @@ class AccessionOverviewSection extends React.Component<IAccessionOverviewSection
{ overviewsTerms && overviewsTerms.get('taxonomy.grinTaxonomySpecies.name') &&
<PropertiesCard
propertiesList={overviewsTerms.get('taxonomy.grinTaxonomySpecies.name').map((term) => ({title: term.term, value: term.count}))}
propertiesList={overviewsTerms.get('taxonomy.grinTaxonomySpecies.name').map((term) => ({title: term.term, value: filterByTerm('taxonomy.grinTaxonName', term, term.count)}))}
title={t(`accessions.common.overview.taxonomy grinTaxonomySpecies`)}
small
propertyItemProps={{numeric: true, classes: {propertiesRowLabel: 'font-italic'}}}
......@@ -175,7 +177,7 @@ class AccessionOverviewSection extends React.Component<IAccessionOverviewSection
}
{ overviewsTerms && overviewsTerms.get('taxonomy.currentTaxonomySpecies.name') &&
<PropertiesCard
propertiesList={overviewsTerms.get('taxonomy.currentTaxonomySpecies.name').map((term) => ({title: term.term, value: term.count}))}
propertiesList={overviewsTerms.get('taxonomy.currentTaxonomySpecies.name').map((term) => ({title: term.term, value: filterByTerm('taxonomy.grinCurrentName', term, term.count)}))}
title={t(`accessions.common.overview.taxonomy currentTaxonomySpecies`)}
small
propertyItemProps={{numeric: true, classes: {propertiesRowLabel: 'font-italic'}}}
......
......@@ -109,7 +109,9 @@
"species": "Specific epithet",
"genusSpecies": "Species",
"subtaxa": "Subtaxon",
"synonyms": "Synonyms"
"synonyms": "Synonyms",
"grinTaxonName": "GRIN taxon",
"grinCurrentName": "Current GRIN taxon"
},
"sgsv": "Backup in SGSV",
"mlsStatus": "MLS",
......
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