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
PMPL
Class Project
Kape
Commits
99eeb065
Commit
99eeb065
authored
Oct 06, 2019
by
ISNAINI NURUL KHASANAH
Browse files
1906336984 50 Menambahkan kolom major di halaman rekap pendaftaran
parent
69150d42
Changes
4
Hide whitespace changes
Inline
Side-by-side
assets/js/SupervisorPage.jsx
View file @
99eeb065
...
...
@@ -7,6 +7,7 @@ import ApplicationList from './components/ApplicationList';
const
cols
=
[
{
key
:
'
StudentName
'
,
label
:
'
Nama
'
},
{
key
:
'
StudentID
'
,
label
:
'
NPM
'
},
{
key
:
'
Major
'
,
label
:
'
Major
'
},
{
key
:
'
Perusahaan
'
,
label
:
'
Perusahaan
'
},
{
key
:
'
Posisi
'
,
label
:
'
Posisi
'
},
{
key
:
'
Status
'
,
label
:
'
Status
'
},
...
...
assets/js/components/ApplicationList.jsx
View file @
99eeb065
...
...
@@ -23,9 +23,10 @@ export default class ApplicationList extends React.Component {
generateRows
()
{
return
this
.
props
.
items
.
map
(
item
=>
(
<
Table
.
Row
key
=
{
`
${
item
.
npm
}
_
${
item
.
company
}
_
${
item
.
position
}
_
${
item
.
status
}
_row`
}
>
<
Table
.
Row
key
=
{
`
${
item
.
npm
}
_
${
item
.
major
}
_
${
item
.
company
}
_
${
item
.
position
}
_
${
item
.
status
}
_row`
}
>
<
Table
.
Cell
key
=
{
`
${
item
.
name
}
_name`
}
>
{
item
.
name
}
</
Table
.
Cell
>
<
Table
.
Cell
key
=
{
`
${
item
.
name
}
_npm`
}
>
{
item
.
npm
}
</
Table
.
Cell
>
<
Table
.
Cell
key
=
{
`
${
item
.
name
}
_major`
}
>
{
item
.
major
}
</
Table
.
Cell
>
<
Table
.
Cell
key
=
{
`
${
item
.
name
}
_company`
}
>
{
item
.
company_name
}
</
Table
.
Cell
>
...
...
core/serializers/vacancies.py
View file @
99eeb065
...
...
@@ -65,6 +65,7 @@ class SupervisorStudentApplicationSerializer(serializers.ModelSerializer):
return
{
'name'
:
instance
.
student
.
full_name
,
'npm'
:
instance
.
student
.
npm
,
'major'
:
instance
.
student
.
major
,
'vacancy_name'
:
instance
.
vacancy
.
name
,
'company_name'
:
instance
.
vacancy
.
company
.
name
,
'status'
:
status_map
[
instance
.
status
]
...
...
@@ -72,8 +73,8 @@ class SupervisorStudentApplicationSerializer(serializers.ModelSerializer):
class
Meta
:
model
=
Application
fields
=
[
'name'
,
'npm'
,
'vacancy_name'
,
'company_name'
,
'status'
]
read_only_fields
=
[
'name'
,
'npm'
,
'vacancy_name'
,
'company_name'
,
'status'
]
fields
=
[
'name'
,
'npm'
,
'major'
,
'vacancy_name'
,
'company_name'
,
'status'
]
read_only_fields
=
[
'name'
,
'npm'
,
'major'
,
'vacancy_name'
,
'company_name'
,
'status'
]
class
VacancyApplicationSerializer
(
serializers
.
ModelSerializer
):
vacancy
=
VacancySerializer
()
...
...
core/tests/test_vacancies.py
View file @
99eeb065
...
...
@@ -382,7 +382,16 @@ class CompanyListsTests(APITestCase):
url
=
'/api/companies/'
+
str
(
new_company
.
pk
)
+
'/applications/'
+
str
(
new_vacancy
.
pk
)
+
'/by_vacancy/?status=5'
response
=
self
.
client
.
get
(
url
,
format
=
'json'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
def
test_company_application_list_with_major
(
self
):
new_user
=
User
.
objects
.
create_user
(
'dummy.company4'
,
'dummy.company4@company.com'
,
'lalala123'
)
new_company
=
Company
.
objects
.
create
(
user
=
new_user
,
description
=
"lalala"
,
status
=
Company
.
VERIFIED
,
logo
=
None
,
address
=
None
)
self
.
client
.
force_authenticate
(
new_user
)
url
=
'/api/companies/'
+
str
(
new_company
.
pk
)
+
'/applications/?major=0'
response
=
self
.
client
.
get
(
url
,
format
=
'json'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_200_OK
)
class
SupervisorStudentApplicationTests
(
APITestCase
):
def
test_list_student_application
(
self
):
...
...
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