Skip to content

Commit

Permalink
resultSets parameters fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma committed Dec 7, 2023
1 parent ed55a28 commit 66e410e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function VariantsResults (props) {
query: {
requestParameters: requestParameters,
filters: [],
includeResultsetResponses: 'HIT',
includeResultsetResponses: `${props.resultSets}`,
pagination: {
skip: 0,
limit: 0
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/components/Individuals/IndividualsResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ function IndividualsResults (props) {
}
}
} catch (error) {
setError('Error. Please retry')
setTimeOut(false)
setError('Connection error. Please retry')
setTimeOut(true)
console.log(error)
}
}
Expand Down Expand Up @@ -362,7 +362,7 @@ function IndividualsResults (props) {
<div>
<div>
{' '}
{timeOut && (
{timeOut && error !== 'Connection error. Please retry' && (
<div>
<div className='selectGranularity'>
<h4>Granularity:</h4>
Expand All @@ -378,6 +378,9 @@ function IndividualsResults (props) {
</div>
</div>
)}
{timeOut && error === 'Connection error. Please retry' && (
<h3>&nbsp; {error} </h3>
)}
{show3 && logInRequired === false && !error && (
<div>
<TableResultsIndividuals
Expand Down
56 changes: 51 additions & 5 deletions frontend/src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function Layout (props) {
const [arrayFilteringTermsQE, setArrayFilteringTermsQE] = useState([])

const [resultSet, setResultset] = useState('HIT')
const [resultSetAux, setResultsetAux] = useState('HIT')

const [descendantTerm, setDescendantTerm] = useState('true')

Expand Down Expand Up @@ -436,9 +437,13 @@ function Layout (props) {
event.preventDefault()

setIsSub(true)

setResultsetAux(resultSet)
setQueryAux(query)

console.log(resultSet)
console.log(resultSetAux)
if (resultSet !== resultSetAux) {
setTriggerQuery(!triggerQuery)
}
if (queryAux !== query) {
setTriggerQuery(!triggerQuery)
}
Expand Down Expand Up @@ -660,7 +665,7 @@ function Layout (props) {
<label>
<h2>Include Resultset Responses</h2>
</label>
<MultiSwitch
{resultSet === 'HIT' && <MultiSwitch
texts={['HIT', 'MISS', 'NONE', 'ALL']}
selectedSwitch={0}
bgColor={'white'}
Expand All @@ -673,7 +678,49 @@ function Layout (props) {
height={'23px'}
fontSize={'12px'}
eachSwitchWidth={55}
></MultiSwitch>
></MultiSwitch>}
{resultSet === 'MISS' && <MultiSwitch
texts={['HIT', 'MISS', 'NONE', 'ALL']}
selectedSwitch={1}
bgColor={'white'}
onToggleCallback={onToggle2}
fontColor={'black'}
selectedFontColor={'white'}
border='0'
selectedSwitchColor='#e29348'
borderWidth='1'
height={'23px'}
fontSize={'12px'}
eachSwitchWidth={55}
></MultiSwitch>}
{resultSet === 'NONE' && <MultiSwitch
texts={['HIT', 'MISS', 'NONE', 'ALL']}
selectedSwitch={2}
bgColor={'white'}
onToggleCallback={onToggle2}
fontColor={'black'}
selectedFontColor={'white'}
border='0'
selectedSwitchColor='#e29348'
borderWidth='1'
height={'23px'}
fontSize={'12px'}
eachSwitchWidth={55}
></MultiSwitch>}
{resultSet === 'ALL' && <MultiSwitch
texts={['HIT', 'MISS', 'NONE', 'ALL']}
selectedSwitch={3}
bgColor={'white'}
onToggleCallback={onToggle2}
fontColor={'black'}
selectedFontColor={'white'}
border='0'
selectedSwitchColor='#e29348'
borderWidth='1'
height={'23px'}
fontSize={'12px'}
eachSwitchWidth={55}
></MultiSwitch>}
</div>
<div className='advSearch-module'>
<label>
Expand Down Expand Up @@ -750,7 +797,6 @@ function Layout (props) {
name='tabset'
id='tab1'
aria-controls='marzen'

/>
<label for='tab1'>Sequence queries</label>

Expand Down

0 comments on commit 66e410e

Please sign in to comment.