Fakultas Ilmu Komputer UI

Commit 330166d9 authored by Hadlina Rahmadinni's avatar Hadlina Rahmadinni
Browse files

1606918566 52

parent e8b42ca5
......@@ -20,6 +20,7 @@ export default class CreateVacancy extends React.Component {
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleDescription = this.handleDescription.bind(this);
this.handleRequirements = this.handleRequirements.bind(this);
this.handleResponsibilities = this.handleResponsibilities.bind(this);
this.setCloseTime = this.setCloseTime.bind(this);
this.setOpenTime = this.setOpenTime.bind(this);
......@@ -33,6 +34,7 @@ export default class CreateVacancy extends React.Component {
close_time: moment(),
name: '',
description: '',
requirements: '',
salary: 0,
};
......@@ -40,6 +42,7 @@ export default class CreateVacancy extends React.Component {
Server.get(`/vacancies/${this.state.vacancyId}/`).then((r) => {
this.setState({
description: r.description,
requirements : r.requirements,
responsibilities: r.responsibilities,
name: r.name,
salary: r.salary,
......@@ -67,6 +70,10 @@ export default class CreateVacancy extends React.Component {
this.setState({ description: value });
}
handleRequirements(value) {
this.setState({ requirements: value });
}
handleResponsibilities(value) {
this.setState({ responsibilities: value });
}
......@@ -78,6 +85,7 @@ export default class CreateVacancy extends React.Component {
const data = {};
data.name = this.state.name;
data.description = this.state.description;
data.requirements = this.state.requirements;
data.salary = this.state.salary;
data.open_time = this.state.open_time.format();
data.close_time = this.state.close_time.format();
......@@ -117,6 +125,11 @@ export default class CreateVacancy extends React.Component {
<CKEditor value={this.state.responsibilities} onChange={this.handleResponsibilities} /> }
<script>CKEDITOR.replace( 'responsibilities' );</script>
<br />
<label htmlFor="requirements"> <b> Persyaratan </b> </label>
{ !this.state.loading &&
<CKEditor value={this.state.requirements} onChange={this.handleRequirements} /> }
<script>CKEDITOR.replace( 'requirements' );</script>
<br />
<Form.Field label="Gaji / Insentif (Rupiah per bulan)" type="number" min="0" name="salary" control={Input} onChange={this.handleChange} value={this.state.salary} />
<Form.Group widths="equal">
<Form.Field
......
......@@ -71,6 +71,7 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
requirements: 'stub',
responsibilities: 'stub',
});
createVacancy.handleChange({ target: { name: 'test', value: 'hue' } });
......@@ -88,6 +89,7 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
requirements: 'stub',
responsibilities: 'stub',
});
......@@ -114,6 +116,7 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
requirements: 'stub',
responsibilities: 'stub',
});
......@@ -133,6 +136,7 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
requirements: 'stub',
responsibilities: 'stub',
});
......@@ -161,6 +165,7 @@ describe('CreateVacancy', () => {
createVacancy.setState({
name: 'stub',
description: 'stub',
requirements: 'stub',
responsibilities: 'stub',
});
......
......@@ -17,6 +17,7 @@ describe('Vacancy', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
id: 3,
name: 'Software Engineer',
......@@ -36,6 +37,7 @@ describe('Vacancy', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
id: 3,
name: 'Software Engineer',
......
......@@ -135,6 +135,7 @@ describe('VacancyList', () => {
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
salary: '1',
close_time: '2017-04-30T03:39:11Z',
......@@ -165,6 +166,7 @@ describe('VacancyList', () => {
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
salary: '1',
close_time: '2017-04-30T03:39:11Z',
......@@ -195,6 +197,7 @@ describe('VacancyList', () => {
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
salary: '1',
close_time: '2017-04-30T03:39:11Z',
......@@ -225,6 +228,7 @@ describe('VacancyList', () => {
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
salary: '1',
close_time: '2017-04-30T03:39:11Z',
......@@ -255,6 +259,7 @@ describe('VacancyList', () => {
verified: true,
open_time: '2017-04-26T03:39:11Z',
description: 'deskripsi',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
salary: '1',
close_time: '2017-04-30T03:39:11Z',
......@@ -278,6 +283,7 @@ describe('VacancyList', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
id: 1,
name: 'Software Engineer',
......@@ -295,6 +301,7 @@ describe('VacancyList', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
id: 2,
name: 'Software Engineer',
......@@ -314,6 +321,7 @@ describe('VacancyList', () => {
},
created: '2017-03-28T07:05:47.128672Z',
description: 'Lorem ipsum dolbh.',
requirements: 'requirements',
responsibilities: 'This is a responsibility.',
id: 2,
name: 'Software Engineer',
......
......@@ -87,6 +87,11 @@ export default class ApplyModal extends React.Component {
<Modal.Header> <h3> Tanggung Jawab Lowongan </h3></Modal.Header>
{ <div dangerouslySetInnerHTML={{ __html: this.props.data.responsibilities }} /> }
</Modal.Description>
<br />
<Modal.Description>
<Modal.Header> <h3> Persyaratan </h3></Modal.Header>
{ <div dangerouslySetInnerHTML={{ __html: this.props.data.requirements }} /> }
</Modal.Description>
{this.props.active && (
<div className="coverLetter">
<br />
......
......@@ -95,6 +95,7 @@ export default class Vacancy extends React.Component {
data={{
header: this.props.data.name,
description: this.props.data.description,
requirements: this.props.data.requirements,
companydescription: this.props.data.company.description,
responsibilities: this.props.data.responsibilities,
id: this.props.data.id,
......
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-28 04:06
# Generated by Django 1.11.17 on 2019-10-12 08:21
from __future__ import unicode_literals
import core.lib.validators
import core.models.accounts
from django.conf import settings
import django.core.validators
......@@ -22,6 +23,8 @@ class Migration(migrations.Migration):
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cover_letter', models.TextField(blank=True, null=True)),
('status', models.IntegerField(default=0)),
],
),
migrations.CreateModel(
......@@ -31,11 +34,28 @@ class Migration(migrations.Migration):
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('description', models.TextField()),
('verified', models.BooleanField(default=False)),
('logo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_company_logo_file_path)),
('alamat', models.CharField(blank=True, max_length=1000, null=True)),
('status', models.IntegerField(default=0)),
('logo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_company_logo_file_path, validators=[core.lib.validators.validate_image_file_extension])),
('address', models.CharField(blank=True, max_length=1000, null=True)),
('category', models.CharField(default=b'Belum ada kategori perusahaan', max_length=140)),
('website', models.CharField(default=b'Belum ada link website', max_length=100)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['-updated'],
},
),
migrations.CreateModel(
name='Feedback',
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=b'', max_length=100)),
('content', models.TextField()),
],
options={
'ordering': ['created'],
},
),
migrations.CreateModel(
name='Student',
......@@ -43,10 +63,37 @@ 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)),
('npm', models.IntegerField(unique=True, validators=[django.core.validators.MinValueValidator(100000000), django.core.validators.MaxValueValidator(9999999999)])),
('resume', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_resume_file_path)),
('phone_number', models.CharField(blank=True, db_index=True, max_length=100, null=True)),
('npm', models.IntegerField(unique=True, validators=[core.lib.validators.validate_npm])),
('resume', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_resume_file_path, validators=[core.lib.validators.validate_document_file_extension])),
('phone_number', models.CharField(blank=True, db_index=True, max_length=100, null=True, validators=[django.core.validators.RegexValidator(b'^0\\d{1,11}$')])),
('gender', models.CharField(blank=True, max_length=30, null=True)),
('birth_place', models.CharField(blank=True, max_length=30, null=True)),
('birth_date', models.DateField(blank=True, null=True)),
('major', models.CharField(blank=True, max_length=30, null=True)),
('batch', models.CharField(blank=True, max_length=4, null=True)),
('show_transcript', models.BooleanField(default=False)),
('self_description', models.CharField(blank=True, db_index=True, max_length=500, null=True)),
('photo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_photo_file_path, validators=[core.lib.validators.validate_image_file_extension])),
('portfolio_link', models.URLField(blank=True, null=True)),
('linkedin_url', models.URLField(blank=True, null=True)),
('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)),
('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)),
('latest_work_desc', models.TextField(blank=True, null=True)),
('github_url', models.URLField(blank=True, null=True)),
('intro', models.CharField(blank=True, max_length=50, null=True)),
('expected_salary', models.CharField(blank=True, max_length=10, null=True)),
('job_seeking_status', models.CharField(blank=True, max_length=30, null=True)),
('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)),
],
options={
'ordering': ['-updated'],
},
),
migrations.CreateModel(
name='Supervisor',
......@@ -57,6 +104,9 @@ class Migration(migrations.Migration):
('nip', models.IntegerField(unique=True, validators=[django.core.validators.MinValueValidator(100000000), django.core.validators.MaxValueValidator(9999999999)])),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['-updated'],
},
),
migrations.CreateModel(
name='Vacancy',
......@@ -65,14 +115,40 @@ class Migration(migrations.Migration):
('verified', models.BooleanField(default=False)),
('open_time', models.DateTimeField()),
('description', models.TextField(blank=True)),
('requirements', models.TextField(blank=True)),
('responsibilities', models.TextField(blank=True)),
('close_time', models.DateTimeField()),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=100)),
('amount', models.IntegerField(null=True)),
('salary', models.IntegerField(default=0)),
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vacancies', to='core.Company')),
],
options={
'ordering': ['-updated'],
},
),
migrations.CreateModel(
name='VacancyMilestone',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('detail', models.TextField()),
('expected_start', models.DateField()),
('expected_finish', models.DateField()),
('vacancy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='milestones', to='core.Vacancy')),
],
),
migrations.AddField(
model_name='student',
name='applied_vacancies',
field=models.ManyToManyField(blank=True, related_name='applied_vacancies', through='core.Application', to='core.Vacancy'),
),
migrations.AddField(
model_name='student',
name='bookmarked_vacancies',
field=models.ManyToManyField(blank=True, to='core.Vacancy'),
field=models.ManyToManyField(blank=True, related_name='bookmarked_vacancies', to='core.Vacancy'),
),
migrations.AddField(
model_name='student',
......@@ -81,12 +157,16 @@ class Migration(migrations.Migration):
),
migrations.AddField(
model_name='application',
name='student_npm',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Student'),
name='student',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Student'),
),
migrations.AddField(
model_name='application',
name='vacancy_id',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Vacancy'),
name='vacancy',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Vacancy'),
),
migrations.AlterUniqueTogether(
name='application',
unique_together=set([('student', 'vacancy')]),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-28 04:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='application',
name='student_npm',
),
migrations.RemoveField(
model_name='application',
name='vacancy_id',
),
migrations.AddField(
model_name='student',
name='applied_vacancies',
field=models.ManyToManyField(blank=True, related_name='applied_vacancies', to='core.Vacancy'),
),
migrations.AlterField(
model_name='student',
name='bookmarked_vacancies',
field=models.ManyToManyField(blank=True, related_name='bookmarked_vacancies', to='core.Vacancy'),
),
migrations.DeleteModel(
name='Application',
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-28 07:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20170328_1131'),
]
operations = [
migrations.AddField(
model_name='vacancy',
name='created',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='vacancy',
name='name',
field=models.CharField(default=django.utils.timezone.now, max_length=100),
preserve_default=False,
),
migrations.AddField(
model_name='vacancy',
name='updated',
field=models.DateTimeField(auto_now=True),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-28 07:17
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20170328_1400'),
]
operations = [
migrations.RenameField(
model_name='company',
old_name='alamat',
new_name='address',
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-28 12:04
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20170328_1417'),
]
operations = [
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cover_letter', models.TextField(blank=True, null=True)),
('allow_transcript', models.BooleanField(default=True)),
],
),
migrations.RemoveField(
model_name='student',
name='applied_vacancies',
),
migrations.AddField(
model_name='student',
name='applied_vacancies',
field=models.ManyToManyField(blank=True, related_name='applied_vacancies', through='core.Application', to='core.Vacancy'),
),
migrations.AddField(
model_name='application',
name='student',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Student'),
),
migrations.AddField(
model_name='application',
name='vacancy',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Vacancy'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-28 12:50
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20170328_1904'),
]
operations = [
migrations.AlterUniqueTogether(
name='application',
unique_together=set([('student', 'vacancy')]),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-24 07:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20170328_1950'),
]
operations = [
migrations.AddField(
model_name='student',
name='batch',
field=models.CharField(blank=True, max_length=4, null=True),
),
migrations.AddField(
model_name='student',
name='birth_date',
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name='student',
name='birth_place',
field=models.TextField(blank=True, max_length=100, null=True),
),
migrations.AddField(
model_name='student',
name='major',
field=models.CharField(blank=True, max_length=100, null=True),
),
migrations.AddField(
model_name='student',
name='show_resume',
field=models.BooleanField(default=False),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-25 15:50
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20170328_1950'),
]
operations = [
migrations.RemoveField(
model_name='application',
name='allow_transcript',
),
migrations.AddField(
model_name='application',
name='status',
field=models.IntegerField(default=0),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-24 07:25
from __future__ import unicode_literals
from django.db import migrations, models
<