Spaces:
Running
Running
Update index.html
Browse files- index.html +89 -19
index.html
CHANGED
|
@@ -1,19 +1,89 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="es">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Gesti贸n de Ingresos y Gastos</title>
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
| 10 |
+
<link rel="stylesheet" href="style.css">
|
| 11 |
+
</head>
|
| 12 |
+
|
| 13 |
+
<body class="bg-indigo-900 text-white">
|
| 14 |
+
<div class="flex items-center justify-center min-h-screen">
|
| 15 |
+
<div class="bg-indigo-800 p-8 rounded-lg shadow-lg w-full max-w-md">
|
| 16 |
+
<h1 class="text-2xl font-bold text-center mb-6">Formulario de Transacci贸n</h1>
|
| 17 |
+
|
| 18 |
+
<!-- Contenedor de mensajes flash (mostrar mensajes aqu铆) -->
|
| 19 |
+
<div id="mensaje" aria-live="polite" class="mb-4"></div>
|
| 20 |
+
|
| 21 |
+
<form id="transaccion-form" method="POST" class="space-y-4" onsubmit="mostrarSpinner(event)">
|
| 22 |
+
|
| 23 |
+
<div>
|
| 24 |
+
<label for="usuario" class="block text-sm font-medium mb-1">Usuario</label>
|
| 25 |
+
<select id="usuario" name="usuario"
|
| 26 |
+
class="w-full p-2 rounded-lg bg-indigo-700 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
|
| 27 |
+
<option value="">Selecciona un usuario</option>
|
| 28 |
+
</select>
|
| 29 |
+
</div>
|
| 30 |
+
|
| 31 |
+
<div>
|
| 32 |
+
<label for="tipo" class="block text-sm font-medium mb-1">Tipo</label>
|
| 33 |
+
<select id="tipo" name="tipo"
|
| 34 |
+
class="w-full p-2 rounded-lg bg-indigo-700 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500"
|
| 35 |
+
onchange="cargarCategorias()">
|
| 36 |
+
<option value="">Selecciona un tipo</option>
|
| 37 |
+
</select>
|
| 38 |
+
|
| 39 |
+
</div>
|
| 40 |
+
<div>
|
| 41 |
+
<label for="categoria" class="block text-sm font-medium mb-1">Categor铆a</label>
|
| 42 |
+
<select id="categoria" name="categoria"
|
| 43 |
+
class="w-full p-2 rounded-lg bg-indigo-700 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500"
|
| 44 |
+
onchange="cargarSubcategorias()">
|
| 45 |
+
<option value="">Seleccione un tipo primero</option>
|
| 46 |
+
</select>
|
| 47 |
+
</div>
|
| 48 |
+
<div>
|
| 49 |
+
<label for="subcategoria" class="block text-sm font-medium mb-1">Subcategor铆a</label>
|
| 50 |
+
<select id="subcategoria" name="subcategoria"
|
| 51 |
+
class="w-full p-2 rounded-lg bg-indigo-700 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
|
| 52 |
+
<option value="">Seleccione una categor铆a primero</option>
|
| 53 |
+
</select>
|
| 54 |
+
</div>
|
| 55 |
+
<div>
|
| 56 |
+
<label for="monto" class="block text-sm font-medium mb-1">Monto</label>
|
| 57 |
+
<div class="flex items-center bg-indigo-700 rounded-lg">
|
| 58 |
+
<span class="px-3 text-white font-medium">S/.</span>
|
| 59 |
+
<input type="number" id="monto" name="monto" step="0.1" min="0" value="0.00"
|
| 60 |
+
class="w-full p-2 rounded-r-lg bg-indigo-700 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
|
| 64 |
+
<div>
|
| 65 |
+
<label for="descripcion" class="block text-sm font-medium mb-1">Descripci贸n</label>
|
| 66 |
+
<textarea id="descripcion" name="descripcion" rows="3"
|
| 67 |
+
class="w-full p-2 rounded-lg bg-indigo-700 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500"></textarea>
|
| 68 |
+
</div>
|
| 69 |
+
<div class="text-center">
|
| 70 |
+
<button type="submit"
|
| 71 |
+
class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-2 px-4 rounded-lg transition duration-300">
|
| 72 |
+
Guardar Transacci贸n
|
| 73 |
+
</button>
|
| 74 |
+
</div>
|
| 75 |
+
</form>
|
| 76 |
+
|
| 77 |
+
<!-- Spinner de carga -->
|
| 78 |
+
<div id="loading">
|
| 79 |
+
<div class="spinner"></div>
|
| 80 |
+
<p>Procesando...</p>
|
| 81 |
+
</div>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
<!--a帽adir scripts.js-->
|
| 86 |
+
<script src="scripts.js"></script>
|
| 87 |
+
</body>
|
| 88 |
+
|
| 89 |
+
</html>
|