From 9584ac68e4213f68603f10aae6576c9ebc5e1f09 Mon Sep 17 00:00:00 2001 From: jomadoye Date: Sat, 25 Aug 2018 02:18:30 +0100 Subject: [PATCH 1/2] Fix issue 2410 --- .../MilestoneTypeCheckpointReview.jsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/projects/detail/components/timeline/milestones/MilestoneTypeCheckpointReview/MilestoneTypeCheckpointReview.jsx b/src/projects/detail/components/timeline/milestones/MilestoneTypeCheckpointReview/MilestoneTypeCheckpointReview.jsx index 836688af1..c34c0d93d 100644 --- a/src/projects/detail/components/timeline/milestones/MilestoneTypeCheckpointReview/MilestoneTypeCheckpointReview.jsx +++ b/src/projects/detail/components/timeline/milestones/MilestoneTypeCheckpointReview/MilestoneTypeCheckpointReview.jsx @@ -40,6 +40,7 @@ class MilestoneTypeCheckpointReview extends React.Component { this.completeReview = this.completeReview.bind(this) this.toggleRejectedSection = this.toggleRejectedSection.bind(this) this.moveToReviewingState = this.moveToReviewingState.bind(this) + this.shouldActivateCompleteReviewButton = this.shouldActivateCompleteReviewButton.bind(this) } showCompleteReviewConfirmation() { @@ -170,6 +171,18 @@ class MilestoneTypeCheckpointReview extends React.Component { return milestone[`${milestone.status}Text`] } + shouldActivateCompleteReviewButton(links, selectedLinks) { + const linksLength = links.length + const selectedLinksLength = selectedLinks.length + if (linksLength < 5 && selectedLinksLength === linksLength) { + return false + } else if (linksLength >= 5 && selectedLinksLength >= 5) { + return false + } else { + return true + } + } + render() { const { milestone, @@ -346,7 +359,7 @@ class MilestoneTypeCheckpointReview extends React.Component {