mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
fix determination of external IC in IC table
This commit is contained in:
parent
e22c0ca659
commit
64e504b939
1 changed files with 5 additions and 5 deletions
|
@ -393,8 +393,8 @@ class InfrastructureComponents extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
isExternalIC(index){
|
||||
let ic = this.state.ics[index]
|
||||
isExternalIC(index, ics){
|
||||
let ic = ics[index]
|
||||
return ic.managedexternally
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ class InfrastructureComponents extends Component {
|
|||
<Table data={ics}>
|
||||
<TableColumn
|
||||
checkbox
|
||||
checkboxDisabled={(index) => this.isExternalIC(index)}
|
||||
checkboxDisabled={(index) => this.isExternalIC(index, ics)}
|
||||
onChecked={(ic, event) => this.onICChecked(ic, event)}
|
||||
width='30'
|
||||
/>
|
||||
|
@ -438,9 +438,9 @@ class InfrastructureComponents extends Component {
|
|||
{this.state.currentUser.role === "Admin" ?
|
||||
<TableColumn
|
||||
width='150'
|
||||
editButton = {(index) => !this.isExternalIC(index)}
|
||||
editButton = {(index) => !this.isExternalIC(index, ics)}
|
||||
exportButton
|
||||
deleteButton = {(index) => !this.isExternalIC(index)}
|
||||
deleteButton = {(index) => !this.isExternalIC(index, ics)}
|
||||
onEdit={index => this.setState({editModal: true, modalIC: ics[index], modalIndex: index})}
|
||||
onExport={index => this.exportIC(index)}
|
||||
onDelete={index => this.setState({deleteModal: true, modalIC: ics[index], modalIndex: index})}
|
||||
|
|
Loading…
Add table
Reference in a new issue