|
|
@@ -1,7 +1,7 @@
|
|
|
import React, { memo } from 'react';
|
|
|
import * as Yup from 'yup';
|
|
|
import { useFormik, Form, FormikProvider } from 'formik';
|
|
|
-import { Modal } from 'react-bootstrap'
|
|
|
+import { Dialog,DialogContent, DialogTitle,DialogActions } from '@mui/material'
|
|
|
import toast, { Toaster } from 'react-hot-toast';
|
|
|
|
|
|
import { AdapterDateFns as DateFnsUtils } from '@mui/x-date-pickers/AdapterDateFns';
|
|
|
@@ -126,13 +126,19 @@ function Manual(props) {
|
|
|
|
|
|
return (
|
|
|
|
|
|
- <Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
|
|
+ <Dialog
|
|
|
+ open={visible}
|
|
|
+ fullWidth="lg"
|
|
|
+ maxWidth="md"
|
|
|
+ aria-labelledby="contained-modal-title-vcenter"
|
|
|
+ onClose={onClose}>
|
|
|
|
|
|
- <Modal.Header>
|
|
|
+ <DialogTitle>
|
|
|
<button onClick={onClose} type="button" className="close" data-dismiss="modal">×</button>
|
|
|
<h4 className="modal-title" style={{ color: '#252525' }}>Agregar Puesto</h4>
|
|
|
- </Modal.Header>
|
|
|
- <Modal.Body className="modal-body">
|
|
|
+ </DialogTitle>
|
|
|
+
|
|
|
+ <DialogContent className="modal-body">
|
|
|
|
|
|
<Tabs value={tab} onChange={changeTab} aria-label="basic tabs example">
|
|
|
<Tab label="Información" />
|
|
|
@@ -179,6 +185,7 @@ function Manual(props) {
|
|
|
label="Nombre"
|
|
|
fullWidth
|
|
|
{...getFieldProps('nombrepuesto')}
|
|
|
+ helperText={touched.nombrepuesto && errors.nombrepuesto}
|
|
|
error={Boolean(touched.nombrepuesto && errors.nombrepuesto)}
|
|
|
/>
|
|
|
|
|
|
@@ -269,7 +276,7 @@ function Manual(props) {
|
|
|
</TabPanel>
|
|
|
|
|
|
|
|
|
- <Modal.Footer>
|
|
|
+ <DialogActions>
|
|
|
<Button
|
|
|
type="submit"
|
|
|
className="registerBtn"
|
|
|
@@ -277,11 +284,12 @@ function Manual(props) {
|
|
|
sx={{ mt: 1, mr: 1 }} >
|
|
|
{'Guardar'}
|
|
|
</Button>
|
|
|
- </Modal.Footer>
|
|
|
+ </DialogActions>
|
|
|
|
|
|
</Form>
|
|
|
</FormikProvider>
|
|
|
- </Modal.Body>
|
|
|
+ </DialogContent>
|
|
|
+
|
|
|
<Backdrop
|
|
|
sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
|
|
open={open}
|
|
|
@@ -289,7 +297,7 @@ function Manual(props) {
|
|
|
<CircularProgress color="inherit" />
|
|
|
</Backdrop>
|
|
|
<Toaster position="top-right" />
|
|
|
- </Modal>
|
|
|
+ </Dialog>
|
|
|
)
|
|
|
}
|
|
|
export default memo(Manual);
|