Skip to content
Snippets Groups Projects
Commit fa6eb9ce authored by Anca Ursachi's avatar Anca Ursachi
Browse files

fix(manuscriptLayout): Make reviewer details to be highlighted in some...

fix(manuscriptLayout): Make reviewer details to be highlighted in some statuses and to not be seen b
parent ca202cbc
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!101Hin 946 fixes
...@@ -55,7 +55,11 @@ const cannotViewReviewersDetails = [ ...@@ -55,7 +55,11 @@ const cannotViewReviewersDetails = [
] ]
export const canViewReviewersDetails = (state, collection = {}) => { 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 false
} }
return canViewReports(state, collection.id) return canViewReports(state, collection.id)
......
...@@ -23,6 +23,8 @@ const messagesLabel = { ...@@ -23,6 +23,8 @@ const messagesLabel = {
reject: 'Comments for Author', reject: 'Comments for Author',
} }
const cannotViewReviewersDetails = ['revisionRequested', 'pendingApproval']
const ManuscriptLayout = ({ const ManuscriptLayout = ({
history, history,
assignHE, assignHE,
...@@ -169,7 +171,9 @@ const ManuscriptLayout = ({ ...@@ -169,7 +171,9 @@ const ManuscriptLayout = ({
getSignedUrl={getSignedUrl} getSignedUrl={getSignedUrl}
highlight={ highlight={
reviewerReports.length === 0 && reviewerReports.length === 0 &&
get(collection, 'status', 'draft') !== 'pendingApproval' !cannotViewReviewersDetails.includes(
get(collection, 'status', 'draft'),
)
} }
invitations={invitationsWithReviewers} invitations={invitationsWithReviewers}
isFetching={isFetching.publonsFetching} isFetching={isFetching.publonsFetching}
......
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