File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
src/projects/detail/components/SimplePlan Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ class CreateSimplePlan extends React.Component {
4848 } = this . props
4949 const onClickMilestonesTab = ( ) => { }
5050
51- const isUpdatable =
52- isCustomer ? project . status === PHASE_STATUS_IN_REVIEW
51+ const isInReview =
52+ isCustomer ? ( milestones . filter ( x => x . status === PHASE_STATUS_IN_REVIEW ) . length > 0 && isProjectLive )
5353 : isProjectLive
5454
5555 if ( milestones . length === 0 ) {
@@ -88,7 +88,8 @@ class CreateSimplePlan extends React.Component {
8888 onApproveMilestones = { onApproveMilestones }
8989 projectMembers = { project . members }
9090 project = { project }
91- isUpdatable = { isUpdatable }
91+ isUpdatable = { isProjectLive && ! isCustomer }
92+ isInReview = { isInReview }
9293 isCustomer = { isCustomer }
9394 />
9495 </ div >
Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ class ManageMilestones extends React.Component {
259259 onChangeMilestones,
260260 isUpdatable,
261261 isCustomer,
262+ isInReview,
262263 project,
263264 } = this . props
264265
@@ -338,13 +339,13 @@ class ManageMilestones extends React.Component {
338339 < col style = { { width : '11%' } } /> { /* END DATE */ }
339340 < col style = { { width : '10%' } } /> { /* STATUS */ }
340341 < col style = { { width : '13%' } } /> { /* COPILOTS */ }
341- { ( isUpdatable ) && ( < col style = { { width : '64px' } } /> ) } { /* ACTION */ }
342+ { ( isUpdatable || isInReview ) && ( < col style = { { width : '64px' } } /> ) } { /* ACTION */ }
342343 </ colgroup >
343344 < thead >
344345 < MilestoneHeaderRow
345346 milestones = { milestones }
346347 onChangeMilestones = { onChangeMilestones }
347- isUpdatable = { isUpdatable }
348+ isUpdatable = { isUpdatable || isInReview }
348349 hideCheckbox = { hideCheckbox }
349350 />
350351 </ thead >
@@ -373,6 +374,7 @@ class ManageMilestones extends React.Component {
373374 phaseMembers = { milestone . members }
374375 isApproving = { milestonesInApproval . indexOf ( milestone . id ) !== - 1 }
375376 hideCheckbox = { hideCheckbox }
377+ isInReview = { isInReview }
376378 /> ,
377379 ...this . renderChallengeTable ( milestone )
378380 ]
@@ -397,6 +399,7 @@ ManageMilestones.propTypes = {
397399 projectMembers : PT . arrayOf ( PT . shape ( ) ) ,
398400 isUpdatable : PT . bool ,
399401 isCustomer : PT . bool ,
402+ isInReview : PT . bool ,
400403 project : PT . shape ( )
401404}
402405
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ function MilestoneRow({
4646 disableDeleteAction,
4747 isCustomer,
4848 isApproving,
49- hideCheckbox
49+ hideCheckbox,
50+ isInReview
5051} ) {
5152 const isNeedApproval = milestone . status === PHASE_STATUS_IN_REVIEW
5253 const showApproval = isCustomer && isNeedApproval
@@ -356,7 +357,7 @@ function MilestoneRow({
356357 </ td >
357358 ) }
358359 {
359- ( isCustomer && isUpdatable ) && (
360+ ( isCustomer && isInReview ) && (
360361 < td styleName = "action" >
361362 < div styleName = "inline-menu approve" >
362363 {
@@ -405,6 +406,7 @@ MilestoneRow.propTypes = {
405406 isCustomer : PT . bool ,
406407 members : PT . object ,
407408 hideCheckbox : PT . bool ,
409+ isInReview : PT . bool ,
408410}
409411
410412export default MilestoneRow
You can’t perform that action at this time.
0 commit comments