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

fix for running state of scenarios, show active state of users with icon instead of text.

This commit is contained in:
Sonja Happ 2020-06-23 15:26:30 +02:00
parent 7894282618
commit 770d31ade1
2 changed files with 14 additions and 4 deletions

View file

@ -217,9 +217,9 @@ class Scenarios extends Component {
modifyRunningColumn(running){
if(running){
return <Icon icon='times' />
} else {
return <Icon icon='check' />
} else {
return <Icon icon='times' />
}
}

View file

@ -122,6 +122,16 @@ class Users extends Component {
}
};
modifyActiveColumn(active){
if(active){
return <Icon icon='check' />
} else {
return <Icon icon='times' />
}
}
render() {
return (
@ -132,8 +142,8 @@ class Users extends Component {
<TableColumn title='Username' width='150' dataKey='username' />
<TableColumn title='ID' width='150' dataKey='id' />
<TableColumn title='E-mail' dataKey='mail' />
<TableColumn title='Role' dataKey='role' modifier={(role) => this.getHumanRoleName(role)} />
<TableColumn title='Active' dataKey='active' />
<TableColumn title='Role' dataKey='role' modifier={(role) => this.getHumanRoleName(role)} />
<TableColumn title='Active' dataKey='active' modifier={(active) => this.modifyActiveColumn(active)} />
<TableColumn width='200' editButton deleteButton onEdit={index => this.setState({ editModal: true, modalData: this.state.users[index] })} onDelete={index => this.setState({ deleteModal: true, modalData: this.state.users[index] })} />
</Table>