First Commit
This commit is contained in:
Executable
+72
@@ -0,0 +1,72 @@
|
||||
{% extends "layouts/dashboard.twig" %}
|
||||
|
||||
{% block title %}Clientes - ERP{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||
<h1 class="h2">Clientes</h1>
|
||||
<div class="btn-toolbar mb-2 mb-md-0">
|
||||
<div class="btn-group me-2">
|
||||
<a href="{{ url('admin/erp') }}" class="btn btn-sm btn-outline-secondary">Voltar</a>
|
||||
<a href="{{ url('admin/erp/customers/new') }}" class="btn btn-sm btn-outline-primary"><i class="bi bi-plus-lg"></i> Novo Cliente</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover" id="customersTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Razão Social</th>
|
||||
<th>Nome Fantasia</th>
|
||||
<th>Contato</th>
|
||||
<th>Email</th>
|
||||
<th>Telefone</th>
|
||||
<th>Ações</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for customer in customers %}
|
||||
<tr>
|
||||
<td>{{ customer.cliente_id }}</td>
|
||||
<td>{{ customer.cliente_razaosocial }}</td>
|
||||
<td>{{ customer.cliente_nfantasia }}</td>
|
||||
<td>{{ customer.cliente_contato }}</td>
|
||||
<td>{{ customer.cliente_email }}</td>
|
||||
<td>{{ customer.cliente_telefone }}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="{{ url('admin/erp/customers/' ~ customer.cliente_id ~ '/edit') }}" class="btn btn-sm btn-info" title="Editar"><i class="bi bi-pencil"></i></a>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="if(confirm('Tem certeza que deseja excluir este cliente?')) { document.getElementById('delete-form-{{ customer.cliente_id }}').submit(); }" title="Excluir"><i class="bi bi-trash"></i></button>
|
||||
</div>
|
||||
<form id="delete-form-{{ customer.cliente_id }}" action="{{ url('admin/erp/customers/' ~ customer.cliente_id ~ '/delete') }}" method="POST" style="display: none;">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if ($('#customersTable').length) {
|
||||
$('#customersTable').DataTable({
|
||||
"language": {
|
||||
"url": "//cdn.datatables.net/plug-ins/1.13.7/i18n/pt-BR.json"
|
||||
},
|
||||
"order": [[0, "desc"]],
|
||||
"pageLength": 10,
|
||||
"responsive": true
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user