Commit 1db9b0ea authored by Matija Obreza's avatar Matija Obreza

Subset public UI updated

- Crop filters
- Subset card updated
parent ebfb1078
......@@ -143,7 +143,10 @@
"available": "Available"
},
"subsets": {
"title": "Title"
"title": "Title",
"crop": "Crop",
"institutes": "Institute code",
"description": "Description"
},
"wiews": {
"code": "Institute code",
......
......@@ -17,15 +17,13 @@ const SubsetCard = ({subset, complete = false, ...other}: { subset: Subset, comp
<CardContent>
<Markdown className="mb-20" firstParagraph={ !complete } source={ subset.description } />
<Properties>
<PropertiesItem title="Publisher">{ subset.publisher }</PropertiesItem>
<PropertiesItem title="License">{ subset.rights }</PropertiesItem>
{ complete && <PropertiesItem title="Creation date"><McpdDate value={ subset.date }/></PropertiesItem> }
{ complete && <PropertiesItem title="Source">{ subset.source }</PropertiesItem> }
{ subset.crops && subset.crops.length > 0 && <PropertiesItem title="Crops"><CropChips crops={ subset.crops }/></PropertiesItem> }
<PropertiesItem title="Number of accessions"><Number value={ subset.accessionCount } /></PropertiesItem>
<PropertiesItem title="Institute"><InstituteLink to={ subset.institute }>{ subset.institute.fullName }</InstituteLink></PropertiesItem>
{ complete && <PropertiesItem title="Publisher">{ subset.publisher }</PropertiesItem> }
{ complete && <PropertiesItem title="License">{ subset.rights }</PropertiesItem> }
{ subset.crops && subset.crops.length > 0 && <PropertiesItem title="Crops"><CropChips crops={ subset.crops }/></PropertiesItem> }
{ complete && <PropertiesItem title="Creation date"><McpdDate value={ subset.date }/></PropertiesItem> }
{ complete && <PropertiesItem title="Source">{ subset.source }</PropertiesItem> }
</Properties>
</CardContent>
......
......@@ -7,6 +7,7 @@ import FiltersBlock from 'ui/common/filter/FiltersBlock';
import CollapsibleComponentSearch from 'ui/common/filter/CollapsibleComponentSearch';
import StringFilter from 'ui/common/filter/StringFilter';
import StringArrFilter from 'ui/common/filter/StringArrFilter';
import CropFilter from 'ui/genesys/crop/CropFilter';
const SubsetFilters = ({handleSubmit, initialValues, initialize, ...other}) => {
// console.log('SubsetFilters', initialValues);
......@@ -17,6 +18,9 @@ const SubsetFilters = ({handleSubmit, initialValues, initialize, ...other}) => {
<StringFilter name="description" searchType="contains" label="Description" placeholder="Subset description"/>
<StringArrFilter name="institutes" label="Institute" placeholder="MEX002"/>
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title="Crop">
<CropFilter />
</CollapsibleComponentSearch>
</FiltersBlock>
);
};
......
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