From 069402fda5271d92a0b87555a94c6c4af5cb02be Mon Sep 17 00:00:00 2001 From: rushtong Date: Wed, 14 Aug 2024 16:34:36 -0400 Subject: [PATCH] feat: update phsId display/filter --- .../dac_dataset_table/DACDatasetTableCellData.jsx | 6 +++--- src/libs/utils.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/dac_dataset_table/DACDatasetTableCellData.jsx b/src/components/dac_dataset_table/DACDatasetTableCellData.jsx index 40cc6e7dd..d7556f0af 100644 --- a/src/components/dac_dataset_table/DACDatasetTableCellData.jsx +++ b/src/components/dac_dataset_table/DACDatasetTableCellData.jsx @@ -17,10 +17,10 @@ export function duosIdCellData({dataset, label = 'duosIdCellData'}) { } export function duosPhsIdCellData({dataset, label = 'duosPhsIdCellData'}) { - const dbGaPPhsID = dataset.study?.properties?.filter(p => p.key === 'dbGaPPhsID')?.value; + const phsId = dataset.study?.phsId; return { - data:
{dbGaPPhsID}
, - value: dbGaPPhsID, + data:
{phsId}
, + value: phsId, id: `identifier-cell-data-${dataset.datasetId}`, cellStyle: {width: styles.cellWidths.duosId}, label diff --git a/src/libs/utils.js b/src/libs/utils.js index a0ba36599..aa8d86c73 100644 --- a/src/libs/utils.js +++ b/src/libs/utils.js @@ -463,6 +463,7 @@ export const getSearchFilterFunctions = () => { : 'rejected' : 'yes no'; const studyName = dataset.study?.studyName; + const phsId = dataset.study?.phsId; let dataUse = []; dataUse = dataUse.concat(dataset.dataUse?.primary?.map(du => du.code)); dataUse = dataUse.concat(dataset.dataUse?.primary?.map(du => du.description)); @@ -475,6 +476,7 @@ export const getSearchFilterFunctions = () => { includes(loweredTerm, toLower(dataset.codeList)) || includes(loweredTerm, toLower(status)) || includes(loweredTerm, toLower(studyName)) || + includes(loweredTerm, toLower(phsId)) || includes(loweredTerm, toLower(dataUse.join(' '))); }, targetList), datasetTerms: (term, targetList) => filter(datasetTerm => {