Fakultas Ilmu Komputer UI

Commit 1c45ba72 authored by Vitosavero Avila Wibisono's avatar Vitosavero Avila Wibisono
Browse files

Merge branch '1506688872-220' into 'master'

1506688872 220 welcome students

See merge request !246
parents f8ff1f50 3906709a
Pipeline #26708 passed with stages
in 16 minutes and 27 seconds
......@@ -281,4 +281,13 @@ describe('TopMenu', () => {
);
expect(topMenu.state.kapeDescription).to.exist;
});
it('TopMenu state contain welcome student', () => {
const topMenu = ReactTestUtils.renderIntoDocument(
<TopMenu user={studentUser}>
<div> test </div>
</TopMenu>,
);
expect(topMenu.state.welcomeStudent).to.exist;
});
});
......@@ -56,9 +56,8 @@ export default class TopMenu extends React.Component {
"4. Pastikan persyaratan sudah terpenuhi\n" +
"5. Jelaskan mengapa anda ingin mengikuti lowongan internship tersebut di 'Cover Letter'\n"+
"6. Klik tombol 'Daftar'\n",
kapeDescription: "Kanal Akses Pendaftaran KP Elektronik"
kapeDescription: "Kanal Akses Pendaftaran KP Elektronik",
welcomeStudent: "Selamat Datang, "
};
this.logout = this.logout.bind(this);
this.logoutCompany = this.logoutCompany.bind(this);
......@@ -172,6 +171,14 @@ export default class TopMenu extends React.Component {
</Menu.Item>
</Menu.Menu>
<Menu.Menu position="center">
{this.props.user.role === 'student' && (
<Menu.Item style={{ padding: '25px' }}>
{this.state.welcomeStudent} {data.name}
</Menu.Item>
)}
</Menu.Menu>
<Menu.Menu position="right">
{this.props.user.role === 'student' && (
<Menu.Item>{btn}</Menu.Item>
......
Supports Markdown
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