|
|
@ -120,6 +120,15 @@ class ProgramSequenceView extends React.Component<{ |
|
|
|
const { sequence, sections } = this.props; |
|
|
|
const { sequence, sections } = this.props; |
|
|
|
const editing = this.props.editing || false; |
|
|
|
const editing = this.props.editing || false; |
|
|
|
const className = classNames("programSequence", { editing }); |
|
|
|
const className = classNames("programSequence", { editing }); |
|
|
|
|
|
|
|
let addButton: React.ReactNode = null; |
|
|
|
|
|
|
|
if (editing) { |
|
|
|
|
|
|
|
addButton = ( |
|
|
|
|
|
|
|
<Button onClick={this.addItem}> |
|
|
|
|
|
|
|
<Icon name="add"/> |
|
|
|
|
|
|
|
Add item |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<ProgramSequenceList |
|
|
|
<ProgramSequenceList |
|
|
@ -133,10 +142,7 @@ class ProgramSequenceView extends React.Component<{ |
|
|
|
onRemove={this.removeItem} |
|
|
|
onRemove={this.removeItem} |
|
|
|
onSortEnd={this.onSortEnd} |
|
|
|
onSortEnd={this.onSortEnd} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Button onClick={this.addItem}> |
|
|
|
{addButton} |
|
|
|
<Icon name="add"/> |
|
|
|
|
|
|
|
Add item |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|