Skip to content
Merged

v0.26.0 #1244

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,5 @@
"engines": {
"node": ">=16.19.0"
},
"version": "0.25.0"
"version": "0.26.0"
}
6 changes: 3 additions & 3 deletions src/client/components/document-management-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ class DocumentManagementDocumentComponent extends React.Component {
h( 'i.material-icons.hide-by-default.invalid', {
className: makeClassList({ 'show': hasIssues( doc ) })
}, 'warning' ),
h( 'i.material-icons.hide-by-default.complete', {
className: makeClassList({ 'show': doc.submitted() || doc.isPublic() })
}, 'check_circle' ),
// h( 'i.material-icons.hide-by-default.complete', {
// className: makeClassList({ 'show': doc.submitted() || doc.isPublic() })
// }, 'check_circle' ),
h( 'i.material-icons.hide-by-default.mute', {
className: makeClassList({ 'show': doc.trashed() })
}, 'delete' )
Expand Down
33 changes: 28 additions & 5 deletions src/model/document/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,15 +567,38 @@ class Document {
}

toBiopaxTemplate( omitDbXref ){
const toPublication = citation => {
let { pmid, doi, title, reference: source, authors: { authorList }, ISODate } = citation;
let db, id;
if ( pmid ){
db = 'pmid';
id = pmid;
} else if( doi ) {
db = 'crossref';
id = doi;
}
const publication = { db, id, title, source };
if( ISODate ) {
const date = new Date( ISODate );
const year = date.getFullYear();
publication.year = year;
}
if( !_.isEmpty( authorList ) ) {
const author = authorList.map( ({ name }) => name );
publication.author = author;
}
return publication;
};
let interactions = this.toBiopaxIntnTemplates( omitDbXref );
let citation = this.citation();
let pathwayName = citation.title;
let pmid = citation.pmid;
let { pmid, doi, title } = citation;
const hasArticleId = pmid != null || doi != null;
let pathwayId = this.id();

let template = { interactions, pathwayName, pathwayId };
if ( pmid ) {
template.publication = { id: pmid, db: 'pubmed' };
let template = { interactions, pathwayName: title, pathwayId };
if ( hasArticleId ) {
const publication = toPublication( citation );
template.publication = publication;
}

return template;
Expand Down
4 changes: 3 additions & 1 deletion src/server/routes/api/document/crossref/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ const getPostedContent = record => {
const JournalIssue = { PubDate };
return JournalIssue;
};
const { institution, 'group-title': groupTitle } = record;
const { institution, 'group-title': groupTitle, publisher } = record;
let Title;
if ( institution ) { // preprint (e.g. bioRxiv, medRxiv)
const { name } = _.head( institution );
Title = name;
} else if ( groupTitle ) { // preprint (e.g. eLife)
Title = groupTitle;
} else {
Title = publisher;
}
const JournalIssue = getJournalIssue( record );
const Journal = { Title, JournalIssue };
Expand Down