|
@@ -17,6 +17,10 @@ import NotFound from '../Images/not_found.png';
|
|
|
import Express from '../Components/Modal/AgregarExpress';
|
|
import Express from '../Components/Modal/AgregarExpress';
|
|
|
import Manual from '../Components/Modal/AgregarManual';
|
|
import Manual from '../Components/Modal/AgregarManual';
|
|
|
|
|
|
|
|
|
|
+import Editar from '../Components/Modal/EditPlaza';
|
|
|
|
|
+import Eliminar from '../Components/Modal/EliminarPlaza';
|
|
|
|
|
+import Mostrar from '../Components/Modal/MostrarPlaza';
|
|
|
|
|
+
|
|
|
|
|
|
|
|
let data = [{
|
|
let data = [{
|
|
|
nombre : 'The standard Lorem Ipsum passage, used since the 1500s',
|
|
nombre : 'The standard Lorem Ipsum passage, used since the 1500s',
|
|
@@ -37,12 +41,14 @@ for ( var _ of new Array(46) ){
|
|
|
data.push({ ...data[0], id : ID.next().value, d : _ })
|
|
data.push({ ...data[0], id : ID.next().value, d : _ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function ListMode() {
|
|
|
|
|
|
|
+function ListMode(props) {
|
|
|
|
|
+
|
|
|
|
|
+ let { setEdit, setDelete, setShow } = props;
|
|
|
|
|
|
|
|
let actions = [
|
|
let actions = [
|
|
|
- <Button onClick={ () => console.log('ver producto') } className="ver_producto">Ver</Button>,
|
|
|
|
|
- <Button onClick={ () => console.log('editar producto') } className="editar_producto">Editar</Button>,
|
|
|
|
|
- <Button onClick={ () => console.log('eliminar producto') } className="eliminar_producto">Eliminar</Button>,
|
|
|
|
|
|
|
+ <Button onClick={ () => setShow(true)} className="ver_producto">Ver</Button>,
|
|
|
|
|
+ <Button onClick={() => setEdit(true)} className="editar_producto">Editar</Button>,
|
|
|
|
|
+ <Button onClick={ () => setDelete(true) } className="eliminar_producto">Eliminar</Button>,
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
return(
|
|
return(
|
|
@@ -89,21 +95,23 @@ function ListMode() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-function GridMode () {
|
|
|
|
|
|
|
+function GridMode (props) {
|
|
|
|
|
+
|
|
|
|
|
+ let { setEdit, setDelete, setShow } = props;
|
|
|
|
|
|
|
|
let buttons = [
|
|
let buttons = [
|
|
|
<div className="botones_interactivos">
|
|
<div className="botones_interactivos">
|
|
|
- <span tooltip-location="top" tooltip="Ver plaza">
|
|
|
|
|
|
|
+ <span onClick={ () => setShow(true) } tooltip-location="top" tooltip="Ver plaza">
|
|
|
<RemoveRedEyeIcon className="grid_btn"/>
|
|
<RemoveRedEyeIcon className="grid_btn"/>
|
|
|
</span>
|
|
</span>
|
|
|
</div>,
|
|
</div>,
|
|
|
<div className="botones_interactivos">
|
|
<div className="botones_interactivos">
|
|
|
- <span tooltip-location="top" tooltip="Editar plaza">
|
|
|
|
|
|
|
+ <span onClick={ () => setEdit(true) } tooltip-location="top" tooltip="Editar plaza">
|
|
|
<EditIcon className="grid_btn"/>
|
|
<EditIcon className="grid_btn"/>
|
|
|
</span>
|
|
</span>
|
|
|
</div>,
|
|
</div>,
|
|
|
<div className="botones_interactivos">
|
|
<div className="botones_interactivos">
|
|
|
- <span tooltip-location="top" tooltip="Eliminar plaza">
|
|
|
|
|
|
|
+ <span onClick={() => setDelete(true)} tooltip-location="top" tooltip="Eliminar plaza">
|
|
|
<HighlightOffIcon className="grid_btn"/>
|
|
<HighlightOffIcon className="grid_btn"/>
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -167,6 +175,10 @@ export function Puestos() {
|
|
|
let [manual, setManual] = React.useState(false);
|
|
let [manual, setManual] = React.useState(false);
|
|
|
let [expres, setExpress] = React.useState(false);
|
|
let [expres, setExpress] = React.useState(false);
|
|
|
|
|
|
|
|
|
|
+ let [edit, setEdit] = React.useState(false);
|
|
|
|
|
+ let [del, setDelete] = React.useState(false);
|
|
|
|
|
+ let [show, setShow] = React.useState(false);
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<div className="content-section">
|
|
<div className="content-section">
|
|
|
|
|
|
|
@@ -192,18 +204,30 @@ export function Puestos() {
|
|
|
</Row>
|
|
</Row>
|
|
|
<div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista' }`} id="grid_view">
|
|
<div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista' }`} id="grid_view">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <GridMode/>
|
|
|
|
|
|
|
+ <GridMode
|
|
|
|
|
+ setEdit={setEdit}
|
|
|
|
|
+ setDelete={setDelete}
|
|
|
|
|
+ setShow={setShow}
|
|
|
|
|
+ />
|
|
|
</Row>
|
|
</Row>
|
|
|
</div>
|
|
</div>
|
|
|
<div className={`main_list_products ${alignment === 'list' ? 'activar_vista' : 'desactivar_vista'}`} id="list_view_products">
|
|
<div className={`main_list_products ${alignment === 'list' ? 'activar_vista' : 'desactivar_vista'}`} id="list_view_products">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <ListMode/>
|
|
|
|
|
|
|
+ <ListMode
|
|
|
|
|
+ setEdit={setEdit}
|
|
|
|
|
+ setDelete={setDelete}
|
|
|
|
|
+ setShow={setShow}
|
|
|
|
|
+ />
|
|
|
</Row>
|
|
</Row>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <Express setExpress={setExpress} visible={expres} onClose={ () => setExpress(false) } />
|
|
|
|
|
- <Manual setManual={setManual} visible={manual} onClose={ () => setManual(false) } />
|
|
|
|
|
|
|
+ <Express setExpress={setExpress} visible={expres} onClose={() => setExpress(false) } />
|
|
|
|
|
+ <Manual setManual={setManual} visible={manual} onClose={() => setManual(false) } />
|
|
|
|
|
+
|
|
|
|
|
+ <Editar visible={edit} onClose={() => setEdit(false)} />
|
|
|
|
|
+ <Eliminar visible={del} onClose={() => setDelete(false)} />
|
|
|
|
|
+ <Mostrar visible={show} onClose={() => setShow(false)} />
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|