diff --git a/src/projects/detail/components/SimplePlan/CreateSimplePlan/CreateSimplePlan.jsx b/src/projects/detail/components/SimplePlan/CreateSimplePlan/CreateSimplePlan.jsx
index c96add512..34d0c65e3 100644
--- a/src/projects/detail/components/SimplePlan/CreateSimplePlan/CreateSimplePlan.jsx
+++ b/src/projects/detail/components/SimplePlan/CreateSimplePlan/CreateSimplePlan.jsx
@@ -10,6 +10,7 @@ import * as milestoneHelper from '../components/helpers/milestone'
import styles from './CreateSimplePlan.scss'
import MilestonesApprovalNotification from '../components/MilestonesApprovalNotification'
+import { PHASE_STATUS_IN_REVIEW } from '../../../../../config/constants'
const createTabs = ({ onClick } ) => ([
{
@@ -47,6 +48,10 @@ class CreateSimplePlan extends React.Component {
} = this.props
const onClickMilestonesTab = () => {}
+ const isInReview =
+ isCustomer ? (milestones.filter( x => x.status === PHASE_STATUS_IN_REVIEW).length > 0 && isProjectLive)
+ : isProjectLive
+
if (milestones.length === 0) {
return isCustomer ? null : (
@@ -84,6 +89,7 @@ class CreateSimplePlan extends React.Component {
projectMembers={project.members}
project={project}
isUpdatable={isProjectLive && !isCustomer}
+ isInReview={isInReview}
isCustomer={isCustomer}
/>
diff --git a/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx b/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx
index 0fd2b913b..97c52277f 100644
--- a/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx
+++ b/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx
@@ -259,6 +259,7 @@ class ManageMilestones extends React.Component {
onChangeMilestones,
isUpdatable,
isCustomer,
+ isInReview,
project,
} = this.props
@@ -338,13 +339,13 @@ class ManageMilestones extends React.Component {
{/* END DATE */}
{/* STATUS */}
{/* COPILOTS */}
- {(isUpdatable || isCustomer) && ()}{/* ACTION */}
+ {(isUpdatable || isInReview) && ()}{/* ACTION */}
@@ -373,6 +374,7 @@ class ManageMilestones extends React.Component {
phaseMembers={milestone.members}
isApproving={milestonesInApproval.indexOf(milestone.id) !== -1}
hideCheckbox={hideCheckbox}
+ isInReview={isInReview}
/>,
...this.renderChallengeTable(milestone)
]
@@ -397,6 +399,7 @@ ManageMilestones.propTypes = {
projectMembers: PT.arrayOf(PT.shape()),
isUpdatable: PT.bool,
isCustomer: PT.bool,
+ isInReview: PT.bool,
project: PT.shape()
}
diff --git a/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx b/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx
index f14a3c4c5..93024fb94 100644
--- a/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx
+++ b/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx
@@ -46,7 +46,8 @@ function MilestoneRow({
disableDeleteAction,
isCustomer,
isApproving,
- hideCheckbox
+ hideCheckbox,
+ isInReview
}) {
const isNeedApproval = milestone.status === PHASE_STATUS_IN_REVIEW
const showApproval = isCustomer && isNeedApproval
@@ -356,7 +357,7 @@ function MilestoneRow({
)}
{
- isCustomer && (
+ (isCustomer && isInReview) && (
{
@@ -405,6 +406,7 @@ MilestoneRow.propTypes = {
isCustomer: PT.bool,
members: PT.object,
hideCheckbox: PT.bool,
+ isInReview: PT.bool,
}
export default MilestoneRow
|