diff --git a/packages/component-faraday-selectors/src/index.js b/packages/component-faraday-selectors/src/index.js index 2cd317cd3b51cbffacd63559edb2fb690431f2ba..17e49d16e0f4c4e474e2a11a45be3650716fa956 100644 --- a/packages/component-faraday-selectors/src/index.js +++ b/packages/component-faraday-selectors/src/index.js @@ -55,7 +55,11 @@ const cannotViewReviewersDetails = [ ] export const canViewReviewersDetails = (state, collection = {}) => { - if (cannotViewReviewersDetails.includes(get(collection, 'status', 'draft'))) { + const isHeAssigned = !!get(collection, 'handlingEditor', false) + if ( + cannotViewReviewersDetails.includes(get(collection, 'status', 'draft')) || + !isHeAssigned + ) { return false } return canViewReports(state, collection.id) @@ -102,6 +106,7 @@ const canEICViewEditorialCommentsStatuses = [ 'accepted', 'inQA', 'pendingApproval', + 'reviewCompleted', ] export const canEICViewEditorialComments = (state, collection = {}) => { const isEIC = currentUserIs(state, 'adminEiC') diff --git a/packages/component-faraday-ui/src/EditorialReportCard.js b/packages/component-faraday-ui/src/EditorialReportCard.js index 8414bcdeea77494c6aefd0190cf0d93ae48014bb..9f326c34063697f2aa29ed40f35047d22e86f605 100644 --- a/packages/component-faraday-ui/src/EditorialReportCard.js +++ b/packages/component-faraday-ui/src/EditorialReportCard.js @@ -90,6 +90,7 @@ export default compose( get( recommendations.find(r => r.value === report.recommendation), 'label', + 'Return to HE', ), }), withProps( diff --git a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js index 4cbdb582680e110dc4d067474dfa4cc3e0c3e913..b16803dbdb91e845d3a6e4b9b24fe30ca6776606 100644 --- a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js +++ b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js @@ -12,7 +12,7 @@ const { const { features = {}, recommendations } = config -const sendMTSPackage = async (collection, fragment) => { +const sendMTSPackage = async (collection, fragment, isEQA = false) => { const s3Config = get(config, 'pubsweet-component-aws-s3', {}) const mtsConfig = get(config, 'mts-service', {}) const MTSService = require('pubsweet-component-mts-package') @@ -27,7 +27,7 @@ const sendMTSPackage = async (collection, fragment) => { }, } - await MTS.sendPackage({ fragment: packageFragment }) + await MTS.sendPackage({ fragment: packageFragment, isEQA }) } const notifications = require('./notifications/notifications') @@ -112,7 +112,7 @@ module.exports = models => async (req, res) => { // the manuscript has not yet passed through the EQA process so we need to upload it to the FTP server if (isEditorInChief && recommendation === 'publish' && !hasEQA) { if (features.mts) { - await sendMTSPackage(collection, fragment) + await sendMTSPackage(collection, fragment, true) } collection.status = 'inQA' diff --git a/packages/component-manuscript/src/components/ManuscriptLayout.js b/packages/component-manuscript/src/components/ManuscriptLayout.js index fcd451edd3f1b063518ac0d99b8c448ce9c0429b..3020066d37b08af3211718c46d698880690d4273 100644 --- a/packages/component-manuscript/src/components/ManuscriptLayout.js +++ b/packages/component-manuscript/src/components/ManuscriptLayout.js @@ -23,6 +23,8 @@ const messagesLabel = { reject: 'Comments for Author', } +const cannotViewReviewersDetails = ['revisionRequested', 'pendingApproval'] + const ManuscriptLayout = ({ history, assignHE, @@ -169,7 +171,9 @@ const ManuscriptLayout = ({ getSignedUrl={getSignedUrl} highlight={ reviewerReports.length === 0 && - get(collection, 'status', 'draft') !== 'pendingApproval' + !cannotViewReviewersDetails.includes( + get(collection, 'status', 'draft'), + ) } invitations={invitationsWithReviewers} isFetching={isFetching.publonsFetching}