|
@@ -1,7 +1,8 @@
|
|
|
-import * as React from 'react';
|
|
|
|
|
|
|
+import React, { } from 'react';
|
|
|
import { Row, Col, Modal, Button, Table } from 'react-bootstrap'
|
|
import { Row, Col, Modal, Button, Table } from 'react-bootstrap'
|
|
|
|
|
+import { Box, Typography, Button as MuiButton, ListItem, withStyles } from '@mui/material';
|
|
|
|
|
+
|
|
|
|
|
|
|
|
-import Box from '@mui/material/Box';
|
|
|
|
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
|
|
|
|
|
@@ -12,6 +13,11 @@ import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
|
|
|
import EditIcon from '@mui/icons-material/Edit';
|
|
import EditIcon from '@mui/icons-material/Edit';
|
|
|
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
|
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
|
|
|
|
|
|
|
|
|
+///import { makeStyles, useTheme } from "@material-ui/core/styles";
|
|
|
|
|
+import { makeStyles, useTheme } from "@mui/material/styles";
|
|
|
|
|
+import TextField from "@mui/material/TextField";
|
|
|
|
|
+import ButtonBase from "@mui/material/ButtonBase";
|
|
|
|
|
+
|
|
|
import NotFound from '../Images/not_found.png';
|
|
import NotFound from '../Images/not_found.png';
|
|
|
|
|
|
|
|
let data = [{
|
|
let data = [{
|
|
@@ -36,7 +42,6 @@ for ( var _ of new Array(23) ){
|
|
|
d : _
|
|
d : _
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
function ListMode() {
|
|
function ListMode() {
|
|
|
|
|
|
|
|
let actions = [
|
|
let actions = [
|
|
@@ -115,7 +120,7 @@ function GridMode () {
|
|
|
data.length ?
|
|
data.length ?
|
|
|
data.map( plaza => {
|
|
data.map( plaza => {
|
|
|
return(
|
|
return(
|
|
|
- <Col key={plaza.id} lg="3" md="6" sm="6" xs="12" >
|
|
|
|
|
|
|
+ <Col key={plaza.id} lg="4" md="6" sm="6" xs="12" >
|
|
|
<div className="panel">
|
|
<div className="panel">
|
|
|
<Row>
|
|
<Row>
|
|
|
<Col md="4">
|
|
<Col md="4">
|
|
@@ -145,8 +150,28 @@ function GridMode () {
|
|
|
|
|
|
|
|
function Manual ( props ) {
|
|
function Manual ( props ) {
|
|
|
|
|
|
|
|
|
|
+ let [ filename, setFilename ] = React.useState(null);
|
|
|
|
|
+
|
|
|
let { visible, onClose } = props
|
|
let { visible, onClose } = props
|
|
|
|
|
|
|
|
|
|
+ // Create a reference to the hidden file input element
|
|
|
|
|
+ const hiddenFileInput = React.useRef(null);
|
|
|
|
|
+
|
|
|
|
|
+ // Programatically click the hidden file input element
|
|
|
|
|
+ // when the Button component is clicked
|
|
|
|
|
+ const handleClick = event => {
|
|
|
|
|
+ hiddenFileInput.current.click();
|
|
|
|
|
+ };
|
|
|
|
|
+ // Call a function (passed as a prop from the parent component)
|
|
|
|
|
+ // to handle the user-selected file
|
|
|
|
|
+ const handleChange = event => {
|
|
|
|
|
+ const fileUploaded = event.target.files[0];
|
|
|
|
|
+ console.log( "FILE >> ", fileUploaded )
|
|
|
|
|
+ setFilename( fileUploaded.name )
|
|
|
|
|
+ //props.handleFile(fileUploaded);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
|
<Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
|
|
<Modal.Header>
|
|
<Modal.Header>
|
|
@@ -157,13 +182,28 @@ function Manual ( props ) {
|
|
|
<Row>
|
|
<Row>
|
|
|
<Col md="4">
|
|
<Col md="4">
|
|
|
<div className="img-container">
|
|
<div className="img-container">
|
|
|
- <img alt="not found img" src="images/not_found.png"/>
|
|
|
|
|
|
|
+ <img alt="agregar plaza manual" src={NotFound}/>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col md="8">
|
|
<Col md="8">
|
|
|
- <div className="custom-file-upload">
|
|
|
|
|
- <input type="file" id="file" name="myfiles[]" multiple />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <input
|
|
|
|
|
+ value={ filename ? filename : "" }
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ class="file-upload-input"
|
|
|
|
|
+ disabled=""
|
|
|
|
|
+ placeholder="Ningún archivo seleccionado"/>
|
|
|
|
|
+
|
|
|
|
|
+ <Button className="btn_add_producto_confirm" style={{ marginLeft : 15 }} onClick={handleClick}>
|
|
|
|
|
+ SUBIR FOTO
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="file"
|
|
|
|
|
+ ref={hiddenFileInput}
|
|
|
|
|
+ onChange={handleChange}
|
|
|
|
|
+ style={{display: 'none'}}
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
|
<div className="data_product">
|
|
<div className="data_product">
|
|
@@ -175,7 +215,7 @@ function Manual ( props ) {
|
|
|
</Col>
|
|
</Col>
|
|
|
<div className="add_producto_confirm">
|
|
<div className="add_producto_confirm">
|
|
|
<div className="btn_add_producto_confirm">
|
|
<div className="btn_add_producto_confirm">
|
|
|
- <span style={{ margin : 15 }} type="submit">Agregar plaza</span>
|
|
|
|
|
|
|
+ <span type="submit">Agregar plaza</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</Row>
|
|
</Row>
|
|
@@ -201,7 +241,7 @@ function Express (props) {
|
|
|
</div>
|
|
</div>
|
|
|
<div className="add_producto_confirm">
|
|
<div className="add_producto_confirm">
|
|
|
<div className="btn_add_producto_confirm">
|
|
<div className="btn_add_producto_confirm">
|
|
|
- <Button type="submit">Agregar plaza</Button>
|
|
|
|
|
|
|
+ <span type="submit">Agregar plaza</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|