Fakultas Ilmu Komputer UI

Commit 99509ca8 authored by sirinbaisa's avatar sirinbaisa
Browse files

[#42][#140653601] Top Menu tambahan

parent a15a59a2
......@@ -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>
);
}
}
}
......@@ -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
......
......@@ -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} />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment