Upstream sync
This commit is contained in:
@@ -6,11 +6,10 @@ import { hashHistory } from 'react-router';
|
||||
|
||||
import {
|
||||
loggedUser,
|
||||
planScheduler,
|
||||
providerScheduler,
|
||||
visitReporter,
|
||||
} from 'utils/authorization';
|
||||
|
||||
|
||||
const ImgIconButtonStyle = {
|
||||
width: '60px',
|
||||
height: '60px'
|
||||
@@ -35,7 +34,6 @@ class NavRightList extends React.Component {
|
||||
handleChange = (event, value) => {
|
||||
hashHistory.push(value);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const user = JSON.parse(localStorage.getItem('loggedUser'));
|
||||
if (user) {
|
||||
@@ -48,8 +46,6 @@ class NavRightList extends React.Component {
|
||||
<ul className="list-unstyled float-right">
|
||||
<li>
|
||||
|
||||
|
||||
|
||||
<IconMenu
|
||||
|
||||
iconButtonElement={<IconButton style={ImgIconButtonStyle}><img src="assets/images/ic_account_circle_white_48dp_1x.png" alt="" className="rounded-circle img30_30" /></IconButton>}
|
||||
@@ -67,16 +63,6 @@ class NavRightList extends React.Component {
|
||||
leftIcon={<i className="material-icons">account_circle</i>}
|
||||
/>
|
||||
}
|
||||
{loggedUser.anyOf(visitReporter) &&
|
||||
<MenuItem
|
||||
onTouchTap={(e) => this.handleChange(e, `/app/form/visit/${this.state.useruuid}`)}
|
||||
primaryText="Create Visit"
|
||||
innerDivStyle={listItemStyle}
|
||||
style={{ fontSize: '14px', lineHeight: '48px' }}
|
||||
leftIcon={<i className="material-icons">mode_edit</i>}
|
||||
/>
|
||||
}
|
||||
|
||||
{!loggedUser.anyOf(visitReporter) &&
|
||||
<MenuItem
|
||||
onTouchTap={(e) => this.handleChange(e, `/app/form/steppers/${this.state.useruuid}`)}
|
||||
@@ -86,20 +72,28 @@ class NavRightList extends React.Component {
|
||||
leftIcon={<i className="material-icons">mode_edit</i>}
|
||||
/>
|
||||
}
|
||||
|
||||
{loggedUser.anyOf(visitReporter) &&
|
||||
<MenuItem
|
||||
onTouchTap={(e) => this.handleChange(e, `/login`)}
|
||||
primaryText="Log Out"
|
||||
onTouchTap={(e) => this.handleChange(e, `/app/form/visit/${this.state.useruuid}`)}
|
||||
primaryText="Create Visit"
|
||||
innerDivStyle={listItemStyle}
|
||||
style={{ fontSize: '14px', lineHeight: '48px' }}
|
||||
leftIcon={<i className="material-icons">forward</i>}
|
||||
leftIcon={<i className="material-icons">mode_edit</i>}
|
||||
/>
|
||||
}
|
||||
<MenuItem
|
||||
onTouchTap={(e) => this.handleChange(e, `/login`)}
|
||||
primaryText="Log Out"
|
||||
innerDivStyle={listItemStyle}
|
||||
style={{ fontSize: '14px', lineHeight: '48px' }}
|
||||
leftIcon={<i className="material-icons">forward</i>}
|
||||
/>
|
||||
</IconMenu>
|
||||
</li>
|
||||
<li style={{ marginRight: '10px' }}><h6>{this.state.name}</h6></li>
|
||||
<li style={{ marginRight: '10px' }}><h6>{this.state.name}</h6></li>
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NavRightList;
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NavRightList;
|
||||
|
||||
Reference in New Issue
Block a user