Fakultas Ilmu Komputer UI

Commit f0e9a9ef authored by M. Reza Qorib's avatar M. Reza Qorib
Browse files

Edit vacancyList

parent 3fd68c92
......@@ -65,7 +65,7 @@ export default class VacancyList extends React.Component {
),
);
}
if (this.props.user.role === 'admin' || this.props.user.role === 'supervisor') {
if ((this.props.user.role === 'admin' && this.props.user.data.supervisor != null) || this.props.user.role === 'supervisor') {
return this.state.vacancies.map(vacancy => (
<AdminVacancy
key={vacancy.id}
......@@ -88,12 +88,12 @@ export default class VacancyList extends React.Component {
}
companyHeader() {
if (this.props.user.role === 'company') {
if (this.props.user.role === 'admin' || this.props.user.role === 'company') {
return (
<Grid textAlign="center" style={{ paddingTop: '10px' }}>
<div>
<Button size="tiny" as={Link} to="/pelamar" icon="eye" labelPosition="left" color="facebook" content="Lihat Semua Pendaftar" />
<Button size="tiny" as={Link} to="/buat-lowongan" icon="add" labelPosition="left" content="Tambah Lowongan Baru" color="teal" />
</Grid>
</div>
);
}
......@@ -103,7 +103,12 @@ export default class VacancyList extends React.Component {
render = () => (
<div>
<Grid container columns="eleven" doubling>
{ this.companyHeader() }
<Grid textAlign="center" style={{ paddingTop: '10px' }}>
{ this.companyHeader() }<br />
{(this.props.user.role === 'admin' || this.props.user.role === 'supervisor') &&
<Button size="tiny" as={Link} to="/rekap" icon="dashboard" labelPosition="left" color="facebook" content="Rekap Pendaftaran" />
}
</Grid>
<Item.Group relaxed style={{ width: '100%' }}>
{ this.generateVacancies() }
</Item.Group>
......
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