Compare commits
1 Commits
hide-menu-
...
hide-profi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b86c36e8a |
@@ -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,6 +54,7 @@ class NavRightList extends React.Component {
|
|||||||
targetOrigin={{ horizontal: 'right', vertical: 'top' }}
|
targetOrigin={{ horizontal: 'right', vertical: 'top' }}
|
||||||
menuStyle={{ minWidth: '150px' }}
|
menuStyle={{ minWidth: '150px' }}
|
||||||
>
|
>
|
||||||
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onTouchTap={(e) => this.handleChange(e, `/app/authorizedusers/${this.state.useruuid}`)}
|
onTouchTap={(e) => this.handleChange(e, `/app/authorizedusers/${this.state.useruuid}`)}
|
||||||
primaryText="Profile"
|
primaryText="Profile"
|
||||||
@@ -55,6 +62,8 @@ class NavRightList extends React.Component {
|
|||||||
innerDivStyle={listItemStyle}
|
innerDivStyle={listItemStyle}
|
||||||
leftIcon={<i className="material-icons">account_circle</i>}
|
leftIcon={<i className="material-icons">account_circle</i>}
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
|
{!loggedUser.anyOf(visitReporter) &&
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onTouchTap={(e) => this.handleChange(e, `/app/form/steppers/${this.state.useruuid}`)}
|
onTouchTap={(e) => this.handleChange(e, `/app/form/steppers/${this.state.useruuid}`)}
|
||||||
primaryText="Book Ride"
|
primaryText="Book Ride"
|
||||||
@@ -62,6 +71,16 @@ class NavRightList extends React.Component {
|
|||||||
style={{ fontSize: '14px', lineHeight: '48px' }}
|
style={{ fontSize: '14px', lineHeight: '48px' }}
|
||||||
leftIcon={<i className="material-icons">mode_edit</i>}
|
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