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:
parent
f4d1c99766
commit
4b41bc3c23
5 changed files with 25 additions and 14 deletions
src
|
@ -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'
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -471,3 +471,7 @@ hr {
|
|||
.swagger-ui .wrapper {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.swagger-ui .info {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
|
|
@ -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/>
|
||||
|
|
Loading…
Add table
Reference in a new issue