diff --git a/assets/js/VacancyPage.jsx b/assets/js/VacancyPage.jsx index 084cba0f52413835ff7b8de2cf0b8c574ac102ea..afa2d70d008dace20cb34dea4798749e05e61c70 100644 --- a/assets/js/VacancyPage.jsx +++ b/assets/js/VacancyPage.jsx @@ -13,7 +13,7 @@ export default class VacancyPage extends React.Component { const role = user.role; if (role === 'student') { return user.data.student.id; - } else if (role === 'company' || role === 'admin') { + } else if (role === 'company') { return user.data.company.id; } @@ -57,7 +57,7 @@ export default class VacancyPage extends React.Component { </Pane> </Tabs> ); - } else if (this.props.user.role === 'company' || this.props.user.role === 'admin') { + } else if (this.props.user.role === 'company') { return ( <VacancyList key={1} userId={this.state.id} url={`/companies/${this.state.id}/vacancies/`} @@ -68,14 +68,15 @@ export default class VacancyPage extends React.Component { return ( <div> <h3> - Anda tidak terautentifikasi. Harap logout dan login - kembali dengan akun yang benar - </h3> + Anda tidak terautentifikasi. Harap logout dan login + kembali dengan akun yang benar + </h3> </div> ); } } + render() { return ( <div className="applicant"> @@ -83,4 +84,5 @@ export default class VacancyPage extends React.Component { </div> ); } -} + } + diff --git a/assets/js/components/TopMenu.jsx b/assets/js/components/TopMenu.jsx index 96b27829853fd2799b338d840b67c5d105996556..b5bc1f27efb19d8a7f59e15739e17391e65b8707 100644 --- a/assets/js/components/TopMenu.jsx +++ b/assets/js/components/TopMenu.jsx @@ -4,6 +4,8 @@ import { Link, browserHistory } from 'react-router'; import Server from '../lib/Server'; import Storage from '../lib/Storage'; +const defaultImage = 'http://semantic-ui.com/images/avatar/small/elliot.jpg'; + export default class TopMenu extends React.Component { static propTypes = { @@ -30,6 +32,8 @@ export default class TopMenu extends React.Component { }); }; + + render() { const { activeItem } = this.state; @@ -42,7 +46,8 @@ export default class TopMenu extends React.Component { <Menu.Item> <Popup trigger={<Image - as={Link} to="/profil" src={this.props.photo} avatar + as={Link} to="/profil" + src={this.props.photo ? this.props.photo : defaultImage} avatar onClick={this.handleItemClick} />} flowing diff --git a/assets/js/index.jsx b/assets/js/index.jsx index 248813bc425cd6076cf3312842e387276cf49b3c..ee7ac55f37447610eefead797e7ca338d77be105 100644 --- a/assets/js/index.jsx +++ b/assets/js/index.jsx @@ -12,7 +12,6 @@ import Storage from './lib/Storage'; import ApplicantPage from './ApplicantPage'; import TranscriptPage from './TranscriptPage'; import AdminVacancyPage from './AdminVacancyPage'; -import HomeSupervisor from './HomeSupervisor'; export default class App extends React.Component { static getRole() { @@ -101,7 +100,6 @@ export default class App extends React.Component { <Route path="/profil" component={App.getRole() === 'student' ? student(ProfilePage) : company(CompanyProfile)} own /> <Route path="/mahasiswa/:id" component={grownups(ProfilePage)} /> <Route path="/perusahaan/:id" component={facultyMember(CompanyProfile)} /> - <Route path="/home-supervisor" component={HomeSupervisor} /> <Route path="/transkrip/:id" component={facultyMember(CompanyProfile)} /> </Route> <Route path="/home" onEnter={this.handleHome} />