diff --git a/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx b/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx index b781ea3f5..532e2d709 100644 --- a/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx +++ b/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx @@ -247,6 +247,7 @@ class ManageMilestones extends React.Component { isUpdatable, } = this.props + const isEditingMilestone = !!_.find(milestones, m => m.edit) const canEdit = isUpdatable && this.getSelectCount() > 0 return (
@@ -286,6 +287,7 @@ class ManageMilestones extends React.Component { ( [ selected = selected && milestone.selected, milestones.length > 0 @@ -32,7 +32,7 @@ function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable }) { return ( {isUpdatable ? + } @@ -54,6 +54,7 @@ function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable }) { MilestoneHeaderRow.propTypes = { onChangeMilestones: PT.func, + isEditingMilestone: PT.bool, } export default MilestoneHeaderRow diff --git a/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx b/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx index ce4012c53..c598245a9 100644 --- a/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx +++ b/src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx @@ -26,6 +26,7 @@ const TCFormFields = FormsyForm.Fields function MilestoneRow({ isExpand, + isEditingMilestone, milestone, rowId, onExpand, @@ -51,7 +52,7 @@ function MilestoneRow({ return edit ? ( {isUpdatable ? + } : null} - + } @@ -309,6 +310,7 @@ function MilestoneRow({ MilestoneRow.propTypes = { milestone: PT.shape(), + isEditingMilestone: PT.bool, rowId: PT.string, onChange: PT.func, onSave: PT.func,
: null} - + {isEditingMilestone? : - MILESTONE DESCRIPTION START DATE
: null} - + {isEditingMilestone ? : - {isUpdatable ? onExpand(!isExpand, milestone)}>{isExpand ? : } + {isEditingMilestone ? : - {milestone.name}