Skip to content

Commit 76c76e6

Browse files
committed
fix save copilot issue
1 parent 6dce7b4 commit 76c76e6

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import './MilestoneHeaderRow.scss'
99

1010
const TCFormFields = FormsyForm.Fields
1111

12-
function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable }) {
12+
function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable, hideCheckbox }) {
1313
const checked = milestones.reduce(
1414
(selected, milestone) => selected = selected && milestone.selected,
1515
milestones.length > 0
@@ -31,16 +31,18 @@ function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable }) {
3131

3232
return (
3333
<tr styleName="milestone-row">
34-
{isUpdatable ? <th />: null}
35-
<th>
36-
<TCFormFields.Checkbox
37-
name="select-all"
38-
value={checked}
39-
onChange={(_, value) => {
40-
value ? selectAll() : unselectAll()
41-
}}
42-
/>
43-
</th>
34+
<th />
35+
{
36+
hideCheckbox ? <th /> : <th>
37+
<TCFormFields.Checkbox
38+
name="select-all"
39+
value={checked}
40+
onChange={(_, value) => {
41+
value ? selectAll() : unselectAll()
42+
}}
43+
/>
44+
</th>
45+
}
4446
<th>MILESTONE</th>
4547
<th>DESCRIPTION</th>
4648
<th>START DATE</th>
@@ -54,6 +56,7 @@ function MilestoneHeaderRow ({ milestones, onChangeMilestones, isUpdatable }) {
5456

5557
MilestoneHeaderRow.propTypes = {
5658
onChangeMilestones: PT.func,
59+
hideCheckbox: PT.bool,
5760
}
5861

5962
export default MilestoneHeaderRow

src/projects/detail/containers/DashboardContainer.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ class DashboardContainer extends React.Component {
275275
...action.payload,
276276
edit: this.state.createGameplanPhases[idx].edit,
277277
selected: this.state.createGameplanPhases[idx].selected,
278+
products: this.state.createGameplanPhases[idx].products,
279+
challenges: this.state.createGameplanPhases[idx].challenges,
278280
members
279281
})
280282
this.setState({ createGameplanPhases: updatedCreateGameplanPhases })

0 commit comments

Comments
 (0)