| 6848 |
stevensc |
1 |
import React, { useEffect, useState } from 'react'
|
|
|
2 |
import { Link } from 'react-router-dom'
|
|
|
3 |
import { getData } from '../../helpers/fetchHelpers';
|
|
|
4 |
import EditItem from '../components/EditItem';
|
| 6628 |
stevensc |
5 |
|
| 6848 |
stevensc |
6 |
const JobsEditView = ({ linkEdit }) => {
|
|
|
7 |
|
|
|
8 |
const [itemsData, setItemsData] = useState({
|
|
|
9 |
title: '',
|
|
|
10 |
status: '',
|
|
|
11 |
description: '',
|
|
|
12 |
location: '',
|
|
|
13 |
employment_type: '',
|
|
|
14 |
last_date_of_application: '',
|
|
|
15 |
job_category: '',
|
|
|
16 |
experience: '',
|
|
|
17 |
salary: '',
|
|
|
18 |
degrees: [],
|
|
|
19 |
languages: [],
|
|
|
20 |
skills: []
|
|
|
21 |
});
|
|
|
22 |
|
|
|
23 |
useEffect(() => {
|
|
|
24 |
getData(linkEdit)
|
|
|
25 |
.then(results => {
|
|
|
26 |
setItemsData({
|
|
|
27 |
title: results.title,
|
|
|
28 |
status: results.status,
|
|
|
29 |
description: results.description,
|
|
|
30 |
location: results.location,
|
|
|
31 |
employment_type: results.employment_type,
|
|
|
32 |
last_date_of_application: results.last_date_of_application,
|
|
|
33 |
job_category: results.job_category,
|
|
|
34 |
experience: results.experience,
|
|
|
35 |
salary: results.salary,
|
|
|
36 |
degrees: results.degrees,
|
|
|
37 |
languages: results.languages,
|
|
|
38 |
skills: results.skills
|
|
|
39 |
})
|
|
|
40 |
})
|
|
|
41 |
}, []);
|
|
|
42 |
|
| 6628 |
stevensc |
43 |
return (
|
|
|
44 |
<>
|
|
|
45 |
<section className="content-header">
|
|
|
46 |
<div className="container-fluid">
|
|
|
47 |
<div className="row mb-2">
|
|
|
48 |
<div className="col-sm-12">
|
| 6848 |
stevensc |
49 |
<Link to='/jobs' className='text-decoration-none text-body'>
|
|
|
50 |
<h1>
|
|
|
51 |
<i className='fa fa-angle-left fw-bold mr-2' />
|
|
|
52 |
Editar empleo
|
|
|
53 |
</h1>
|
|
|
54 |
</Link>
|
| 6628 |
stevensc |
55 |
</div>
|
|
|
56 |
</div>
|
|
|
57 |
</div>
|
|
|
58 |
</section>
|
| 6848 |
stevensc |
59 |
<section class="content">
|
|
|
60 |
<div class="container-fluid">
|
|
|
61 |
<div class="row">
|
|
|
62 |
<div class="col-lg-3">
|
|
|
63 |
</div>
|
|
|
64 |
<div class="col-lg-6">
|
|
|
65 |
<div class="main-ws-sec">
|
|
|
66 |
<EditItem title='Estatus' data={itemsData.status} action />
|
|
|
67 |
<EditItem title='Título' data={itemsData.title} action />
|
|
|
68 |
<EditItem title='Visión general' data={itemsData.description} action />
|
|
|
69 |
<EditItem title='Último día de aplicación' data={itemsData.last_date_of_application} action />
|
|
|
70 |
<EditItem title='Tipo de empleo' data={itemsData.employment_type} action />
|
|
|
71 |
<EditItem title='Ubicación' data={itemsData.location} action />
|
|
|
72 |
<EditItem title='Experiencia' data={itemsData.experience} action />
|
|
|
73 |
<EditItem title='Salario' data={itemsData.salary} action />
|
|
|
74 |
<EditItem title='Categoría' data={itemsData.job_category} action />
|
|
|
75 |
<EditItem title='Habilidades' data={itemsData.skills} action />
|
|
|
76 |
<EditItem title='Idiomas' data={itemsData.languages} action />
|
|
|
77 |
<EditItem title='Grados' data={itemsData.degrees} action />
|
|
|
78 |
</div>
|
|
|
79 |
</div>
|
|
|
80 |
<div class="col-lg-3">
|
|
|
81 |
</div>
|
|
|
82 |
</div>
|
|
|
83 |
</div>
|
|
|
84 |
</section>
|
| 6628 |
stevensc |
85 |
</>
|
|
|
86 |
)
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
export default JobsEditView
|