Skip to content
Snippets Groups Projects
Commit 09a58d03 authored by Mihail Hagiu's avatar Mihail Hagiu
Browse files

fix(AuthorEmailHERemoved): Removed title variable in favour of titleText

parent 1870e69c
No related branches found
No related tags found
3 merge requests!196S25 - EiC submit revision,!189S25,!170feat(AuthorEmailHERemoved): Created email template and code for sending it
......@@ -3,13 +3,7 @@ const config = require('config')
const staffEmail = config.get('journal.staffEmail')
const journalName = config.get('journal.name')
const getEmailCopy = ({
emailType,
titleText,
targetUserName,
comments,
title,
}) => {
const getEmailCopy = ({ emailType, titleText, targetUserName, comments }) => {
let paragraph
let hasLink = true
let hasIntro = true
......@@ -45,7 +39,7 @@ const getEmailCopy = ({
hasIntro = true
hasLink = false
hasSignature = true
paragraph = `The handling editor of your manuscript "${title}" had to be replaced. This may cause some delays in the peer review process.<br/><br/>
paragraph = `The handling editor of your manuscript "${titleText}" had to be replaced. This may cause some delays in the peer review process.<br/><br/>
Thank you for your submission to ${journalName}.`
break
default:
......
......@@ -81,7 +81,7 @@ module.exports = {
const fragmentId = last(collection.fragments)
const fragment = await FragmentModel.find(fragmentId)
const fragmentHelper = new Fragment({ fragment })
const { title } = await fragmentHelper.getFragmentData()
const { title: titleText } = await fragmentHelper.getFragmentData()
const { submittingAuthor } = await fragmentHelper.getAuthorData({
UserModel,
})
......@@ -89,8 +89,6 @@ module.exports = {
submittingAuthor.lastName
}`
const titleText = title
const userHelper = new User({ UserModel })
const eics = await userHelper.getEditorsInChief()
const eic = eics[0]
......@@ -98,7 +96,6 @@ module.exports = {
const { customId } = collection
const { paragraph, ...bodyProps } = getEmailCopy({
title,
titleText,
targetUserName: submittingAuthorName,
emailType: 'author-he-removed',
......
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