Skip to content

Commit

Permalink
EC-142: demo example participant table
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Jun 22, 2023
1 parent a381c8c commit 879af73
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions apps/portals/src/configurations/elportal/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const studiesSql = 'SELECT * FROM syn51209885 ORDER BY isFeatured DESC'
export const speciesSql = 'SELECT * FROM syn51449110 ORDER BY ItemOrder'
export const computationalSql = 'SELECT * FROM syn51469335'
export const upsetPlotSql = 'SELECT files, assay FROM syn51581771'
export const cohortBuilderSql = 'SELECT * FROM syn51714515'

export const defaultSearchConfiguration = {
fullTextSearchHelpURL: 'https://help.eliteportal.org/help/search-tips',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
import { SynapseConfig } from 'types/portal-config'
import { dataSql, defaultSearchConfiguration } from '../resources'
import { cohortBuilderSql, defaultSearchConfiguration } from '../resources'
import { displayToast } from 'synapse-react-client'

const rgbIndex = 1

const cohortbuilder: SynapseConfig = {
name: 'QueryWrapperPlotNav',
props: {
rgbIndex,
name: 'Data',
name: 'Participants',
// showExportToCavatica: true,
visibleColumnCount: 10,
facetsToPlot: ['diagnosis', 'sex'],
tableConfiguration: {
showAccessColumn: true,
showDownloadColumn: true,
showAccessColumn: false,
showDownloadColumn: false,
isRowSelectionVisible: true,
columnLinks: [
{
matchColumnName: 'study',
isMarkdown: false,
baseURL: 'Explore/Studies/DetailsPage',
URLColumnName: 'studyKey',
wrapValueWithParens: true,
wrapValueWithParens: false,
},
],
},
sql: `${dataSql} where study='invalidstudyname'`,
customControls: [
{
buttonText: 'View files in selection',
onClick: (event) => {
displayToast(
`TODO: pass the ${event.selectedRows?.length} selected participant ID(s) to another configuration of the same VirtualTable, where participant data is shown in aggregate`,
)
console.log(event)
},
},
],
sql: cohortBuilderSql,
shouldDeepLink: true,
searchConfiguration: defaultSearchConfiguration,
},
Expand Down

0 comments on commit 879af73

Please sign in to comment.