diff --git a/assets/css/custom.css b/assets/css/custom.css index 20b5596234b598870761ddbd5dbeeb1834fd410b..d7b9b27d8229ce70adcb90d67039c19ba3a46edf 100755 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -32,7 +32,7 @@ padding-right:15%; background: #fff; border: 1px solid #e5e5e5; border-radius: 3px; - margin: 100px 100px 30px; + margin: 80px 100px 30px; } .tabs__labels { margin: 0; @@ -189,15 +189,16 @@ card .formRegis{ height: auto !important; /* real browsers */ min-height: 100%; /* real browsers */ background-color: #EEEEEE; + padding-bottom: 5%; } .footer{ background-color: #031634; - position: relative; + position: absolute; bottom: 0; width: 100%; padding: 1%; - margin-top: 5%; + } .footer h5{ diff --git a/assets/js/ApplicantPage.jsx b/assets/js/ApplicantPage.jsx index 318930ac7f0dbc22d757fc0cbba0f43c8c5ea72d..2931c861f6ace5619a6db83b6bbb741e542e17c3 100644 --- a/assets/js/ApplicantPage.jsx +++ b/assets/js/ApplicantPage.jsx @@ -6,6 +6,11 @@ import ApplicantList from './components/ApplicantList'; import Applicant from './components/Applicant'; export default class ApplicantPage extends React.Component { + + static propTypes = { + user: React.PropTypes.object.isRequired, + }; + constructor(props) { super(props); /* istanbul ignore next */ @@ -21,7 +26,7 @@ export default class ApplicantPage extends React.Component { handleItemClick = (e, { name }) => this.setState({ activeItem: name }); render() { - const company = Storage.get('user-data').company; + const company = this.props.user.data.company; return ( <Tabs selected={0}> <Pane label="Lamaran Baru" > diff --git a/assets/js/CreateVacancy.jsx b/assets/js/CreateVacancy.jsx index e5015d6ff56edaa2b97e3b7ab0ab69f6b590368d..c1b7fe979e6e4f1e2c2191f9ec6635a2cc5be902 100644 --- a/assets/js/CreateVacancy.jsx +++ b/assets/js/CreateVacancy.jsx @@ -12,6 +12,7 @@ export default class CreateVacancy extends React.Component { static propTypes = { params: React.PropTypes.object.isRequired, + user: React.PropTypes.object.isRequired, }; constructor(props) { @@ -22,7 +23,7 @@ export default class CreateVacancy extends React.Component { this.state = { formLoading: false, - company: Storage.get('user-data').company, + company: this.props.user.data.company, vacancyId: this.props.params.id, open_time: moment(), close_time: moment(), diff --git a/core/serializers/vacancies.py b/core/serializers/vacancies.py index c1ffaf652c62345895f998fb5b921dc930a2799c..4aef67817c016fbdee542a6eb2e16c34bbcc165a 100644 --- a/core/serializers/vacancies.py +++ b/core/serializers/vacancies.py @@ -1,11 +1,12 @@ from rest_framework import serializers +from core.models import Company from core.models.vacancies import Vacancy, Application from core.serializers.accounts import StudentSerializer, CompanySerializer class VacancySerializer(serializers.ModelSerializer): - company = CompanySerializer() + company = serializers.PrimaryKeyRelatedField(queryset=Company.objects.all()) class Meta: model = Vacancy