Browse Source

complete circle

amenpunk 3 years ago
parent
commit
bae2bacded

+ 2 - 2
src/App.css

205
 }
205
 }
206
 
206
 
207
 #login_btn_fn:hover{
207
 #login_btn_fn:hover{
208
-    background-color: var(--second)
208
+    background-color: var(--main);
209
 }
209
 }
210
 
210
 
211
 .btn_plaza_common{
211
 .btn_plaza_common{
213
 }
213
 }
214
 
214
 
215
 .btn_plaza_common:hover{
215
 .btn_plaza_common:hover{
216
-    color:var(--second) !important;
216
+    color:var(--main) !important;
217
 }
217
 }
218
 .center_pagination_puestos{
218
 .center_pagination_puestos{
219
     display :flex;
219
     display :flex;

+ 0 - 149
src/Components/AgregarManual.js

1
-import React from 'react';
2
-import * as Yup from 'yup';
3
-import { Formik, Field, Form } from 'formik';
4
-import { Row, Col, Modal, Button} from 'react-bootstrap'
5
-
6
-import NotFound from '../../Images/not_found.png';
7
-const SUPPORTED_FORMATS = ["image/jpg", "image/jpeg", "image/gif", "image/png"];
8
-
9
-const NewPlazaSchema = Yup.object().shape({
10
-    nombre : Yup.string().required('El nombre es requerido').min(5).max(20),
11
-    description : Yup.string().required('La description es requerida').min(5).max(20),
12
-    salario : Yup.number().required('El salario es requerido'),
13
-    imagen:  Yup.mixed().required('El imagen es requerido').test('fileSize', "El archivo es demasiado grande", value => {
14
-        if(!value || value.length <= 0) return false
15
-        return value[0].size < 200000
16
-    }).test('fileType', "El tipo del archivo no es válido", value => {
17
-        if(!value) return false
18
-        return SUPPORTED_FORMATS.includes(value[0].type)
19
-    })
20
-})
21
-
22
-export default function Manual ( props ) {
23
-
24
-    let [ filename, setFilename ] = React.useState('');
25
-    let [ file, setFile ] = React.useState(undefined);
26
-    let [ type, setType ] = React.useState(undefined);
27
-    let [ validType, setValidType ] = React.useState(false);
28
-
29
-    let { visible, onClose } = props
30
-    const hiddenFileInput = React.useRef(null);
31
-
32
-    const PickFile = event => hiddenFileInput.current.click();
33
-
34
-    React.useEffect(() => {
35
-        if( SUPPORTED_FORMATS.includes(type) ){
36
-            setValidType(true)
37
-        }else{
38
-            setValidType(false)
39
-        }
40
-
41
-    }, [type])
42
-
43
-
44
-    return (
45
-        <Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered  show={visible} onHide={onClose}>
46
-            <Modal.Header>
47
-                <button onClick={onClose}  type="button" className="close" data-dismiss="modal">&times;</button>
48
-                <h4 className="modal-title">Agregar plaza</h4>
49
-            </Modal.Header>
50
-            <Modal.Body className="modal-body">
51
-
52
-                <Formik
53
-
54
-                    initialValues={{
55
-                        nombre: '',
56
-                        description: '',
57
-                        salario: '',
58
-                        imagen: '',
59
-                    }}
60
-
61
-                    validationSchema={NewPlazaSchema}
62
-                    onSubmit={ (values) => {
63
-                        // console.log('VALUES >> ',values)
64
-                        props.setManual(false)
65
-                    }} >
66
-
67
-
68
-                    { ({  errors, touched, validateField, validateForm, setFieldValue  }) => (
69
-                        <Form>
70
-                            <Row>
71
-
72
-                                <Col md="4">
73
-                                    <div className="img-container">
74
-                                        <img alt="agregar plaza manual" src={ validType ? file : NotFound}/>
75
-                                    </div>
76
-                                </Col>
77
-
78
-                                <Col md="8">
79
-
80
-                                    <input 
81
-                                        value={filename} 
82
-                                        type="text" 
83
-                                        className="file-upload-input" 
84
-                                        disabled="" 
85
-                                        placeholder="Ningún archivo seleccionado" readOnly
86
-                                    />
87
-
88
-                                    <Button className="btn_add_producto_confirm" style={{ marginLeft : 15 }} onClick={PickFile}>
89
-                                        SUBIR FOTO
90
-                                    </Button>
91
-
92
-                                    {errors.imagen && touched.imagen && <div className="error_feedback">{errors.imagen}</div>}
93
-                                    <input
94
-                                        multiple={false}
95
-                                        type="file"
96
-                                        ref={hiddenFileInput}
97
-                                        onChange={(event) => {
98
-                                            const files = event.target.files;
99
-                                            console.log('files crud ', files[0])
100
-                                            let myFiles =Array.from(files);
101
-                                            setFieldValue("imagen", myFiles);
102
-                                            setFilename(myFiles[0].name)
103
-                                            setType(myFiles[0].type)
104
-                                            const objectUrl = URL.createObjectURL(files[0])
105
-                                            setFile(objectUrl)
106
-                                        }}
107
-                                        style={{display: 'none'}}
108
-                                    />
109
-
110
-                                </Col>
111
-
112
-                            </Row>
113
-                            <div className="data_product">
114
-                                <Row>
115
-                                    <Col md="12">
116
-
117
-                                        {errors.nombre && touched.nombre && <div className="error_feedback">{errors.nombre}</div>}
118
-                                        <Field name="nombre" placeholder="Nombre de la plaza"/>
119
-
120
-                                        {errors.description && touched.description && <div className="error_feedback">{errors.description}</div>}
121
-                                        <Field name="description">
122
-                                            {({ field, form, meta }) => {
123
-                                                return(
124
-                                                    <textarea id="description" name="description" value={field.value} onChange={field.onChange} placeholder="Descripción general de la plaza"></textarea>
125
-                                                )
126
-                                            }}
127
-                                        </Field>
128
-
129
-                                        {errors.salario && touched.salario && <div className="error_feedback">{errors.salario}</div>}
130
-                                        <Field name="salario" type="number" placeholder="Salario"/>
131
-
132
-
133
-                                    </Col>
134
-                                    <div className="add_producto_confirm">
135
-                                        <button className="btn_add_producto_confirm" type="submit">Agregar plaza</button>
136
-                                    </div>
137
-                                </Row>
138
-                            </div>
139
-                        </Form>
140
-                    )}
141
-
142
-
143
-
144
-
145
-                </Formik>
146
-            </Modal.Body>
147
-        </Modal>
148
-    )
149
-}

+ 44 - 26
src/Components/Modal/AgregarManual.js

5
 
5
 
6
 import DateFnsUtils from '@date-io/date-fns';
6
 import DateFnsUtils from '@date-io/date-fns';
7
 import { DesktopDatePicker,LocalizationProvider } from '@mui/lab';
7
 import { DesktopDatePicker,LocalizationProvider } from '@mui/lab';
8
-import {  Button, Stack, TextField, } from '@mui/material';
8
+import {  Button, Stack, TextField, MenuItem,FormControl, InputLabel, Select } from '@mui/material';
9
 
9
 
10
 import { Service } from '../../Utils/HTTP';
10
 import { Service } from '../../Utils/HTTP';
11
 import  useAuth from '../../Auth/useAuth';
11
 import  useAuth from '../../Auth/useAuth';
12
 
12
 
13
+import { departamentos } from '../Password/Rows'
14
+
13
 
15
 
14
 export default function Manual ( props ) {
16
 export default function Manual ( props ) {
15
 
17
 
16
     const NewPlazaSchema = Yup.object().shape({
18
     const NewPlazaSchema = Yup.object().shape({
17
-        nombrepuesto : Yup.string().required('El nombre es requerido').min(5).max(100),
19
+        nombrepuesto : Yup.string().required('El nombre es requerido').min(5, "El nombre del  puesto debe ser mayor a 5 caracteres").max(100),
18
         puestosuperior : Yup.number("El puesto superior debe ser un número"),
20
         puestosuperior : Yup.number("El puesto superior debe ser un número"),
19
         aredepto : Yup.number().required('Escoge alguna área'),
21
         aredepto : Yup.number().required('Escoge alguna área'),
20
         fecha : Yup.date("Ingresa una fecha válida"),
22
         fecha : Yup.date("Ingresa una fecha válida"),
21
         notas : Yup.string("Ingresa una nota válida").min(5).max(150),
23
         notas : Yup.string("Ingresa una nota válida").min(5).max(150),
22
     })
24
     })
25
+    
26
+    const [departamento, setDepartamento] = React.useState('');
27
+
28
+    const changeDepartamento = (event) => {
29
+        setDepartamento(event.target.value);
30
+    };
31
+
23
 
32
 
24
     const [date, setDate] = React.useState(new Date());
33
     const [date, setDate] = React.useState(new Date());
25
     const auth = useAuth();
34
     const auth = useAuth();
26
     const token = auth.getToken();
35
     const token = auth.getToken();
27
 
36
 
28
-    let { visible, onClose, success, error } = props
37
+    let { visible, onClose, Complete } = props
29
 
38
 
30
     const formik = useFormik({
39
     const formik = useFormik({
31
         initialValues: {
40
         initialValues: {
32
-            nombrepuesto: "QA ENGINIER",
33
-            puestosuperior: 3,
41
+            nombrepuesto: "",
42
+            puestosuperior: "",
34
             aredepto: 1,
43
             aredepto: 1,
35
             fecha: date,
44
             fecha: date,
36
-            notas: "alguna nota ",
45
+            notas: "",
37
         },
46
         },
38
-        onSubmit: (fields) => {
47
+        onSubmit: ( fields, { resetForm } ) => {
39
 
48
 
40
-            fields['fecha'] = "2023-06-11T00:22:15.211"//new Date(fields.fecha).toString() //getDate(fields.fecha);
49
+            fields['fecha'] =  new Date(fields.fecha).toISOString();
41
             fields['areadeptoplz_id'] = 1;
50
             fields['areadeptoplz_id'] = 1;
42
             fields['id'] = -1;
51
             fields['id'] = -1;
43
 
52
 
45
 
54
 
46
             Rest
55
             Rest
47
             .post( fields, token )
56
             .post( fields, token )
48
-            .then(data => {
57
+            .then( _ => {
58
+                resetForm();
59
+                Complete(true);
49
                 onClose();
60
                 onClose();
50
-                success();
51
-                console.log('data ', data)
52
             })
61
             })
53
             .catch(err => {
62
             .catch(err => {
54
-                error();
55
                 console.error(err)
63
                 console.error(err)
64
+                Complete(false);
56
             })
65
             })
57
 
66
 
58
         },
67
         },
59
         validationSchema: NewPlazaSchema,
68
         validationSchema: NewPlazaSchema,
60
     });
69
     });
61
 
70
 
62
-    const { errors, touched, handleSubmit, getFieldProps } = formik;
71
+    const { errors, touched, handleSubmit, getFieldProps} = formik;
63
 
72
 
64
     return (
73
     return (
65
 
74
 
73
                 <FormikProvider style={{ padding : 25 }} value={formik}>
82
                 <FormikProvider style={{ padding : 25 }} value={formik}>
74
                     <Form autoComplete="off" noValidate onSubmit={handleSubmit}>
83
                     <Form autoComplete="off" noValidate onSubmit={handleSubmit}>
75
                         <Stack spacing={3}>
84
                         <Stack spacing={3}>
85
+
76
                             <Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
86
                             <Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
77
 
87
 
78
                                 <TextField
88
                                 <TextField
93
 
103
 
94
                             </Stack>
104
                             </Stack>
95
                             <Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
105
                             <Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
96
-                                <TextField
97
-                                    label="Departamento"
98
-                                    fullWidth
99
-                                    type="text"
100
-                                    {...getFieldProps('aredepto')}
101
-                                    error={Boolean(touched.aredepto && errors.aredepto)}
102
-                                    helperText={touched.aredepto && errors.aredepto}
103
-                                />
106
+                                <FormControl fullWidth>
107
+                                    <InputLabel id="demo-simple-select-label">Departamento</InputLabel>
108
+                                    <Select
109
+                                        labelId="demo-simple-select-label"
110
+                                        value={departamento}
111
+                                        label="Departamento"
112
+                                        onChange={changeDepartamento}
113
+                                        {...getFieldProps('aredepto')}
114
+                                        error={Boolean(touched.aredepto && errors.aredepto)} >
115
+                                        {
116
+                                        departamentos.map( ( nivel, index ) => {
117
+                                            return (
118
+                                                <MenuItem key={nivel} value={index}>{nivel}</MenuItem>
119
+                                            )
120
+                                        })
121
+                                    }
122
+                                    </Select>
123
+                                </FormControl>
124
+
125
+
104
                                 <LocalizationProvider 
126
                                 <LocalizationProvider 
105
                                     dateAdapter={DateFnsUtils}>
127
                                     dateAdapter={DateFnsUtils}>
106
                                     <DesktopDatePicker
128
                                     <DesktopDatePicker
145
                                 type="submit"
167
                                 type="submit"
146
                                 className="registerBtn" 
168
                                 className="registerBtn" 
147
                                 variant="contained"
169
                                 variant="contained"
148
-                                sx={{ mt: 1, mr: 1 }}
149
-                            >
170
+                                sx={{ mt: 1, mr: 1 }} >
150
                                 {'Guardar'}
171
                                 {'Guardar'}
151
                             </Button>
172
                             </Button>
152
                         </Modal.Footer>
173
                         </Modal.Footer>
153
 
174
 
154
                     </Form>
175
                     </Form>
155
                 </FormikProvider>
176
                 </FormikProvider>
156
-
157
-
158
-
159
             </Modal.Body>
177
             </Modal.Body>
160
         </Modal>
178
         </Modal>
161
     )
179
     )

+ 8 - 0
src/Components/Password/Rows.js

54
         label: 'Operacion',
54
         label: 'Operacion',
55
     },
55
     },
56
 ]
56
 ]
57
+
57
 export const niveles_educativos = [
58
 export const niveles_educativos = [
58
     "Primaria",
59
     "Primaria",
59
     "Basico",
60
     "Basico",
66
     "Certificacion",
67
     "Certificacion",
67
     "Cursos"
68
     "Cursos"
68
 ]
69
 ]
70
+
71
+
72
+export const departamentos = [
73
+    "Jutiapa",
74
+    "Guatemala",
75
+    "Santa Rosa",
76
+]

+ 15 - 8
src/Components/Puestos/GridMode.jsx

7
     HighlightOff as HighlightOffIcon,
7
     HighlightOff as HighlightOffIcon,
8
 } from '@mui/icons-material';
8
 } from '@mui/icons-material';
9
 
9
 
10
+import { Grow } from '@mui/material';
11
+
10
 
12
 
11
 import { Row, Col } from 'react-bootstrap'
13
 import { Row, Col } from 'react-bootstrap'
12
 
14
 
13
 export function GridMode(props){
15
 export function GridMode(props){
14
 
16
 
15
-    let { setEdit, setDelete, setShow, setPuesto, data ,index} = props;
16
-    console.log('data reci', data,index)
17
+    let { setEdit, setDelete, setShow, setPuesto, data ,index, showing} = props;
17
 
18
 
18
     return(
19
     return(
19
         <React.Fragment> 
20
         <React.Fragment> 
20
             {
21
             {
21
-                data.length ? 
22
-                    data[index].map( plaza => {
22
+                data.length && showing === 'grid' ? 
23
+                    data[index].map( (plaza,i) => {
23
                         return(
24
                         return(
24
-                            <Col key={plaza.id} lg="4" md="6" sm="6" xs="12" >
25
+                        <Grow  
26
+                            in={true}
27
+                            style={{ transformOrigin: '0 0 0' }}
28
+                            timeout={500}
29
+                            key={plaza.id}
30
+                            >
31
+                            <Col  lg="4" md="6" sm="6" xs="12" >
25
                                 <div className="panel">
32
                                 <div className="panel">
26
                                     <Row>
33
                                     <Row>
27
                                         <Col md="4">
34
                                         <Col md="4">
32
                                         <Col md="8">
39
                                         <Col md="8">
33
                                             <div className="info_details">
40
                                             <div className="info_details">
34
                                                 <p>{ plaza.nombre }</p>
41
                                                 <p>{ plaza.nombre }</p>
35
-                                                <p>{ plaza.description }</p>
36
-                                                <p>{'100'}</p>
42
+                                                <p>{ plaza.description.slice(0,17) + "..." }</p>
37
                                             </div>
43
                                             </div>
38
                                             <div className="btn_interactivos">
44
                                             <div className="btn_interactivos">
39
 
45
 
76
                                     </Row>
82
                                     </Row>
77
                                 </div>
83
                                 </div>
78
                             </Col>
84
                             </Col>
85
+                        </Grow>
79
                         )
86
                         )
80
-                }) : <div>no hay ni mierda</div>
87
+                }) : <div></div>
81
             }
88
             }
82
         </React.Fragment>
89
         </React.Fragment>
83
     )
90
     )

+ 7 - 6
src/Components/Puestos/ListMode.jsx

1
 import {  Col, Button, Table } from 'react-bootstrap'
1
 import {  Col, Button, Table } from 'react-bootstrap'
2
+import Zoom from '@mui/material/Zoom';
2
 
3
 
3
 export function ListMode(props) {
4
 export function ListMode(props) {
4
     
5
     
5
     const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
6
     const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
6
-    let { setEdit, setDelete, setShow, setPuesto, data, index } = props;
7
+    let { setEdit, setDelete, setShow, setPuesto, data, index, showing } = props;
7
 
8
 
8
     return(
9
     return(
9
         <Col md="12">
10
         <Col md="12">
18
                         </tr>
19
                         </tr>
19
                     </thead>
20
                     </thead>
20
                     <tbody>
21
                     <tbody>
21
-
22
                         {
22
                         {
23
-                            data.length ? 
23
+                            data.length && showing === 'list' ? 
24
                                 data[index].map( (plaza) => {
24
                                 data[index].map( (plaza) => {
25
                                     return (
25
                                     return (
26
-                                        <tr key={plaza.id}>
26
+                                    <Zoom key={plaza.id} in={true}>
27
+                                        <tr >
27
                                             <td className="text-center">{ plaza.nombre }</td>
28
                                             <td className="text-center">{ plaza.nombre }</td>
28
                                             <td className="text-center">{ plaza.description }</td>
29
                                             <td className="text-center">{ plaza.description }</td>
29
                                             <td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
30
                                             <td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
52
                                                 </Button>
53
                                                 </Button>
53
                                             </td>
54
                                             </td>
54
                                         </tr>
55
                                         </tr>
56
+                                    </Zoom>
55
                                     )
57
                                     )
56
-                                }) : undefined
58
+                            }) : <h1>no data bro</h1>
57
                         }
59
                         }
58
-
59
                     </tbody>
60
                     </tbody>
60
                     <tfoot>
61
                     <tfoot>
61
                         <tr>
62
                         <tr>

+ 3 - 3
src/Css/all.css

807
     float: right;
807
     float: right;
808
 }
808
 }
809
 .btn_add_producto {
809
 .btn_add_producto {
810
-    border: 1px solid var(--second);
811
-    background: var(--second);
812
-    border-radius: 10px;
810
+    border: 1px solid var(--main);
811
+    background: var(--main);
812
+    border-radius: 5px;
813
     color: #fff;
813
     color: #fff;
814
     font-size: 12px;
814
     font-size: 12px;
815
     margin : 3px;
815
     margin : 3px;

+ 68 - 46
src/Pages/Puestos.jsx

26
 import { GridMode } from '../Components/Puestos/GridMode'
26
 import { GridMode } from '../Components/Puestos/GridMode'
27
 import { Add as AddIcon, } from '@mui/icons-material/'
27
 import { Add as AddIcon, } from '@mui/icons-material/'
28
 
28
 
29
-
30
-const Success =  () => toast.success('Plaza Agregada!!')
31
-const Error =  () => toast.error('Ups creo que ocurrio un error, intentalo nuevamente')
32
-
33
 function Divide(arregloOriginal){
29
 function Divide(arregloOriginal){
34
-    const LONGITUD_PEDAZOS = 9;
30
+    const LONGITUD_PEDAZOS = 7;
35
     let arregloDeArreglos = [];
31
     let arregloDeArreglos = [];
36
     for (let i = 0; i < arregloOriginal.length; i += LONGITUD_PEDAZOS) {
32
     for (let i = 0; i < arregloOriginal.length; i += LONGITUD_PEDAZOS) {
37
         let pedazo = arregloOriginal.slice(i, i + LONGITUD_PEDAZOS);
33
         let pedazo = arregloOriginal.slice(i, i + LONGITUD_PEDAZOS);
42
 
38
 
43
 export function Puestos() {
39
 export function Puestos() {
44
 
40
 
41
+    const Complete =  (status) => {
42
+
43
+        if(!status){
44
+            toast.error('Ups creo que ocurrio un error, intentalo nuevamente')
45
+        }
46
+
47
+        let rest = new Service("/plaza/getall")
48
+        rest
49
+            .get(token)
50
+            .then(({data}) => {
51
+                let entries = data.map( e => {
52
+                    return {
53
+                        nombre : e.nombrepuesto,
54
+                        description : e.notas,
55
+                        id : e.id,
56
+                        created: e.create_day,
57
+                        data: e
58
+                    };
59
+                })
60
+                setData(Divide(entries))
61
+            })
62
+            .catch((error) => {
63
+                console.log('error fetching data  ', error );
64
+            })
65
+
66
+        toast.success('Puesto agregado exitosamente')
67
+    } 
68
+
45
     const auth = useAuth();
69
     const auth = useAuth();
46
     const [data, setData] = useState([]);
70
     const [data, setData] = useState([]);
47
     const [page, setPage] = useState(1);
71
     const [page, setPage] = useState(1);
48
     const token = auth.getToken();
72
     const token = auth.getToken();
49
-    
50
-    const changePage = ( _ , value) => {
51
-        let page_numer = value;
52
-        // let divided =  Divide(data)
53
-        setPage(page_numer);
54
-        // setData(divided)
55
-    };
73
+
74
+    const changePage = ( _ , value) => setPage(value);
56
 
75
 
57
     useEffect(() => {
76
     useEffect(() => {
58
 
77
 
59
         let rest = new Service("/plaza/getall")
78
         let rest = new Service("/plaza/getall")
60
-
61
         rest
79
         rest
62
-        .get(token)
63
-        .then(({data}) => {
64
-            let entries = data.map( e => {
65
-                return {
66
-                    nombre : e.nombrepuesto,
67
-                    description : e.notas,
68
-                    id : e.id,
69
-                    created: e.create_day,
70
-                    data: e
71
-                };
80
+            .get(token)
81
+            .then(({data}) => {
82
+                let entries = data.map( e => {
83
+                    return {
84
+                        nombre : e.nombrepuesto,
85
+                        description : e.notas,
86
+                        id : e.id,
87
+                        created: e.create_day,
88
+                        data: e
89
+                    };
90
+                })
91
+                setData(Divide(entries))
72
             })
92
             })
73
-            setData(Divide(entries))
74
-        })
75
-        .catch((error) => {
76
-            console.log('error fetching data  ', error );
77
-        })
93
+            .catch((error) => {
94
+                console.log('error fetching data  ', error );
95
+            })
96
+
78
 
97
 
79
     },[token])
98
     },[token])
80
 
99
 
139
                         <div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista'  }`} id="grid_view">
158
                         <div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista'  }`} id="grid_view">
140
                             <Row>
159
                             <Row>
141
                                 <GridMode
160
                                 <GridMode
161
+                                    showing={alignment}
142
                                     data={data}
162
                                     data={data}
143
                                     index={page - 1}
163
                                     index={page - 1}
144
                                     setPuesto={setPuesto}
164
                                     setPuesto={setPuesto}
145
                                     setEdit={setEdit}
165
                                     setEdit={setEdit}
146
                                     setDelete={setDelete}
166
                                     setDelete={setDelete}
147
                                     setShow={setShow}
167
                                     setShow={setShow}
148
-                                />
168
+                                    />
149
                             </Row>
169
                             </Row>
150
                         </div>
170
                         </div>
151
                         <div className={`main_list_products ${alignment === 'list' ?  'activar_vista' : 'desactivar_vista'}`} id="list_view_products">
171
                         <div className={`main_list_products ${alignment === 'list' ?  'activar_vista' : 'desactivar_vista'}`} id="list_view_products">
152
                             <Row>
172
                             <Row>
153
                                 <ListMode 
173
                                 <ListMode 
174
+                                    showing={alignment}
154
                                     data={data}
175
                                     data={data}
155
-                                    index={page -1}
176
+                                    index={page - 1}
156
                                     setPuesto={setPuesto}
177
                                     setPuesto={setPuesto}
157
                                     setEdit={setEdit}
178
                                     setEdit={setEdit}
158
                                     setDelete={setDelete}
179
                                     setDelete={setDelete}
159
                                     setShow={setShow}
180
                                     setShow={setShow}
160
-                                />
181
+                                    />
161
                             </Row>
182
                             </Row>
162
                         </div>
183
                         </div>
163
 
184
 
164
-                            <Pagination 
165
-                                sx={{
166
-                                    "& ul" :{
167
-                                        "padding-top" : "20px",
168
-                                        "justify-content": "center"
169
-                                    }
170
-                                }}
171
-                                siblingCount={2} 
172
-                                boundaryCount={2}
173
-                                shape='rounded' 
174
-                                count={data.length} 
175
-                                page={page} 
176
-                                onChange={changePage} 
185
+                        <Pagination 
186
+                            sx={{
187
+                                "& ul" :{
188
+                                    paddingTop: "20px",
189
+                                    justifyContent: "center"
190
+                                }
191
+                            }}
192
+                            siblingCount={2} 
193
+                            boundaryCount={2}
194
+                            shape='rounded' 
195
+                            count={data.length} 
196
+                            page={page} 
197
+                            onChange={changePage} 
177
                             />
198
                             />
178
 
199
 
179
                     </Paper>
200
                     </Paper>
181
 
202
 
182
             </div>
203
             </div>
183
 
204
 
184
-            <Express success={Success} setExpress={setExpress} visible={expres} onClose={() => setExpress(false) } />
185
-            <Manual success={Success} error={Error} setManual={setManual} visible={manual}  onClose={() => setManual(false) } />
205
+            <Express setExpress={setExpress} visible={expres} onClose={() => setExpress(false) } />
206
+
207
+            <Manual Complete={Complete} visible={manual} onClose={() => setManual(false)}/>
186
 
208
 
187
             <Editar   puesto={puesto} visible={edit} onClose={() => setEdit(false)} />
209
             <Editar   puesto={puesto} visible={edit} onClose={() => setEdit(false)} />
188
             <Eliminar puesto={puesto} visible={del} onClose={() => setDelete(false)} />
210
             <Eliminar puesto={puesto} visible={del} onClose={() => setDelete(false)} />