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