Commit 56c199f1 authored by Audrey Hamelers's avatar Audrey Hamelers

#476 activity logs

parent 6ee05fd1
Pipeline #12974 passed with stages
in 5 minutes and 57 seconds
......@@ -286,7 +286,7 @@ const EventDescription = ({ audit, manuscript }) => {
const { originalData, objectType, changes } = audit
if (objectType === 'note') {
const notes_type = changes.notes_type || originalData.notes_type
if (notes_type === 'userMessage') {
if (notes_type === 'userMessage' && !changes.deleted) {
const content = JSON.parse(changes.content)
if (content && content.to) {
return (
......@@ -320,8 +320,19 @@ const EventDescription = ({ audit, manuscript }) => {
</React.Fragment>
)
} else if (notes_type === 'selectedReviewer') {
return 'Selected reviewer to invite'
if (changes.deleted) {
return 'Reviewer set; removed reviewer invitation'
}
const revNote = changes.content && JSON.parse(changes.content)
if (revNote) {
return `Selected reviewer to invite: ${revNote.name.givenNames} ${
revNote.name.surname
}${revNote.email ? `, ${revNote.email}` : ''}`
}
} else if (notes_type === 'userCitation') {
if (changes.deleted) {
return 'Deleted user-provided citation information'
}
return `Provided citation info: ${changes.content}`
} else if (notes_type === 'notDuplicates') {
return `Marked as not duplicates: ${changes.content}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment