1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

another fix for determination of external IC in IC table, edit and delete buttons should not show in case of external ic

This commit is contained in:
Sonja Happ 2021-02-24 11:28:46 +01:00
parent 64e504b939
commit a4223aa6d0

View file

@ -405,7 +405,7 @@ class InfrastructureComponents extends Component {
<Table data={ics}>
<TableColumn
checkbox
checkboxDisabled={(index) => this.isExternalIC(index, ics)}
checkboxDisabled={(index) => this.isExternalIC(index, ics) === true}
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, ics)}
editButton = {(index) => this.isExternalIC(index, ics) !== true}
exportButton
deleteButton = {(index) => !this.isExternalIC(index, ics)}
deleteButton = {(index) => this.isExternalIC(index, ics) !== true}
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})}