Show validation errors on eligibility check

This commit is contained in:
GotPPay
2018-05-21 17:21:23 +02:00
parent 6ec37630f3
commit 7728262f29

View File

@@ -3,16 +3,13 @@ import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
export class ValidationErrorsInfoDialog extends React.Component {
constructor(props) {
super(props)
this.props = props;
this.state = {
state = {
open: this.props.open,
}
}
componentWillReceiveProps(newProps) {
this.setState({ open: newProps.open });
componentWillReceiveProps(newProps){
this.setState({open: newProps.open});
}
handleOpen = () => {
@@ -38,18 +35,18 @@ export class ValidationErrorsInfoDialog extends React.Component {
return (
<div>
<Dialog
title="Errors"
title="Erors"
actions={actions}
modal={this.props.modal ? this.props.modal : false}
open={this.state.open}
onRequestClose={this.handleClose}
overlayStyle={{ backgroundColor: 'transparent' }}
overlayStyle={{backgroundColor: 'transparent'}}
>
{this.props.errorMessages.map(errorMessage => {
return (
<div>
<a>{errorMessage.message}</a>
<br />
<br/>
</div>
);
})}
@@ -57,6 +54,6 @@ export class ValidationErrorsInfoDialog extends React.Component {
</div>
);
}
}
}
module.exports = ValidationErrorsInfoDialog;
module.exports = ValidationErrorsInfoDialog;