diff --git a/src/components/Shared/ValidationErrorsInfoDialog.js b/src/components/Shared/ValidationErrorsInfoDialog.js index c42fd6f..f0efe0c 100644 --- a/src/components/Shared/ValidationErrorsInfoDialog.js +++ b/src/components/Shared/ValidationErrorsInfoDialog.js @@ -3,57 +3,60 @@ import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; export class ValidationErrorsInfoDialog extends React.Component { - - state = { + constructor(props) { + super(props) + this.props = props; + this.state = { open: this.props.open, } - - componentWillReceiveProps(newProps){ - this.setState({open: newProps.open}); - } - - handleOpen = () => { - this.setState({ open: true }); - }; - - handleClose = () => { - this.setState({ open: false }); - this.props.onDismiss(); - }; - - render() { - - const actions = [ - , - ]; - - return ( -
- - {this.props.errorMessages.map(errorMessage => { - return ( -
- {errorMessage.message} -
-
- ); - })} -
-
- ); - } } - module.exports = ValidationErrorsInfoDialog; \ No newline at end of file + componentWillReceiveProps(newProps) { + this.setState({ open: newProps.open }); + } + + handleOpen = () => { + this.setState({ open: true }); + }; + + handleClose = () => { + this.setState({ open: false }); + this.props.onDismiss(); + }; + + render() { + + const actions = [ + , + ]; + + return ( +
+ + {this.props.errorMessages.map(errorMessage => { + return ( +
+ {errorMessage.message} +
+
+ ); + })} +
+
+ ); + } +} + +module.exports = ValidationErrorsInfoDialog; \ No newline at end of file diff --git a/src/components/Sidenav/SidenavContent.js b/src/components/Sidenav/SidenavContent.js index eec00f4..f017ccb 100644 --- a/src/components/Sidenav/SidenavContent.js +++ b/src/components/Sidenav/SidenavContent.js @@ -7,6 +7,7 @@ import { loggedUser, planScheduler, providerScheduler, + visitReporter, } from 'utils/authorization'; class SidebarContent extends React.Component { @@ -66,7 +67,6 @@ class SidebarContent extends React.Component { $subUl.stop().slideToggle(slideTime); }); - // HighlightActiveItems const $links = $nav.find('a'); const currentLocation = hashHistory.getCurrentLocation(); @@ -101,27 +101,34 @@ class SidebarContent extends React.Component { return (