diff --git a/README.md b/README.md index a467269..4a57f35 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ services: - ver como funcionan los productos / precios de HC # TODO general: +- generar reportes y exportar a excel +- sistema de comisiones para gente part time temporal(?) - tabla de productos vendidos durante el mes - formulario de cosas robadas - implementar horas extra? @@ -54,9 +56,10 @@ services: - categorias de productos (complementos, etc) - precio de prodcot por zona - proteccion contra borrado de zonas o modulos i ya estan asignados a algo +- ahcer que contraseña autogerada force a crear una neva -# TODO quizas: -- generar reportes(?) +# TODO no prioritario: +- dejar mas bonito las cosas de admin en media ventana o otros formatos # TODO peppermint: ## formulario diff --git a/app.py b/app.py index 4979b78..1fe3c27 100644 --- a/app.py +++ b/app.py @@ -868,25 +868,6 @@ def admin_reportes_index(): return render_template('admin_reportes_index.html', modulos=modulos) -@app.route('/admin/reportes/modulo//menu') -@admin_required -def admin_reportes_menu_modulo(modulo_id): - # Esta ruta muestra las opciones de reporte para un módulo específico - conn = sqlite3.connect(DB_NAME) - c = conn.cursor() - - c.execute("SELECT name FROM modulos WHERE id = ?", (modulo_id,)) - modulo_info = c.fetchone() - conn.close() - - if not modulo_info: - flash("Módulo no encontrado.", "danger") - return redirect(url_for('admin_reportes_index')) - - modulo_name = modulo_info[0] - - return render_template('admin_reportes_menu.html', modulo_id=modulo_id, modulo_name=modulo_name) - @app.route('/admin/reportes/modulo/') @admin_required def report_modulo_periodo(modulo_id): diff --git a/docker-compose.yml b/docker-compose.yml index f9693f6..33f94e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,10 @@ name: rendiciones services: rendiciones: ports: - - 5001:5000 + - 5500:5000 volumes: - - YOUR_PATH/rendiciones/db:/app/db - - YOUR_PATH/rendiciones/static/cache:/app/static/cache + - /home/shironeko/Documents/dockerVols/rendiciones/db:/app/db + - /home/shironeko/Documents/dockerVols/rendiciones/static/cache:/app/static/cache container_name: rendiciones-server image: rendiciones:latest restart: unless-stopped \ No newline at end of file diff --git a/templates/admin_report_modulo.html b/templates/admin_report_modulo.html index 2292673..cd3ecfb 100644 --- a/templates/admin_report_modulo.html +++ b/templates/admin_report_modulo.html @@ -26,8 +26,8 @@ {% block content %}
- - Volver al Menú + + Volver al Menú

Resumen Financiero y Medios de Pago

diff --git a/templates/admin_reportes_index.html b/templates/admin_reportes_index.html index ddb531c..57005ca 100644 --- a/templates/admin_reportes_index.html +++ b/templates/admin_reportes_index.html @@ -1,4 +1,5 @@ {% extends "macros/base.html" %} +{% from "macros/modals.html" import reportes_menu_modal %} {% block title %}Panel de Reportes{% endblock %} @@ -20,7 +21,7 @@
{% for mod in lista_modulos %}
- +
@@ -39,11 +40,25 @@
No hay módulos registrados en el sistema.
{% endfor %} +{% for zona_name, lista_modulos in modulos|groupby(2) %} + {% for mod in lista_modulos %} + {{ reportes_menu_modal(mod[0], mod[1]) }} + {% endfor %} +{% endfor %} + -{% endblock %} \ No newline at end of file diff --git a/templates/macros/modals.html b/templates/macros/modals.html index fdda152..af06ef1 100644 --- a/templates/macros/modals.html +++ b/templates/macros/modals.html @@ -385,4 +385,113 @@
+{% endmacro %} + +{% macro reportes_menu_modal(modulo_id, modulo_name) %} +
{% endmacro %} \ No newline at end of file