Fakultas Ilmu Komputer UI

Commit 738ee6b7 authored by Aviliani Pramestya's avatar Aviliani Pramestya
Browse files

1606829402 128

parent 4937ee4e
......@@ -55,6 +55,7 @@ export default class ProfilePage extends React.Component {
latest_work_desc: '',
github_url: '',
awards: '',
projects: '',
certification: '',
languages: '',
seminar: '',
......@@ -73,6 +74,7 @@ export default class ProfilePage extends React.Component {
latest_work_desc: '',
github_url: '',
awards: '',
projects: '',
certification: '',
languages: '',
seminar: '',
......@@ -126,6 +128,7 @@ export default class ProfilePage extends React.Component {
skills: data.skills,
github_url: data.github_url,
awards: data.awards,
projects: data.projects,
certification: data.certification,
languages: data.languages,
seminar: data.seminar,
......@@ -365,6 +368,15 @@ export default class ProfilePage extends React.Component {
name="awards"
/>
</Form.Field>
<Form.Field>
<label htmlFor="projects">Projects</label>
<input
onChange={this.handleChange}
placeholder={this.state.projects === null ? 'Ow-Jek - Android Mobile Project' : this.state.projects}
defaultValue={this.state.projects === null ? null : this.state.projects}
name="projects"
/>
</Form.Field>
<Form.Field>
<label htmlFor="certification">Sertifikasi</label>
<input
......
......@@ -57,6 +57,7 @@ export default class ProfilePage extends React.Component {
latest_work_desc: '',
github_url: '',
awards: '',
projects: '',
certification: '',
languages: '',
seminar: '',
......@@ -75,6 +76,7 @@ export default class ProfilePage extends React.Component {
latest_work_desc: '',
github_url: '',
awards: '',
projects: '',
certification: '',
languages: '',
semimar: '',
......@@ -129,6 +131,7 @@ export default class ProfilePage extends React.Component {
skills: data.skills,
github_url: data.github_url,
awards: data.awards,
projects: data.projects,
certification: data.certification,
languages: data.languages,
seminar: data.seminar,
......@@ -372,6 +375,15 @@ export default class ProfilePage extends React.Component {
name="awards"
/>
</Form.Field>
<Form.Field>
<label htmlFor="projects">Projects</label>
<input
onChange={this.handleChange}
placeholder={this.state.projects === null ? 'Ow-Jek - Android Mobile Project' : this.state.projects}
defaultValue={this.state.projects === null ? null : this.state.projects}
name="projects"
/>
</Form.Field>
<Form.Field>
<label htmlFor="certification">Sertifikasi</label>
<input
......@@ -685,6 +697,17 @@ export default class ProfilePage extends React.Component {
</Grid>
</Segment>
<Segment basic vertical>
<Grid>
<Grid.Column width={2}>
<Icon name="folder open" size="big" />
</Grid.Column>
<Grid.Column width={13}>
<p> {this.state.projects || 'Projects belum ditambahkan'} </p>
</Grid.Column>
</Grid>
</Segment>
<Segment basic vertical>
<Grid>
<Grid.Column width={2}>
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-14 07:37
# Generated by Django 1.11.17 on 2019-11-14 09:34
from __future__ import unicode_literals
import core.lib.validators
......@@ -50,7 +50,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(auto_now_add=True)),
('title', models.CharField(blank=True, default='', max_length=100)),
('title', models.CharField(blank=True, default=b'', max_length=100)),
('content', models.TextField()),
],
options={
......@@ -81,8 +81,8 @@ class Migration(migrations.Migration):
('website_url', models.URLField(blank=True, null=True)),
('work_experience', models.CharField(blank=True, max_length=500, null=True)),
('region', models.CharField(blank=True, max_length=30, null=True)),
('skills', models.CharField(blank=True, max_length=50, null=True)),
('alamat', models.CharField(blank=True, max_length=50, null=True)),
('skills', models.CharField(blank=True, max_length=50, null=True)),
('recommendations', models.CharField(blank=True, max_length=500, null=True)),
('ui_ux_portofolio', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_ui_ux_portofolio_file_path, validators=[core.lib.validators.validate_document_file_extension])),
('latest_work', models.CharField(blank=True, max_length=100, null=True)),
......@@ -94,6 +94,7 @@ class Migration(migrations.Migration):
('student_gpa', models.FloatField(blank=True, db_column=b'student_gpa', default=1.0, null=True)),
('volunteer', models.CharField(blank=True, max_length=100, null=True)),
('awards', models.CharField(blank=True, max_length=100, null=True)),
('projects', models.CharField(blank=True, max_length=100, null=True)),
('certification', models.CharField(blank=True, max_length=100, null=True)),
('languages', models.CharField(blank=True, max_length=100, null=True)),
('seminar', models.CharField(blank=True, max_length=100, null=True)),
......@@ -108,7 +109,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('nip', models.IntegerField(unique=True, validators=[django.core.validators.MinValueValidator(100000000), django.core.validators.MaxValueValidator(9999999999)])),
('nip', models.IntegerField(unique=True, validators=[django.core.validators.MinValueValidator(100000000), django.core.validators.MaxValueValidator(9999999999L)])),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
......@@ -134,6 +135,7 @@ class Migration(migrations.Migration):
('working_period', models.CharField(max_length=100, null=True)),
('tag', models.TextField(blank=True)),
('salary', models.IntegerField(default=0)),
('recruiter_activity', models.CharField(blank=True, max_length=10, null=True)),
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vacancies', to='core.Company')),
],
options={
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-14 07:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='vacancy',
name='recruiter_activity',
field=models.CharField(blank=True, max_length=10, null=True),
),
]
......@@ -102,6 +102,7 @@ class Student(models.Model):
student_gpa = models.FloatField(db_column='student_gpa', default=1.0, blank=True, null=True)
volunteer = models.CharField(max_length=100, blank=True, null=True)
awards = models.CharField(max_length=100, blank=True, null=True)
projects = models.CharField(max_length=100, blank=True, null=True)
certification = models.CharField(max_length=100, blank=True, null=True)
languages = models.CharField(max_length= 100, blank=True, null=True)
seminar = models.CharField(max_length=100, blank=True, null=True)
......
......@@ -22,7 +22,7 @@ class StudentSerializer(serializers.ModelSerializer):
fields = ['id', 'name', 'user', 'npm', 'resume', 'phone_number', 'gender', 'birth_place', 'birth_date', 'major', 'batch',
'show_transcript', 'photo', 'accepted_no', 'linkedin_url', 'hackerrank_url', 'region', 'intro', 'portfolio_link', 'website_url', 'student_gpa', 'age', 'recommendations',
'work_experience', 'latest_work', 'latest_work_desc', 'read_no', 'volunteer', 'job_seeking_status', 'skills', 'expected_salary',
'self_description', 'github_url', 'awards', 'certification', 'languages', 'seminar', 'alamat']
'self_description', 'github_url', 'awards', 'certification', 'languages', 'seminar', 'alamat', 'projects']
def get_accepted_no(self, obj):
apps = Application.objects.filter(student=obj, status=4)
......@@ -71,6 +71,7 @@ class StudentUpdateSerializer(serializers.ModelSerializer):
'skills': instance.skills,
'github_url': instance.github_url,
'awards' : instance.awards,
'projects' : instance.projects,
'certification' : instance.certification,
'languages' : instance.languages,
'seminar' : instance.seminar
......@@ -125,6 +126,8 @@ class StudentUpdateSerializer(serializers.ModelSerializer):
'github_url', instance.github_url)
instance.awards = validated_data.get(
'awards', instance.awards)
instance.projects = validated_data.get(
'projects', instance.projects)
instance.certification = validated_data.get(
'certification', instance.certification)
instance.languages = validated_data.get(
......@@ -139,7 +142,7 @@ class StudentUpdateSerializer(serializers.ModelSerializer):
model = Student
fields = ['resume', 'email', 'phone_number', 'gender', 'photo', 'show_transcript', 'linkedin_url', 'hackerrank_url', 'region', 'intro', 'portfolio_link', 'website_url', 'student_gpa',
'recommendations', 'work_experience', 'latest_work', 'latest_work_desc', 'volunteer', 'job_seeking_status', 'skills', 'expected_salary',
'self_description', 'github_url', 'awards', 'certification', 'languages', 'seminar', 'alamat']
'self_description', 'github_url', 'awards', 'certification', 'languages', 'seminar', 'alamat', 'projects']
class CompanyUpdateSerializer(serializers.ModelSerializer):
......
......@@ -217,6 +217,11 @@ class ProfileUpdateTests(APITestCase):
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
self.assertEqual(response.data.get('awards'), 'Juara 2 UIUX Gemastik 2019')
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'projects': 'Ow-Jek - Android Mobile Project'}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
self.assertEqual(response.data.get('projects'), 'Ow-Jek - Android Mobile Project')
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'certification': 'TOEFL'}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
......
......@@ -4204,7 +4204,7 @@
"estraverse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=",
"dev": true
},
"fast-levenshtein": {
......@@ -11727,7 +11727,7 @@
"starwars": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/starwars/-/starwars-1.0.1.tgz",
"integrity": "sha1-+OIWt4KUs/y/ytJbRPJxF543U9U="
"integrity": "sha512-d23qkhEuFNlHas4/w2J6ZF6qS7jqy8OK4N3gfQbtTk/5Lt1wKe+xv0cIweuNxwtwBGVXvmsLV2mdUOBKfj12cA=="
},
"static-extend": {
"version": "0.1.2",
......
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