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