first commit

This commit is contained in:
2026-01-02 09:19:43 -03:00
parent 63cf724aaf
commit cc44b7ef4f
187 changed files with 2484 additions and 686 deletions

View File

@@ -2,23 +2,49 @@
{% block title %} List {% endblock %}
{% block content %}
<div class="conteiner mt-4">
<h3 class="display-6"> Cadastrar </h3>
<div class="card col-md-10">
<div class="container">
<h3 class="mb-4">Cadastrar Cliente</h3>
<div class="card shadow-sm col-md-8 ">
<div class="card-body">
<form method="post" class="form">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary"> Salvar </button>
</form>
<a href="{% url 'ClientListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
<form method="post">
{% csrf_token %}
<div class="mb-3">
<label class="form-label">{{ form.first_name.label }}</label>
{{ form.first_name }}
</div>
<div class="mb-3">
<label class="form-label">{{ form.last_name.label }}</label>
{{ form.last_name }}
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label class="form-label">{{ form.phone.label }}</label>
{{ form.phone }}
</div>
<div class="col-md-6 mb-3">
<label class="form-label">{{ form.double_workload.label }}</label>
{{ form.double_workload }}
</div>
</div>
<div class="mb-3">
<label class="form-label">{{ form.professional.label }}</label>
{{ form.professional }}
</div>
<div class="mt-4 border-top pt-3 d-flex justify-content-between">
<button type="submit" class="btn btn-primary px-4">Salvar Alterações</button>
<button type="button" onclick="history.back()" class="btn btn-outline-secondary">Cancelar e Voltar</button>
</div>
</form>
</div>
</div>
</div>
<script>
</script>
{% endblock %}

View File

@@ -1,45 +0,0 @@
{% extends "BaseLogin.html" %}
{% block title %} Bank Accounts List {% endblock %}
{% block content %}
<div class="conteiner mt-4">
<h3 class="display-6"> Detalhes do Banco </h3>
<div class="card">
<div class="card-body">
<h3 class="card-title">{{ object.first_name }} {{ object.last_name }}</h3><br>
<p class="card-text">Tel.: {{ object.phone }}</p>
<p class="card-text">Prof. de Preferencia : {{ object.professional }}</p>
<p class="card-text">Tempo Duplo : {{ object.double_workload }}</p>
<p class="card-text">Nota: {{ object.notes }}</p>
<br>
<h3> Ultimas visitas </h3>
<div class="col-4">
<table class="table table-striped table-sm table-hover ">
<thead>
<tr>
<th>Dia </th>
<th>Horario</th>
<th>Profissinal</th>
</tr>
</thead>
<tbody class="table table-bordered">
{% for client in clients %}
<tr>
<td>{{ client.date|date:"d/m/Y" }}</td>
<td>{{ client.time }} </td>
<td>{{ client.professional }} </td>
</tr>
{% empty %}
<tr>
<td colspan="2"> Nada </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<a href="{% url 'ClientUpdateView' object.id %}" class="btn btn-secondary mt-3 "> Editar </a>
</div>
</div>
<a href="{% url 'ClientListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
</div>
{% endblock %}

View File

@@ -0,0 +1,26 @@
{% extends "BaseLogin.html" %}
{% block title %} Cliente {% endblock %}
{% block content %}
<div class="container mt-4">
{# <h3 class="display-6 mb-4">Detalhes do Cliente</h3>#}
<div class="card shadow-sm">
<div class="card-body">
<div class="row">
{% include 'Client/Detail/Detail_p1.html' %}
<div class="col-md-6 ps-md-4">
{% include 'Client/Detail/Detail_p2.html' %}
{% include 'Client/Detail/Detail_p3.html' %}
</div>
</div>
<hr>
{% include 'Client/Detail/Detail_btn.html' %}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,32 @@
<div class="d-flex justify-content-between align-items-center mt-4">
<form method="get" action="{% url 'MovCalendarCreateCustom' %}">
<input type="hidden" name="Client" value="{{ object.id }}">
<button type="submit" class="btn btn-primary">Marcar Atendimento </button>
</form>
<form method="get" action="{% url 'MovProductCreateCustom' %}">
<input type="hidden" name="Client" value="{{ object.id }}">
<button type="submit" class="btn btn-success">Produto</button>
</form>
{% if perms.brands.change_brands %}
<a href="{% url 'ClientUpdateView' object.id %}" class="btn btn-warning btn-sm">
Editar Infirmações
</a>
{% endif %}
{% if perms.brands.change_brands %}
<a href="{% url 'ClientUpdateResponsableView' object.id %}" class="btn btn-warning btn-sm">
Editar Responsavel
</a>
{% endif %}
<button type="button" onclick="history.back()" class="btn btn-danger">
<i class="bi bi-arrow-left"></i> Cancelar e Voltar
</button>
</div>

View File

@@ -0,0 +1,21 @@
{% load phone_filters %}
<div class="col-md-6 border-end">
<h1 class="card-title text-primary">{{ object.first_name }} {{ object.last_name }}</h1>
<hr>
<p class="card-text"><strong>Tel.:</strong> {{ object.phone|format_phone_true }}</p>
<p class="card-text"><strong>Prof. de Preferência:</strong> {{ object.professional }}</p>
{% if object.responsable %}
<p class="card-text d-flex align-items-center">
<i class="bi bi-person-badge text-info me-2"></i>
<strong>Responsável:</strong>
<a href="{% url 'ClientDetailView' object.responsable.id %}"
class="btn btn-link p-0 ms-1 text-decoration-none">
{{ object.responsable }}
</a>
</p>
{% endif %}
<p class="card-text"><strong>Última visita:</strong> {{ object.last_visit|date:"d/m/Y" }}</p>
<p class="card-text"><strong>Nota:</strong> {{ object.notes|default:"Nenhuma nota adicionada." }}</p>
</div>

View File

@@ -0,0 +1,46 @@
<h5 class="text-muted mb-3">Detalhes</h5>
<p class="card-text">
<form method="post" class="m-0">
{% csrf_token %}
<button type="submit" name="double_workload" value="double_workload" class="btn p-0">
{% if object.double_workload %}
<i class="bi bi-check-circle-fill text-success me-2"></i>
{% else %}
<i class="bi bi-x-circle-fill text-danger me-2"></i>
{% endif %}
</button>
Tempo Duplo
</form>
</p>
<p class="card-text">
<form method="post" class="m-0">
{% csrf_token %}
<button type="submit" name="late" value="late" class="btn p-0">
{% if object.late %}
<i class="bi bi-check-circle-fill text-success me-2"></i>
{% else %}
<i class="bi bi-x-circle-fill text-danger me-2"></i>
{% endif %}
</button>
Costuma Atrasar
</form>
</p>
<p class="card-text">
<form method="post" class="m-0">
{% csrf_token %}
<button type="submit" name="feed_back" value="feed_back" class="btn p-0">
{% if object.feed_back %}
<i class="bi bi-check-circle-fill text-success me-2"></i>
{% else %}
<i class="bi bi-x-circle-fill text-danger me-2"></i>
{% endif %}
</button>
FeedBack no Google
</form>
</p>

View File

@@ -0,0 +1,43 @@
<h5 class="text-muted mb-3">Lembrete de volta</h5>
<div class="d-flex gap-3">
<form method="post" class="m-0">
{% csrf_token %}
<button type="submit" name="msg_3_months" value="msg_3_months" class="btn p-0">
{% if object.msg_3_months %}
<i class="bi bi-check-circle-fill text-success me-2"></i>
{% else %}
<i class="bi bi-x-circle-fill text-danger me-2"></i>
{% endif %}
</button>
3 meses
</form>
<form method="post" class="m-0">
{% csrf_token %}
<button type="submit" name="msg_6_months" value="msg_6_months" class="btn p-0">
{% if object.msg_6_months %}
<i class="bi bi-check-circle-fill text-success me-2"></i>
{% else %}
<i class="bi bi-x-circle-fill text-danger me-2"></i>
{% endif %}
</button>
6 meses
</form>
<form method="post" class="m-0">
{% csrf_token %}
<button type="submit" name="msg_12_months" value="msg_12_months" class="btn p-0">
{% if object.msg_12_months %}
<i class="bi bi-check-circle-fill text-success me-2"></i>
{% else %}
<i class="bi bi-x-circle-fill text-danger me-2"></i>
{% endif %}
</button>
1 Ano
</form>
</div>

View File

@@ -1,5 +1,6 @@
{% extends "BaseLogin.html" %}
{% block title %} List {% endblock %}
{% load phone_filters %}
{% block content %}
<h1> Clientes </h1><br>
<div class="row mb-3">
@@ -29,83 +30,46 @@
</div>
</form>
</div>
{# <div class="col-md-3">#}
{# <form method="get" action="{% url 'ClientListView' %}" id="filterForm3">#}
{# <div class="input-group">#}
{# <input type="hidden" class="form-control" name="all"#}
{# placeholder="" value="all"#}
{# onchange="document.getElementById('filterForm3').submit();"#}
{# >#}
{# <button type="submit" class="btn btn-primary"> Tudo#}
{# <i class="bi bi-search"></i>#}
{# </button>#}
{# </div>#}
{# </form>#}
{# </div>#}
{# {% if perms.brands.add_brands %}#}
<div class="col-md-1">
<a href="{% url 'ClientCreateView' %}" class="btn btn-success float-end">
{# <i class="bi bi-plus"></i> #}
Criar </a>
</div>
{# {% endif %}#}
</div>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead class="thead-dark">
<tr class="text-center">
<th width="5%"> Marcar </th>
<th> Nome </th>
<th> Sobrenome </th>
<th width="10%"> Telefone </th>
<th width="5%"> </th>
<th width="5%"> </th>
<th> Nome Completo </th>
<th width="20%"> Telefone </th>
<th width="10%"> Profissinal </th>
<th width="08%"> T. D. </th>
<th width="05%"> FeedBack </th>
<th width="15%"> Notas </th>
<th width="5%"> Produto </th>
<th width="15%"> Ações </th>
<th width="08%"> T. Duplo </th>
<th width="15%"> U. Visita </th>
</tr>
</thead>
<tbody align="center">
{% for Client in Clients %}
<tr align="center" vertical-align="center">
<td>
<form method="get" action="{% url 'MovCalendarCreateCustom' %}" >
<a href="{% url 'ClientDetailView' Client.id %}" class="">
{# <i class="bi bi-eye"></i>#}
<button type="submit" class="btn btn-primary"> Detalhes </button>
</a>
</td>
<td>
<form method="get" action="{% url 'MovCalendarCreateCustom' %}">
<input type="hidden" name="Client" value="{{ Client.id }}">
<button type="submit" class="btn btn-primary"> Marcar </button>
<button type="submit" class="btn btn-primary">Marcar </button>
</form>
</td>
<td> {{ Client.first_name }} </td>
<td> {{ Client.last_name }} </td>
<td> {{ Client.phone }} </td>
<td> {{ Client.professional.symbol }} {{ Client.professional }}</td>
<td> {{ Client.first_name }} {{ Client.last_name }} {{ Client.professional.symbol }}</td>
<td> {{ Client.phone|format_phone }} </td>
<td> {{ Client.professional.name }}</td>
<td> {% if Client.double_workload %} <i class="bi bi-check-circle-fill text-success "></i>
{% else %} <i class="bi bi-x-circle-fill text-danger "></i> {% endif %} </td>
<td> {% if Client.feed_back %} <i class="bi bi-check-circle-fill text-success "></i>
{% else %} <i class="bi bi-x-circle-fill text-danger "></i> {% endif %} </td>
<td> {{ Client.notes }} </td>
<td>
<form method="get" action="{% url 'MovProductCreateCustom' %}" >
<input type="hidden" name="Client" value="{{ Client.id }}">
<button type="submit" class="btn btn-primary"> Produto </button>
</form>
</td>
<td>
<a href="{% url 'ClientDetailView' Client.id %}" class="btn btn-info btn-sm">
<i class="bi bi-eye"></i>
</a>
{# {% if perms.brands.change_brands %}#}
<a href="{% url 'ClientUpdateView' Client.id %}" class="btn btn-warning btn-sm">
<i class="bi bi-pencil"></i>
</a>
{# {% endif %}#}
{# {% if perms.brands.delete_brands %}#}
<a href="{% url 'ClientDeleteView' Client.id %}" class="btn btn-danger btn-sm">
<i class="bi bi-trash"></i>
</a>
{# {% endif %}#}
</td>
<td> {{ Client.last_visit|date:"d/m/Y" }} </td>
</tr>
{% endfor %}
</tbody>

View File

@@ -2,15 +2,62 @@
{% block title %} Bank Accounts List {% endblock %}
{% block content %}
<div class="conteiner mt-4">
<h3 class="display-6"> Editar Bancos </h3>
<h3 class="display-6"> Editar Clientes </h3>
<div class="card">
<div class="card-body">
<form method="post" class="form">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary"> Salvar </button>
</form>
<a href="{% url 'ClientListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
{% csrf_token %}
<div class="row">
<div class="col-md-6 mb-3">
<label for="{{ form.first_name.id_for_label }}" class="form-label">Nome</label>
<input type="text" name="{{ form.first_name.name }}" id="{{ form.first_name.id_for_label }}"
class="form-control" value="{{ form.first_name.value|default:'' }}">
{% if form.first_name.errors %}<div class="text-danger small">{{ form.first_name.errors }}</div>{% endif %}
</div>
<div class="col-md-6 mb-3">
<label for="{{ form.last_name.id_for_label }}" class="form-label">Sobrenome</label>
<input type="text" name="{{ form.last_name.name }}" id="{{ form.last_name.id_for_label }}"
class="form-control" value="{{ form.last_name.value|default:'' }}">
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="{{ form.phone.id_for_label }}" class="form-label">WhatsApp (Somente números)</label>
<input type="number" name="{{ form.phone.name }}" id="{{ form.phone.id_for_label }}"
class="form-control" value="{{ form.phone.value|default:'' }}">
</div>
<div class="col-md-6 mb-3">
<label for="{{ form.professional.id_for_label }}" class="form-label">Profissional</label>
<select name="{{ form.professional.name }}" id="{{ form.professional.id_for_label }}" class="form-select">
{% for choice in form.professional.field.choices %}
<option value="{{ choice.0 }}" {% if form.professional.value|stringformat:"s" == choice.0|stringformat:"s" %}selected{% endif %}>
{{ choice.1 }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="double_workload" id="id_double_workload" {% if form.double_workload.value %}checked{% endif %}>
<label class="form-check-label" for="id_double_workload">Tempo Duplo</label>
</div>
</div>
<br>
<div class="mb-3">
<label for="{{ form.notes.id_for_label }}" class="form-label">Notas do Cliente</label>
<textarea name="{{ form.notes.name }}" id="{{ form.notes.id_for_label }}" class="form-control" rows="3">{{ form.notes.value|default:'' }}</textarea>
</div>
<div class="mt-4 border-top pt-3 d-flex justify-content-between">
<button type="submit" class="btn btn-primary px-4">Salvar Alterações</button>
<button type="button" onclick="history.back()" class="btn btn-outline-secondary">Cancelar e Voltar</button>
</div>
</form>
</div>
</div>
</div>

View File

@@ -0,0 +1,72 @@
{% extends "BaseLogin.html" %}
{% load phone_filters %}
{% block title %} Editar Cliente {% endblock %}
{% block content %}
<div class="container mt-4">
<h3 class="display-6 mb-4">Editar Responsável</h3>
<div class="card shadow-sm">
<div class="card-body">
<form method="GET" action="{% url 'ClientUpdateResponsableView' pk=object.pk %}" class="mb-4">
<label for="filterClient" class="form-label font-weight-bold">Filtrar Cliente</label>
<div class="input-group">
<input type="text"
id="filterClient"
name="Client"
placeholder="Digite o nome para buscar..."
class="form-control"
value="{{ request.GET.Client }}">
<button type="submit" class="btn btn-primary">Filtrar</button>
</div>
</form>
<hr>
<form method="post">
{% csrf_token %}
<input type="hidden" name="first_name" value="{{ object.first_name }}">
<input type="hidden" name="last_name" value="{{ object.last_name }}">
<input type="hidden" name="phone" value="{{ object.phone }}">
<input type="hidden" name="professional" value="{{ object.professional.id }}">
<div class="row">
<div class="col-12 mb-3">
<label class="form-label"><strong>Selecione o Responsável</strong></label>
<div class="list-group">
{% for client in Clients %}
<label class="list-group-item list-group-item-action d-flex align-items-center">
<input type="radio"
name="responsable"
value="{{ client.id }}"
class="form-check-input me-3"
id="client_{{ client.id }}"
{% if object.responsable.id == client.id %}checked{% endif %}>
<span>
{{ client.first_name }} {{ client.last_name }}
<small class="text-muted d-block d-md-inline ms-md-2">
{{ client.phone|format_phone }}
</small>
</span>
</label>
{% empty %}
<div class="alert alert-light border">Nenhum cliente encontrado.</div>
{% endfor %}
</div>
</div>
</div>
<div class="mt-4 border-top pt-3 d-flex justify-content-between">
<button type="submit" class="btn btn-primary px-4">Salvar Alterações</button>
<button type="button" onclick="history.back()" class="btn btn-outline-secondary">Cancelar e Voltar</button>
</div>
</form>
</div>
</div>
</div>
{% endblock %}