|
@@ -47,6 +47,7 @@ function Manual(props) {
|
47
|
47
|
})
|
48
|
48
|
|
49
|
49
|
const [departamento, setDepartamento] = React.useState('');
|
|
50
|
+ const [puestoSup, setPuestoSup] = React.useState('');
|
50
|
51
|
const [open, setOpen] = React.useState(false);
|
51
|
52
|
const [date, setDate] = React.useState(new Date());
|
52
|
53
|
const [tab, setTab] = React.useState(0);
|
|
@@ -57,6 +58,10 @@ function Manual(props) {
|
57
|
58
|
const changeDepartamento = (event) => {
|
58
|
59
|
setDepartamento(event.target.value);
|
59
|
60
|
};
|
|
61
|
+
|
|
62
|
+ const changePuestoSup = (event) => {
|
|
63
|
+ setPuestoSup(event.target.value);
|
|
64
|
+ };
|
60
|
65
|
|
61
|
66
|
const agregarPuesto = async (puesto) => {
|
62
|
67
|
let rest = new Service('/plaza/save');
|
|
@@ -167,6 +172,8 @@ function Manual(props) {
|
167
|
172
|
<TabPanel value={tab} index={0}>
|
168
|
173
|
|
169
|
174
|
<Stack spacing={3}>
|
|
175
|
+
|
|
176
|
+
|
170
|
177
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
171
|
178
|
<TextField
|
172
|
179
|
label="Nombre"
|
|
@@ -176,13 +183,28 @@ function Manual(props) {
|
176
|
183
|
helperText={touched.nombrepuesto && errors.nombrepuesto}
|
177
|
184
|
/>
|
178
|
185
|
|
179
|
|
- <TextField
|
180
|
|
- label="Puesto Superior"
|
181
|
|
- fullWidth
|
182
|
|
- {...getFieldProps('puestosuperior')}
|
183
|
|
- error={Boolean(touched.puestosuperior && errors.puestosuperior)}
|
184
|
|
- helperText={touched.puestosuperior && errors.puestosuperior}
|
185
|
|
- />
|
|
186
|
+ <FormControl fullWidth>
|
|
187
|
+ <InputLabel id="demo-simple-select-label">Puesto Superior</InputLabel>
|
|
188
|
+ <Select
|
|
189
|
+ labelId="demo-simple-select-label"
|
|
190
|
+ value={puestoSup}
|
|
191
|
+ label="Puesto Superior"
|
|
192
|
+ onChange={changePuestoSup}
|
|
193
|
+ {...getFieldProps('puestosuperior')}
|
|
194
|
+ helperText={touched.puestosuperior && errors.puestosuperior}
|
|
195
|
+ error={Boolean(touched.puestosuperior && errors.puestosuperior)} >
|
|
196
|
+ {
|
|
197
|
+ data ?
|
|
198
|
+ data.data.map(cate => {
|
|
199
|
+ return (
|
|
200
|
+ <MenuItem key={cate.id} value={cate.id}>{cate.nombre}</MenuItem>
|
|
201
|
+ )
|
|
202
|
+ })
|
|
203
|
+ : <MenuItem>Null</MenuItem>
|
|
204
|
+ }
|
|
205
|
+ </Select>
|
|
206
|
+ </FormControl>
|
|
207
|
+
|
186
|
208
|
</Stack>
|
187
|
209
|
|
188
|
210
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|