diff --git a/packages/bento-frontend/src/bento/dashboardTabData.js b/packages/bento-frontend/src/bento/dashboardTabData.js index 3a514c796..b801bb678 100644 --- a/packages/bento-frontend/src/bento/dashboardTabData.js +++ b/packages/bento-frontend/src/bento/dashboardTabData.js @@ -726,71 +726,6 @@ query fileOverview( } `; -export const GET_FILES_OVERVIEW_STRING_QUERY =` -query fileOverview( - $subject_ids: [String], - $file_ids: [String], - $programs: [String] , - $studies: [String] , - $diagnoses: [String] , - $rc_scores: [String] , - $tumor_sizes: [String] , - $chemo_regimen: [String] , - $tumor_grades: [String] , - $er_status: [String] , - $pr_status: [String] , - $endo_therapies: [String] , - $meno_status: [String] , - $tissue_type: [String], - $composition: [String], - $association: [String], - $file_type: [String], - $age_at_index: [Float], - $first: Int, - $offset: Int, - $order_by: String - $sort_direction: String ){ - fileOverview( - subject_ids: $subject_ids, - file_ids: $file_ids, - programs: $programs, - studies: $studies, - diagnoses: $diagnoses, - rc_scores: $rc_scores, - tumor_sizes: $tumor_sizes, - chemo_regimen: $chemo_regimen, - tumor_grades: $tumor_grades, - er_status: $er_status, - pr_status: $pr_status, - endo_therapies: $endo_therapies, - meno_status: $meno_status, - tissue_type: $tissue_type, - composition: $composition, - association: $association, - file_type: $file_type, - age_at_index: $age_at_index, - first: $first, - offset: $offset, - order_by: $order_by, - sort_direction: $sort_direction - ){ - file_id, - program_id, - file_name, - association, - file_description, - file_format, - file_size, - program, - arm, - acl, - subject_id, - sample_id, - diagnosis, - } -} -`; - export const GET_SAMPLES_OVERVIEW_QUERY = gql` query sampleOverview( $subject_ids: [String], @@ -855,70 +790,6 @@ query sampleOverview( } `; -export const GET_SAMPLES_OVERVIEW_STRING_QUERY =` -query sampleOverview( - $subject_ids: [String], - $sample_ids: [String], - $programs: [String] , - $studies: [String] , - $diagnoses: [String] , - $rc_scores: [String] , - $tumor_sizes: [String] , - $chemo_regimen: [String] , - $tumor_grades: [String] , - $er_status: [String] , - $pr_status: [String] , - $endo_therapies: [String] , - $meno_status: [String] , - $tissue_type: [String], - $composition: [String], - $association: [String], - $file_type: [String], - $age_at_index: [Float], - $first: Int, - $offset: Int, - $order_by: String - $sort_direction: String ){ - sampleOverview( - subject_ids: $subject_ids, - sample_ids: $sample_ids, - programs: $programs, - studies: $studies, - diagnoses: $diagnoses, - rc_scores: $rc_scores, - tumor_sizes: $tumor_sizes, - chemo_regimen: $chemo_regimen, - tumor_grades: $tumor_grades, - er_status: $er_status, - pr_status: $pr_status, - endo_therapies: $endo_therapies, - meno_status: $meno_status, - tissue_type: $tissue_type, - composition: $composition, - association: $association, - file_type: $file_type, - age_at_index: $age_at_index, - first: $first, - offset: $offset, - order_by: $order_by, - sort_direction: $sort_direction - ){ - sample_id, - subject_id, - program, - program_id, - arm, - diagnosis, - tissue_type, - tissue_composition, - sample_anatomic_site, - sample_procurement_method, - platform, - files - } -} -`; - export const GET_CASES_OVERVIEW_QUERY = gql` query subjectOverview( $subject_ids: [String], @@ -1207,9 +1078,8 @@ export const GET_FILE_IDS_FROM_FILE_NAME = gql` }`; // --------------- Tabs Table configuration -------------- -export const tabContainersOld = [ +export const tabContainers = [ { - name: 'Cases', dataField: 'dataCase', api: GET_CASES_OVERVIEW_QUERY, @@ -1219,46 +1089,31 @@ export const tabContainersOld = [ defaultSortField: 'subject_id', defaultSortDirection: 'asc', buttonText: 'Add Selected Files', - tabHeaderStyle:{selected:{ - background: '#d6f2ea', - color: '#10a075', - }}, - saveButtonDefaultStyle: { - color: '#fff', - backgroundColor: '#09A175', - opacity: '1', - border: '0px', - cursor: 'pointer', - }, - ActiveSaveButtonDefaultStyle: { - cursor: 'pointer', - opacity: 'unset', - border: 'unset', - }, - DeactiveSaveButtonDefaultStyle: { - opacity: '0.3', - cursor: 'auto', + tableID: 'case_tab_table', + extendedViewConfig: { + pagination: true, + manageViewColumns: false, }, columns: [ + { + cellType: cellTypes.CHECKBOX, + display: true, + role: cellTypes.CHECKBOX, + }, { dataField: 'subject_id', header: 'Case ID', - sort: 'asc', - link: '/case/{subject_id}', cellType: cellTypes.LINK, linkAttr : { rootPath: '/case', pathParams: ['subject_id'], }, - primary: true, display: true, tooltipText: 'sort', }, { dataField: 'program', header: 'Program Code', - sort: 'asc', - link: '/program/{program_id}', cellType: cellTypes.LINK, linkAttr : { rootPath: '/program', @@ -1266,19 +1121,18 @@ export const tabContainersOld = [ }, display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'program_id', header: 'Program ID', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'study_acronym', header: 'Arm', - sort: 'asc', - link: '/arm/{study_acronym}', cellType: cellTypes.LINK, linkAttr : { rootPath: '/arm', @@ -1286,72 +1140,73 @@ export const tabContainersOld = [ }, display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'diagnosis', header: 'Diagnosis', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'recurrence_score', header: 'Recurrence Score', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'tumor_size', header: 'Tumor Size (cm)', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'er_status', header: 'ER Status', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'pr_status', header: 'PR Status', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'age_at_index', header: 'Age (years)', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'survival_time', header: 'Survival (days)', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, + cellType: cellTypes.CUSTOM_ELEM, + displayEmpty: false, }, ], id: 'case_tab', - onRowsSelect: 'type1', - disableRowSelection: 'type1', tableID: 'case_tab_table', - selectableRows: true, tableDownloadCSV: customCasesTabDownloadCSV, tabIndex: '0', downloadFileName: 'Bento_Dashboard_cases_download', - headerPagination: true, - footerPagination: true, tableMsg: { noMatch: 'No Matching Records Found', }, - addAddFileAPI: GET_ALL_FILEIDS_FROM_CASESTAB_FOR_ADD_ALL_CART, - addSelectedIdAPI: GET_ALL_FILEIDS_CASESTAB_FOR_SELECT_ALL, + addFilesRequestVariableKey: 'subject_ids', + addFilesResponseKeys: ['fileIDsFromList'], + addAllFilesResponseKeys: ['subjectOverview', 'files'], + addAllFileQuery: GET_ALL_FILEIDS_FROM_CASESTAB_FOR_ADD_ALL_CART, + addSelectedFilesQuery: GET_ALL_FILEIDS_CASESTAB_FOR_SELECT_ALL, }, { name: 'Samples', @@ -1362,10 +1217,11 @@ export const tabContainersOld = [ dataKey: 'sample_id', defaultSortField: 'sample_id', defaultSortDirection: 'asc', - tabHeaderStyle:{selected:{ - background: '#cfedf9', - color: '#0dafec', - }}, + tableID: 'sample_tab_table', + extendedViewConfig: { + pagination: true, + manageViewColumns: false, + }, saveButtonDefaultStyle: { color: '#fff', backgroundColor: '#00AEEF', @@ -1382,19 +1238,22 @@ export const tabContainersOld = [ opacity: 'unset', border: 'unset', }, + columns: [ + { + cellType: cellTypes.CHECKBOX, + display: true, + role: cellTypes.CHECKBOX, + }, { dataField: 'sample_id', header: 'Sample ID', - sort: 'asc', - primary: true, display: true, tooltipText: 'sort', }, { dataField: 'subject_id', header: 'Case ID', - sort: 'asc', link: '/case/{subject_id}', cellType: cellTypes.LINK, linkAttr : { @@ -1403,98 +1262,96 @@ export const tabContainersOld = [ }, display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'program', header: 'Program Code', - sort: 'asc', - link: '/program/{program_id}', cellType: cellTypes.LINK, + tooltipText: 'sort', linkAttr : { rootPath: '/program', pathParams: ['program_id'], }, display: true, + role: cellTypes.DISPLAY, }, { dataField: 'program_id', header: 'Program ID', - sort: 'asc', display: false, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'arm', header: 'Arm', - sort: 'asc', link: '/arm/{arm}', cellType: cellTypes.LINK, linkAttr : { rootPath: '/arm', - pathParams: ['study_acronym'], + pathParams: ['arm'], }, display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'diagnosis', header: 'Diagnosis', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'tissue_type', header: 'Tissue Type', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'tissue_composition', header: 'Tissue Composition', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'sample_anatomic_site', header: 'Sample Anatomic Site', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'sample_procurement_method', header: 'Sample Procurement Method', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, { dataField: 'platform', header: 'platform', - sort: 'asc', display: true, tooltipText: 'sort', + role: cellTypes.DISPLAY, }, ], id: 'sample_tab', - onRowsSelect: 'type3', - disableRowSelection: 'type2', - buttonText: 'Add Selected Files', tableID: 'sample_tab_table', - selectableRows: true, tabIndex: '1', tableDownloadCSV: customSamplesTabDownloadCSV, downloadFileName: 'Bento_Dashboard_cases_download', - headerPagination: true, - footerPagination: true, tableMsg: { noMatch: 'No Matching Records Found', }, - addAddFileAPI: GET_ALL_FILEIDS_FROM_SAMPLETAB_FOR_ADD_ALL_CART, - addSelectedIdAPI: GET_ALL_FILEIDS_SAMPLESTAB_FOR_SELECT_ALL, + addFilesRequestVariableKey: 'sample_ids', + addFilesResponseKeys: ['fileIDsFromList'], + addAllFilesResponseKeys: ['sampleOverview', 'files'], + addAllFileQuery: GET_ALL_FILEIDS_FROM_SAMPLETAB_FOR_ADD_ALL_CART, + addSelectedFilesQuery: GET_ALL_FILEIDS_SAMPLESTAB_FOR_SELECT_ALL, }, { name: 'Files', @@ -1504,520 +1361,27 @@ export const tabContainersOld = [ defaultSortField: 'file_name', defaultSortDirection: 'asc', count: 'numberOfFiles', - buttonText: 'Add Selected Files', dataKey: 'file_name', - tabHeaderStyle:{selected:{ - background: '#f7d7f7', - color: '#c92ec7', - }}, - saveButtonDefaultStyle: { - color: '#fff', - backgroundColor: '#DC2FDA', - opacity: '1', - border: '0px', - cursor: 'pointer', - }, - DeactiveSaveButtonDefaultStyle: { - opacity: '0.3', - cursor: 'auto', - }, - ActiveSaveButtonDefaultStyle: { - cursor: 'pointer', - opacity: 'unset', - border: 'unset', + tableID: 'file_tab_table', + extendedViewConfig: { + pagination: true, + manageViewColumns: false, }, columns: [ { - dataField: 'file_name', - header: 'File Name', - sort: 'asc', - primary: true, - display: true, - tooltipText: 'sort', - }, - { - dataField: 'file_id', - header: 'File ID', - sort: 'asc', - display: false, - tooltipText: 'sort', - }, - { - dataField: 'association', - header: 'Association', - sort: 'asc', - display: true, - tooltipText: 'sort', - }, - { - dataField: 'file_description', - header: 'Description', - sort: 'asc', - display: true, - tooltipText: 'sort', - }, - { - dataField: 'file_format', - header: 'File Format', - sort: 'asc', + cellType: cellTypes.CHECKBOX, display: true, - tooltipText: 'sort', + role: cellTypes.CHECKBOX, }, { - dataField: 'file_size', - header: 'Size', - sort: 'asc', + dataField: 'file_name', + header: 'File Name', display: true, - formatBytes: true, tooltipText: 'sort', }, - { - dataField: 'acl', // This need to left empty if no data need to be displayed before file download icon - header: 'Access', - sort: 'asc', - display: true, - cellType: cellTypes.CUSTOM_ELEM, - downloadDocument: true, // To indicate that column is document donwload - documentDownloadProps: { - // Max file size needs to bin Bytes to seperate two support file preview and download - maxFileSize: 315, - // Tool top text for Unauthenticated users - toolTipTextUnauthenticated: 'Controlled access file', - // Tool top text for file download - toolTipTextFileDownload: 'Download a copy of this file', - // Tool top text for file preview - toolTipTextFilePreview: 'Because of its size and/or format, this file is unavailable for download and must be accessed via the My Files workflow', - // datafield where file file column exists in the table - fileSizeColumn: 'file_size', - // datafield where file file id exists in the table which is used to get file location - fileLocationColumn: 'file_id', - // datafield where file format exists in the table - fileFormatColumn: 'file_format', - // datafield where file case id exists in the table which is used to get file information - caseIdColumn: 'subject_id', - // Unauthenticated lock icon - iconUnauthenticated: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/bento/images/icons/svgs/Access_Lock.svg', - // file download icon - iconFileDownload: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/bento/images/icons/svgs/DocumentDownloadPDF.svg', - // file preview icon - iconFilePreview: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/bento/images/icons/svgs/DocumentDownloadCloud.svg', - // file viewer icon JBrowse - iconFileViewer: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/bento/images/icons/svgs/DocumentDownloadBAM.svg', - }, - tooltipText: 'sort', - }, - { - dataField: 'program', - header: 'Program Code', - sort: 'asc', - link: '/program/{program_id}', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/program', - pathParams: ['program_id'], - }, - display: true, - tooltipText: 'sort', - }, - { - dataField: 'program_id', - header: 'Program ID', - sort: 'asc', - display: false, - tooltipText: 'sort', - }, - { - dataField: 'arm', - header: 'Arm', - sort: 'asc', - link: '/arm/{arm}', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/arm', - pathParams: ['study_acronym'], - }, - display: true, - tooltipText: 'sort', - }, - { - dataField: 'subject_id', - header: 'Case ID', - sort: 'asc', - link: '/case/{subject_id}', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/case', - pathParams: ['subject_id'], - }, - display: true, - tooltipText: 'sort', - }, - { - dataField: 'sample_id', - header: 'Sample ID', - sort: 'asc', - display: true, - tooltipText: 'sort', - }, - { - dataField: 'diagnosis', - header: 'Diagnosis', - sort: 'asc', - display: false, - tooltipText: 'sort', - }, - ], - id: 'file_tab', - onRowsSelect: 'type2', - disableRowSelection: 'type3', - tableID: 'file_tab_table', - selectableRows: true, - tabIndex: '2', - tableDownloadCSV: customFilesTabDownloadCSV, - downloadFileName: 'Bento_Dashboard_cases_download', - headerPagination: true, - footerPagination: true, - tableMsg: { - noMatch: 'No Matching Records Found', - }, - addAllFileAPI: GET_ALL_FILEIDS_FROM_FILESTAB_FOR_ADD_ALL_CART, - addSelectedIdAPI: GET_ALL_FILEIDS_FILESTAB_FOR_SELECT_ALL, - }, -]; - -// --------------- Tabs Table configuration -------------- -export const tabContainers = [ - { - - name: 'Cases', - dataField: 'dataCase', - api: GET_CASES_OVERVIEW_QUERY, - paginationAPIField: 'subjectOverview', - count: 'numberOfSubjects', - dataKey: 'subject_id', - defaultSortField: 'subject_id', - defaultSortDirection: 'asc', - buttonText: 'Add Selected Files', - tableID: 'case_tab_table', - extendedViewConfig: { - pagination: true, - }, - columns: [ - { - cellType: cellTypes.CHECKBOX, - display: true, - role: cellTypes.CHECKBOX, - }, - { - dataField: 'subject_id', - header: 'Case ID', - sort: 'asc', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/case', - pathParams: ['subject_id'], - }, - primary: true, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'program', - header: 'Program Code', - sort: 'asc', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/program', - pathParams: ['program_id'], - }, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'program_id', - header: 'Program ID', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'study_acronym', - header: 'Arm', - sort: 'asc', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/arm', - pathParams: ['study_acronym'], - }, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'diagnosis', - header: 'Diagnosis', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'recurrence_score', - header: 'Recurrence Score', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'tumor_size', - header: 'Tumor Size (cm)', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'er_status', - header: 'ER Status', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'pr_status', - header: 'PR Status', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'age_at_index', - header: 'Age (years)', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'survival_time', - header: 'Survival (days)', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - cellType: cellTypes.CUSTOM_ELEM, - displayEmpty: false, - }, - ], - id: 'case_tab', - tableID: 'case_tab_table', - tableDownloadCSV: customCasesTabDownloadCSV, - tabIndex: '0', - downloadFileName: 'Bento_Dashboard_cases_download', - tableMsg: { - noMatch: 'No Matching Records Found', - }, - addFilesRequestVariableKey: 'subject_ids', - addFilesResponseKeys: ['fileIDsFromList'], - addAllFilesResponseKeys: ['subjectOverview', 'files'], - addAllFileQuery: GET_ALL_FILEIDS_FROM_CASESTAB_FOR_ADD_ALL_CART, - addSelectedFilesQuery: GET_ALL_FILEIDS_CASESTAB_FOR_SELECT_ALL, - }, - { - name: 'Samples', - dataField: 'dataSample', - api: GET_SAMPLES_OVERVIEW_QUERY, - count: 'numberOfSamples', - paginationAPIField: 'sampleOverview', - dataKey: 'sample_id', - defaultSortField: 'sample_id', - defaultSortDirection: 'asc', - tableID: 'sample_tab_table', - extendedViewConfig: { - pagination: true, - }, - saveButtonDefaultStyle: { - color: '#fff', - backgroundColor: '#00AEEF', - opacity: '1', - border: '0px', - cursor: 'pointer', - }, - DeactiveSaveButtonDefaultStyle: { - opacity: '0.3', - cursor: 'auto', - }, - ActiveSaveButtonDefaultStyle: { - cursor: 'pointer', - opacity: 'unset', - border: 'unset', - }, - - columns: [ - { - cellType: cellTypes.CHECKBOX, - display: true, - role: cellTypes.CHECKBOX, - }, - { - dataField: 'sample_id', - header: 'Sample ID', - sort: 'asc', - primary: true, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'subject_id', - header: 'Case ID', - sort: 'asc', - link: '/case/{subject_id}', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/case', - pathParams: ['subject_id'], - }, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'program', - header: 'Program Code', - sort: 'asc', - cellType: cellTypes.LINK, - tooltipText: 'sort', - linkAttr : { - rootPath: '/program', - pathParams: ['program_id'], - }, - display: true, - role: cellTypes.DISPLAY, - }, - { - dataField: 'program_id', - header: 'Program ID', - sort: 'asc', - display: false, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'arm', - header: 'Arm', - sort: 'asc', - link: '/arm/{arm}', - cellType: cellTypes.LINK, - linkAttr : { - rootPath: '/arm', - pathParams: ['arm'], - }, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'diagnosis', - header: 'Diagnosis', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'tissue_type', - header: 'Tissue Type', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'tissue_composition', - header: 'Tissue Composition', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'sample_anatomic_site', - header: 'Sample Anatomic Site', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'sample_procurement_method', - header: 'Sample Procurement Method', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - { - dataField: 'platform', - header: 'platform', - sort: 'asc', - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, - ], - id: 'sample_tab', - tableID: 'sample_tab_table', - tabIndex: '1', - tableDownloadCSV: customSamplesTabDownloadCSV, - downloadFileName: 'Bento_Dashboard_cases_download', - tableMsg: { - noMatch: 'No Matching Records Found', - }, - addFilesRequestVariableKey: 'sample_ids', - addFilesResponseKeys: ['fileIDsFromList'], - addAllFilesResponseKeys: ['sampleOverview', 'files'], - addAllFileQuery: GET_ALL_FILEIDS_FROM_SAMPLETAB_FOR_ADD_ALL_CART, - addSelectedFilesQuery: GET_ALL_FILEIDS_SAMPLESTAB_FOR_SELECT_ALL, - }, - { - name: 'Files', - dataField: 'dataFile', - api: GET_FILES_OVERVIEW_QUERY, - paginationAPIField: 'fileOverview', - defaultSortField: 'file_name', - defaultSortDirection: 'asc', - count: 'numberOfFiles', - dataKey: 'file_name', - tableID: 'file_tab_table', - extendedViewConfig: { - pagination: true, - }, - columns: [ - { - cellType: cellTypes.CHECKBOX, - display: true, - role: cellTypes.CHECKBOX, - }, - { - dataField: 'file_name', - header: 'File Name', - sort: 'asc', - primary: true, - display: true, - tooltipText: 'sort', - role: cellTypes.DISPLAY, - }, { dataField: 'file_id', header: 'File ID', - sort: 'asc', display: false, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2025,7 +1389,6 @@ export const tabContainers = [ { dataField: 'association', header: 'Association', - sort: 'asc', display: true, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2033,7 +1396,6 @@ export const tabContainers = [ { dataField: 'file_description', header: 'Description', - sort: 'asc', display: true, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2041,7 +1403,6 @@ export const tabContainers = [ { dataField: 'file_format', header: 'File Format', - sort: 'asc', display: true, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2049,7 +1410,6 @@ export const tabContainers = [ { dataField: 'file_size', header: 'Size', - sort: 'asc', display: true, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2059,7 +1419,6 @@ export const tabContainers = [ { dataField: 'acl', // This need to left empty if no data need to be displayed before file download icon header: 'Access', - sort: 'asc', display: true, cellType: cellTypes.CUSTOM_ELEM, downloadDocument: true, // To indicate that column is document donwload @@ -2095,7 +1454,6 @@ export const tabContainers = [ { dataField: 'program', header: 'Program Code', - sort: 'asc', link: '/program/{program_id}', cellType: cellTypes.LINK, linkAttr : { @@ -2109,7 +1467,6 @@ export const tabContainers = [ { dataField: 'program_id', header: 'Program ID', - sort: 'asc', display: false, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2117,7 +1474,6 @@ export const tabContainers = [ { dataField: 'arm', header: 'Arm', - sort: 'asc', link: '/arm/{arm}', cellType: cellTypes.LINK, linkAttr : { @@ -2131,7 +1487,6 @@ export const tabContainers = [ { dataField: 'subject_id', header: 'Case ID', - sort: 'asc', link: '/case/{subject_id}', cellType: cellTypes.LINK, linkAttr : { @@ -2145,7 +1500,6 @@ export const tabContainers = [ { dataField: 'sample_id', header: 'Sample ID', - sort: 'asc', display: true, tooltipText: 'sort', role: cellTypes.DISPLAY, @@ -2153,7 +1507,6 @@ export const tabContainers = [ { dataField: 'diagnosis', header: 'Diagnosis', - sort: 'asc', display: false, tooltipText: 'sort', role: cellTypes.DISPLAY, diff --git a/packages/facet-filter/src/FacetFilterController.js b/packages/facet-filter/src/FacetFilterController.js index 4e544d973..f6edbe01b 100644 --- a/packages/facet-filter/src/FacetFilterController.js +++ b/packages/facet-filter/src/FacetFilterController.js @@ -63,12 +63,14 @@ const FacetFilterController = (props) => { const arrangeBySections = (arr) => { const sideBar = {}; + arr.forEach(({ section, ...item }) => { + const { isExpanded } =facetSectionConfig[section]; if (!sideBar[section]) { sideBar[section] = { name: section, sectionName: section, - expandSection: facetSectionConfig[section]?.isExpanded || true, + expandSection: isExpanded !== undefined && typeof isExpanded === 'boolean' ? isExpanded : true, items: [], }; }