Skip to content
Snippets Groups Projects
Commit 114b0c88 authored by Sebastian Mihalache's avatar Sebastian Mihalache :hammer_pick:
Browse files

feat(manuscript-manager): update email copy for HE reject

parent f48995c3
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!67Hin restore he rec
......@@ -87,8 +87,8 @@ const getEmailCopy = ({
case 'eic-recommend-to-reject-from-he':
hasIntro = false
hasSignature = false
paragraph = `Dr. ${targetUserName} has recommended rejecting ${titleText}.<br/>
${comments}<br/>
paragraph = `Dr. ${targetUserName} has recommended rejecting ${titleText}.<br/><br/>
${comments}<br/><br/>
To review this decision, please visit the manuscript details page.`
break
case 'eic-request-revision-from-he':
......
......@@ -29,12 +29,15 @@ module.exports = {
const parsedFragment = await fragmentHelper.getFragmentData({
handlingEditor: collection.handlingEditor,
})
const fragmentAuthors = await fragmentHelper.getAuthorData({ UserModel })
const {
activeAuthors,
submittingAuthor,
} = await fragmentHelper.getAuthorData({ UserModel })
const subjectBaseText = `${collection.customId}: Manuscript`
const titleText = `The manuscript titled "${parsedFragment.title}" by ${
fragmentAuthors.submittingAuthor.firstName
} ${fragmentAuthors.submittingAuthor.lastName}`
submittingAuthor.firstName
} ${submittingAuthor.lastName}`
const userHelper = new User({ UserModel })
const eicName = await userHelper.getEiCName()
......@@ -135,7 +138,7 @@ module.exports = {
comments,
emailType,
title: parsedFragment.title,
fragmentAuthors: fragmentAuthors.activeAuthors,
fragmentAuthors: activeAuthors,
})
email = helpers.updateEmailContentForAllAuthors({
email,
......@@ -151,10 +154,10 @@ module.exports = {
newRecommendation,
})
const author = helpers.getSubmittingAuthor({
authorNoteText,
journalName,
authorNoteText,
submittingAuthor,
title: parsedFragment.title,
submittingAuthor: fragmentAuthors.submittingAuthor,
})
email = helpers.updateEmailContentForSA({
email,
......@@ -203,10 +206,12 @@ module.exports = {
email,
baseUrl,
customId,
titleText,
userHelper,
recommendation: newRecommendation,
targetUserName: collHelper.getHELastName(),
titleText: `the submission "${parsedFragment.title}" by ${
submittingAuthor.firstName
} ${submittingAuthor.lastName}`,
})
}
......
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