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
564b1d6c
Commit
564b1d6c
authored
Oct 10, 2019
by
Tyagita Larasati
Browse files
1606918616 48
parent
5e2995b0
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
assets/js/ProfilePage.jsx
View file @
564b1d6c
...
...
@@ -34,11 +34,13 @@ export default class ProfilePage extends React.Component {
intro
:
''
,
job_seeking_status
:
''
,
volunteer
:
''
,
skills
:
''
,
form
:
{
picture
:
''
,
email
:
''
,
phone_number
:
''
,
region
:
''
,
skills
:
''
,
resume
:
''
,
show_transcript
:
''
,
volunteer
:
''
,
...
...
@@ -99,6 +101,7 @@ export default class ProfilePage extends React.Component {
website_url
:
data
.
website_url
,
latest_work
:
data
.
latest_work
,
latest_work_desc
:
data
.
latest_work_desc
,
skills
:
data
.
skills
,
});
if
(
this
.
props
.
route
.
own
)
{
const
newSession
=
this
.
props
.
user
.
data
;
...
...
@@ -222,6 +225,10 @@ export default class ProfilePage extends React.Component {
<
label
htmlFor
=
"region"
>
Region
</
label
>
<
input
onChange
=
{
this
.
handleChange
}
placeholder
=
"Indonesia"
name
=
"region"
/>
</
Form
.
Field
>
<
Form
.
Field
>
<
label
htmlFor
=
"skills"
>
Skills
</
label
>
<
input
onChange
=
{
this
.
handleChange
}
placeholder
=
"Isi sesuai dengan keahlian anda"
name
=
"skills"
/>
</
Form
.
Field
>
<
Form
.
Field
>
<
label
htmlFor
=
"latest_work"
>
Latest Working Experience
</
label
>
<
input
onChange
=
{
this
.
handleChange
}
placeholder
=
"Teaching Asssistant at Fasilkom UI"
name
=
"latest_work"
/>
...
...
@@ -384,7 +391,16 @@ export default class ProfilePage extends React.Component {
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
vertical
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
<
Icon
name
=
"cogs"
size
=
"big"
/>
</
Grid
.
Column
>
<
Grid
.
Column
width
=
{
13
}
>
<
p
>
{
this
.
state
.
skills
||
'
Skills belum ditambahkan
'
}
</
p
>
</
Grid
.
Column
>
</
Grid
>
</
Segment
>
<
Segment
basic
vertical
>
<
Grid
>
<
Grid
.
Column
width
=
{
2
}
>
...
...
assets/js/__test__/ProfilePage-test.jsx
View file @
564b1d6c
...
...
@@ -30,7 +30,7 @@ describe('ProfilePage', () => {
birth_date
:
'
1995-02-24
'
,
major
:
null
,
batch
:
null
,
show_resume
:
false
,
show_resume
:
false
,
bookmarked_vacancies
:
[
3
,
2
,
...
...
core/migrations/0045_student_skills.py
0 → 100644
View file @
564b1d6c
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-10-10 15:35
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0044_merge_20191010_2105'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'student'
,
name
=
'skills'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
]
core/models/accounts.py
View file @
564b1d6c
...
...
@@ -78,6 +78,7 @@ class Student(models.Model):
linkedin_url
=
models
.
URLField
(
max_length
=
200
,
blank
=
True
,
null
=
True
)
website_url
=
models
.
URLField
(
max_length
=
200
,
blank
=
True
,
null
=
True
)
region
=
models
.
CharField
(
max_length
=
30
,
blank
=
True
,
null
=
True
)
skills
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
recommendations
=
models
.
CharField
(
max_length
=
500
,
blank
=
True
,
null
=
True
)
ui_ux_portofolio
=
models
.
FileField
(
upload_to
=
get_student_ui_ux_portofolio_file_path
,
null
=
True
,
blank
=
True
,
validators
=
[
validate_document_file_extension
])
latest_work
=
models
.
CharField
(
max_length
=
100
,
blank
=
True
,
null
=
True
)
...
...
core/serializers/accounts.py
View file @
564b1d6c
...
...
@@ -21,7 +21,7 @@ class StudentSerializer(serializers.ModelSerializer):
model
=
Student
fields
=
[
'id'
,
'name'
,
'user'
,
'npm'
,
'resume'
,
'phone_number'
,
'birth_place'
,
'birth_date'
,
'major'
,
'batch'
,
\
'show_transcript'
,
'photo'
,
'accepted_no'
,
'linkedin_url'
,
'region'
,
'intro'
,
'website_url'
,
'student_gpa'
,
'age'
,
'recommendations'
,
'latest_work'
,
'latest_work_desc'
,
'read_no'
,
'volunteer'
,
'job_seeking_status'
]
'latest_work'
,
'latest_work_desc'
,
'read_no'
,
'volunteer'
,
'job_seeking_status'
,
'skills'
]
def
get_accepted_no
(
self
,
obj
):
apps
=
Application
.
objects
.
filter
(
student
=
obj
,
status
=
4
)
...
...
@@ -60,6 +60,7 @@ class StudentUpdateSerializer(serializers.ModelSerializer):
'recommendations'
:
instance
.
recommendations
,
'latest_work'
:
instance
.
latest_work
,
'latest_work_desc'
:
instance
.
latest_work_desc
,
'skills'
:
instance
.
skills
,
}
def
update
(
self
,
instance
,
validated_data
):
...
...
@@ -75,6 +76,7 @@ class StudentUpdateSerializer(serializers.ModelSerializer):
instance
.
job_seeking_status
=
validated_data
.
get
(
'job_seeking_status'
,
instance
.
job_seeking_status
)
instance
.
student_gpa
=
validated_data
.
get
(
'student_gpa'
,
instance
.
student_gpa
)
instance
.
website_url
=
validated_data
.
get
(
'website_url'
,
instance
.
website_url
)
instance
.
skills
=
validated_data
.
get
(
'skills'
,
instance
.
skills
)
instance
.
recommendations
=
validated_data
.
get
(
'recommendations'
,
instance
.
recommendations
)
instance
.
latest_work
=
validated_data
.
get
(
'latest_work'
,
instance
.
latest_work
)
instance
.
latest_work_desc
=
validated_data
.
get
(
'latest_work_desc'
,
instance
.
latest_work_desc
)
...
...
@@ -85,7 +87,7 @@ class StudentUpdateSerializer(serializers.ModelSerializer):
class
Meta
:
model
=
Student
fields
=
[
'resume'
,
'email'
,
'phone_number'
,
'photo'
,
'show_transcript'
,
'linkedin_url'
,
'region'
,
'intro'
,
'website_url'
,
'student_gpa'
,
'recommendations'
,
'latest_work'
,
'latest_work_desc'
,
'volunteer'
,
'job_seeking_status'
]
'recommendations'
,
'latest_work'
,
'latest_work_desc'
,
'volunteer'
,
'job_seeking_status'
,
'skills'
]
class
CompanyUpdateSerializer
(
serializers
.
ModelSerializer
):
...
...
core/tests/test_accounts.py
View file @
564b1d6c
...
...
@@ -166,6 +166,11 @@ class ProfileUpdateTests(APITestCase):
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_202_ACCEPTED
)
self
.
assertEqual
(
response
.
data
.
get
(
'region'
),
'Indonesia'
)
url
=
'/api/students/'
+
str
(
student_id
)
+
"/profile/"
response
=
self
.
client
.
patch
(
url
,
{
'skills'
:
'Java, Python'
},
format
=
'multipart'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_202_ACCEPTED
)
self
.
assertEqual
(
response
.
data
.
get
(
'skills'
),
'Java, Python'
)
url
=
'/api/students/'
+
str
(
student_id
)
+
"/profile/"
response
=
self
.
client
.
patch
(
url
,
{
'email'
:
'saasdasd'
},
format
=
'multipart'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
...
...
kape/files/student-ui-ux-portofolio/30893417-790e-4e7f-b57a-7a624b74f5ec.pdf
0 → 100644
View file @
564b1d6c
File added
kape/files/student-ui-ux-portofolio/6e5117fa-08ef-4084-8ed4-e42a90cf2ed8.pdf
0 → 100644
View file @
564b1d6c
File added
kape/files/student-ui-ux-portofolio/a2ebe8f5-b92e-4ae2-9f7a-b5d996d856c7.pdf
0 → 100644
View file @
564b1d6c
File added
kape/files/student-ui-ux-portofolio/e3994e27-9c00-4967-bb5b-708aefe69cbd.pdf
0 → 100644
View file @
564b1d6c
File added
kape/files/student-ui-ux-portofolio/ec606cea-3e4b-4d23-81a9-b21bc6c19499.pdf
0 → 100644
View file @
564b1d6c
File added
kape/files/student-ui-ux-portofolio/f9105f5b-d2e2-4299-9ab4-261395e90768.pdf
0 → 100644
View file @
564b1d6c
File added
package-lock.json
View file @
564b1d6c
This diff is collapsed.
Click to expand it.
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