hide profile from top menu and substitute book ride for visit
This commit is contained in:
@@ -4,6 +4,12 @@ import MenuItem from 'material-ui/MenuItem';
|
|||||||
import IconButton from 'material-ui/IconButton/IconButton';
|
import IconButton from 'material-ui/IconButton/IconButton';
|
||||||
import { hashHistory } from 'react-router';
|
import { hashHistory } from 'react-router';
|
||||||
|
|
||||||
|
import {
|
||||||
|
loggedUser,
|
||||||
|
visitReporter,
|
||||||
|
} from 'utils/authorization';
|
||||||
|
|
||||||
|
|
||||||
const ImgIconButtonStyle = {
|
const ImgIconButtonStyle = {
|
||||||
width: '60px',
|
width: '60px',
|
||||||
height: '60px'
|
height: '60px'
|
||||||
@@ -48,20 +54,33 @@ class NavRightList extends React.Component {
|
|||||||
targetOrigin={{ horizontal: 'right', vertical: 'top' }}
|
targetOrigin={{ horizontal: 'right', vertical: 'top' }}
|
||||||
menuStyle={{ minWidth: '150px' }}
|
menuStyle={{ minWidth: '150px' }}
|
||||||
>
|
>
|
||||||
<MenuItem
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
onTouchTap={(e) => this.handleChange(e, `/app/authorizedusers/${this.state.useruuid}`)}
|
<MenuItem
|
||||||
primaryText="Profile"
|
onTouchTap={(e) => this.handleChange(e, `/app/authorizedusers/${this.state.useruuid}`)}
|
||||||
style={{ fontSize: '14px', lineHeight: '48px' }}
|
primaryText="Profile"
|
||||||
innerDivStyle={listItemStyle}
|
style={{ fontSize: '14px', lineHeight: '48px' }}
|
||||||
leftIcon={<i className="material-icons">account_circle</i>}
|
innerDivStyle={listItemStyle}
|
||||||
/>
|
leftIcon={<i className="material-icons">account_circle</i>}
|
||||||
<MenuItem
|
/>
|
||||||
onTouchTap={(e) => this.handleChange(e, `/app/form/steppers/${this.state.useruuid}`)}
|
}
|
||||||
primaryText="Book Ride"
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
innerDivStyle={listItemStyle}
|
<MenuItem
|
||||||
style={{ fontSize: '14px', lineHeight: '48px' }}
|
onTouchTap={(e) => this.handleChange(e, `/app/form/steppers/${this.state.useruuid}`)}
|
||||||
leftIcon={<i className="material-icons">mode_edit</i>}
|
primaryText="Book Ride"
|
||||||
/>
|
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/visit/${this.state.useruuid}`)}
|
||||||
|
primaryText="Create Visit"
|
||||||
|
innerDivStyle={listItemStyle}
|
||||||
|
style={{ fontSize: '14px', lineHeight: '48px' }}
|
||||||
|
leftIcon={<i className="material-icons">mode_edit</i>}
|
||||||
|
/>
|
||||||
|
}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onTouchTap={(e) => this.handleChange(e, `/login`)}
|
onTouchTap={(e) => this.handleChange(e, `/login`)}
|
||||||
primaryText="Log Out"
|
primaryText="Log Out"
|
||||||
|
|||||||
Reference in New Issue
Block a user