Commit 03cd229d authored by Matija Obreza's avatar Matija Obreza

Merge branch '706-missing-term-statistics-from-es' into 'master'

Missing term statistics from ES

Closes #711 and #706

See merge request genesys-pgr/genesys-ui!689
parents b0c408d7 6753d5ee
......@@ -823,7 +823,9 @@
},
"aegisStatus": {
"0": "Accession is not part of the European Collection",
"1": "Accession is part of the European Collection"
"1": "Accession is part of the European Collection",
"true": "Accession is part of the European Collection",
"false": "Accession is not part of the European Collection"
},
"coll": {
"collCode": "Collecting institute code",
......
......@@ -384,6 +384,8 @@
"null": "Status not provided"
},
"aegisStatus": {
"true": "Accession is part of the European Collection",
"false": "Accession is not part of the European Collection",
"1": "Accession is part of the European Collection",
"0": "Accession is not part of the European Collection"
},
......
......@@ -51,7 +51,7 @@ class AccessionOverviewSection extends React.Component<IAccessionOverviewSection
case 'available':
case 'mlsStatus':
case 'aegis':
_.set(updatedFilter, property, term === '1' ? true : false);
_.set(updatedFilter, property, term === 'true');
break;
// set
......
......@@ -64,13 +64,13 @@ class BooleanArrFilter extends React.Component<IBooleanArrFilter, any> {
private getTermsValue = (val) => {
switch (val) {
case 'true':
return this.props.terms.get('1');
return this.props.terms.get('true');
case 'false':
return this.props.terms.get('0');
return this.props.terms.get('false');
case 'NULL':
return this.props.terms.get('missing') || '0';
return this.props.terms.get('missing') || 'false';
default:
return ((this.props.terms.get('1') || 0) + (this.props.terms.get('0') || 0) + (this.props.terms.get('missing') || 0)) || '0';
return ((this.props.terms.get('true') || 0) + (this.props.terms.get('false') || 0) + (this.props.terms.get('missing') || 0)) || 'false';
}
}
......
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