diff --git a/public/assets/records/benchmark.svg b/public/assets/records/benchmark.svg new file mode 100644 index 0000000000..6940b0ba17 --- /dev/null +++ b/public/assets/records/benchmark.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/components/Editor/EditPublications.vue b/src/components/Editor/EditPublications.vue index 1dfedc71bf..7a6e1f7642 100644 --- a/src/components/Editor/EditPublications.vue +++ b/src/components/Editor/EditPublications.vue @@ -527,47 +527,55 @@ export default { } else { dataPublication = data; } - if ( - dataPublication.metadata.upload_type === "publication" || - (dataPublication.metadata.resource_type && - dataPublication.metadata.resource_type.type && - dataPublication.metadata.resource_type.type === "publication") - ) { - this.newPublication = { - journal: null, - doi: null, - title: null, - url: null, - year: null, - authors: null, - }; - if (dataPublication.metadata.journal_title) { - this.newPublication.journal = - dataPublication.metadata.journal_title; - } else { - if (dataPublication.metadata.meeting) { + if (dataPublication.metadata !== undefined) { + if (dataPublication.metadata.upload_type === "publication" || + (dataPublication.metadata.resource_type && + dataPublication.metadata.resource_type.type && + dataPublication.metadata.resource_type.type === "publication") + ) { + this.newPublication = { + journal: null, + doi: null, + title: null, + url: null, + year: null, + authors: null, + }; + if (dataPublication.metadata.journal_title) { this.newPublication.journal = - dataPublication.metadata.meeting.title; + dataPublication.metadata.journal_title; + } else { + if (dataPublication.metadata.meeting) { + this.newPublication.journal = + dataPublication.metadata.meeting.title; + } } + this.newPublication.doi = dataPublication.doi; + this.newPublication.title = dataPublication.metadata.title; + this.newPublication.url = dataPublication.links.doi; + this.newPublication.year = Number( + dataPublication.metadata.publication_date.split("-")[0] + ); + let authors = []; + dataPublication.metadata.creators.forEach(function (a) { + authors.push(a.name + "; "); + }); + this.newPublication.authors = authors.join(""); + this.newPublication.isCitation = false; + this.openEditor = true; } - this.newPublication.doi = dataPublication.doi; - this.newPublication.title = dataPublication.metadata.title; - this.newPublication.url = dataPublication.links.doi; - this.newPublication.year = Number( - dataPublication.metadata.publication_date.split("-")[0] - ); - let authors = []; - dataPublication.metadata.creators.forEach(function (a) { - authors.push(a.name + "; "); - }); - this.newPublication.authors = authors.join(""); - this.newPublication.isCitation = false; - this.openEditor = true; - } else { + else { + this.errors.doi = true; + } + } + else { + // TODO: Add a query to osf.io here: + // TODO: https://developer.osf.io/ this.errors.doi = true; } } - } else { + } + else { /* istanbul ignore next */ this.newPublication.journal = data["container-title-short"] || data["container-title"]; diff --git a/src/data/communityCurationCohorts.json b/src/data/communityCurationCohorts.json index e0379db605..06aeef2bea 100644 --- a/src/data/communityCurationCohorts.json +++ b/src/data/communityCurationCohorts.json @@ -766,7 +766,12 @@ { "name": "Beth Knazook", "id": 7666, - "organisation": [], + "organisation": [ + { + "id": 4666, + "name": "Digital Repository of Ireland" + } + ], "scope": "Cultural Heritage", "orcid": "0000-0002-0151-6397", "early_adopter" : false, diff --git a/src/plugins/icons.js b/src/plugins/icons.js index ec4d4dcd54..fc966a5f1d 100644 --- a/src/plugins/icons.js +++ b/src/plugins/icons.js @@ -199,6 +199,11 @@ const customIcons = { icon: "/assets/records/db-icon.svg", tooltip: "Knowledge Base & repository", }, + benchmark: { + type: "img", + icon: "/assets/records/benchmark.svg", + tooltip: "Benchmark", + }, DOI: { type: "img", icon: "/assets/icons/DOI_logo.svg",