From f686f537de8d3548ab63bec72bd4235539350e5b Mon Sep 17 00:00:00 2001 From: Eric Gauzens Date: Tue, 23 Jul 2024 12:57:15 -0400 Subject: [PATCH 1/2] Added PI to dataset search results --- .../SearchResults/DatasetSearchResults.vue | 18 ++++++++++++++---- pages/data/index.vue | 4 +++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/components/SearchResults/DatasetSearchResults.vue b/components/SearchResults/DatasetSearchResults.vue index 11f6b5b9..07124f4f 100644 --- a/components/SearchResults/DatasetSearchResults.vue +++ b/components/SearchResults/DatasetSearchResults.vue @@ -103,13 +103,17 @@ export default { displayName: 'Experimental Approach', propPath: '_highlightResult.item.modalities' }, - { - displayName: 'Publication Date', - propPath: 'pennsieve' - }, { displayName: 'Samples', propPath: 'item.statistics' + }, + { + displayName: 'Principal Investigator', + propPath: '_highlightResult.pennsieve.owner' + }, + { + displayName: 'Publication Date', + propPath: 'pennsieve' } ] } @@ -135,6 +139,12 @@ export default { ? organs.map(item => this.toTermUppercase(item.name.value)).join(', ') : undefined } + case 'Principal Investigator': { + const owner = _.get(item, property.propPath) + return owner + ? this.toTermUppercase(`${owner.first.name.value} ${this.toTermUppercase(owner.last.name.value)}`) + : undefined + } case 'Includes': { const published = _.get(item, property.propPath) return (published == undefined || published == 'false') ? undefined : 'Publications' diff --git a/pages/data/index.vue b/pages/data/index.vue index 24f04c4d..8773267e 100644 --- a/pages/data/index.vue +++ b/pages/data/index.vue @@ -443,7 +443,9 @@ export default { 'item.description', 'item.modalities', 'anatomy.organ', - 'organisms.primary.species.name' + 'organisms.primary.species.name', + 'pennsieve.owner.first.name', + 'pennsieve.owner.last.name' ], highlightPreTag: `<${HIGHLIGHT_HTML_TAG}>`, highlightPostTag: `` From 8d478f104d51a3320d415e11b74555af662b4c5c Mon Sep 17 00:00:00 2001 From: Eric Gauzens Date: Tue, 23 Jul 2024 14:21:36 -0400 Subject: [PATCH 2/2] updated test --- tests/cypress/e2e/databrowser.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/e2e/databrowser.cy.js b/tests/cypress/e2e/databrowser.cy.js index 7b5eef1b..b657fc35 100644 --- a/tests/cypress/e2e/databrowser.cy.js +++ b/tests/cypress/e2e/databrowser.cy.js @@ -45,7 +45,7 @@ browseCategories.forEach((category, bcIndex) => { cy.get(':nth-child(1) > .el-table_1_column_2 > .cell > :nth-child(1) > .property-table > :nth-child(1) > .property-name-column').should('contain', 'Anatomical Structure'); cy.get(':nth-child(1) > .el-table_1_column_2 > .cell > :nth-child(1) > .property-table > :nth-child(2) > .property-name-column').should('contain', 'Species'); cy.get(':nth-child(1) > .el-table_1_column_2 > .cell > :nth-child(1) > .property-table > :nth-child(3) > .property-name-column').should('contain', 'Experimental Approach'); - cy.get(':nth-child(1) > .el-table_1_column_2 > .cell > :nth-child(1) > .property-table > :nth-child(4) > .property-name-column').should('contain', 'Publication Date'); + cy.get(':nth-child(1) > .el-table_1_column_2 > .cell > :nth-child(1) > .property-table > :nth-child(6) > .property-name-column').should('contain', 'Publication Date'); }) it('All Page Features', function () {