|
@@ -1,7 +1,7 @@
|
1
|
1
|
import React, { memo } from 'react';
|
2
|
2
|
import * as Yup from 'yup';
|
3
|
3
|
import { useFormik, Form, FormikProvider } from 'formik';
|
4
|
|
-import { Modal } from 'react-bootstrap'
|
|
4
|
+import { Dialog,DialogContent, DialogTitle,DialogActions } from '@mui/material'
|
5
|
5
|
import toast, { Toaster } from 'react-hot-toast';
|
6
|
6
|
|
7
|
7
|
import { AdapterDateFns as DateFnsUtils } from '@mui/x-date-pickers/AdapterDateFns';
|
|
@@ -126,13 +126,19 @@ function Manual(props) {
|
126
|
126
|
|
127
|
127
|
return (
|
128
|
128
|
|
129
|
|
- <Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
|
129
|
+ <Dialog
|
|
130
|
+ open={visible}
|
|
131
|
+ fullWidth="lg"
|
|
132
|
+ maxWidth="md"
|
|
133
|
+ aria-labelledby="contained-modal-title-vcenter"
|
|
134
|
+ onClose={onClose}>
|
130
|
135
|
|
131
|
|
- <Modal.Header>
|
|
136
|
+ <DialogTitle>
|
132
|
137
|
<button onClick={onClose} type="button" className="close" data-dismiss="modal">×</button>
|
133
|
138
|
<h4 className="modal-title" style={{ color: '#252525' }}>Agregar Puesto</h4>
|
134
|
|
- </Modal.Header>
|
135
|
|
- <Modal.Body className="modal-body">
|
|
139
|
+ </DialogTitle>
|
|
140
|
+
|
|
141
|
+ <DialogContent className="modal-body">
|
136
|
142
|
|
137
|
143
|
<Tabs value={tab} onChange={changeTab} aria-label="basic tabs example">
|
138
|
144
|
<Tab label="Información" />
|
|
@@ -179,6 +185,7 @@ function Manual(props) {
|
179
|
185
|
label="Nombre"
|
180
|
186
|
fullWidth
|
181
|
187
|
{...getFieldProps('nombrepuesto')}
|
|
188
|
+ helperText={touched.nombrepuesto && errors.nombrepuesto}
|
182
|
189
|
error={Boolean(touched.nombrepuesto && errors.nombrepuesto)}
|
183
|
190
|
/>
|
184
|
191
|
|
|
@@ -269,7 +276,7 @@ function Manual(props) {
|
269
|
276
|
</TabPanel>
|
270
|
277
|
|
271
|
278
|
|
272
|
|
- <Modal.Footer>
|
|
279
|
+ <DialogActions>
|
273
|
280
|
<Button
|
274
|
281
|
type="submit"
|
275
|
282
|
className="registerBtn"
|
|
@@ -277,11 +284,12 @@ function Manual(props) {
|
277
|
284
|
sx={{ mt: 1, mr: 1 }} >
|
278
|
285
|
{'Guardar'}
|
279
|
286
|
</Button>
|
280
|
|
- </Modal.Footer>
|
|
287
|
+ </DialogActions>
|
281
|
288
|
|
282
|
289
|
</Form>
|
283
|
290
|
</FormikProvider>
|
284
|
|
- </Modal.Body>
|
|
291
|
+ </DialogContent>
|
|
292
|
+
|
285
|
293
|
<Backdrop
|
286
|
294
|
sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
287
|
295
|
open={open}
|
|
@@ -289,7 +297,7 @@ function Manual(props) {
|
289
|
297
|
<CircularProgress color="inherit" />
|
290
|
298
|
</Backdrop>
|
291
|
299
|
<Toaster position="top-right" />
|
292
|
|
- </Modal>
|
|
300
|
+ </Dialog>
|
293
|
301
|
)
|
294
|
302
|
}
|
295
|
303
|
export default memo(Manual);
|