Skip to content

Commit 4bfbbfa

Browse files
committed
fix: change table for customer view
1 parent 6f75f09 commit 4bfbbfa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 2 additions & 2 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,7 +258,7 @@ class ManageMilestones extends React.Component {
258258
<IconGnattView />
259259
</button>
260260
<div styleName="separator" /> */}
261-
{canEdit ? <div styleName="unselect-bottom" onClick={this.onUnselectAll}>
261+
{this.getSelectCount() > 0 ? <div styleName="unselect-bottom" onClick={this.onUnselectAll}>
262262
<IconUnselect /> {this.getSelectCount()} PROJECTS SELECTED
263263
</div>: null }
264264
{canEdit ? <div styleName="line"/>: null}

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/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}`}

0 commit comments

Comments
 (0)