Skip to content
Snippets Groups Projects

fix(Only authors can see Reviewer Reports): Only authors can see Reviewer Reports

Merged Iosif Boanca requested to merge HIN-1123 into develop
Files
5
@@ -364,13 +364,17 @@ export const getInvitationsWithReviewersForFragment = (state, fragmentId) =>
export const canMakeHERecommendation = (state, { collection, statuses }) => {
const validHE = isHEToManuscript(state, get(collection, 'id', ''))
if (!validHE) return false
const statusImportance = get(
statuses,
`${get(collection, 'status', 'draft')}.importance`,
1,
)
return statusImportance > 1 && statusImportance < 9 && validHE
if (!(statusImportance > 1 && statusImportance < 10)) return false
return true
}
export const getFragmentAuthorResponse = (state, fragmentId) =>
@@ -384,6 +388,7 @@ export const getFragmentReviewerRecommendations = (state, fragmentId) =>
getFragmentRecommendations(state, fragmentId).filter(
r => r.recommendationType === 'review',
)
const getFragmentEditorialComments = (state, fragmentId) =>
getFragmentRecommendations(state, fragmentId).filter(
r => r.recommendationType === 'editorRecommendation',