first commit
This commit is contained in:
4
Movement/templates/Product/Create/client.html
Normal file
4
Movement/templates/Product/Create/client.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{% for cl in form.client.field.queryset %}
|
||||
<input type="hidden" name="client" value="{{ cl.id }}" >
|
||||
<h1> {{ cl.first_name }} {{ cl.last_name }} </h1>
|
||||
{% endfor %} <br>
|
||||
6
Movement/templates/Product/Create/date.html
Normal file
6
Movement/templates/Product/Create/date.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<label> <div class=""> Dia </div>
|
||||
<input type="date" name="date"
|
||||
value="{% now 'Y-m-d' %}"
|
||||
class="date form-control"
|
||||
>
|
||||
</label><br><br>
|
||||
33
Movement/templates/Product/Create/index.html
Normal file
33
Movement/templates/Product/Create/index.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "BaseLogin.html" %}
|
||||
{% block title %} Bank Accounts List {% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<div class="conteiner mt-4">
|
||||
<h3 class="display-6"> Cadastrar </h3>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="post" class="form">
|
||||
{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">{% include 'Product/Create/client.html' %}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">{% include 'Product/Create/date.html' %}</div>
|
||||
<div class="col-md-6">{{ form.quantity.label }} <br> {{ form.quantity }} </div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">{% include 'Product/Create/product.html' %}</div>
|
||||
<div class="col-md-4">{% include 'Product/Create/pay_method.html' %}</div>
|
||||
<div class="col-md-4">{% include 'Product/Create/professional.html' %}</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"> Salvar </button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{% url 'MovProductListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
13
Movement/templates/Product/Create/pay_method.html
Normal file
13
Movement/templates/Product/Create/pay_method.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class=""> Metodo de Pagamento </div> <br>
|
||||
<div class="form-group">
|
||||
{% for Pay in form.pay_method.field.queryset %}
|
||||
<div class="form-check ">
|
||||
<label>
|
||||
<input type="radio" name="pay_method"
|
||||
value="{{ Pay.id }}" class="form-check-input"
|
||||
>
|
||||
{{ Pay.name }} - {{ Pay.bank }}
|
||||
</label><br>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div> <br>
|
||||
13
Movement/templates/Product/Create/product.html
Normal file
13
Movement/templates/Product/Create/product.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class=""> Produto </div> <br>
|
||||
<div class="form-group">
|
||||
{% for Pay in form.product.field.queryset %}
|
||||
<div class="form-check ">
|
||||
<label>
|
||||
<input type="radio" name="product"
|
||||
value="{{ Pay.id }}" class="form-check-input"
|
||||
>
|
||||
{{ Pay.name }} - {{ Pay.value }}
|
||||
</label><br>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div> <br>
|
||||
13
Movement/templates/Product/Create/professional.html
Normal file
13
Movement/templates/Product/Create/professional.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class=""> Professional </div><br>
|
||||
<div class="form-group">
|
||||
{% for prof in form.professional.field.queryset %}
|
||||
<div class="form-check ">
|
||||
<label>
|
||||
<input type="radio" name="professional"
|
||||
value="{{ prof.id }}" class="form-check-input"
|
||||
>
|
||||
{{ prof.name }} {{ prof.symbol }}
|
||||
</label><br>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div> <br>
|
||||
8
Movement/templates/Product/Create/quantity.html
Normal file
8
Movement/templates/Product/Create/quantity.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<label>
|
||||
<input type="number" name="quantity" class="form-control"
|
||||
>
|
||||
</label><br>
|
||||
</div>
|
||||
</div> <br>
|
||||
18
Movement/templates/Product/Delete.html
Normal file
18
Movement/templates/Product/Delete.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "BaseLogin.html" %}
|
||||
{% block title %} Bank Accounts List {% endblock %}
|
||||
{% block content %}
|
||||
<div class="conteiner mt-4">
|
||||
<h3 class="display-6"> Deletar da Marcar </h3>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h3 class="card-title">Tem certeza que quer deletar ? </h3>
|
||||
<strong>{{ object.name }}</strong>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger mt-3"> Deletar </button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{% url 'ProfessionalListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
15
Movement/templates/Product/Detail.html
Normal file
15
Movement/templates/Product/Detail.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% 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.name }}</h3>
|
||||
<p class="card-text">Descrição: {{ object.description }}</p>
|
||||
{# <a href="{% url 'BrandsUpdate' object.id %}" class="btn btn-secondary mt-3 "> Editar </a>#}
|
||||
</div>
|
||||
</div>
|
||||
<a href="{% url 'ProfessionalListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
75
Movement/templates/Product/List.html
Normal file
75
Movement/templates/Product/List.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{% extends "BaseLogin.html" %}
|
||||
{% block title %} List {% endblock %}
|
||||
{% block content %}
|
||||
<h1> Produtos </h1><br>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3">
|
||||
<form method="get" action="{% url 'MovProductListView' %}" id="filterForm">
|
||||
<div class="input-group">
|
||||
<input type="date" class="date form-control" name="date"
|
||||
placeholder="Dia" value="{{ request.GET.date }}"
|
||||
onchange="document.getElementById('filterForm').submit();"
|
||||
>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{# {% if perms.brands.add_brands %}#}
|
||||
{# <div class="col-md-6">#}
|
||||
{# <a href="{% url 'MovProductCreateCustom' %}" 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 align="center">
|
||||
|
||||
<th> date </th>
|
||||
<th> product </th>
|
||||
<th> pay_method </th>
|
||||
<th> professional </th>
|
||||
<th> quantity </th>
|
||||
<th> gross_value </th>
|
||||
{# <th> net_value </th>#}
|
||||
<th> client </th>
|
||||
<th width="15%"> Ações </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for Prod in Products %}
|
||||
<tr align="center">
|
||||
<td> {{ Prod.date|date:"d/m/Y" }} </td>
|
||||
<td> {{ Prod.product.name }} </td>
|
||||
<td> {{ Prod.pay_method }} </td>
|
||||
<td> {{ Prod.professional }} </td>
|
||||
<td> {{ Prod.quantity }} </td>
|
||||
<td> {{ Prod.gross_value }} </td>
|
||||
{# <td> {{ Prod.net_value }} </td>#}
|
||||
<td> {{ Prod.client }} </td>
|
||||
<td>
|
||||
<a href="{% url 'MovProductDetailView' Prod.id %}" class="btn btn-info btn-sm">
|
||||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
{# {% if perms.brands.change_brands %}#}
|
||||
<a href="{% url 'MovProductUpdateView' Prod.id %}" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
{# {% endif %}#}
|
||||
{# {% if perms.brands.delete_brands %}#}
|
||||
<a href="{% url 'MovProductDeleteView' Prod.id %}" class="btn btn-danger btn-sm">
|
||||
<i class="bi bi-trash"></i>
|
||||
</a>
|
||||
{# {% endif %}#}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'components/_pagination.html' %}
|
||||
{% endblock %}
|
||||
17
Movement/templates/Product/Update.html
Normal file
17
Movement/templates/Product/Update.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "BaseLogin.html" %}
|
||||
{% block title %} Bank Accounts List {% endblock %}
|
||||
{% block content %}
|
||||
<div class="conteiner mt-4">
|
||||
<h3 class="display-6"> Editar Bancos </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 'ProfessionalListView' %}" class="btn btn-secondary mt-3 "> Cancelar e Voltar </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user