diff --git a/app.py b/app.py index a307883..cf1a571 100644 --- a/app.py +++ b/app.py @@ -290,7 +290,7 @@ def manage_workers(): flash("El RUT ya existe en el sistema.", "danger") # Fetch workers and JOIN their module name - c.execute('''SELECT w.id, w.rut, w.name, w.phone, m.name + c.execute('''SELECT w.id, w.rut, w.name, w.phone, m.name, w.modulo_id FROM workers w LEFT JOIN modulos m ON w.modulo_id = m.id WHERE w.is_admin = 0''') @@ -378,7 +378,8 @@ def admin_reset_password(id): conn.close() flash(f"Contraseña de {worker[0]} restablecida. La nueva contraseña es: {new_password}", "warning") - return redirect(url_for('edit_worker', id=id)) + + return redirect(url_for('manage_workers')) @app.route('/admin/estructura', methods=['GET', 'POST']) diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..8292d24 --- /dev/null +++ b/static/style.css @@ -0,0 +1,12 @@ + +[data-bs-theme="dark"] .form-control[readonly] { + background-color: #1a1d21; /* Un fondo casi negro, más oscuro que el modal */ + border-color: #373b3e; /* Un borde sutil */ + color: #e3e6e8; /* Texto blanco grisáceo, muy legible */ + opacity: 1; /* Evita la opacidad predeterminada de Bootstrap */ + cursor: not-allowed; /* Refuerza visualmente que no es editable */ +} + +[data-bs-theme="dark"] .text-muted-rut { + color: #adb5bd !important; /* Un gris medio para el label "RUT (No editable)" */ +} diff --git a/templates/admin_productos.html b/templates/admin_productos.html index a1f0ec7..c943478 100644 --- a/templates/admin_productos.html +++ b/templates/admin_productos.html @@ -7,7 +7,6 @@ {% endblock %} - {% block content %}