-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin.html
447 lines (426 loc) · 16.6 KB
/
admin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="./styles.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
<!-- Material Design Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.1/css/mdb.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Anton&family=Montserrat&display=swap" rel="stylesheet">
<link rel = "preconnect" href = "https://fonts.gstatic.com">
<link href = "https://fonts.googleapis.com/css2? family = Pacifico & display = swap" rel = "hoja de estilo ">
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
crossorigin="anonymous"
/>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Heebo&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="./style.css">
<title>Panel Administración Cafeteria Java Script</title>
</head>
<body>
<header>
<!-- Navbar-->
<div class="container">
<nav class="navadmin navbar navbar-expand-lg navbar-dark fixed-top scrolling-navbar">
<div class="container-fluid">
<a class="navbar-brand me-2 mb-1 d-flex align-items-center" style="color: black;" href="index.html"><img src="./images/Logo.png" class="logo">Administracion The Coffee House</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<!-- de aca para abajo es la segunda mitad del nav -->
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navg navbar-nav w-100 justify-content-lg-end">
<li class="nav-item">
<a class="nav-link d-sm-flex align-items-sm-center" href="#"
type="button"
class="btn btn-primary"
data-bs-toggle="modal"
data-bs-target="#exampleModal"><strong class="d-none d-sm-block ms-1" style="color: black;">Agregar Producto</strong></a>
</li>
<li class="nav-item dropdown me-3 me-lg-1">
<a
class="nav-link dropdown-toggle hidden-arrow"
href="#"
id="navbarDropdownMenuLink"
role="button"
data-mdb-toggle="dropdown"
aria-expanded="false"
style="color: black;">
<i class="fas fa-chevron-circle-down fa-lg" style="color: black;"></i>
</a>
<ul
class="dropdown-menu dropdown-menu-end"
aria-labelledby="navbarDropdownMenuLink"
>
<li><a class="dropdown-item" href="./index.html" style="color: black;">Logout Admin</a></li>
</li>
</li>
</ul>
</div>
</div>
</div>
<!-- Navbar -->
<br>
<br>
<br>
<br>
<br>
<div class="tituloprincipal">
<h1>Listado de Productos</h1>
<hr>
</div>
<!-- Busqueda -->
<div class="d-flex justify-content-center mt-5 mb-3">
<form id="formBusqueda" style="margin-bottom: auto; margin-top: auto;">
<label for="busqueda">Búsqueda por producto</label>
<input id="busqueda" type="text">
<button type="submit" class="btn-sm btn-warning">Buscar</button>
<button type="button" class="btn-sm btn-dark" onclick="limpiarFiltro()">Limpiar</button>
</form>
<div id="alertaBusqueda" class="alert alert-info d-none">No hay resultados para la búsqueda</div>
</div>
<!-- Modal -->
<div
class="modal fade"
id="exampleModal"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ingrese producto nuevo</h5>
</div>
<div class="modal-body">
<div class="card m-auto p-3 bg-light" style="max-width: 600px">
<form id="formulario">
<div class="form-group">
<label for="inputTipo">Ingresar Tipo de Producto</label>
<br />
<select id="inputTipo" required>
<option>Cafe</option>
<option>Máquina</option>
<option>Molinillo</option>
</select>
</div>
<br>
<div>
<label for="inputMarca">Marca</label>
<input
type="text"
class="form-control"
id="inputMarca"
placeholder="Ingrese Marca"
required
maxlength="60"
/>
</div>
<div>
<label for="inputDescripcion">Descripción</label>
<input
type="text"
class="form-control"
id="inputDescripcion"
placeholder="Ingrese Descripción"
required
maxlength="60"
/>
</div>
<div>
<label for="inputPrecio">Precio</label>
<input
type="number"
class="form-control"
id="inputPrecio"
placeholder="Ingrese Precio"
required
maxlength="60"
/>
</div>
<div>
<label for="inputStock">Stock</label>
<input
type="number"
class="form-control"
id="inputStock"
placeholder="Ingrese Stock Disponible"
required
maxlength="60"
/>
</div>
<div>
<label for="inputImagen">Ingrese URL Imagen</label>
<input
type="url"
class="form-control"
id="inputImagen"
placeholder="Ingrese URL Imagen"
required
/>
</div>
<!-- <div>
<label for="inputImagen">Imagen Producto</label>
<br/>
<select id="inputImagen" required>
<option value="http://www.duckduckgo.com">Cafe</option>
<option value="http://www.google.com">Molinillo</option>
<option value="http://www.yahoo.com">Maquina</option>
</select>
</div> -->
<button type="submit" class="btn btn-primary mt-3">ENVIAR</button>
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
CERRAR
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Tabla que muestra los productos -->
<div class="container">
<table class="table table-bordered mt-5">
<thead>
<tr>
<th scope="col">Tipo</th>
<th scope="col">Marca</th>
<th scope="col">Descripción</th>
<th scope="col">Precio</th>
<th scope="col">Stock</th>
<!-- <th scope="col">Imagen</th> -->
<th scope="col">Acciones</th>
</tr>
</thead>
<tbody id="tabla"></tbody>
<!-- <tr>
<td>Tipo</td>
<td>Descripcion</td>
<td>
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal"
data-bs-target="#modalDetalle">Ver detalle</button>
<button type="button" class="btn btn-success btn-sm" data-bs-toggle="modal"
data-bs-target="#modalEditar">Editar</button>
<button onclick="eliminarUsuario()" class="btn btn-danger btn-sm">Eliminar</button>
</td>
</tr> -->
</table>
</div>
<!-- Tabla que muestra los usuarios -->
<div class="tituloprincipal pt-5">
<h1>Listado de Usuarios</h1>
</div>
<div class="container">
<table class="table table-bordered mt-5">
<thead>
<tr>
<th scope="col">Email</th>
<th scope="col">Nombre</th>
<th scope="col">Apellido</th>
<th scope="col">Fecha de nacimiento</th>
<th scope="col">Sexo</th>
<th scope="col">Acciones</th>
</tr>
</thead>
<tbody id="tablaUsuarios"></tbody>
<!-- <tr>
<td>Tipo</td>
<td>Descripcion</td>
<td>
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal"
data-bs-target="#modalDetalle">Ver detalle</button>
<button type="button" class="btn btn-success btn-sm" data-bs-toggle="modal"
data-bs-target="#modalEditar">Editar</button>
<button onclick="eliminarUsuario()" class="btn btn-danger btn-sm">Eliminar</button>
</td>
</tr> -->
</table>
</div>
<!-- Modal Detalle Nota -->
<div
class="modal fade"
id="modalDetalle"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Datos de Producto</h5>
</div>
<div id="detalleProducto" class="modal-body row">
<!-- <p>Titulo</p>
<p>Nota</p> -->
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
Cerrar
</button>
</div>
</div>
</div>
</div>
<!-- Modal Editar Nota -->
<div class="modal fade" id="modalEditar" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Editar Producto</h5>
</div>
<form id="formularioEditar">
<div class="modal-body row m-3">
<label for="editarTipo">Ingresar Tipo de Producto</label>
<select id="editarTipo" required>
<option>Cafe</option>
<option>Máquina</option>
<option>Molinillo</option>
</select>
<br>
<label for="editarMarca">Ingresar Marca</label>
<input type="text" id="editarMarca" required>
<br>
<label for="editarDescripcion">Ingresar Descripcion</label>
<input type="text" id="editarDescripcion" required>
<br>
<label for="editarPrecio">Ingresar Precio</label>
<input type="number" id="editarPrecio" required>
<br>
<label for="editarStock">Ingresar Stock</label>
<input type="number" id="editarStock" required>
<br>
<label for="editarImagen">Ingresar Imagen</label>
<input type="text" id="editarImagen" required>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="submit" >Enviar</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
</div>
</form>
</div>
</div>
</div>
<!-- Modal Detalle Usuario -->
<div class="modal fade" id="modalDetalleUs" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Datos de usuario</h5>
</div>
<div id="detalleUsuario" class="modal-body row m-3">
<!-- <p>Email</p>
<p>Nombre</p>
<p>Rol</p>
<p>Fecha de registro</p> -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div>
<!-- Modal Editar Usuario -->
<div class="modal fade" id="modalEditarUsuarios" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Editar usuario</h5>
</div>
<form id="formularioEditarUsuarios">
<div class="modal-body row m-3">
<label for="editarNombre">Ingresar nombre</label>
<input type="text" id="editarNombre">
<br>
<br>
<label for="editarApellido">Ingresar Apellido</label>
<input type="text" id="editarApellido">
<br>
<br>
<label for="editarPass">Ingresar nueva Contraseña</label>
<input type="text" id="editarPass">
<br>
<br>
<label for="editarEmail">Ingresar Email</label>
<input type="email" id="editarEmail">
<br>
<br>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="submit">Enviar</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
</div>
</form>
</div>
</div>
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"
></script>
<!-- Font Awesome -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
rel="stylesheet"
/>
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
rel="stylesheet"
/>
<!-- MDB -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.css"
rel="stylesheet"
/>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js" integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.min.js" integrity="sha384-nsg8ua9HAw1y0W1btsyWgBklPnCUAFLuTMS2G72MMONqmOymq585AcH49TLBQObG" crossorigin="anonymous"></script>
-->
<script src="./admin.js"></script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<!-- MDB -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.js"
></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
</body>
</html>