diff --git a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-312.pyc b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-312.pyc index 6c5f633..d3dc32f 100644 Binary files a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-312.pyc and b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-312.pyc differ diff --git a/gestaoRaul/comandas/__pycache__/urls.cpython-312.pyc b/gestaoRaul/comandas/__pycache__/urls.cpython-312.pyc index b0a2808..60191b4 100644 Binary files a/gestaoRaul/comandas/__pycache__/urls.cpython-312.pyc and b/gestaoRaul/comandas/__pycache__/urls.cpython-312.pyc differ diff --git a/gestaoRaul/comandas/htmx_views.py b/gestaoRaul/comandas/htmx_views.py index 3c5a7ee..1787fee 100644 --- a/gestaoRaul/comandas/htmx_views.py +++ b/gestaoRaul/comandas/htmx_views.py @@ -53,12 +53,22 @@ def removeProductComanda(request, productComanda_id): 'id':order.id, 'speak': f'Pedido cancelado! {order.id_product.name}.' }) - asyncio.run(enviar_mensagem(msg)) + # asyncio.run(enviar_mensagem(msg)) # order.delete() + consumo = ProductComanda.objects.filter(comanda=comanda) + valores = somar(consumo,comanda) else: product_comanda.delete() + consumo = ProductComanda.objects.filter(comanda=comanda) + valores = somar(consumo,comanda) - return render(request, "htmx_components/comandas/htmx_list_products_in_comanda.html",{'config':config, 'valores': valores,'parcials':parcial,'consumo': consumo, 'comanda':comanda}) + return render(request, + "htmx_components/comandas/htmx_list_products_in_comanda.html", + {'config':config, + 'valores': valores, + 'parcials':parcial, + 'consumo': consumo, + 'comanda':comanda}) else: pass diff --git a/gestaoRaul/comandas/templates/viewcomanda.html b/gestaoRaul/comandas/templates/viewcomanda.html index 6af1eb6..04d886a 100644 --- a/gestaoRaul/comandas/templates/viewcomanda.html +++ b/gestaoRaul/comandas/templates/viewcomanda.html @@ -103,7 +103,7 @@ Detalhes {{comanda.name}} {% for item in consumo%} - + {{item.product.name}} @@ -131,13 +131,12 @@ Detalhes {{comanda.name}} {% if comanda.status != 'OPEN'%} {% else %} + + > {% endif %} @@ -180,30 +179,21 @@ Detalhes {{comanda.name}} - - - -
- + -