Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fasilkom UI Open Source Software
Kape
Commits
1be86691
Commit
1be86691
authored
May 23, 2017
by
sirinbaisa
Browse files
Home Dosen
parent
974b0aa4
Changes
6
Hide whitespace changes
Inline
Side-by-side
assets/css/custom.css
View file @
1be86691
...
...
@@ -245,23 +245,31 @@ card .formRegis{
}
.ui.segment.biodata-section
{
background-color
:
#343838
;
background-color
:
white
;
}
.ui.segment.biodata-section
h
2
{
color
:
white
;
.ui.segment.biodata-section
h
1
{
color
:
black
;
}
.ui.segment.biodata-section
h3
{
color
:
white
;
color
:
black
;
}
.ui.segment.biodata-section
h4
{
color
:
black
;
}
.ui.segment.biodata-section
h5
{
color
:
white
;
color
:
black
;
}
.ui.segments.biodataBorder
{
border-color
:
transparent
;
}
.transkrip
{
color
:
white
;
color
:
black
;
}
.ui.segment.biodata-section
b
{
...
...
assets/js/Dashboard.jsx
View file @
1be86691
...
...
@@ -17,6 +17,13 @@ export default class Dashboard extends React.Component {
};
static
getInfo
(
user
)
{
const
adminRole
=
{
name
:
'
admin
'
,
user
:
{
email
:
''
,
},
photo
:
null
,
};
const
role
=
user
.
role
;
if
(
role
===
'
student
'
)
{
return
user
.
data
.
student
;
...
...
@@ -24,7 +31,7 @@ export default class Dashboard extends React.Component {
return
user
.
data
.
company
;
}
return
0
;
return
adminRole
;
}
constructor
(
props
)
{
...
...
assets/js/ProfilePage.jsx
View file @
1be86691
...
...
@@ -154,9 +154,10 @@ export default class ProfilePage extends React.Component {
<
div
className
=
"profilePage"
>
<
Segment
className
=
"biodata-section"
>
<
Grid
>
<
Grid
.
Column
width
=
{
3
}
>
<
Grid
.
Column
width
=
{
7
}
>
<
Header
as
=
"h2"
icon
textAlign
=
"center"
>
<
Image
src
=
{
this
.
state
.
photo
?
this
.
state
.
photo
:
defaultPicture
}
size
=
"small"
shape
=
"circular"
/>
<
br
/>
<
Image
src
=
{
this
.
state
.
photo
?
this
.
state
.
photo
:
defaultPicture
}
size
=
"medium"
/>
</
Header
>
</
Grid
.
Column
>
...
...
@@ -164,83 +165,74 @@ export default class ProfilePage extends React.Component {
<
Container
textAlign
=
"left"
className
=
"profile-biodata"
>
<
div
className
=
"biodata"
>
<
Segment
.
Group
basic
>
<
Segment
basic
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
color
=
"teal"
name
=
"users"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
11
}
>
<
h2
>
{
this
.
state
.
name
}
</
h2
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
color
=
"teal"
name
=
"university"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
major
}
,
{
this
.
state
.
batch
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
color
=
"teal"
name
=
"mail"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
email
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
</
Segment
.
Group
>
<
Segment
basic
textAlign
=
"center"
>
<
h1
>
{
this
.
state
.
name
}
</
h1
>
</
Segment
>
<
Segment
basic
vertical
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
name
=
"university"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
major
}
,
{
this
.
state
.
batch
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
vertical
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
name
=
"mail"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
email
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
vertical
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
name
=
"phone"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
phone_number
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
vertical
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
name
=
"gift"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
cityOfBirth
}
,
{
this
.
state
.
dateOfBirth
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
</
div
>
</
Container
>
<
Container
textAlign
=
"center"
>
<
div
className
=
"button-profile"
>
<
a
href
=
{
this
.
state
.
resume
?
this
.
state
.
resume
:
'
#
'
}
><
Button
primary
size
=
"small"
>
Resume
</
Button
></
a
>
{
this
.
state
.
show_transcript
&&
<
Button
primary
size
=
"small"
>
Transkrip
</
Button
>
}
</
div
>
<
div
>
<
h4
>
Bagikan Transkrip :
{
this
.
state
.
bagikanTranskrip
}
</
h4
>
</
div
>
</
Container
>
</
Container
>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
5
}
>
<
Segment
.
Group
>
<
Segment
basic
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
color
=
"teal"
name
=
"phone"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
phone_number
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
color
=
"teal"
name
=
"gift"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
h3
>
{
this
.
state
.
cityOfBirth
}
,
{
this
.
state
.
dateOfBirth
}
</
h3
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
</
Segment
.
Group
>
<
div
className
=
"button-profile"
>
<
a
href
=
{
this
.
state
.
resume
?
this
.
state
.
resume
:
'
#
'
}
><
Button
primary
size
=
"small"
>
Resume
</
Button
></
a
>
{
this
.
state
.
show_transcript
&&
<
Button
primary
size
=
"small"
>
Transkrip
</
Button
>
}
</
div
>
<
div
>
<
b
>
Bagikan Transkrip :
{
this
.
state
.
bagikanTranskrip
}
</
b
>
</
div
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
{
this
.
updateForm
(
this
.
props
.
route
.
own
)
}
...
...
assets/js/VacancyPage.jsx
View file @
1be86691
...
...
@@ -3,7 +3,7 @@ import Tabs from './components/Tabs';
import
Pane
from
'
./components/Pane
'
;
import
VacancyList
from
'
./components/VacancyList
'
;
import
Pagination
from
'
./components/Pagination
'
;
import
Applicants
from
'
./components/
Applicants
'
;
import
Applicants
from
'
./components/
SupervisorPage
'
;
export
default
class
VacancyPage
extends
React
.
Component
{
...
...
@@ -47,7 +47,7 @@ export default class VacancyPage extends React.Component {
/>
}
/>
<
Applicants
/>
<
Applicants
/>
</
Pane
>
<
Pane
label
=
"Lamaran saya"
>
<
Pagination
...
...
@@ -79,17 +79,26 @@ export default class VacancyPage extends React.Component {
);
}
else
if
(
this
.
props
.
user
.
role
===
'
company
'
||
this
.
props
.
user
.
role
===
'
admin
'
)
{
return
(
<
Pagination
url
=
{
`/companies/
${
this
.
state
.
id
}
/vacancies/`
}
child
=
{
<
VacancyList
key
=
{
1
}
user
=
{
this
.
props
.
user
}
userId
=
{
this
.
state
.
id
}
/>
<
div
>
<
Pagination
url
=
{
`/companies/
${
this
.
state
.
id
}
/vacancies/`
}
child
=
{
<
VacancyList
key
=
{
1
}
user
=
{
this
.
props
.
user
}
userId
=
{
this
.
state
.
id
}
/>
}
error
=
"Anda belum diverifikasi. Harap hubungi admin"
/>
error
=
"Anda belum diverifikasi. Harap hubungi admin"
/>
</
div
>
);
}
else
if
(
this
.
props
.
user
.
role
===
'
admin
'
)
{
return
(
<
div
>
<
h1
>
halo
</
h1
>
</
div
>
);
}
...
...
assets/js/components/
Applicants
.jsx
→
assets/js/components/
SupervisorPage
.jsx
View file @
1be86691
import
React
from
'
react
'
;
import
{
Header
,
Icon
}
from
'
semantic-ui-react
'
;
import
Tables
from
'
./Tables
'
;
import
Server
from
'
../lib/Server
'
;
const
cols
=
[
{
key
:
'
StudentName
'
,
label
:
'
Students Name
'
},
...
...
@@ -9,7 +10,7 @@ const cols = [
{
key
:
'
Status
'
,
label
:
'
Status
'
},
];
const
data
=
[
const
data
2
=
[
{
id
:
1
,
StudentName
:
'
John Doe
'
,
Perusahaan
:
'
Jalanloka
'
,
Posisi
:
'
Software Engineer
'
,
Status
:
'
Melamar
'
},
{
id
:
2
,
StudentName
:
'
Clark Kent
'
,
Perusahaan
:
'
Tutuplapak
'
,
Posisi
:
'
Data Scientist
'
,
Status
:
'
Diterima
'
},
{
id
:
3
,
StudentName
:
'
Rosamund Pike
'
,
Perusahaan
:
'
Tutuplapak
'
,
Posisi
:
'
System Analyst
'
,
Status
:
'
Diterima
'
},
...
...
@@ -19,9 +20,29 @@ const data = [
export
default
class
Applicants
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
list
:
[]
};
}
componentDidMount
()
{
this
.
UserList
();
}
UserList
()
{
Server
.
get
(
'
/student-applications/
'
,
false
).
then
((
data
)
=>
{
this
.
setState
({
list
:
data
.
results
});
});
}
render
()
{
const
list
=
this
.
state
.
list
.
map
((
item
,
i
)
=>
<
div
>
<
h1
>
{
item
.
name
}
</
h1
>
<
span
>
{
item
.
npm
}
,
{
item
.
email
}
</
span
>
</
div
>);
return
(
<
div
className
=
"home-dosen"
>
<
Header
as
=
"h2"
>
<
Icon
name
=
"list"
/>
...
...
@@ -30,7 +51,9 @@ export default class Applicants extends React.Component {
</
Header
.
Content
>
</
Header
>
<
Tables
data
=
{
data
}
cols
=
{
cols
}
/>
<
div
id
=
"layout-content"
className
=
"layout-content-wrapper"
>
<
div
className
=
"panel-list"
>
{
list
}
</
div
>
</
div
>
</
div
>
);
...
...
assets/js/index.jsx
View file @
1be86691
...
...
@@ -12,6 +12,8 @@ import Storage from './lib/Storage';
import
ApplicantPage
from
'
./ApplicantPage
'
;
import
TranscriptPage
from
'
./TranscriptPage
'
;
import
AdminVacancyPage
from
'
./AdminVacancyPage
'
;
import
CompanyPage
from
'
./CompanyPage
'
;
export
default
class
App
extends
React
.
Component
{
static
getRole
()
{
...
...
@@ -70,15 +72,24 @@ export default class App extends React.Component {
handleHome
=
(
nextState
,
replace
,
cb
)
=>
{
if
(
Server
.
isLoggedIn
())
{
if
(
App
.
getRole
()
===
'
student
'
)
{
replace
({
pathname
:
'
/lowongan
'
});
cb
();
replace
({
pathname
:
'
/lowongan
'
});
cb
();
}
else
if
(
App
.
getRole
()
===
'
company
'
)
{
replace
({
pathname
:
'
/lowongan
'
});
cb
();
}
else
if
(
App
.
getRole
()
===
'
company
'
)
{
replace
({
pathname
:
'
/lowongan
'
});
cb
();
replace
({
pathname
:
'
/lowongan
'
});
cb
();
}
else
if
(
App
.
getRole
()
===
'
admin
'
)
{
replace
({
pathname
:
'
/perusahaan
'
});
cb
();
}
}
replace
({
pathname
:
'
/login
'
});
cb
();
};
render
()
{
const
staff
=
this
.
authorization
([
'
admin
'
]);
const
student
=
this
.
authorization
([
'
admin
'
,
'
student
'
]);
// const supervisor = this.authorization(['admin', 'supervisor']);
const
company
=
this
.
authorization
([
'
admin
'
,
'
company
'
]);
...
...
@@ -90,7 +101,7 @@ export default class App extends React.Component {
return
(
<
Router
history
=
{
browserHistory
}
>
<
Route
path
=
"/login"
component
=
{
Login
}
/>
<
Route
component
=
{
all
(
Dashboard
)
}
onEnter
=
{
this
.
handleAuth
}
own
>
<
Route
component
=
{
commonUser
(
Dashboard
)
}
onEnter
=
{
this
.
handleAuth
}
>
<
Route
path
=
"/transcript/:id"
component
=
{
company
(
TranscriptPage
)
}
/>
<
Route
path
=
"/lowongan"
component
=
{
commonUser
(
VacancyPage
)
}
/>
<
Route
path
=
"/admin-lowongan"
component
=
{
AdminVacancyPage
}
/>
...
...
@@ -100,6 +111,7 @@ 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
=
"/perusahaan"
component
=
{
staff
(
CompanyPage
)
}
/>
<
Route
path
=
"/transkrip/:id"
component
=
{
facultyMember
(
CompanyProfile
)
}
/>
</
Route
>
<
Route
path
=
"/home"
onEnter
=
{
this
.
handleHome
}
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment