|
@@ -1,7 +1,8 @@
|
1
|
|
-import * as React from 'react';
|
|
1
|
+import React, { } from 'react';
|
2
|
2
|
import { Row, Col, Modal, Button, Table } from 'react-bootstrap'
|
|
3
|
+import { Box, Typography, Button as MuiButton, ListItem, withStyles } from '@mui/material';
|
|
4
|
+
|
3
|
5
|
|
4
|
|
-import Box from '@mui/material/Box';
|
5
|
6
|
import ToggleButton from '@mui/material/ToggleButton';
|
6
|
7
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
7
|
8
|
|
|
@@ -12,6 +13,11 @@ import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
|
12
|
13
|
import EditIcon from '@mui/icons-material/Edit';
|
13
|
14
|
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
14
|
15
|
|
|
16
|
+///import { makeStyles, useTheme } from "@material-ui/core/styles";
|
|
17
|
+import { makeStyles, useTheme } from "@mui/material/styles";
|
|
18
|
+import TextField from "@mui/material/TextField";
|
|
19
|
+import ButtonBase from "@mui/material/ButtonBase";
|
|
20
|
+
|
15
|
21
|
import NotFound from '../Images/not_found.png';
|
16
|
22
|
|
17
|
23
|
let data = [{
|
|
@@ -36,7 +42,6 @@ for ( var _ of new Array(23) ){
|
36
|
42
|
d : _
|
37
|
43
|
})
|
38
|
44
|
}
|
39
|
|
-
|
40
|
45
|
function ListMode() {
|
41
|
46
|
|
42
|
47
|
let actions = [
|
|
@@ -115,7 +120,7 @@ function GridMode () {
|
115
|
120
|
data.length ?
|
116
|
121
|
data.map( plaza => {
|
117
|
122
|
return(
|
118
|
|
- <Col key={plaza.id} lg="3" md="6" sm="6" xs="12" >
|
|
123
|
+ <Col key={plaza.id} lg="4" md="6" sm="6" xs="12" >
|
119
|
124
|
<div className="panel">
|
120
|
125
|
<Row>
|
121
|
126
|
<Col md="4">
|
|
@@ -145,8 +150,28 @@ function GridMode () {
|
145
|
150
|
|
146
|
151
|
function Manual ( props ) {
|
147
|
152
|
|
|
153
|
+ let [ filename, setFilename ] = React.useState(null);
|
|
154
|
+
|
148
|
155
|
let { visible, onClose } = props
|
149
|
156
|
|
|
157
|
+ // Create a reference to the hidden file input element
|
|
158
|
+ const hiddenFileInput = React.useRef(null);
|
|
159
|
+
|
|
160
|
+ // Programatically click the hidden file input element
|
|
161
|
+ // when the Button component is clicked
|
|
162
|
+ const handleClick = event => {
|
|
163
|
+ hiddenFileInput.current.click();
|
|
164
|
+ };
|
|
165
|
+ // Call a function (passed as a prop from the parent component)
|
|
166
|
+ // to handle the user-selected file
|
|
167
|
+ const handleChange = event => {
|
|
168
|
+ const fileUploaded = event.target.files[0];
|
|
169
|
+ console.log( "FILE >> ", fileUploaded )
|
|
170
|
+ setFilename( fileUploaded.name )
|
|
171
|
+ //props.handleFile(fileUploaded);
|
|
172
|
+ };
|
|
173
|
+
|
|
174
|
+
|
150
|
175
|
return (
|
151
|
176
|
<Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={onClose}>
|
152
|
177
|
<Modal.Header>
|
|
@@ -157,13 +182,28 @@ function Manual ( props ) {
|
157
|
182
|
<Row>
|
158
|
183
|
<Col md="4">
|
159
|
184
|
<div className="img-container">
|
160
|
|
- <img alt="not found img" src="images/not_found.png"/>
|
|
185
|
+ <img alt="agregar plaza manual" src={NotFound}/>
|
161
|
186
|
</div>
|
162
|
187
|
</Col>
|
163
|
188
|
<Col md="8">
|
164
|
|
- <div className="custom-file-upload">
|
165
|
|
- <input type="file" id="file" name="myfiles[]" multiple />
|
166
|
|
- </div>
|
|
189
|
+
|
|
190
|
+ <input
|
|
191
|
+ value={ filename ? filename : "" }
|
|
192
|
+ type="text"
|
|
193
|
+ class="file-upload-input"
|
|
194
|
+ disabled=""
|
|
195
|
+ placeholder="Ningún archivo seleccionado"/>
|
|
196
|
+
|
|
197
|
+ <Button className="btn_add_producto_confirm" style={{ marginLeft : 15 }} onClick={handleClick}>
|
|
198
|
+ SUBIR FOTO
|
|
199
|
+ </Button>
|
|
200
|
+ <input
|
|
201
|
+ type="file"
|
|
202
|
+ ref={hiddenFileInput}
|
|
203
|
+ onChange={handleChange}
|
|
204
|
+ style={{display: 'none'}}
|
|
205
|
+ />
|
|
206
|
+
|
167
|
207
|
</Col>
|
168
|
208
|
</Row>
|
169
|
209
|
<div className="data_product">
|
|
@@ -175,7 +215,7 @@ function Manual ( props ) {
|
175
|
215
|
</Col>
|
176
|
216
|
<div className="add_producto_confirm">
|
177
|
217
|
<div className="btn_add_producto_confirm">
|
178
|
|
- <span style={{ margin : 15 }} type="submit">Agregar plaza</span>
|
|
218
|
+ <span type="submit">Agregar plaza</span>
|
179
|
219
|
</div>
|
180
|
220
|
</div>
|
181
|
221
|
</Row>
|
|
@@ -201,7 +241,7 @@ function Express (props) {
|
201
|
241
|
</div>
|
202
|
242
|
<div className="add_producto_confirm">
|
203
|
243
|
<div className="btn_add_producto_confirm">
|
204
|
|
- <Button type="submit">Agregar plaza</Button>
|
|
244
|
+ <span type="submit">Agregar plaza</span>
|
205
|
245
|
</div>
|
206
|
246
|
</div>
|
207
|
247
|
</div>
|