refactor: remoção do htmx do excluir item da comanda | feedback da exclusão

This commit is contained in:
2025-07-01 12:28:47 -03:00
parent 377fac4f1c
commit fe00c4da90
10 changed files with 151 additions and 189 deletions

View File

@@ -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