feat: redesign do detalhe de cliente (contatos e status de chaves)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
343f61ade7
commit
18029de9f8
@@ -2,8 +2,8 @@
|
||||
{% extends "base.html" %}
|
||||
{% block titulo %}{{ cliente.RAZAO }}{% endblock %}
|
||||
{% block conteudo %}
|
||||
<h1>{{ cliente.FANTASIA }} <small>({{ cliente.CODIGO }})</small></h1>
|
||||
<p>{{ cliente.RAZAO }} — {{ cliente.CNPJ }}</p>
|
||||
<h1>{{ cliente.FANTASIA }} <small style="color:var(--cor-texto-secundario)">({{ cliente.CODIGO }})</small></h1>
|
||||
<p style="color:var(--cor-texto-secundario)">{{ cliente.RAZAO }} — {{ cliente.CNPJ }}</p>
|
||||
<p>
|
||||
<a class="botao" href="/clientes/{{ cliente.ID }}/editar">Editar</a>
|
||||
<form method="post" action="/clientes/{{ cliente.ID }}/excluir" style="display:inline">
|
||||
@@ -13,6 +13,7 @@
|
||||
</p>
|
||||
|
||||
<h2>Contatos</h2>
|
||||
<div class="tabela-wrap">
|
||||
<table>
|
||||
<tr><th>Nome</th><th>Telefone</th><th>E-mail</th><th></th></tr>
|
||||
{% for ct in contatos %}
|
||||
@@ -40,6 +41,8 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="cartao">
|
||||
<form method="post" action="/clientes/{{ cliente.ID }}/contatos">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<label for="nome">Nome</label>
|
||||
@@ -50,13 +53,16 @@
|
||||
<input type="text" id="email" name="email">
|
||||
<button type="submit">Adicionar contato</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Status em Clientes_Chaves</h2>
|
||||
{% if status_chaves %}
|
||||
<div class="tabela-wrap">
|
||||
<table>
|
||||
<tr>{% for mes in status_chaves.meses %}<th>{{ mes }}</th>{% endfor %}</tr>
|
||||
<tr>{% for mes, valor in status_chaves.meses.items() %}<td>{{ "✓" if valor else "—" }}</td>{% endfor %}</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Nenhuma linha em Clientes_Chaves para o código {{ cliente.CODIGO }}.</p>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user