From c3cce60cca215f9a29848466d027d961232f9a54 Mon Sep 17 00:00:00 2001 From: Qi-Xuan Lu Date: Thu, 18 Jan 2024 15:10:43 -0500 Subject: [PATCH] fix pilltags, apis, and select --- .../src/generated/CBioPortalAPIInternal.ts | 4 +- src/pages/studyView/UserSelections.tsx | 63 ++++++++++--------- .../geneLevelSelection/GeneLevelSelection.tsx | 36 ++++++----- src/pages/studyView/tabs/SummaryTab.tsx | 5 +- 4 files changed, 61 insertions(+), 47 deletions(-) diff --git a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts index 79889c7c184..a56a6560e51 100644 --- a/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts +++ b/packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts @@ -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) { @@ -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 = {}; diff --git a/src/pages/studyView/UserSelections.tsx b/src/pages/studyView/UserSelections.tsx index d6763d23024..17a75a217ea 100644 --- a/src/pages/studyView/UserSelections.tsx +++ b/src/pages/studyView/UserSelections.tsx @@ -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'; @@ -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 ( + 1} + /> + ); + } + ); + acc.push(
{ - return ( - - {chartMeta.displayName} - , - this.groupedMutationDataFilters( - dataFilterValues, - this.props - .updateMutationDataFilter, - chartMeta - ), - ]} - operation=":" - group={ - dataFilterValues.length > 1 - } - /> - ); - } - )} - operation={'and'} + components={[ + + {chartMeta.displayName} + , + 1} + />, + ]} + operation={':'} group={false} />
diff --git a/src/pages/studyView/addChartButton/geneLevelSelection/GeneLevelSelection.tsx b/src/pages/studyView/addChartButton/geneLevelSelection/GeneLevelSelection.tsx index 647a97507c4..33d06ee042d 100644 --- a/src/pages/studyView/addChartButton/geneLevelSelection/GeneLevelSelection.tsx +++ b/src/pages/studyView/addChartButton/geneLevelSelection/GeneLevelSelection.tsx @@ -265,7 +265,8 @@ export default class GeneLevelSelection extends React.Component<
- {this.selectedOption && - this.subOptions - .map(option => option.profileType) - .includes( - this.selectedOption.alterationType - ) && ( - - )}
+
+ {this.selectedOption && + this.subOptions + .map(option => option.profileType) + .includes( + this.selectedOption.alterationType + ) && ( + + )} +
+ {/*
*/} diff --git a/src/pages/studyView/tabs/SummaryTab.tsx b/src/pages/studyView/tabs/SummaryTab.tsx index f66022453be..f689ec22bd0 100644 --- a/src/pages/studyView/tabs/SummaryTab.tsx +++ b/src/pages/studyView/tabs/SummaryTab.tsx @@ -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]: () => ({