Skip to content
Snippets Groups Projects
Commit 7f82b580 authored by Tania Fecheta's avatar Tania Fecheta
Browse files

fix(reviewerReports): after minor revision the reviewr sees on the last...

fix(reviewerReports): after minor revision the reviewr sees on the last verions he has acces only hi
parent 8b0ed0eb
No related branches found
No related tags found
2 merge requests!176Sprint 24,!171Sprint 24
...@@ -64,6 +64,7 @@ export default compose( ...@@ -64,6 +64,7 @@ export default compose(
publonReviewers = [], publonReviewers = [],
reviewerReports = [], reviewerReports = [],
currentUser, currentUser,
isLatestVersion,
}) => ({ }) => ({
token: get(currentUser, 'token', ''), token: get(currentUser, 'token', ''),
publonReviewers, publonReviewers,
...@@ -71,10 +72,17 @@ export default compose( ...@@ -71,10 +72,17 @@ export default compose(
...i, ...i,
review: reviewerReports.find(r => r.userId === i.userId), review: reviewerReports.find(r => r.userId === i.userId),
})), })),
reports: indexReviewers( reports: isLatestVersion
reviewerReports.filter(r => r.submittedOn), ? indexReviewers(
invitations, reviewerReports.filter(
), r => r.submittedOn && r.userId === currentUser.id,
),
invitations,
)
: indexReviewers(
reviewerReports.filter(r => r.submittedOn),
invitations,
),
}), }),
), ),
)(ReviewerReports) )(ReviewerReports)
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