Access to User Profile enabled

This commit is contained in:
Luis Fernando Molina committed 2018-10-14 08:17:44 +02:00
1 parent 558ed31180
commit 20eb098966
5 files changed
+16 -7

No files matched your search

+9
View File
@@ -12,9 +12,11 @@ import BrowseIcon from '@material-ui/icons/ImportContacts'
import SearchIcon from '@material-ui/icons/Search'
import ContactIcon from '@material-ui/icons/ContactMail'
import AboutIcon from '@material-ui/icons/FormatShapes'
import UserIcon from '@material-ui/icons/Person'
import { Link } from 'react-router-dom'
const UserLink = props => <Link to='/user' {...props} />
const AboutLink = props => <Link to='/about' {...props} />
const ContactLink = props => <Link to='/contact' {...props} />
const SearchLink = props => <Link to='/search' {...props} />
@@ -97,6 +99,13 @@ class NavBar extends Component {
component={AboutLink}>
<AboutIcon />
</IconButton>
<IconButton
className={classes.menuButton}
color='inherit'
title='Your Profile'
component={UserLink}>
<UserIcon />
</IconButton>
</Toolbar>
</AppBar>
</div>
+1 -1
View File
@@ -244,7 +244,7 @@ class ProfileSheet extends Component {
let authId = localStorage.getItem('authId')
let userData = localStorage.getItem('loggedInUser')
if (userData === 'undefined') { return }
if (userData === 'undefined' || userData === null) { return }
let user = JSON.parse(userData)
this.defaultValuesSet = true
+2 -2
View File
@@ -113,7 +113,7 @@ class UserList extends Component {
/>
<CardContent>
<Typography gutterBottom variant="headline" component="h2">
<Typography gutterBottom variant="h5" component="h2">
{user.alias}
</Typography>
<Typography className={classes.typography} gutterBottom>
@@ -136,7 +136,7 @@ class UserList extends Component {
<IconButton color="inherit" onClick={this.handleClose} aria-label="Close">
<CloseIcon />
</IconButton>
<Typography variant="title" color="inherit" className={classes.flex}>
<Typography variant="h6" color="inherit" className={classes.flex}>
User Profile
</Typography>
<Button color="inherit" onClick={this.handleClose}>
+2 -2
View File
@@ -66,12 +66,12 @@ class UserProfile extends Component {
/>
<CardContent>
<Typography className={classes.typography} gutterBottom variant='headline' component='h2'>
<Typography className={classes.typography} gutterBottom variant='h5' component='h2'>
{ user.firstName } { user.lastName } ( {user.alias} )
</Typography>
<Divider />
<Typography className={classes.typography} align='left' gutterBottom variant='subheading' component='h2'>
<Typography className={classes.typography} align='left' gutterBottom variant='subtitle1' component='h2'>
{ user.role.name }
</Typography>
<Divider />
+2 -2
View File
@@ -175,7 +175,7 @@ class UserSearch extends Component {
/>
<CardContent>
<Typography gutterBottom variant='headline' component='h2'>
<Typography gutterBottom variant='h5' component='h2'>
{user.alias}
</Typography>
</CardContent>
@@ -202,7 +202,7 @@ class UserSearch extends Component {
<div>
<form onSubmit={this.submitForm.bind(this)}>
<Typography className={classes.formTypography} variant='body1' gutterBottom align='left'>
<Typography className={classes.formTypography} variant='body2' gutterBottom align='left'>
Use any of these fileds to search for users. {this.selectText()}
</Typography>