From 0fdf4ab4e39766f54437259322946a694c9b01cb Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 20 Aug 2026 09:53:55 -0300 Subject: [PATCH] feat: campo Ativo no cadastro e filtro de status na listagem de clientes --- app/templates/cliente_form.html | 5 ++++ app/templates/clientes_lista.html | 11 ++++++-- tests/test_router_clientes.py | 46 +++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/app/templates/cliente_form.html b/app/templates/cliente_form.html index 35d3bdd..4503426 100644 --- a/app/templates/cliente_form.html +++ b/app/templates/cliente_form.html @@ -46,6 +46,11 @@ {% elif campo in ["IMPLANTACAO", "MENSALIDADE", "JUROS_MORA", "JUROS_MULTA"] %} + {% elif campo == "ATIVO" %} + {% else %} {% if campo == "CNPJ" %} diff --git a/app/templates/clientes_lista.html b/app/templates/clientes_lista.html index b8d83dc..17b5d82 100644 --- a/app/templates/clientes_lista.html +++ b/app/templates/clientes_lista.html @@ -13,12 +13,18 @@ + +

+ Novo cliente

{% set busca_qs = ('&busca=' + (busca | urlencode)) if busca else '' %} - {% set qs_base = ('&ordenar_por=' + ordenar_por + '&direcao=' + direcao + '&por_pagina=' + (por_pagina | string) + busca_qs) | safe %} + {% set qs_base = ('&ordenar_por=' + ordenar_por + '&direcao=' + direcao + '&por_pagina=' + (por_pagina | string) + '&status=' + status + busca_qs) | safe %}
@@ -26,7 +32,7 @@ {% for campo, rotulo in colunas_tabela %} {% set nova_direcao = "desc" if (ordenar_por == campo and direcao == "asc") else "asc" %} @@ -53,6 +59,7 @@ + {% if busca %}{% endif %}
- + {{ rotulo }}{% if ordenar_por == campo %}{{ " ▲" if direcao == "asc" else " ▼" }}{% endif %}