|
@@ -15,283 +15,282 @@ import {
|
15
|
15
|
|
16
|
16
|
import { Service } from '../../Utils/HTTP';
|
17
|
17
|
import { useQuery, useMutation, useQueryClient } from 'react-query';
|
18
|
|
-import useAuth from '../../Auth/useAuth';
|
19
|
18
|
import { TabPanel } from './TabPanel'
|
|
19
|
+import { useSelector } from 'react-redux';
|
20
|
20
|
|
21
|
21
|
function Manual(props) {
|
22
|
22
|
|
23
|
|
- const auth = useAuth();
|
24
|
|
- const token = auth.getToken();
|
25
|
|
-
|
26
|
|
- const getCategories = async () => {
|
27
|
|
- let rest = new Service("/categoria/getAll")
|
28
|
|
- return await rest.getQuery(token)
|
29
|
|
- }
|
|
23
|
+ const auth = useSelector((state) => state.token)
|
|
24
|
+
|
|
25
|
+ const getCategories = async () => {
|
|
26
|
+ let rest = new Service("/categoria/getAll")
|
|
27
|
+ return await rest.getQuery(auth.token)
|
|
28
|
+ }
|
|
29
|
+
|
|
30
|
+ const getTest = async () => {
|
|
31
|
+ let rest = new Service("/tests/getAll")
|
|
32
|
+ return await rest.getQuery(auth.token)
|
|
33
|
+ }
|
|
34
|
+
|
|
35
|
+ const { data } = useQuery('categories', getCategories);
|
|
36
|
+ const { data: testsCatalog } = useQuery('tests', getTest);
|
|
37
|
+ const queryClient = useQueryClient();
|
|
38
|
+
|
|
39
|
+ const NewPlazaSchema = Yup.object().shape({
|
|
40
|
+ nombrepuesto: Yup.string().required('El nombre es requerido').min(5, "El nombre del puesto debe ser mayor a 5 caracteres").max(100),
|
|
41
|
+ puestosuperior: Yup.number("El puesto superior debe ser un número").required("El puesto es requerido"),
|
|
42
|
+ aredepto: Yup.number().required('Escoge alguna área'),
|
|
43
|
+ fecha: Yup.date("Ingresa una fecha válida"),
|
|
44
|
+ notas: Yup.string("Ingresa una nota válida").min(5, "Ingresa una nota válida").max(150),
|
|
45
|
+ tests: Yup.array()
|
|
46
|
+ })
|
|
47
|
+
|
|
48
|
+ const [departamento, setDepartamento] = React.useState('');
|
|
49
|
+ const [puestoSup, setPuestoSup] = React.useState('');
|
|
50
|
+ const [open, setOpen] = React.useState(false);
|
|
51
|
+ const [date, setDate] = React.useState(new Date());
|
|
52
|
+ const [tab, setTab] = React.useState(0);
|
|
53
|
+ const [checklist, setChecklist] = React.useState([]);
|
|
54
|
+
|
|
55
|
+ const handleClose = () => false
|
|
56
|
+
|
|
57
|
+ const changeDepartamento = (event) => {
|
|
58
|
+ setDepartamento(event.target.value);
|
|
59
|
+ };
|
|
60
|
+
|
|
61
|
+ const changePuestoSup = (event) => {
|
|
62
|
+ setPuestoSup(event.target.value);
|
|
63
|
+ };
|
|
64
|
+
|
|
65
|
+ const agregarPuesto = async (puesto) => {
|
|
66
|
+ let rest = new Service('/plaza/save');
|
|
67
|
+ return await rest.postQuery(puesto, auth.token);
|
|
68
|
+ }
|
|
69
|
+
|
|
70
|
+ const puestoMutation = useMutation(agregarPuesto)
|
|
71
|
+
|
|
72
|
+ let { visible, onClose } = props
|
|
73
|
+
|
|
74
|
+ const formik = useFormik({
|
|
75
|
+ initialValues: {
|
|
76
|
+ nombrepuesto: "",
|
|
77
|
+ puestosuperior: "",
|
|
78
|
+ aredepto: 1,
|
|
79
|
+ fecha: date,
|
|
80
|
+ notas: "",
|
|
81
|
+ tests:[]
|
|
82
|
+ },
|
|
83
|
+ onSubmit: (fields, { resetForm }) => {
|
|
84
|
+
|
|
85
|
+ setOpen(true)
|
|
86
|
+ fields['fecha'] = new Date(fields.fecha).toISOString();
|
|
87
|
+ fields['areadeptoplz_id'] = 1;
|
|
88
|
+ fields['id'] = -1;
|
|
89
|
+
|
|
90
|
+ puestoMutation.mutate(fields, {
|
|
91
|
+ onSuccess: () => {
|
|
92
|
+ setOpen(false)
|
|
93
|
+ resetForm();
|
|
94
|
+ onClose();
|
|
95
|
+ queryClient.invalidateQueries('puestos')
|
|
96
|
+ toast.success("Puesto Agregado")
|
|
97
|
+ },
|
|
98
|
+ onError: () => {
|
|
99
|
+ setOpen(false)
|
|
100
|
+ toast.error("Ups!! Ocurrio un error, inténtalo más tarde")
|
|
101
|
+ }
|
|
102
|
+ })
|
|
103
|
+ },
|
|
104
|
+ validationSchema: NewPlazaSchema,
|
|
105
|
+ });
|
30
|
106
|
|
31
|
|
- const getTest = async () => {
|
32
|
|
- let rest = new Service("/tests/getAll")
|
33
|
|
- return await rest.getQuery(token)
|
34
|
|
- }
|
|
107
|
+ const changeTab = (_event, newValue) => {
|
|
108
|
+ setTab(newValue);
|
|
109
|
+ };
|
35
|
110
|
|
36
|
|
- const { data } = useQuery('categories', getCategories);
|
37
|
|
- const { data: testsCatalog } = useQuery('tests', getTest);
|
38
|
|
- const queryClient = useQueryClient();
|
39
|
|
-
|
40
|
|
- const NewPlazaSchema = Yup.object().shape({
|
41
|
|
- nombrepuesto: Yup.string().required('El nombre es requerido').min(5, "El nombre del puesto debe ser mayor a 5 caracteres").max(100),
|
42
|
|
- puestosuperior: Yup.number("El puesto superior debe ser un número").required("El puesto es requerido"),
|
43
|
|
- aredepto: Yup.number().required('Escoge alguna área'),
|
44
|
|
- fecha: Yup.date("Ingresa una fecha válida"),
|
45
|
|
- notas: Yup.string("Ingresa una nota válida").min(5, "Ingresa una nota válida").max(150),
|
46
|
|
- tests: Yup.array()
|
47
|
|
- })
|
48
|
|
-
|
49
|
|
- const [departamento, setDepartamento] = React.useState('');
|
50
|
|
- const [puestoSup, setPuestoSup] = React.useState('');
|
51
|
|
- const [open, setOpen] = React.useState(false);
|
52
|
|
- const [date, setDate] = React.useState(new Date());
|
53
|
|
- const [tab, setTab] = React.useState(0);
|
54
|
|
- const [checklist, setChecklist] = React.useState([]);
|
55
|
|
-
|
56
|
|
- const handleClose = () => false
|
57
|
|
-
|
58
|
|
- const changeDepartamento = (event) => {
|
59
|
|
- setDepartamento(event.target.value);
|
60
|
|
- };
|
61
|
|
-
|
62
|
|
- const changePuestoSup = (event) => {
|
63
|
|
- setPuestoSup(event.target.value);
|
64
|
|
- };
|
65
|
|
-
|
66
|
|
- const agregarPuesto = async (puesto) => {
|
67
|
|
- let rest = new Service('/plaza/save');
|
68
|
|
- return await rest.postQuery(puesto, token);
|
69
|
|
- }
|
70
|
111
|
|
71
|
|
- const puestoMutation = useMutation(agregarPuesto)
|
|
112
|
+ const { errors, touched, handleSubmit, getFieldProps, values, setValues } = formik;
|
72
|
113
|
|
73
|
|
- let { visible, onClose } = props
|
74
|
|
-
|
75
|
|
- const formik = useFormik({
|
76
|
|
- initialValues: {
|
77
|
|
- nombrepuesto: "",
|
78
|
|
- puestosuperior: "",
|
79
|
|
- aredepto: 1,
|
80
|
|
- fecha: date,
|
81
|
|
- notas: "",
|
82
|
|
- tests:[]
|
83
|
|
- },
|
84
|
|
- onSubmit: (fields, { resetForm }) => {
|
85
|
|
-
|
86
|
|
- setOpen(true)
|
87
|
|
- fields['fecha'] = new Date(fields.fecha).toISOString();
|
88
|
|
- fields['areadeptoplz_id'] = 1;
|
89
|
|
- fields['id'] = -1;
|
90
|
|
-
|
91
|
|
- puestoMutation.mutate(fields, {
|
92
|
|
- onSuccess: () => {
|
93
|
|
- setOpen(false)
|
94
|
|
- resetForm();
|
95
|
|
- onClose();
|
96
|
|
- queryClient.invalidateQueries('puestos')
|
97
|
|
- toast.success("Puesto Agregado")
|
98
|
|
- },
|
99
|
|
- onError: () => {
|
100
|
|
- setOpen(false)
|
101
|
|
- toast.error("Ups!! Ocurrio un error, inténtalo más tarde")
|
102
|
|
- }
|
103
|
|
- })
|
104
|
|
- },
|
105
|
|
- validationSchema: NewPlazaSchema,
|
106
|
|
- });
|
107
|
|
-
|
108
|
|
- const changeTab = (_event, newValue) => {
|
109
|
|
- setTab(newValue);
|
110
|
|
- };
|
111
|
|
-
|
112
|
|
-
|
113
|
|
- const { errors, touched, handleSubmit, getFieldProps, values, setValues } = formik;
|
114
|
|
-
|
115
|
|
- const addPrueba = (check,id) => {
|
116
|
|
- let { tests } = values
|
117
|
|
- let temp ;
|
118
|
|
- if(check){
|
119
|
|
- temp = [...tests, {id}]
|
120
|
|
- }else{
|
121
|
|
- temp = tests.filter( test => test.id !== id);
|
122
|
|
- }
|
123
|
|
- setChecklist( temp.map( test => test.id) )
|
124
|
|
- setValues({...values, tests: temp})
|
125
|
|
- };
|
126
|
|
-
|
127
|
|
- return (
|
128
|
|
-
|
129
|
|
- <Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
130
|
|
-
|
131
|
|
- <Modal.Header>
|
132
|
|
- <button onClick={onClose} type="button" className="close" data-dismiss="modal">×</button>
|
133
|
|
- <h4 className="modal-title" style={{ color: '#252525' }}>Agregar Puesto</h4>
|
134
|
|
- </Modal.Header>
|
135
|
|
- <Modal.Body className="modal-body">
|
136
|
|
-
|
137
|
|
- <Tabs value={tab} onChange={changeTab} aria-label="basic tabs example">
|
138
|
|
- <Tab label="Información" />
|
139
|
|
- <Tab label="Pruebas" />
|
140
|
|
- </Tabs>
|
141
|
|
-
|
142
|
|
- <FormikProvider style={{ paddingTop: 25 }} value={formik}>
|
143
|
|
- <Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
144
|
|
-
|
145
|
|
- <TabPanel value={tab} index={1}>
|
146
|
|
- <Stack spacing={1}>
|
147
|
|
- <Box style={{ paddingTop :5, paddingLeft :15 }}>
|
148
|
|
- <Divider/>
|
149
|
|
- <h4 style={{paddingTop :10, paddingBottom:10}}>Seleciona los test a realizar</h4>
|
150
|
|
- <Divider/>
|
151
|
|
- <FormGroup>
|
152
|
|
- {
|
153
|
|
- testsCatalog ?
|
154
|
|
- testsCatalog.data.map( test => (
|
155
|
|
- <FormControlLabel
|
156
|
|
- key={test.id}
|
157
|
|
- control={
|
158
|
|
- <Checkbox
|
159
|
|
- checked={checklist.includes((test.id))}
|
160
|
|
- onChange={(event)=> addPrueba(event.target.checked,test.id)}
|
161
|
|
- />
|
162
|
|
- }
|
163
|
|
- label={test.nombre}
|
164
|
|
- />
|
165
|
|
- )): null
|
166
|
|
- }
|
167
|
|
- </FormGroup>
|
168
|
|
- </Box>
|
169
|
|
- </Stack>
|
170
|
|
- </TabPanel>
|
171
|
|
-
|
172
|
|
- <TabPanel value={tab} index={0}>
|
173
|
|
-
|
174
|
|
- <Stack spacing={3}>
|
175
|
|
-
|
176
|
|
-
|
177
|
|
- <Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
178
|
|
- <TextField
|
179
|
|
- label="Nombre"
|
180
|
|
- fullWidth
|
181
|
|
- {...getFieldProps('nombrepuesto')}
|
182
|
|
- error={Boolean(touched.nombrepuesto && errors.nombrepuesto)}
|
183
|
|
- helperText={touched.nombrepuesto && errors.nombrepuesto}
|
184
|
|
- />
|
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
|
|
-
|
208
|
|
- </Stack>
|
209
|
|
-
|
210
|
|
- <Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
211
|
|
-
|
212
|
|
- <FormControl fullWidth>
|
213
|
|
- <InputLabel id="demo-simple-select-label">Departamento</InputLabel>
|
214
|
|
- <Select
|
215
|
|
- labelId="demo-simple-select-label"
|
216
|
|
- value={departamento}
|
217
|
|
- label="Departamento"
|
218
|
|
- onChange={changeDepartamento}
|
219
|
|
- {...getFieldProps('aredepto')}
|
220
|
|
- error={Boolean(touched.aredepto && errors.aredepto)} >
|
221
|
|
- {
|
222
|
|
- data ?
|
223
|
|
- data.data.map(cate => {
|
224
|
|
- return (
|
225
|
|
- <MenuItem key={cate.id} value={cate.id}>{cate.nombre}</MenuItem>
|
226
|
|
- )
|
227
|
|
- })
|
228
|
|
- : <MenuItem>Null</MenuItem>
|
229
|
|
- }
|
230
|
|
- </Select>
|
231
|
|
- </FormControl>
|
232
|
|
-
|
233
|
|
-
|
234
|
|
- <LocalizationProvider
|
235
|
|
- dateAdapter={DateFnsUtils}>
|
236
|
|
- <DesktopDatePicker
|
237
|
|
- label="Fecha Creación"
|
238
|
|
- fullWidth
|
239
|
|
- inputFormat="dd/MM/yyyy"
|
240
|
|
- {...getFieldProps('fecha')}
|
241
|
|
- value={date}
|
242
|
|
- onChange={setDate}
|
243
|
|
- renderInput={(params) =>
|
244
|
|
- <TextField
|
245
|
|
- disabled={true}
|
246
|
|
- label="Fecha Creación"
|
247
|
|
- fullWidth
|
248
|
|
- {...params}
|
249
|
|
- />}
|
250
|
|
- />
|
251
|
|
- </LocalizationProvider>
|
252
|
|
-
|
253
|
|
- </Stack>
|
254
|
|
-
|
255
|
|
- <Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
256
|
|
- <TextField
|
257
|
|
- id="filled-multiline-static"
|
258
|
|
- multiline
|
259
|
|
- rows={4}
|
260
|
|
- variant="filled"
|
261
|
|
- label="Notas"
|
262
|
|
- fullWidth
|
263
|
|
- type="text"
|
264
|
|
- {...getFieldProps('notas')}
|
265
|
|
- error={Boolean(touched.notas && errors.notas)}
|
266
|
|
- helperText={touched.notas && errors.notas}
|
267
|
|
- />
|
268
|
|
- </Stack>
|
269
|
|
- </Stack>
|
270
|
|
-
|
271
|
|
- </TabPanel>
|
272
|
|
-
|
273
|
|
-
|
274
|
|
- <Modal.Footer>
|
275
|
|
- <Button
|
276
|
|
- type="submit"
|
277
|
|
- className="registerBtn"
|
278
|
|
- variant="contained"
|
279
|
|
- sx={{ mt: 1, mr: 1 }} >
|
280
|
|
- {'Guardar'}
|
281
|
|
- </Button>
|
282
|
|
- </Modal.Footer>
|
283
|
|
-
|
284
|
|
- </Form>
|
285
|
|
- </FormikProvider>
|
286
|
|
- </Modal.Body>
|
287
|
|
- <Backdrop
|
288
|
|
- sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
289
|
|
- open={open}
|
290
|
|
- onClick={handleClose} >
|
291
|
|
- <CircularProgress color="inherit" />
|
292
|
|
- </Backdrop>
|
293
|
|
- <Toaster position="top-right" />
|
294
|
|
- </Modal>
|
295
|
|
- )
|
|
114
|
+ const addPrueba = (check,id) => {
|
|
115
|
+ let { tests } = values
|
|
116
|
+ let temp ;
|
|
117
|
+ if(check){
|
|
118
|
+ temp = [...tests, {id}]
|
|
119
|
+ }else{
|
|
120
|
+ temp = tests.filter( test => test.id !== id);
|
|
121
|
+ }
|
|
122
|
+ setChecklist( temp.map( test => test.id) )
|
|
123
|
+ setValues({...values, tests: temp})
|
|
124
|
+ };
|
|
125
|
+
|
|
126
|
+ return (
|
|
127
|
+
|
|
128
|
+ <Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
|
129
|
+
|
|
130
|
+ <Modal.Header>
|
|
131
|
+ <button onClick={onClose} type="button" className="close" data-dismiss="modal">×</button>
|
|
132
|
+ <h4 className="modal-title" style={{ color: '#252525' }}>Agregar Puesto</h4>
|
|
133
|
+ </Modal.Header>
|
|
134
|
+ <Modal.Body className="modal-body">
|
|
135
|
+
|
|
136
|
+ <Tabs value={tab} onChange={changeTab} aria-label="basic tabs example">
|
|
137
|
+ <Tab label="Información" />
|
|
138
|
+ <Tab label="Pruebas" />
|
|
139
|
+ </Tabs>
|
|
140
|
+
|
|
141
|
+ <FormikProvider style={{ paddingTop: 25 }} value={formik}>
|
|
142
|
+ <Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
|
143
|
+
|
|
144
|
+ <TabPanel value={tab} index={1}>
|
|
145
|
+ <Stack spacing={1}>
|
|
146
|
+ <Box style={{ paddingTop :5, paddingLeft :15 }}>
|
|
147
|
+ <Divider/>
|
|
148
|
+ <h4 style={{paddingTop :10, paddingBottom:10}}>Seleciona los test a realizar</h4>
|
|
149
|
+ <Divider/>
|
|
150
|
+ <FormGroup>
|
|
151
|
+ {
|
|
152
|
+ testsCatalog ?
|
|
153
|
+ testsCatalog.data.map( test => (
|
|
154
|
+ <FormControlLabel
|
|
155
|
+ key={test.id}
|
|
156
|
+ control={
|
|
157
|
+ <Checkbox
|
|
158
|
+ checked={checklist.includes((test.id))}
|
|
159
|
+ onChange={(event)=> addPrueba(event.target.checked,test.id)}
|
|
160
|
+ />
|
|
161
|
+ }
|
|
162
|
+ label={test.nombre}
|
|
163
|
+ />
|
|
164
|
+ )): null
|
|
165
|
+ }
|
|
166
|
+ </FormGroup>
|
|
167
|
+ </Box>
|
|
168
|
+ </Stack>
|
|
169
|
+ </TabPanel>
|
|
170
|
+
|
|
171
|
+ <TabPanel value={tab} index={0}>
|
|
172
|
+
|
|
173
|
+ <Stack spacing={3}>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+ <Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
|
177
|
+ <TextField
|
|
178
|
+ label="Nombre"
|
|
179
|
+ fullWidth
|
|
180
|
+ {...getFieldProps('nombrepuesto')}
|
|
181
|
+ error={Boolean(touched.nombrepuesto && errors.nombrepuesto)}
|
|
182
|
+ helperText={touched.nombrepuesto && errors.nombrepuesto}
|
|
183
|
+ />
|
|
184
|
+
|
|
185
|
+ <FormControl fullWidth>
|
|
186
|
+ <InputLabel id="demo-simple-select-label">Puesto Superior</InputLabel>
|
|
187
|
+ <Select
|
|
188
|
+ labelId="demo-simple-select-label"
|
|
189
|
+ value={puestoSup}
|
|
190
|
+ label="Puesto Superior"
|
|
191
|
+ onChange={changePuestoSup}
|
|
192
|
+ {...getFieldProps('puestosuperior')}
|
|
193
|
+ helperText={touched.puestosuperior && errors.puestosuperior}
|
|
194
|
+ error={Boolean(touched.puestosuperior && errors.puestosuperior)} >
|
|
195
|
+ {
|
|
196
|
+ data ?
|
|
197
|
+ data.data.map(cate => {
|
|
198
|
+ return (
|
|
199
|
+ <MenuItem key={cate.id} value={cate.id}>{cate.nombre}</MenuItem>
|
|
200
|
+)
|
|
201
|
+ })
|
|
202
|
+ : <MenuItem>Null</MenuItem>
|
|
203
|
+ }
|
|
204
|
+ </Select>
|
|
205
|
+ </FormControl>
|
|
206
|
+
|
|
207
|
+ </Stack>
|
|
208
|
+
|
|
209
|
+ <Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
|
210
|
+
|
|
211
|
+ <FormControl fullWidth>
|
|
212
|
+ <InputLabel id="demo-simple-select-label">Departamento</InputLabel>
|
|
213
|
+ <Select
|
|
214
|
+ labelId="demo-simple-select-label"
|
|
215
|
+ value={departamento}
|
|
216
|
+ label="Departamento"
|
|
217
|
+ onChange={changeDepartamento}
|
|
218
|
+ {...getFieldProps('aredepto')}
|
|
219
|
+ error={Boolean(touched.aredepto && errors.aredepto)} >
|
|
220
|
+ {
|
|
221
|
+ data ?
|
|
222
|
+ data.data.map(cate => {
|
|
223
|
+ return (
|
|
224
|
+ <MenuItem key={cate.id} value={cate.id}>{cate.nombre}</MenuItem>
|
|
225
|
+ )
|
|
226
|
+ })
|
|
227
|
+ : <MenuItem>Null</MenuItem>
|
|
228
|
+ }
|
|
229
|
+ </Select>
|
|
230
|
+ </FormControl>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+ <LocalizationProvider
|
|
234
|
+ dateAdapter={DateFnsUtils}>
|
|
235
|
+ <DesktopDatePicker
|
|
236
|
+ label="Fecha Creación"
|
|
237
|
+ fullWidth
|
|
238
|
+ inputFormat="dd/MM/yyyy"
|
|
239
|
+ {...getFieldProps('fecha')}
|
|
240
|
+ value={date}
|
|
241
|
+ onChange={setDate}
|
|
242
|
+ renderInput={(params) =>
|
|
243
|
+ <TextField
|
|
244
|
+ disabled={true}
|
|
245
|
+ label="Fecha Creación"
|
|
246
|
+ fullWidth
|
|
247
|
+ {...params}
|
|
248
|
+ />}
|
|
249
|
+ />
|
|
250
|
+ </LocalizationProvider>
|
|
251
|
+
|
|
252
|
+ </Stack>
|
|
253
|
+
|
|
254
|
+ <Stack direction={{ xs: 'column', sm: 'row' }} spacing={4}>
|
|
255
|
+ <TextField
|
|
256
|
+ id="filled-multiline-static"
|
|
257
|
+ multiline
|
|
258
|
+ rows={4}
|
|
259
|
+ variant="filled"
|
|
260
|
+ label="Notas"
|
|
261
|
+ fullWidth
|
|
262
|
+ type="text"
|
|
263
|
+ {...getFieldProps('notas')}
|
|
264
|
+ error={Boolean(touched.notas && errors.notas)}
|
|
265
|
+ helperText={touched.notas && errors.notas}
|
|
266
|
+ />
|
|
267
|
+ </Stack>
|
|
268
|
+ </Stack>
|
|
269
|
+
|
|
270
|
+ </TabPanel>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+ <Modal.Footer>
|
|
274
|
+ <Button
|
|
275
|
+ type="submit"
|
|
276
|
+ className="registerBtn"
|
|
277
|
+ variant="contained"
|
|
278
|
+ sx={{ mt: 1, mr: 1 }} >
|
|
279
|
+ {'Guardar'}
|
|
280
|
+ </Button>
|
|
281
|
+ </Modal.Footer>
|
|
282
|
+
|
|
283
|
+ </Form>
|
|
284
|
+ </FormikProvider>
|
|
285
|
+ </Modal.Body>
|
|
286
|
+ <Backdrop
|
|
287
|
+ sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
|
288
|
+ open={open}
|
|
289
|
+ onClick={handleClose} >
|
|
290
|
+ <CircularProgress color="inherit" />
|
|
291
|
+ </Backdrop>
|
|
292
|
+ <Toaster position="top-right" />
|
|
293
|
+ </Modal>
|
|
294
|
+ )
|
296
|
295
|
}
|
297
|
296
|
export default memo(Manual);
|