diff --git a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js index 32ea418b7386c22618561d70dc972cd405f78ccc..fc2f8ec70deb8acf5da422d3fd4067280d9471c2 100644 --- a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js +++ b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js @@ -145,16 +145,12 @@ module.exports = models => async (req, res) => { const hasPeerReview = !isEmpty(collection.handlingEditor) if (isEditorInChief) { - if ( - recommendation === 'publish' && - collection.technicalChecks.token && - ['accepted', 'inQA'].includes(collection.status) - ) { - if (collection.status === 'inQA') { - notification.notifyEAWhenEiCRequestsEQAApproval() - } else { - notification.notifyEAWhenEiCMakesFinalDecision() - } + if (recommendation === 'publish' && collection.status === 'inQA') { + notification.notifyEAWhenEiCRequestsEQAApproval() + } + + if (recommendation === 'publish' && collection.status === 'accepted') { + notification.notifyEAWhenEiCMakesFinalDecision() } if (hasPeerReview && (recommendation !== 'publish' || hasEQA)) { diff --git a/packages/component-manuscript-manager/src/routes/technicalChecks/patch.js b/packages/component-manuscript-manager/src/routes/technicalChecks/patch.js index 04154a845eb6be4ea77388c4ec501749c0b3b90e..c73ab4ad4f676df47d77fc7fd7ee281e06dd31a9 100644 --- a/packages/component-manuscript-manager/src/routes/technicalChecks/patch.js +++ b/packages/component-manuscript-manager/src/routes/technicalChecks/patch.js @@ -51,7 +51,6 @@ module.exports = ({ Collection, Fragment, User }) => async (req, res) => { }) } - delete collection.technicalChecks.token if (agree) { if (step === TECHNICAL_STEPS.EQA) { collection.technicalChecks.eqa = true @@ -61,6 +60,7 @@ module.exports = ({ Collection, Fragment, User }) => async (req, res) => { } } + delete collection.technicalChecks.token collection.status = setNewStatus(step, agree) await collection.save()