From bcd2c4782df548a0088fab01da3f8365e702b1b8 Mon Sep 17 00:00:00 2001 From: Gemma Date: Thu, 4 Jan 2024 16:58:40 +0100 Subject: [PATCH] form mode variants improved --- frontend/src/App.css | 38 ++++++++++---- .../GenomicVariations/VariantsResults.js | 50 ++++++++++++++++--- frontend/src/components/Layout/Layout.js | 21 +++++--- .../components/Layout/LayoutVariantsTable.css | 6 ++- frontend/src/components/NavBar/Navbar.css | 19 ++++--- 5 files changed, 101 insertions(+), 33 deletions(-) diff --git a/frontend/src/App.css b/frontend/src/App.css index 08ec597..5c90ee0 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -38,8 +38,8 @@ html { font-variant-caps: all-petite-caps; } -.modeVariants:hover h2{ - color: rgb(236, 149, 0)!important; +.modeVariants:hover h2 { + color: rgb(236, 149, 0) !important; } .variantsFilters { @@ -196,11 +196,12 @@ html { } .inputVariants { - height: 18px; + height: 20px; border: 1.5px solid #dfdfdf; border-radius: 2px; margin-bottom: 30px; - font-size: 14.5px; + font-size: 12.5px; + padding: 5px; } .labelVariants { @@ -362,11 +363,10 @@ html { } .buttonVariants { - margin-top: 12px; - margin-bottom: 20px; - box-shadow: rgba(0, 0, 0, 0.25) 0px 1px 1px, - rgba(179, 179, 179, 0.22) 0px 1px 1px; - padding: 7px; + margin-top: 9px; + margin-bottom: -14px; + box-shadow: rgba(0, 0, 0, 0.25) 0px 1px 1px, rgba(179, 179, 179, 0.22) 0px 1px 1px; + padding: 6px; cursor: pointer; } @@ -394,6 +394,26 @@ html { flex-direction: column; } +.sequenceExampleButton { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + border: solid #d6d5e1; + padding: 4px; + margin-left: 13px; + margin-bottom: 20px; + border-radius: 5px; + font-size: 10px; + box-shadow: 1px 1px 1px -1px #ffd8d8; + text-transform: uppercase; + color: rgba(12, 16, 64, 0.606); + font-weight: 700; +} +.sequenceExampleButton:hover{ + background-color: #3498db; + border: solid #3498db; +} + .divFlex { width: 168%; display: flex; diff --git a/frontend/src/components/GenomicVariations/VariantsResults.js b/frontend/src/components/GenomicVariations/VariantsResults.js index f419220..729ab38 100644 --- a/frontend/src/components/GenomicVariations/VariantsResults.js +++ b/frontend/src/components/GenomicVariations/VariantsResults.js @@ -492,14 +492,50 @@ function VariantsResults (props) { setBoolean(false) } else { res.data.response.resultSets.forEach((element, index) => { + console.log(res.data.response) if (element.id && element.id !== '') { - let arrayResultsPerDataset = [ - element.beaconId, - element.id, - element.exists, - element.resultsCount - ] - resultsPerDataset.push(arrayResultsPerDataset) + console.log(resultsPerDataset) + if (resultsPerDataset.length > 0) { + resultsPerDataset.forEach(element2 => { + console.log(element2[0]) + console.log(element.beaconId) + if (element2[0] === element.beaconId) { + element2[1].push(element.id) + element2[2].push(element.exists) + element2[3].push(element.resultsCount) + } else { + console.log('hola') + + let arrayResultsPerDataset = [ + element.beaconId, + [element.id], + [element.exists], + [element.resultsCount] + ] + let found = false + + console.log(arrayResultsPerDataset) + resultsPerDataset.forEach(element => { + if (element[0] === arrayResultsPerDataset[0]) { + found = true + } + console.log(found) + }) + if (found === false) { + resultsPerDataset.push(arrayResultsPerDataset) + } + } + }) + } else { + let arrayResultsPerDataset = [ + element.beaconId, + [element.id], + [element.exists], + [element.resultsCount] + ] + console.log(arrayResultsPerDataset) + resultsPerDataset.push(arrayResultsPerDataset) + } } if (element.id === undefined || element.id === '') { diff --git a/frontend/src/components/Layout/Layout.js b/frontend/src/components/Layout/Layout.js index 56032f3..8848ae5 100644 --- a/frontend/src/components/Layout/Layout.js +++ b/frontend/src/components/Layout/Layout.js @@ -373,6 +373,13 @@ function Layout (props) { setExpansionSection(true) } + const handleSequenceExample = e => { + setAssemblyId('hg19') + setAlternateBases('A') + setRefBases('G') + setStart('16050114') + } + useEffect(() => { if (props.collection === 'Individuals') { setPlaceholder('filtering term comma-separated, ID><=value') @@ -801,7 +808,7 @@ function Layout (props) { type='radio' name='tabset' id='tab1' - aria-controls='marzen' + aria-controls='sequence' /> @@ -809,7 +816,7 @@ function Layout (props) { type='radio' name='tabset' id='tab2' - aria-controls='rauchbier' + aria-controls='range' /> @@ -817,12 +824,14 @@ function Layout (props) { type='radio' name='tabset' id='tab3' - aria-controls='dunkles' + aria-controls='gene' />
-
+
+ +
-
+
-
+