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