mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: button on/off products
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -31,10 +31,6 @@ def listProductBalcao(request, comanda_id, search_product):
|
||||
return render(request, "htmx_components/htmx_list_products_balcao.html", {"products": products,'comanda_id':comanda_id})
|
||||
|
||||
|
||||
# def listProductBalcao(request, comanda_id):
|
||||
# product = request.GET.get("search-product")
|
||||
# products = Product.objects.filter(name__icontains=product)
|
||||
# return render(request, "htmx_components/htmx_list_products_balcao.html", {"products": products,'comanda_id':comanda_id})
|
||||
|
||||
def addProductBalcao(request, product_id, comanda_id, qtd):
|
||||
for i in range(qtd):
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
|
||||
<div id="add-produto">
|
||||
|
||||
<!-- <article> -->
|
||||
|
||||
<form id="productForm" >
|
||||
<h2 style="text-align: center;">Buscar Produto </h2>
|
||||
<div class="grid-container">
|
||||
@@ -128,22 +126,14 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<!-- </article> -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dialog id="payment-comanda" style="display: none;" >
|
||||
<article>
|
||||
<h2>Receber</h2>
|
||||
|
||||
@@ -5,21 +5,16 @@ from balcao import htmx_views
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
# path('', views.comandas, name='comandas'),
|
||||
path('', views.viewBalcao, name='viewBalcao'),
|
||||
# path('createComanda/', views.createComanda, name='createComanda'),
|
||||
|
||||
]
|
||||
|
||||
|
||||
htmx_urlpatterns = [
|
||||
# path('listProduct/', htmx_views.listProduct, name='listProduct'),
|
||||
path('listProductBalcao/<int:comanda_id>/<str:search_product>/', htmx_views.listProductBalcao, name='listProductBalcao'),
|
||||
path('addProductBalcao<int:product_id>/<int:comanda_id>/<int:qtd>/', htmx_views.addProductBalcao, name='addProductBalcao'),
|
||||
path('addProductBalcaoTeclado<int:product_id>/<int:comanda_id>/<int:qtd>/', htmx_views.addProductBalcaoTeclado, name='addProductBalcaoTeclado'),
|
||||
path('removeProductBalcao<int:productComanda_id>/', htmx_views.removeProductBalcao, name='removeProductBalcao'),
|
||||
# path('closeComanda<int:comanda_id>/', htmx_views.closeComanda, name='closeComanda'),
|
||||
# path('reopenComanda<int:comanda_id>/', htmx_views.reopenComanda, name='reopenComanda'),
|
||||
path('paymentBalcao<int:comanda_id>/', htmx_views.paymentBalcao, name='paymentBalcao'),
|
||||
]
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ from django.shortcuts import render, redirect
|
||||
|
||||
from comandas.models import Comanda, ProductComanda
|
||||
from products.models import Product
|
||||
from mesas.models import Mesa
|
||||
from django.db.models import Count, F
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user