alter: alterado metodo http para fechar comanda | retirada do htmx

This commit is contained in:
2025-03-28 14:07:30 -03:00
parent bb51147d99
commit ac2a0283d0
9 changed files with 61 additions and 40 deletions

View File

@@ -93,21 +93,6 @@ def addProduct(request, product_id, comanda_id):
return render(request, "htmx_components/comandas/htmx_list_products_in_comanda.html",{'config':config, 'valores':valores,'parcials':parcial,'consumo': consumo,'comanda':comanda})
# @group_required(groupName='Garçom')
# def editOrders(request, productComanda_id, obs):
# order = Order.objects.get(productComanda=productComanda_id)
# order.obs = obs
# order.save()
# msg = JsonResponse({
# 'type': 'broadcast',
# 'message': obs,
# 'local':'cozinha',
# 'tipo':'edit',
# 'id':order.id,
# 'speak': f'Pedido alterado! {order.id_product.name}, é {obs}.'
# })
# # asyncio.run(enviar_mensagem(msg))
# return JsonResponse({'status': 'ok'})
@group_required(groupName='Garçom')
@@ -138,11 +123,7 @@ def removeProductComanda(request, productComanda_id):
return render(request, "htmx_components/comandas/htmx_list_products_in_comanda.html",{'config':config, 'valores': valores,'parcials':parcial,'consumo': consumo, 'comanda':comanda})
@group_required(groupName='Garçom')
def closeComanda(request, comanda_id):
comanda = Comanda.objects.get(id=comanda_id)
comanda.status = "PAYING"
comanda.save()
@group_required(groupName='Gerente')