Commit dd1ec45d authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza
Browse files

Accession browser with crop filter

parent 5b8b26d0
......@@ -330,6 +330,7 @@
}
},
"f": {
"crop": "Crop",
"filtersTitle": "Filter accessions",
"seqNumber": "Sequential number",
"subtaxon": "Subtaxon",
......
......@@ -11,6 +11,7 @@
}
},
"f": {
"crop": "Crop",
"filtersTitle": "Filter accessions",
"seqNumber": "Sequential number",
"subtaxon": "Subtaxon",
......
......@@ -12,6 +12,7 @@ import StringFilter from 'ui/common/filter/StringFilter';
import StringArrFilter from 'ui/common/filter/StringArrFilter';
import Accession from 'model/accession/Accession';
import DateFilter from 'ui/common/filter/DateFilter';
import CropFilter from 'crop/ui/c/CropFilter';
const AccessionFilters = ({handleSubmit, initialValues, initialize, t, ...other}) => {
// console.log('AccessionFilters', initialValues);
......@@ -28,6 +29,9 @@ const AccessionFilters = ({handleSubmit, initialValues, initialize, t, ...other}
<CollapsibleComponentSearch title={ t('common:f.dateSearch') }>
<DateFilter name="lastModifiedDate" label={ t('common:f.lastModifiedDate') }/>
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title={ t('accessions.public.f.crop') }>
<CropFilter/>
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title={ t('accessions.common.taxonomy') }>
<StringArrFilter name="taxa.genus" label={ t('accessions.common.genus') } placeholder="Hordeum"/>
<StringArrFilter name="taxa.species" label={ t('accessions.common.species') } placeholder="vulgare"/>
......
......@@ -84,7 +84,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
private applyCropFilter = () => {
const { shortName, applyFilters} = this.props;
const filter = { crop: shortName };
const filter = { crop: [ shortName ] };
applyFilters(filter);
}
......
......@@ -14,7 +14,7 @@ class AccessionFilter {
public available: boolean;
public createdBy: number[];
public createdDate: DateFilter;
public crop: string;
public crop?: string[];
public cropName: string;
public doi: string[];
public elevation: NumberFilter;
......
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