chore: Delete numerous application modules, templates, static assets, documentation, and build files.

This commit is contained in:
2026-02-25 17:09:27 -03:00
parent 7ddaa2d1f9
commit 2fc4fafed7
562 changed files with 17 additions and 6810 deletions

View File

@@ -0,0 +1,19 @@
{% for product in products %}
<div
style="background-image: url('{{product.image}}');"
class="card-product"
onclick="addProductComanda({{product.id}}, {{comanda_id}}, '{{product.cuisine}}')" >
<p class="card-product-p"> {{product.name}}</p>
<p class="card-product-p"> R$ {{product.price}}</p>
</div >
{% endfor %}

View File

@@ -0,0 +1,84 @@
{% load static %}
{% load custom_filter_tag %}
<tr>
<th style="text-align: left;"><b>Produto</b></th>
<th style="text-align: left;"><b>Preço</b></th>
</tr>
{% for item in consumo%}
<tr id="item-{{item.id}}">
<td id="id-for-print-{{item.id}}">
<spam style="cursor: pointer;" onclick="inforOrders({{item.id}})">
{{item.product.name}}</spam>
{% if item.product.cuisine == True %}
<input hidden id="{{item.id}}-obsOrder" type="order" value="{{item.id | obsOrder}}">
<img
onclick="openModalObs({{item.id}})"
src="{% static 'midia/icons/note.svg' %}"
style="width: 25px; height: 35px; cursor: pointer;">
</img>
<img
onclick="printOrder({{item.id}})"
src="{% static 'midia/icons/print.svg' %}"
style="width: 35px; height: 35px; cursor: pointer;">
</img>
{% endif %}
</td>
<td>R$ {{item.product.price}}</td>
{% if comanda.status != 'OPEN'%}
{% else %}
<td>
<img
onclick="removeProductComanda({{item.id}}, '{{item.product.name}}')"
src="{% static 'midia/icons/delete.svg' %}"
style="width: 35px; height: 35px; cursor: pointer;"
>
</img>
</td>
{% endif %}
</tr>
{% endfor %}
{% if config.taxa %}
<tr>
<td>
Taxa de serviço 10%
</td>
<td>
R$ {{valores.taxa}}
</td>
</tr>
{% endif %}
{% if parcials%}
<td colspan="2" style="text-align: center;"><b>Pagamentos parciais</b></td>
{% endif %}
{% for parcial in parcials %}
<tr>
<td>{{parcial.description}} ás {{parcial.datetime|date:"H:i"}}</td>
<td>R$ -{{parcial.value}}</td>
</tr>
{% endfor %}
<tfoot>
<tr>
{% if config.taxa %}
<td colspan="2" style="text-align: center;"><b>Total R$ {{valores.totalComTaxa}}</b></td>
{% else %}
<td colspan="2" style="text-align: center;"><b>Total R$ {{valores.totalSemTaxa}}</b></td>
{% endif %}
</tr>
</tfoot>

View File

@@ -0,0 +1,51 @@
{% for product in products %}
{% if forloop.counter0 == 0 %}
<article
style="background-image: url('{{product.image}}');"
name="productBox"
id="productId-{{ product.id }}"
class="card-product"
onclick="addProductClick({{product.id}} )"
>
<p hidden id="{{forloop.counter0}}" >{{product.id}}</p>
<p hidden id="comanda{{forloop.counter0}}" >{{comanda.id}}</p>
<p class="card-product-p"> {{product.name}}</p>
<p id="{{product.id}}"></p>
<p class="card-product-p"> R$ {{product.price}}</p>
</article >
{% else %}
<article
style="background-image: url('{{product.image}}');"
name="productBox"
id="productId-{{ product.id }}"
class="card-product"
onclick="addProductClick({{product.id}})"
>
<p class="card-product-p"> {{product.name}}</p>
<p class="card-product-p"> R$ {{product.price}}</p>
</article >
{% endif %}
{% endfor %}
<!-- hx-swap="none"> -->
<div
style="background-image: url('{{product.image}}');"
class="card-product"
onclick="addProductComanda({{product.id}}, {{comanda.id}}, '{{product.cuisine}}')" >
<p class="card-product-p"> {{product.name}}</p>
<p class="card-product-p"> R$ {{product.price}}</p>
</div >

View File

@@ -0,0 +1,28 @@
<tr>
<th style="text-align: left;"><b>Produto</b></th>
<th style="text-align: left;"><b>Preço</b></th>
</tr>
{% for item in consumo%}
<tr>
<td>{{item.product.name}}</td>
<td>R$ {{item.product.price}} </td>
<td><button class="btn-cancel" onclick="removeProductBalcao({{item.id}})"
>Excluir</button></td>
</tr>
{% endfor %}
<tfoot>
<tr>
<td value={{total}} colspan="2" style="text-align: center;">Total R$ {{total}}</td>
</tr>
<tr >
<td hidden id="total">{{total}}</td>
</tr>
</tfoot>
</table>

View File

@@ -0,0 +1,160 @@
{% load static %}
<thead> <tr>
<th style="text-align: left;" data-col-type="text">Produto</th>
<th style="text-align: left;width: 20%;" data-col-type="number">Preço</th>
<th class="hide-on-mobile" style="text-align: left;" data-col-type="number">Quantidade</th>
<th class="hide-on-mobile" style="text-align: left;" data-col-type="text">Categoria</th>
<th style="text-align: left;width: 20%;">Ações</th> </tr>
</thead>
<tbody> {% for product in products %}
<tr>
<td id="name-{{product.id}}" >{{product.name}}</td>
<td id="price-{{product.id}}" >R$ {{product.price}}</td>
{% if product.quantity > 20 %}
<td class="hide-on-mobile" id="quantity-{{product.id}}" >{{product.quantity}}</td>
{% else %}
<td class="hide-on-mobile" id="quantity-{{product.id}}" style="background-color: brown;" >{{product.quantity}}</td>
{% endif %}
<td hidden class="hide-on-mobile" id="image-{{product.id}}" >{{product.image}}</td>
<td class="hide-on-mobile" id="category-{{product.id}}" >{{product.category.name}}</td>
<td>
<div class="grid-buttons">
<img
src="{% static 'midia/icons/edit.svg' %}"
style="width: 35px; height: 35px; cursor: pointer;"
onclick="editProduct({{product.id}})"
>
</img>
<input type="hidden" id="h-category-{{product.id}}" value="{{ product.category.id }}">
<input type="hidden" id="description-{{product.id}}" value="{{ product.description }}">
<input type="hidden" id="cuisine-{{product.id}}" value="{{ product.cuisine }}">
<form hx-post="{% url 'onOffproduct' %}" hx-trigger="click" hx-target="#product-list">
{% csrf_token %}
<input type="hidden" name="id-product" id="id-{{product.id}}" value="{{ product.id }}">
{% if product.active == True %}
<button style="background-color: rgba(255, 0, 0, 0); padding: 0px;border: 0px;">
<span data-tooltip="Ativar ou Desativar Produto" data-flow="top">
<img
src="{% static 'midia/icons/toggle-on.svg' %}"
style="width: 35px; height: 35px; cursor: pointer;"
>
</img>
</span>
</button>
{% else %}
<button style="background-color: rgba(0, 128, 0, 0); padding: 0px;border: 0px;" >
<span data-tooltip="Ativar ou Desativar Produto" data-flow="top">
<img
src="{% static 'midia/icons/toggle-off.svg' %}"
style="width: 35px; height: 35px; cursor: pointer;"
>
</img>
<span>
</button>
{% endif %}
</form>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<script>
function listerSortTeable(){
// document.addEventListener('DOMContentLoaded', function() {
const table = document.getElementById('product-list');
const headers = table.querySelectorAll('th');
const tbody = table.querySelector('tbody'); // Seleciona o corpo da tabela
let currentSortColumn = -1; // Armazena o índice da coluna atualmente ordenada
let sortDirection = 'asc'; // 'asc' para ascendente, 'desc' para descendente
// Adiciona um ouvinte de evento de clique a cada cabeçalho de coluna
headers.forEach((header, index) => {
if (header.textContent.trim() !== 'Ações') {
header.addEventListener('click', () => {
// Se a mesma coluna for clicada, inverte a direção da ordenação
if (currentSortColumn === index) {
sortDirection = (sortDirection === 'asc') ? 'desc' : 'asc';
} else {
// Se uma nova coluna for clicada, define como a coluna atual
// e inicia a ordenação ascendente
currentSortColumn = index;
sortDirection = 'asc';
}
// Remove as classes de ordenação de todos os cabeçalhos
headers.forEach(h => {
h.classList.remove('sorted-asc', 'sorted-desc');
});
// Adiciona a classe de ordenação ao cabeçalho clicado para visualização
header.classList.add(`sorted-${sortDirection}`);
// Chama a função de ordenação
sortColumn(index, sortDirection, header.dataset.colType);
});
}
})
function sortColumn(columnIndex, direction, columnType) {
// Converte os NodeList de linhas em um Array para poder usar sort()
const rows = Array.from(tbody.querySelectorAll('tr'));
rows.sort((rowA, rowB) => {
// Obtém o texto da célula na coluna clicada para ambas as linhas
let valueA = rowA.children[columnIndex].textContent.trim();
let valueB = rowB.children[columnIndex].textContent.trim();
// Trata valores específicos para colunas como "Preço" que têm "R$"
if (columnIndex === 1) { // Índice da coluna "Preço"
valueA = valueA.replace('R$', '').trim();
valueB = valueB.replace('R$', '').trim();
}
// Converte para número se o tipo da coluna for "number"
// ou se for a coluna de "Preço" após remover "R$"
if (columnType === 'number' || columnIndex === 1) {
valueA = parseFloat(valueA);
valueB = parseFloat(valueB);
// Garante que NaN (Not a Number) sejam tratados para evitar problemas de ordenação
valueA = isNaN(valueA) ? -Infinity : valueA;
valueB = isNaN(valueB) ? -Infinity : valueB;
} else {
// Para texto, use localeCompare para ordenação correta com caracteres acentuados
// e torna minúsculo para ordenação case-insensitive
valueA = valueA.toLowerCase();
valueB = valueB.toLowerCase();
}
let comparison = 0;
if (valueA > valueB) {
comparison = 1;
} else if (valueA < valueB) {
comparison = -1;
}
// Aplica a direção da ordenação
return (direction === 'asc') ? comparison : -comparison;
});
// Remove todas as linhas existentes e adiciona as linhas ordenadas de volta ao tbody
while (tbody.firstChild) {
tbody.removeChild(tbody.firstChild);
}
rows.forEach(row => tbody.appendChild(row));
}
// });
}
listerSortTeable()
</script>