diff --git a/frontend/src/App.css b/frontend/src/App.css index a203dae..d114fca 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -1315,8 +1315,8 @@ h5 { justify-content: center; align-items: center; z-index: 0; - height: 84px; - margin-top: -21px; + height: 73px; + margin-top: 11px; } .bulbLogo { diff --git a/frontend/src/components/Cohorts/Cohorts.js b/frontend/src/components/Cohorts/Cohorts.js index de252ae..18b6879 100644 --- a/frontend/src/components/Cohorts/Cohorts.js +++ b/frontend/src/components/Cohorts/Cohorts.js @@ -77,25 +77,33 @@ function Cohorts (props) { const fetchDataCohorts = async () => { try { let res = await axios.get(configData.API_URL + '/cohorts') + res.data.response.collections.forEach(element => { if (optionsCohorts.length > 0) { + let found = 0 optionsCohorts.forEach(cohort => { + found = 0 if (cohort.value === element.id) { - let obj = { - value: element.id + count, - label: element.id - } - setCount(count + 1) - element.id = element.id + count - optionsCohorts.push(obj) - } else { - let obj = { - value: element.id, - label: element.id - } - optionsCohorts.push(obj) + console.log(element.id) + found = 1 } }) + if (found === 0) { + let obj = { + value: element.id, + label: element.id + } + optionsCohorts.push(obj) + } + if (found === 1) { + let obj = { + value: element.id + count, + label: element.id + count + } + setCount(count + 1) + element.id = element.id + count + optionsCohorts.push(obj) + } } else { let obj = { value: element.id, @@ -103,7 +111,7 @@ function Cohorts (props) { } optionsCohorts.push(obj) } - + console.log(optionsCohorts) arrayCohorts.push(element) const timer = setTimeout(() => { setTriggerLayout(true) @@ -201,7 +209,7 @@ function Cohorts (props) { let entriesGeo = '' let valuesDiseases = '' let labelsDiseases = '' - + // for (var i = 0; i < res.data.response.collections.length; i++) { if (element2.eventGenders !== undefined) { sexs = element2.eventGenders.distribution.genders @@ -262,7 +270,7 @@ function Cohorts (props) { if (labelsEthnicities !== '') { setLabelsEthnicities(labelsEthnicities) } - + if (geoData !== '') { valuesGeo = Object.values(geoData) labelsGeo = Object.keys(geoData) diff --git a/frontend/src/components/Datasets/ResultsDatasets.css b/frontend/src/components/Datasets/ResultsDatasets.css index 26892ec..bd519ee 100644 --- a/frontend/src/components/Datasets/ResultsDatasets.css +++ b/frontend/src/components/Datasets/ResultsDatasets.css @@ -170,14 +170,25 @@ p a { justify-content: center; height: 100%; width: 100%; + margin-top: 7px; + margin-bottom: 7px; +} + +.resultSetsContainer h5 { + /* padding: 0px; */ + margin-top: 6px !important; + margin-bottom: 6px !important; + margin-right: 0px; + margin-left: 5px; } .resultSetsContainer h6 { - background: #86e4a8; border-radius: 2px; width: fit-content !important; margin-left: 5px; padding: 3px; + margin-top: 0px; + margin-bottom: 0px; } .tittleResults h2 { diff --git a/frontend/src/components/FilteringTerms/FilteringTerms.css b/frontend/src/components/FilteringTerms/FilteringTerms.css index 025b070..7a6af6e 100644 --- a/frontend/src/components/FilteringTerms/FilteringTerms.css +++ b/frontend/src/components/FilteringTerms/FilteringTerms.css @@ -1,11 +1,11 @@ .search-box { - margin: 10px; + margin-top: 10px; + margin-bottom: 10px; width: 100%; } .search-tr { display: flex; - width: 40%; } thead { @@ -23,7 +23,7 @@ thead { .thead2 { position: sticky; - top: 73.6px; + top: 61.4px; z-index: 2; } @@ -36,8 +36,11 @@ thead { .tableWrapper { height: 100vh; - width: 90vw; + width: 95vw; overflow: scroll; + display: flex; + + justify-content: center; } .generalContainer { @@ -214,14 +217,14 @@ thead { } .searchTermInput { - margin: 10px; - width: 90%; + margin: 5px; + width: 60%; height: 28px; } .searchTermInput1 { - margin: 10px; - width: 90%; + margin: 5px; + width: 60%; height: 28px; } @@ -231,8 +234,8 @@ tr { } .terms1 { - background-color: #efedf4; - border-bottom: solid #8985c1; + background-color: #e7eef5; + border-bottom: solid #3d72a6; } .checkbox { diff --git a/frontend/src/components/FilteringTerms/FilteringTerms.js b/frontend/src/components/FilteringTerms/FilteringTerms.js index 240b9c3..198a2ec 100644 --- a/frontend/src/components/FilteringTerms/FilteringTerms.js +++ b/frontend/src/components/FilteringTerms/FilteringTerms.js @@ -27,6 +27,7 @@ function FilteringTerms (props) { const [trigger, setTrigger] = useState(false) + const [hide, setHide] = useState(true) const remove = tag => { setSelected(selected.filter(t => t.value !== tag.value)) @@ -230,7 +231,7 @@ function FilteringTerms (props) { label: infoValue[0], value: infoValue[0] } - + selected.push(newTag) } @@ -276,7 +277,6 @@ function FilteringTerms (props) { } const handleCheck2 = e => { - if (e.target.checked === false) { let newValueChosen = valueChosen.filter(valor => valor !== e.target.value) setValueChosen(newValueChosen) @@ -345,53 +345,57 @@ function FilteringTerms (props) { - - -
- -
- - - - -
- -
- - + {hide === false && ( + + +
+ +
+ + + )} + {hide === false && ( + + +
+ +
+ + + )} term label - type - scopes + {hide === false && type} + {hide === false && scopes} {props.filteringTerms.data !== undefined && @@ -436,16 +440,20 @@ function FilteringTerms (props) { - )} - {term.type} + {hide === false && ( + {term.type} + )} - - {term.scopes !== undefined && - term.scopes.map((term2, index) => { - return index < term.scopes.length - 1 - ? term2 + '' + ',' - : term2 + '' - })} - + {hide === false && ( + + {term.scopes !== undefined && + term.scopes.map((term2, index) => { + return index < term.scopes.length - 1 + ? term2 + '' + ',' + : term2 + '' + })} + + )} )} {index % 2 == !0 && ( @@ -484,15 +492,19 @@ function FilteringTerms (props) { - )} - {term.type} + {hide === false && ( + {term.type} + )} - - {term.scopes.map((term2, index) => { - return index < term.scopes.length - 1 - ? term2 + '' + ',' - : term2 + '' - })} - + {hide === false && ( + + {term.scopes.map((term2, index) => { + return index < term.scopes.length - 1 + ? term2 + '' + ',' + : term2 + '' + })} + + )} )} diff --git a/frontend/src/components/Individuals/Individuals.css b/frontend/src/components/Individuals/Individuals.css index 62d6862..1bc1400 100644 --- a/frontend/src/components/Individuals/Individuals.css +++ b/frontend/src/components/Individuals/Individuals.css @@ -23,6 +23,14 @@ margin: 0px !important; } +.granularityActive { + color: rgb(92, 165, 211) !important; + font-size: 14px; +} +.granularityNoActive { + color: rgb(222, 82, 82) !important; + font-size: 14px; +} .measuresContainer { display: flex; } @@ -94,11 +102,6 @@ h4 { margin-left: 10px; } -.selectGranularity h5 { - font-size: 14px; - color: #8985c1; -} - .selectGranularity h4 { font-size: 14px; } @@ -118,7 +121,6 @@ h4 { .results { flex-wrap: wrap; justify-content: center; - } .typeResults { diff --git a/frontend/src/components/Individuals/IndividualsResults.js b/frontend/src/components/Individuals/IndividualsResults.js index 0dca556..60f70f5 100644 --- a/frontend/src/components/Individuals/IndividualsResults.js +++ b/frontend/src/components/Individuals/IndividualsResults.js @@ -438,7 +438,13 @@ function IndividualsResults (props) {

Granularity: