feat: rotas de CLIENTE_CONTATO na tela de detalhe do cliente

This commit is contained in:
Gustavo
2026-08-13 10:25:20 -03:00
parent 2c7bf429fc
commit f1139e8b3a
3 changed files with 138 additions and 2 deletions
+18 -2
View File
@@ -13,11 +13,27 @@
<h2>Contatos</h2>
<table>
<tr><th>Nome</th><th>Telefone</th><th>E-mail</th></tr>
<tr><th>Nome</th><th>Telefone</th><th>E-mail</th><th></th></tr>
{% for ct in contatos %}
<tr><td>{{ ct.NOME }}</td><td>{{ ct.TELEFONE }}</td><td>{{ ct.EMAIL or "" }}</td></tr>
<tr>
<td>{{ ct.NOME }}</td><td>{{ ct.TELEFONE }}</td><td>{{ ct.EMAIL or "" }}</td>
<td>
<form method="post" action="/clientes/{{ cliente.ID }}/contatos/{{ ct.ID }}/excluir" style="display:inline">
<button type="submit" onclick="return confirm('Excluir este contato?')">Excluir</button>
</form>
</td>
</tr>
{% endfor %}
</table>
<form method="post" action="/clientes/{{ cliente.ID }}/contatos">
<label for="nome">Nome</label>
<input type="text" id="nome" name="nome">
<label for="telefone">Telefone</label>
<input type="text" id="telefone" name="telefone" required>
<label for="email">E-mail</label>
<input type="text" id="email" name="email">
<button type="submit">Adicionar contato</button>
</form>
<h2>Status em Clientes_Chaves</h2>
{% if status_chaves %}