|
@@ -47,6 +47,7 @@ function Manual(props) {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const [departamento, setDepartamento] = React.useState('');
|
|
const [departamento, setDepartamento] = React.useState('');
|
|
|
|
|
+ const [puestoSup, setPuestoSup] = React.useState('');
|
|
|
const [open, setOpen] = React.useState(false);
|
|
const [open, setOpen] = React.useState(false);
|
|
|
const [date, setDate] = React.useState(new Date());
|
|
const [date, setDate] = React.useState(new Date());
|
|
|
const [tab, setTab] = React.useState(0);
|
|
const [tab, setTab] = React.useState(0);
|
|
@@ -57,6 +58,10 @@ function Manual(props) {
|
|
|
const changeDepartamento = (event) => {
|
|
const changeDepartamento = (event) => {
|
|
|
setDepartamento(event.target.value);
|
|
setDepartamento(event.target.value);
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ const changePuestoSup = (event) => {
|
|
|
|
|
+ setPuestoSup(event.target.value);
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const agregarPuesto = async (puesto) => {
|
|
const agregarPuesto = async (puesto) => {
|
|
|
let rest = new Service('/plaza/save');
|
|
let rest = new Service('/plaza/save');
|
|
@@ -167,6 +172,8 @@ function Manual(props) {
|
|
|
<TabPanel value={tab} index={0}>
|
|
<TabPanel value={tab} index={0}>
|
|
|
|
|
|
|
|
<Stack spacing={3}>
|
|
<Stack spacing={3}>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
|
|
<TextField
|
|
<TextField
|
|
|
label="Nombre"
|
|
label="Nombre"
|
|
@@ -176,13 +183,28 @@ function Manual(props) {
|
|
|
helperText={touched.nombrepuesto && errors.nombrepuesto}
|
|
helperText={touched.nombrepuesto && errors.nombrepuesto}
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <TextField
|
|
|
|
|
- label="Puesto Superior"
|
|
|
|
|
- fullWidth
|
|
|
|
|
- {...getFieldProps('puestosuperior')}
|
|
|
|
|
- error={Boolean(touched.puestosuperior && errors.puestosuperior)}
|
|
|
|
|
- helperText={touched.puestosuperior && errors.puestosuperior}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <FormControl fullWidth>
|
|
|
|
|
+ <InputLabel id="demo-simple-select-label">Puesto Superior</InputLabel>
|
|
|
|
|
+ <Select
|
|
|
|
|
+ labelId="demo-simple-select-label"
|
|
|
|
|
+ value={puestoSup}
|
|
|
|
|
+ label="Puesto Superior"
|
|
|
|
|
+ onChange={changePuestoSup}
|
|
|
|
|
+ {...getFieldProps('puestosuperior')}
|
|
|
|
|
+ helperText={touched.puestosuperior && errors.puestosuperior}
|
|
|
|
|
+ error={Boolean(touched.puestosuperior && errors.puestosuperior)} >
|
|
|
|
|
+ {
|
|
|
|
|
+ data ?
|
|
|
|
|
+ data.data.map(cate => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <MenuItem key={cate.id} value={cate.id}>{cate.nombre}</MenuItem>
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+ : <MenuItem>Null</MenuItem>
|
|
|
|
|
+ }
|
|
|
|
|
+ </Select>
|
|
|
|
|
+ </FormControl>
|
|
|
|
|
+
|
|
|
</Stack>
|
|
</Stack>
|
|
|
|
|
|
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|