@@ -16,7 +16,7 @@ import MilestoneMoveDateButton from '../components/MilestoneMoveDateButton'
1616import * as milestoneHelper from '../components/helpers/milestone'
1717import IconUnselect from '../../../../../assets/icons/icon-disselect.svg'
1818import IconCopilot from '../../../../../assets/icons/icon-copilot.svg'
19- import { CHALLENGE_ID_MAPPING , PHASE_STATUS_IN_REVIEW } from '../../../../../config/constants'
19+ import { CHALLENGE_ID_MAPPING , PHASE_STATUS_IN_REVIEW , PROJECT_STATUS_CANCELLED , PROJECT_STATUS_COMPLETED } from '../../../../../config/constants'
2020
2121import './ManageMilestones.scss'
2222import MilestoneApprovalButton from '../components/MilestoneApprovalButton'
@@ -256,8 +256,11 @@ class ManageMilestones extends React.Component {
256256 onChangeMilestones,
257257 isUpdatable,
258258 isCustomer,
259+ project,
259260 } = this . props
260261
262+ const hideCheckbox = project . status === PROJECT_STATUS_CANCELLED || project . status === PROJECT_STATUS_COMPLETED
263+
261264 // const isNeedApproval = project.status === PROJECT_STATUS_IN_REVIEW
262265 const isNeedApproval = ! milestones . filter ( ms => ms . selected === true ) . find ( ms => ! ( ms . status === PHASE_STATUS_IN_REVIEW ) )
263266 const canShowApproval = isCustomer && isNeedApproval
@@ -325,7 +328,7 @@ class ManageMilestones extends React.Component {
325328 < table styleName = "milestones-table" >
326329 < colgroup >
327330 < col style = { { width : '20px' } } />
328- < col style = { { width : '20px' } } /> { /* CHECKBOX */ }
331+ { hideCheckbox ? null : < col style = { { width : '20px' } } /> } { /* CHECKBOX */ }
329332 < col style = { { width : '8%' } } /> { /* MILESTONE */ }
330333 < col /> { /* DESCRIPTION */ }
331334 < col style = { { width : '12%' } } /> { /* START DATE */ }
@@ -339,6 +342,7 @@ class ManageMilestones extends React.Component {
339342 milestones = { milestones }
340343 onChangeMilestones = { onChangeMilestones }
341344 isUpdatable = { isUpdatable || isCustomer }
345+ hideCheckbox = { hideCheckbox }
342346 />
343347 </ thead >
344348 < tbody >
@@ -365,6 +369,7 @@ class ManageMilestones extends React.Component {
365369 onApprove = { this . onApprove }
366370 phaseMembers = { milestone . members }
367371 isApproving = { milestonesInApproval . indexOf ( milestone . id ) !== - 1 }
372+ hideCheckbox = { hideCheckbox }
368373 /> ,
369374 ...this . renderChallengeTable ( milestone )
370375 ]
0 commit comments