Skip to content

Commit

Permalink
Merge pull request #1462 from nickgros/PORTALS-3364
Browse files Browse the repository at this point in the history
PORTALS-3361, PORTALS-3364 - Elite Portal scrub
  • Loading branch information
nickgros authored Dec 16, 2024
2 parents 30ad953 + c2251e7 commit fc8b29d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion apps/portals/elportal/src/config/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export const projectsSql = 'SELECT * FROM syn51209786'
export const publicationsSql = 'SELECT * FROM syn51407023 ORDER BY "Year" DESC'
export const topPublicationsSql =
'SELECT * FROM syn51407023 ORDER BY "publicationDate" DESC LIMIT 6'
export const studiesSql = 'SELECT * FROM syn51523775 ORDER BY isFeatured DESC'
export const studiesSql =
'SELECT * FROM syn51523775 ORDER BY isFeatured DESC, dataStatus ASC, studyName ASC'
export const speciesSql = 'SELECT * FROM syn53406593 ORDER BY ItemOrder'
export const computationalSql = 'SELECT * FROM syn51469335'
export const upsetPlotSql = 'SELECT files, assay FROM syn51581771'
Expand Down
4 changes: 4 additions & 0 deletions apps/portals/elportal/src/config/synapseConfigs/dataTable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const DATA_TABLE_COLUMN_NAMES = {
ID: 'id',
STUDY: 'Study',
}
15 changes: 9 additions & 6 deletions apps/portals/elportal/src/pages/StudyDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
studiesSql,
} from '../config/resources'
import studyHeaderSvg from '../config/style/study-header.svg?url'
import { DATA_TABLE_COLUMN_NAMES } from '../config/synapseConfigs/dataTable'
import {
studiesRgbIndex,
studyCardConfiguration,
Expand Down Expand Up @@ -150,10 +151,11 @@ export const studyDetailsPageRoutes: RouteObject[] = [
shouldDeepLink={false}
defaultShowPlots={false}
lockedColumn={{
columnName: 'study',
columnName: DATA_TABLE_COLUMN_NAMES.STUDY,
value: value!,
}}
searchParams={{ study: value! }}
searchParams={{ [DATA_TABLE_COLUMN_NAMES.STUDY]: value! }}
fileIdColumnName={DATA_TABLE_COLUMN_NAMES.ID}
hideQueryCount
/>
)}
Expand All @@ -180,21 +182,22 @@ export const studyDetailsPageRoutes: RouteObject[] = [
showDownloadColumn: true,
columnLinks: [
{
matchColumnName: 'study',
matchColumnName: DATA_TABLE_COLUMN_NAMES.STUDY,
isMarkdown: false,
baseURL: 'Explore/Studies/DetailsPage',
URLColumnName: 'studyKey',
wrapValueWithParens: true,
wrapValueWithParens: false,
},
],
}}
sql={dataSql}
shouldDeepLink={false}
lockedColumn={{
columnName: 'study',
columnName: DATA_TABLE_COLUMN_NAMES.STUDY,
value: value!,
}}
searchParams={{ study: value! }}
fileIdColumnName={DATA_TABLE_COLUMN_NAMES.ID}
searchParams={{ [DATA_TABLE_COLUMN_NAMES.STUDY]: value! }}
hideQueryCount
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function FacetFilterControls(props: FacetFilterControlsProps) {

return (
<div className={`FacetFilterControls`}>
{combineRangeFacetConfig && (
{combineRangeFacetConfig && combinedRangeFacets.length >= 2 && (
<CombinedRangeFacetFilter
facetResults={combinedRangeFacets as FacetColumnResultRange[]}
label={combineRangeFacetConfig.label}
Expand Down

0 comments on commit fc8b29d

Please sign in to comment.