Skip to content
Snippets Groups Projects
Commit 9d7063c9 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

Merge branch 'HIN-850' into 'develop'

Hin 850

See merge request !32
parents 5ab05f63 2947fecb
No related branches found
No related tags found
2 merge requests!34Sprint 17 features,!32Hin 850
......@@ -116,45 +116,27 @@ module.exports = {
})
}
if (
newRecommendation.recommendationType !== 'review' &&
newRecommendation.recommendation !== 'return-to-handling-editor'
) {
if (isEditorInChief || collection.status === 'revisionRequested') {
sendAuthorsEmail({
email,
baseUrl,
titleText,
parsedFragment,
fragmentAuthors,
isEditorInChief,
subjectBaseText,
newRecommendation,
})
}
if (hasPeerReview(collection)) {
sendReviewersEmail({
email,
baseUrl,
UserModel,
titleText,
fragmentHelper,
isEditorInChief,
subjectBaseText,
recommendation: newRecommendation.recommendation,
handlingEditorName: get(collection, 'handlingEditor.name', 'N/A'),
})
sendEiCsEmail({
email,
baseUrl,
userHelper,
titleText,
subjectBaseText,
recommendation: newRecommendation,
})
}
if (hasPeerReview(collection)) {
sendReviewersEmail({
email,
baseUrl,
UserModel,
titleText,
fragmentHelper,
isEditorInChief,
subjectBaseText,
recommendation: newRecommendation.recommendation,
handlingEditorName: get(collection, 'handlingEditor.name', eicName),
})
sendEiCsEmail({
email,
baseUrl,
userHelper,
titleText,
subjectBaseText,
recommendation: newRecommendation,
})
}
}
}
......
......@@ -56,7 +56,7 @@ module.exports = {
}
const requestUser = await UserModel.find(reqUser)
if (requestUser.admin) {
if (requestUser.id !== user.id) {
sendAddedToManuscriptEmail({
email,
baseUrl,
......
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