mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 05:25:40 +00:00
não lembro
This commit is contained in:
Binary file not shown.
@@ -141,6 +141,7 @@ def closeComanda(request, comanda_id):
|
|||||||
|
|
||||||
@group_required(groupName='Garçom')
|
@group_required(groupName='Garçom')
|
||||||
def addProduct(request, product_id, comanda_id):
|
def addProduct(request, product_id, comanda_id):
|
||||||
|
print('chamouuuuuuuuuuu')
|
||||||
config = {
|
config = {
|
||||||
'taxa': False
|
'taxa': False
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -106,26 +106,26 @@ WSGI_APPLICATION = 'gestaoRaul.wsgi.application'
|
|||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# DATABASES = {
|
# DATABASES = {
|
||||||
# 'default': {
|
# 'default': {
|
||||||
# 'ENGINE': DB_ENGINE,
|
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||||
# 'NAME': DB_NAME,
|
# 'NAME': BASE_DIR / 'db.sqlite3',
|
||||||
# 'USER': DB_USER,
|
|
||||||
# 'PASSWORD': DB_PASSWORD,
|
|
||||||
# 'HOST': DB_HOST,
|
|
||||||
# 'PORT': DB_PORT,
|
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': DB_ENGINE,
|
||||||
|
'NAME': DB_NAME,
|
||||||
|
'USER': DB_USER,
|
||||||
|
'PASSWORD': DB_PASSWORD,
|
||||||
|
'HOST': DB_HOST,
|
||||||
|
'PORT': DB_PORT,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -66,7 +66,15 @@ def editProduct(request, productId):
|
|||||||
|
|
||||||
def createJson(request):
|
def createJson(request):
|
||||||
products = Product.objects.filter(active=True).exclude(
|
products = Product.objects.filter(active=True).exclude(
|
||||||
category__name__in=['insumos', 'Cervejas', 'pratos']
|
category__name__in=['Insumos',
|
||||||
|
'Adicional',
|
||||||
|
'Bomboniere',
|
||||||
|
'Lojinha',
|
||||||
|
'Utensilios',
|
||||||
|
'Litros',
|
||||||
|
'Ingressos',
|
||||||
|
'Cigarros',
|
||||||
|
'Outros']
|
||||||
)
|
)
|
||||||
product_list = []
|
product_list = []
|
||||||
for product in products:
|
for product in products:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div
|
<div
|
||||||
style="background-image: url('{{product.image}}');"
|
style="background-image: url('{{product.image}}');"
|
||||||
class="card-product"
|
class="card-product"
|
||||||
onclick="addProductComanda({{product.id}}, {{comanda.id}}, '{{product.cuisine}}')" >
|
onclick="addProductComanda({{product.id}}, {{comanda_id}}, '{{product.cuisine}}')" >
|
||||||
<p class="card-product-p"> {{product.name}}</p>
|
<p class="card-product-p"> {{product.name}}</p>
|
||||||
<p class="card-product-p"> R$ {{product.price}}</p>
|
<p class="card-product-p"> R$ {{product.price}}</p>
|
||||||
</div >
|
</div >
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ function searchProduct() {
|
|||||||
var search_product = document.getElementById('search-product-modal').value.trim()
|
var search_product = document.getElementById('search-product-modal').value.trim()
|
||||||
var productListElement = document.getElementById("product-list-modal");
|
var productListElement = document.getElementById("product-list-modal");
|
||||||
var comanda_id = document.getElementById("id-comanda").value;
|
var comanda_id = document.getElementById("id-comanda").value;
|
||||||
|
|
||||||
if(search_product.length == 0 ){search_product ='*';}
|
if(search_product.length == 0 ){search_product ='*';}
|
||||||
fetch(`/comandas/listProduct/${comanda_id}/${search_product}`, {
|
fetch(`/comandas/listProduct/${comanda_id}/${search_product}`, {
|
||||||
method: 'GET',}
|
method: 'GET',}
|
||||||
|
|||||||
Reference in New Issue
Block a user