Skip to content

Commit

Permalink
fix pilltags, apis, and select
Browse files Browse the repository at this point in the history
  • Loading branch information
qlu-cls committed Jan 18, 2024
1 parent 1db8774 commit c3cce60
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4559,7 +4559,7 @@ export default class CBioPortalAPIInternal {
$queryParameters ? : any
}): string {
let queryParameters: any = {};
let path = '/mutation-data-counts/fetch';
let path = '/api/mutation-data-counts/fetch';

if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
Expand All @@ -4585,7 +4585,7 @@ export default class CBioPortalAPIInternal {
const domain = parameters.$domain ? parameters.$domain : this.domain;
const errorHandlers = this.errorHandlers;
const request = this.request;
let path = '/mutation-data-counts/fetch';
let path = '/api/mutation-data-counts/fetch';
let body: any;
let queryParameters: any = {};
let headers: any = {};
Expand Down
63 changes: 34 additions & 29 deletions src/pages/studyView/UserSelections.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import _ from 'lodash';
import _, { filter } from 'lodash';
import { observer } from 'mobx-react';
import { computed, makeObservable, runInAction } from 'mobx';
import styles from './styles.module.scss';
Expand Down Expand Up @@ -302,37 +302,42 @@ export default class UserSelections extends React.Component<
);
const chartMeta = this.props.attributesMetaSet[uniqueKey];
if (chartMeta) {
const filters = mutationDataFilter.values.map(
dataFilterValues => {
return (
<GroupLogic
components={[
this.groupedMutationDataFilters(
dataFilterValues,
this.props.updateMutationDataFilter,
chartMeta
),
]}
operation=":"
group={dataFilterValues.length > 1}
/>
);
}
);

acc.push(
<div className={styles.parentGroupLogic}>
<GroupLogic
components={mutationDataFilter.values.map(
dataFilterValues => {
return (
<GroupLogic
components={[
<span
className={
styles.filterClinicalAttrName
}
>
{chartMeta.displayName}
</span>,
this.groupedMutationDataFilters(
dataFilterValues,
this.props
.updateMutationDataFilter,
chartMeta
),
]}
operation=":"
group={
dataFilterValues.length > 1
}
/>
);
}
)}
operation={'and'}
components={[
<span
className={
styles.filterClinicalAttrName
}
>
{chartMeta.displayName}
</span>,
<GroupLogic
components={filters}
operation={'and'}
group={filters.length > 1}
/>,
]}
operation={':'}
group={false}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ export default class GeneLevelSelection extends React.Component<
<div
style={{
flex: 1,
marginRight: 15,
width: '50%',
marginRight: '5%',
}}
>
<ReactSelect
Expand All @@ -274,31 +275,36 @@ export default class GeneLevelSelection extends React.Component<
options={this.molecularProfileOptions}
isClearable={false}
isSearchable={false}
style={{ width: '100%' }}
/>
{this.selectedOption &&
this.subOptions
.map(option => option.profileType)
.includes(
this.selectedOption.alterationType
) && (
<ReactSelect
value={this.selectedSubOption}
onChange={this.handleSubSelect}
options={this.subOptions}
isClearable={false}
isSearchable={false}
/>
)}
</div>
<button
disabled={this.isQueryInvalid || this.hasOQL}
className="btn btn-primary btn-sm"
data-test="GeneLevelSelectionSubmitButton"
onClick={this.onAddChart}
style={{ width: '25%' }}
>
{this.props.submitButtonText}
</button>
</div>
<div style={{ width: '70%', marginTop: '5px' }}>
{this.selectedOption &&
this.subOptions
.map(option => option.profileType)
.includes(
this.selectedOption.alterationType
) && (
<ReactSelect
value={this.selectedSubOption}
onChange={this.handleSubSelect}
options={this.subOptions}
isClearable={false}
isSearchable={false}
/>
)}
</div>

{/* <div className={styles.operations}>
</div> */}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/studyView/tabs/SummaryTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ export class StudySummaryTab extends React.Component<
commonProps: () => ({
onChangeChartType: this.handlers.onChangeChartType,
getData: (dataType?: DataType) =>
this.store.getChartDownloadableData(chartMeta, dataType),
this.store.getChartDownloadableData(
chartMeta,
dataType
),
downloadTypes: ['Summary Data', 'Full Data', 'SVG', 'PDF'],
}),
[ChartMetaDataTypeEnum.CUSTOM_DATA]: () => ({
Expand Down

0 comments on commit c3cce60

Please sign in to comment.