From 75ba6963555fe6cfc8fa1a01685fa9bdf774d3e2 Mon Sep 17 00:00:00 2001 From: andersonid Date: Fri, 4 Apr 2025 13:02:23 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20adiciona=20modal=20global=20para=20edi?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20militantes=20na=20home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/home.js | 11 +++ templates/home.html | 185 ++++++++++++++++++-------------------------- 2 files changed, 88 insertions(+), 108 deletions(-) create mode 100644 static/js/home.js diff --git a/static/js/home.js b/static/js/home.js new file mode 100644 index 0000000..d72440e --- /dev/null +++ b/static/js/home.js @@ -0,0 +1,11 @@ +document.addEventListener('DOMContentLoaded', function() { + // Configurar clique nos itens da lista de pagamentos + document.querySelectorAll('.list-group-item[onclick*="carregarDadosPagamento"]').forEach(item => { + item.addEventListener('click', function(e) { + const pagamentoId = this.getAttribute('data-pagamento-id'); + if (pagamentoId) { + carregarDadosPagamento(pagamentoId); + } + }); + }); +}); \ No newline at end of file diff --git a/templates/home.html b/templates/home.html index 5e3bd77..083afa7 100644 --- a/templates/home.html +++ b/templates/home.html @@ -82,14 +82,9 @@ {% for militante in ultimos_militantes %}
+ data-militante-nome="{{ militante.nome }}">
{{ militante.nome }}
{{ militante.email }} @@ -153,107 +148,6 @@
- - - - - - + +{% include 'modals/militante_editar.html' %} +{% include 'modals/militante_excluir.html' %} + {% block extra_js %} @@ -639,5 +607,6 @@ document.addEventListener('DOMContentLoaded', function() { {% block scripts %} + {% endblock %} {% endblock %} \ No newline at end of file