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

smaller bug fixes

This commit is contained in:
Steffen Vogel 2021-03-09 00:25:17 +01:00
parent f4d1c99766
commit 4b41bc3c23
5 changed files with 25 additions and 14 deletions

View file

@ -116,13 +116,10 @@ class EditFilesDialog extends React.Component {
valid={true}
>
<Table data={this.props.files}>
{this.state.currentUser.role === "Admin" ?
<TableColumn
title='ID'
dataKey='id'
/>
: <></>
}
<TableColumn
title='Name'
dataKey='name'

View file

@ -803,7 +803,7 @@ class Scenario extends React.Component {
onEdit={index => this.setState({ editInputSignalsModal: true, modalConfigData: this.state.configs[index], modalConfigIndex: index })}
/>
<TableColumn
title='Signal AutoConf'
title='Import Signals'
exportButton
onExport={(index) => this.signalsAutoConf(index)}
/>
@ -1048,6 +1048,7 @@ class Scenario extends React.Component {
<TableColumn
title=''
width='200'
align='right'
deleteButton
onDelete={(index) => this.setState({
deleteUserModal: true,
@ -1057,7 +1058,12 @@ class Scenario extends React.Component {
/>
</Table>
<InputGroup style={{ width: 400, float: 'right' }}>
<InputGroup
style={{
width: 400,
float: 'right'
}}
>
<Form.Control
placeholder="Username"
onChange={(e) => this.onUserInputChange(e)}
@ -1077,6 +1083,7 @@ class Scenario extends React.Component {
</InputGroup.Append>
</InputGroup>
<br />
<br />
<DeleteDialog
title="Delete user from scenario"

View file

@ -289,7 +289,7 @@ class EditSignalMappingDialog extends React.Component {
variant='secondary'
key={51}
onClick={() => this.handleRemove()} style={buttonStyle}>
<Icon icon="minus" />Remove
<Icon icon="minus" /> Remove
</Button>
<Button
variant='secondary'

View file

@ -471,3 +471,7 @@ hr {
.swagger-ui .wrapper {
padding: 0 !important;
}
.swagger-ui .info {
margin-top: 10px;
}

View file

@ -59,22 +59,25 @@ class User extends Component {
this.setState({ editModal: false });
let updatedData = {}
updatedData.id = this.state.currentUser.id;
let updatedUser = this.state.currentUser;
let hasChanged = false;
let pwChanged = false;
updatedData.id = this.state.currentUser.id;
if (data) {
if (data.username !== '') {
if (data.username !== this.state.currentUser.username) {
hasChanged = true;
updatedData.username = data.username;
updatedUser.username = data.username
}
if (data.mail !== '') {
if (data.mail !== this.state.currentUser.mail) {
hasChanged = true;
updatedData.mail = data.mail;
updatedUser.mail = data.mail;
}
if (data.password !== '' && data.oldPassword !== '' && data.password === data.confirmPassword ) {
pwChanged = true;
updatedData.password = data.password;
@ -142,7 +145,7 @@ class User extends Component {
<EditOwnUserDialog
show={this.state.editModal}
onClose={(data) => this.closeEditModal(data)}
user={this.state.currentUser}
user={user}
/>
</>
: <div/>