diff --git a/gestaoRaul/balcao/__pycache__/views.cpython-310.pyc b/gestaoRaul/balcao/__pycache__/views.cpython-310.pyc index 1c90ca4..20f1b17 100644 Binary files a/gestaoRaul/balcao/__pycache__/views.cpython-310.pyc and b/gestaoRaul/balcao/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/balcao/views.py b/gestaoRaul/balcao/views.py index 0be8e4f..e3856f1 100644 --- a/gestaoRaul/balcao/views.py +++ b/gestaoRaul/balcao/views.py @@ -1,4 +1,4 @@ -from django.shortcuts import render, redirect +from django.shortcuts import render from comandas.models import Comanda, ProductComanda from products.models import Product @@ -20,7 +20,6 @@ def viewBalcao(request): for p in products: if p.name == produto['nome'] and p.active == True: products_ordenados.append(p) - total = 0 for produto in consumo: diff --git a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc index 54b7e70..a2a96cc 100644 Binary files a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc and b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc index 8d2635e..8419fad 100644 Binary files a/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc and b/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/htmx_views.py b/gestaoRaul/comandas/htmx_views.py index 15c1ad3..f3831c2 100644 --- a/gestaoRaul/comandas/htmx_views.py +++ b/gestaoRaul/comandas/htmx_views.py @@ -1,4 +1,4 @@ -from django.shortcuts import render, redirect, HttpResponse +from django.shortcuts import render, redirect from comandas.models import Comanda, ProductComanda from products.models import Product @@ -38,7 +38,6 @@ def closeComanda(request, comanda_id): comanda = Comanda.objects.get(id=comanda_id) comanda.status = "PAYING" comanda.save() - # return redirect('back') def reopenComanda(request, comanda_id): @@ -48,7 +47,6 @@ def reopenComanda(request, comanda_id): else: comanda.status = "OPEN" comanda.save() - # return redirect('back') def paymentComanda(request, comanda_id): typePayment = TypePay.objects.get(id=1) diff --git a/gestaoRaul/comandas/templates/viewcomanda.html b/gestaoRaul/comandas/templates/viewcomanda.html index 844ba61..afc3acb 100644 --- a/gestaoRaul/comandas/templates/viewcomanda.html +++ b/gestaoRaul/comandas/templates/viewcomanda.html @@ -2,15 +2,13 @@ {% load static %} - - {% block 'title' %} + Detalhes {{comanda.name}} + {% endblock %} - - {% block 'head' %} {% endblock %} @@ -25,13 +23,13 @@ Detalhes {{comanda.name}} {% if comanda.status != 'OPEN'%} disabled {% endif %} - >Adicionar Produto + >Add Produto + >Fechar Conta {% if comanda.status == 'PAYING' %} @@ -46,7 +44,7 @@ Detalhes {{comanda.name}} {% if comanda.status != 'OPEN'%} style="display: none;" {% endif %} - onclick="imprimirFichas()">Imprimir Fichas + onclick="imprimirFichas()">Fichas
@@ -122,37 +118,15 @@ Detalhes {{comanda.name}} {% endfor %} - - - - - - - - - - {% endblock %} \ No newline at end of file diff --git a/gestaoRaul/comandas/templatetags/__pycache__/__init__.cpython-310.pyc b/gestaoRaul/comandas/templatetags/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..f6241ef Binary files /dev/null and b/gestaoRaul/comandas/templatetags/__pycache__/__init__.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/templatetags/__pycache__/custom_filter_tag.cpython-310.pyc b/gestaoRaul/comandas/templatetags/__pycache__/custom_filter_tag.cpython-310.pyc new file mode 100644 index 0000000..349bc95 Binary files /dev/null and b/gestaoRaul/comandas/templatetags/__pycache__/custom_filter_tag.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/views.py b/gestaoRaul/comandas/views.py index 91d1d72..81838d3 100644 --- a/gestaoRaul/comandas/views.py +++ b/gestaoRaul/comandas/views.py @@ -12,7 +12,6 @@ def comandas(request): return render(request, 'comandas.html', {'comandas': comandas, 'mesas': mesas}) - def viewComanda(request): id = request.GET.get('parametro') comanda_id = int(id) @@ -30,7 +29,6 @@ def viewComanda(request): if p.name == produto['nome'] and p.active == True: products_ordenados.append(p) total = 0 - for produto in consumo: total += produto.product.price @@ -44,8 +42,5 @@ def createComanda(request): mesa = Mesa.objects.get(id=mesa_id) comanda = Comanda(name=name, mesa=mesa) comanda.save() - return redirect('comandas') - - diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index 5f5b3f1..b34dbd7 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/products/templates/products.html b/gestaoRaul/products/templates/products.html index 9eb87b7..7abaab5 100644 --- a/gestaoRaul/products/templates/products.html +++ b/gestaoRaul/products/templates/products.html @@ -4,8 +4,6 @@ {% block 'head' %} - - {% endblock %} {% block 'title' %} @@ -13,19 +11,15 @@ Produtos {% endblock %} - {% block 'body' %} -
+ margin: 5px 10px 20px 10px;" + onclick="openModal()" id="openModal">Novo Produto
@@ -84,20 +78,14 @@ Produtos - {% endfor %} - -
- - - -
- + +
{% csrf_token %} @@ -106,20 +94,20 @@ Produtos


- - {% for categorie in categories %} - - {% endfor %} + {% for categorie in categories %} + + {% endfor %} - +
-
+
diff --git a/gestaoRaul/templates/htmx_components/htmx_list_products.html b/gestaoRaul/templates/htmx_components/htmx_list_products.html index a94e512..453b3fa 100644 --- a/gestaoRaul/templates/htmx_components/htmx_list_products.html +++ b/gestaoRaul/templates/htmx_components/htmx_list_products.html @@ -2,10 +2,15 @@ {% for product in products %} -
+
{{product.name}}
R$ {{product.price}} -
+
{% endfor %} diff --git a/gestaoRaul/templates/static/base.css b/gestaoRaul/templates/static/base.css index bb494c6..391b3d5 100644 --- a/gestaoRaul/templates/static/base.css +++ b/gestaoRaul/templates/static/base.css @@ -117,5 +117,6 @@ body { } .open { display: block; + transition: transform 0.2s; } } diff --git a/gestaoRaul/templates/static/comandas/css/comandas.css b/gestaoRaul/templates/static/comandas/css/comandas.css index 2f854d0..73af2b7 100644 --- a/gestaoRaul/templates/static/comandas/css/comandas.css +++ b/gestaoRaul/templates/static/comandas/css/comandas.css @@ -10,14 +10,14 @@ .card-comanda { width: 80%; - /* gap: 5px; */ + gap: 3px; /* min-width: 220px; min-height: 250px; */ background-color: #292929; border-radius: 5px; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; - line-height: 15px; + line-height: 12px; font-size: 15px; font-weight: bold; color: #333; @@ -87,11 +87,13 @@ input, textarea { .grid-container { display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: center; } .card-comanda { width: 31%; + gap: 3px; + flex-wrap: wrap; font-size: 15px; font-weight: bold; color: #333; diff --git a/gestaoRaul/templates/static/comandas/css/viewcomanda.css b/gestaoRaul/templates/static/comandas/css/viewcomanda.css index 2f9dbbb..5a91843 100644 --- a/gestaoRaul/templates/static/comandas/css/viewcomanda.css +++ b/gestaoRaul/templates/static/comandas/css/viewcomanda.css @@ -2,16 +2,18 @@ display: grid; grid-template-columns: repeat(1, 2fr); gap: 10px; - max-width: 800px; /* Define a largura máxima do grid */ - margin: 0 auto; /* Centraliza o grid na página */ + max-width: 800px; + margin: 0 auto; } .grid-list-products { + + justify-items: center; display: grid; - grid-template-columns: repeat(3, 2fr); - gap: 10px; - max-width: 800px; /* Define a largura máxima do grid */ - margin: 0 auto; /* Centraliza o grid na página */ + grid-template-columns: repeat(3, 1fr); + gap: 8px; + max-width: 800px; + margin: 0 auto; } .card { @@ -21,7 +23,7 @@ border-radius: 15px; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; - line-height: 40px; /* Centraliza o texto verticalmente */ + line-height: 40px; font-size: 20px; font-weight: bold; color: #333; @@ -39,8 +41,6 @@ } - - button { background-color: #007BFF; color: white; diff --git a/gestaoRaul/templates/static/comandas/js/viewcomanda.js b/gestaoRaul/templates/static/comandas/js/viewcomanda.js index cd05dd7..d9c97ff 100644 --- a/gestaoRaul/templates/static/comandas/js/viewcomanda.js +++ b/gestaoRaul/templates/static/comandas/js/viewcomanda.js @@ -6,10 +6,6 @@ function openModal() { } -// function open_remove_product_comanda() { -// document.getElementById('remove-product-comanda').style.display = 'block'; -// // alert('Produto removido com sucesso!'); -// } function modal_payment_comanda() { document.getElementById('payment-comanda').style.display = 'block'; @@ -24,9 +20,6 @@ function closeModal() { } -// function removeCloseModal() { -// document.getElementById('remove-product-comanda').style.display = 'none'; -// } function imprimirFichas() { const element = document.getElementById("list-products-comanda");