Skip to content

Commit d6439ee

Browse files
authored
Merge pull request #4454 from yoution/feature/new-milestone-concept
- Fix customer view table (hide challenges view, adjust width) - Fixes for #4450, #4451, #4452, #4454 (excluding hiding checkboxes for customer as it is needed for approval)
2 parents fe8d458 + 8ea95c7 commit d6439ee

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ManageMilestones extends React.Component {
181181
const {
182182
isUpdatable
183183
} = this.props
184-
if (!this.isExpandChallengeList(milestone)) {
184+
if (!isUpdatable ||!this.isExpandChallengeList(milestone)) {
185185
return <tr />
186186
}
187187

@@ -258,8 +258,8 @@ class ManageMilestones extends React.Component {
258258
<IconGnattView />
259259
</button>
260260
<div styleName="separator" /> */}
261-
{canEdit ? <div styleName="unselect-bottom" onClick={this.onUnselectAll}>
262-
<IconUnselect /> {this.getSelectCount()} PROJECTS SELECTED
261+
{this.getSelectCount() > 0 ? <div styleName="unselect-bottom" onClick={this.onUnselectAll}>
262+
<IconUnselect /> {this.getSelectCount()} PROJECT(S) SELECTED
263263
</div>: null }
264264
{canEdit ? <div styleName="line"/>: null}
265265
{ canEdit ? <div styleName="delete-button">
@@ -284,17 +284,6 @@ class ManageMilestones extends React.Component {
284284
<div styleName="table-container">
285285
<Formsy.Form>
286286
<table styleName="milestones-table">
287-
<colgroup>
288-
<col style={{ width: '20px' }} />
289-
<col style={{ width: '20px' }} />{/* CHECKBOX */}
290-
<col style={{ width: '8%' }} />{/* MILESTONE */}
291-
<col />{/* DESCRIPTION */}
292-
<col style={{ width: '12%' }} />{/* START DATE */}
293-
<col style={{ width: '11%' }} />{/* END DATE */}
294-
<col style={{ width: '10%' }} />{/* STATUS */}
295-
<col style={{ width: '13%' }} />{/* COPILOTS */}
296-
{isUpdatable && (<col style={{ width: '64px' }} />)}{/* ACTION */}
297-
</colgroup>
298287
<thead>
299288
<MilestoneHeaderRow
300289
milestones={milestones}

src/projects/detail/components/SimplePlan/components/ConfirmMoveMilestoneDate/ConfirmMoveMilestoneDate.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
margin-bottom: 10px;
2727
>input {
2828
height: 26px;
29+
line-height: 26px;
2930
width: 80px;
3031
margin: 0 10px 0 0;
3132
}

src/projects/detail/components/SimplePlan/components/MilestoneHeaderRow/MilestoneHeaderRow.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable }) {
3131

3232
return (
3333
<tr styleName="milestone-row">
34-
<th />
34+
{isUpdatable ? <th />: null}
3535
<th>
3636
<TCFormFields.Checkbox
3737
name="select-all"

src/projects/detail/components/SimplePlan/components/MilestoneMoveDateButton/MilestoneMoveDateButton.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
height: 14px;
44
padding: 0;
55
border: 0;
6+
margin: 0 8px;
67
cursor: pointer;
78

89
svg {

src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function MilestoneRow({
5050

5151
return edit ? (
5252
<tr styleName="milestone-row" className="edit-milestone-row">
53-
<td />
53+
{isUpdatable ? <td /> : null}
5454
<td styleName="checkbox">
5555
<TCFormFields.Checkbox
5656
name={`select-${rowId}`}
@@ -251,7 +251,7 @@ function MilestoneRow({
251251
</tr>
252252
) : (
253253
<tr styleName="milestone-row">
254-
<td styleName="expand" onClick={() => onExpand(!isExpand, milestone)}>{isExpand ? <IconClose />: <IconExpand />}</td>
254+
{isUpdatable ? <td styleName="expand" onClick={() => onExpand(!isExpand, milestone)}>{isExpand ? <IconClose />: <IconExpand />}</td>: null}
255255
<td styleName="checkbox">
256256
<TCFormFields.Checkbox
257257
name={`select-${rowId}`}

src/projects/detail/components/SimplePlan/components/MilestoneRow/MilestoneRow.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,9 @@
153153
> *:not(:last-child) {
154154
margin-right: 10px;
155155
}
156+
svg {
157+
width: 14px;
158+
height: 14px;
159+
}
156160
}
157161
}

0 commit comments

Comments
 (0)