From fa6eb9cee2d65caae6219e4fbddd00c248f1e3b0 Mon Sep 17 00:00:00 2001 From: Anca Ursachi <anca.ursachi@thinslices.com> Date: Thu, 18 Oct 2018 16:53:49 +0300 Subject: [PATCH] fix(manuscriptLayout): Make reviewer details to be highlighted in some statuses and to not be seen b --- packages/component-faraday-selectors/src/index.js | 6 +++++- .../component-manuscript/src/components/ManuscriptLayout.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/component-faraday-selectors/src/index.js b/packages/component-faraday-selectors/src/index.js index 2cd317cd3..de9d06ea5 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) diff --git a/packages/component-manuscript/src/components/ManuscriptLayout.js b/packages/component-manuscript/src/components/ManuscriptLayout.js index fcd451edd..3020066d3 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} -- GitLab