Fakultas Ilmu Komputer UI

Commit 8a55610f authored by ISNAINI NURUL KHASANAH's avatar ISNAINI NURUL KHASANAH
Browse files

Sprint 3 : mencegah field kosong saat edit profil perusahaan

parent 092ece39
Pipeline #26810 passed with stages
in 8 minutes and 57 seconds
......@@ -7,7 +7,6 @@ import { Doughnut } from 'react-chartjs-2';
import Server from './lib/Server';
import Dumper from './lib/Dumper';
import ModalAlert from './components/ModalAlert';
import DatePicker from "react-datepicker";
export default class CompanyProfile extends React.Component {
static propTypes = {
......@@ -18,21 +17,19 @@ export default class CompanyProfile extends React.Component {
super(props);
this.state = {
id: this.props.user.data.company.id,
name: '',
address: '',
category: '',
description: '',
founded: '',
website: '',
logo: '',
size: '',
linkedin_url: '',
name: this.props.user.data.company.name,
address: this.props.user.data.company.address,
category: this.props.user.data.company.category,
description: this.props.user.data.company.description,
website: this.props.user.data.company.website,
logo: this.props.user.data.company.logo,
size: this.props.user.data.company.size,
linkedin_url: this.props.user.data.company.linkedin_url,
loading: false,
form: {
name: '',
address: '',
description: '',
founded: '',
website: '',
size: '',
},
......@@ -40,8 +37,6 @@ export default class CompanyProfile extends React.Component {
applications: [],
vacancies: [],
};
this.getProfile();
this.getProfile = this.getProfile.bind(this);
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
......@@ -66,7 +61,6 @@ export default class CompanyProfile extends React.Component {
category: result.category,
id: result.id,
description: result.description,
founded: result.founded,
refresh: this.state.refresh + 1,
website: result.website,
size: result.size,
......@@ -156,9 +150,6 @@ export default class CompanyProfile extends React.Component {
-
{this.state.description}
</p>
<p>
Founded: {this.state.founded}
</p>
<p>{this.state.website}</p>
<p>
{this.state.size}
......@@ -237,7 +228,7 @@ karyawan
required
/>
</Form.Field>
<Form.Field required>
<Form.Field required>
<label htmlFor="founded">Founded:</label>
<input
name="founded"
......@@ -249,7 +240,7 @@ karyawan
}
required
/>
<Form.Field/>
</Form.Field>
<Form.Field required>
<label htmlFor="size">Jumlah karyawan</label>
<input
......
Markdown is supported
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