Skip to content
Snippets Groups Projects
Commit d8d628c6 authored by Iosif Boanca's avatar Iosif Boanca
Browse files

HIN-1006 selector added for tests

parent 299bbec0
No related branches found
No related tags found
1 merge request!96Hin 1006
......@@ -61,15 +61,16 @@ export const canViewReviewersDetails = (state, collection = {}) => {
return canViewReports(state, collection.id)
}
const authorCannotViewReportsDetails = ['submitted', 'rejected']
const authorCannotViewReportsDetails = ['rejected', 'revisionRequested']
export const authorCanViewReportsDetails = (state, collection = {}) => {
console.log(collection)
if (
authorCannotViewReportsDetails.includes(get(collection, 'status', 'draft'))
) {
return false
return authorCanViewReports(state, collection.id)
}
return authorCanViewReports(state, collection.id)
return false
}
export const authorCanViewReports = (state, collectionId) => {
......
......@@ -186,7 +186,7 @@ const ManuscriptLayout = ({
toggle={toggleReviewerDetails}
/>
)}
{console.log(currentUser)}
{get(currentUser, 'permissions.authorCanViewReportsDetails', false) && (
<AuthorReviews
currentUser={currentUser}
......
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