Skip to content

Commit

Permalink
feat: update phsId display/filter
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Aug 14, 2024
1 parent 503dffa commit 069402f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/dac_dataset_table/DACDatasetTableCellData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <div className={style['cell-data']}>{dbGaPPhsID}</div>,
value: dbGaPPhsID,
data: <div className={style['cell-data']}>{phsId}</div>,
value: phsId,
id: `identifier-cell-data-${dataset.datasetId}`,
cellStyle: {width: styles.cellWidths.duosId},
label
Expand Down
2 changes: 2 additions & 0 deletions src/libs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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 => {
Expand Down

0 comments on commit 069402f

Please sign in to comment.