mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
minor changes
This commit is contained in:
parent
e31c512c2d
commit
2b5f5568c8
2 changed files with 4 additions and 15 deletions
|
@ -32,6 +32,7 @@ class EditResultDialog extends React.Component {
|
|||
configSnapshots: '',
|
||||
description: '',
|
||||
resultFileIDs: [],
|
||||
id:0,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -50,22 +51,14 @@ class EditResultDialog extends React.Component {
|
|||
|
||||
handleChange = event => {
|
||||
this.setState({ [event.target.id]: event.target.value });
|
||||
|
||||
let description = true;
|
||||
|
||||
if (this.state.description === '') {
|
||||
description = false;
|
||||
}
|
||||
|
||||
this.valid = description;
|
||||
|
||||
};
|
||||
|
||||
resetState = () => {
|
||||
this.setState({
|
||||
configSnapshots: this.props.configSnapshots,
|
||||
description: this.props.configSnapshots,
|
||||
description: this.props.description,
|
||||
resultFileIDs: this.props.resultFileIDs,
|
||||
id: this.props.id,
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -94,7 +87,7 @@ class EditResultDialog extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
return <Dialog show={this.props.show} title={'Edit Result No. '+this.state.no} buttonTitle='Save' onClose={this.onClose} onReset={this.resetState} valid={true}>
|
||||
return <Dialog show={this.props.show} title={'Edit Result No. '+this.state.id} buttonTitle='Save' onClose={this.onClose} onReset={this.resetState} valid={true}>
|
||||
<form>
|
||||
<FormGroup as={Col} controlId='description'>
|
||||
<FormLabel column={false}>Description</FormLabel>
|
||||
|
|
|
@ -35,17 +35,13 @@ class NewResultDialog extends React.Component {
|
|||
onClose(canceled) {
|
||||
console.log("on close new result");
|
||||
if (canceled === false) {
|
||||
//if (this.valid) {
|
||||
this.props.onClose(this.state);
|
||||
// }
|
||||
} else {
|
||||
this.props.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
handleChange(e) {
|
||||
console.log("handle change, e:");
|
||||
console.log(e);
|
||||
this.setState({ [e.target.id]: e.target.value });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue