| Produto |
- Preço |
+ Preço |
Quantidade |
Categoria |
- Ações |
+ Ações |
{% for product in products %}
@@ -40,7 +40,7 @@ Produtos
{{product.category.name}} |
-
+ 📝
@@ -49,9 +49,9 @@ Produtos
{% if product.active == True %}
-
+
{% else %}
-
+
{% endif %}
diff --git a/gestaoRaul/templates/static/comandas/js/viewbalcao.js b/gestaoRaul/templates/static/comandas/js/viewbalcao.js
index d2db574..891e50e 100644
--- a/gestaoRaul/templates/static/comandas/js/viewbalcao.js
+++ b/gestaoRaul/templates/static/comandas/js/viewbalcao.js
@@ -22,7 +22,7 @@ function imprimirFichas() {
font-size: 24px;}
`;
const agora = new Date();
- var dateString = agora.getDay() + '/' + agora.getMonth() + '/' + agora.getFullYear() + ' - ' + agora.getHours() + ':' + agora.getMinutes()+' - Raul Rock Bar & Café';
+ var dateString = agora.getDate() + '/' +( agora.getMonth() + 1 )+ '/' + agora.getFullYear() + ' - ' + agora.getHours() + ':' + agora.getMinutes()+' - Raul Rock Bar & Café';
if (element) {
var content = element.innerHTML;
@@ -74,7 +74,8 @@ function updateTotal(){
function addProductBalcao() {
var productId = document.getElementById('0').innerText;
var comandaId = document.getElementById('comanda0').innerText;
- var qtd = document.getElementById('qtd-product').value;
+ fieldQtd = document.getElementById('qtd-product');
+ var qtd = fieldQtd.value;
const url = `/balcao/addProductBalcaoTeclado${productId}/${comandaId}/${qtd}/`;
fetch(url, {
method: 'GET',
@@ -90,6 +91,7 @@ function addProductBalcao() {
const imprimir = document.getElementById('imprimirFichas')
receber.removeAttribute('disabled');
imprimir.removeAttribute('disabled');
+ fieldQtd.value = 1;
setTimeout(function() {
updateTotal();}, 100);
}
@@ -130,7 +132,7 @@ function searchProduct() {
function time(){
var search_product = document.getElementById('search-product').value.trim()
var productListElement = document.getElementById("product-list");
- if(search_product.length >= 1 ){
+ if(search_product.length == 0 ){search_product ='*';}
fetch(`/balcao/listProductBalcao/13/${search_product}`, {
method: 'GET',}
).then(function(response) {
@@ -138,11 +140,12 @@ function searchProduct() {
}).then(function(text) {
productListElement.innerHTML = text;
- })}}
+ })}
}
function addProductClick(productId, comandaId) {
- var qtd = document.getElementById('qtd-product').value
+ fieldQtd = document.getElementById('qtd-product');
+ var qtd = fieldQtd.value;
fetch(`/balcao/addProductBalcaoTeclado${productId}/${comandaId}/${qtd}`, {
method: 'GET',
headers: {
@@ -160,6 +163,7 @@ function addProductClick(productId, comandaId) {
const imprimir = document.getElementById('imprimirFichas')
receber.removeAttribute('disabled');
imprimir.removeAttribute('disabled');
+ fieldQtd.value = 1;
setTimeout(function() {
updateTotal();}, 100);
diff --git a/gestaoRaul/templates/static/products/css/products.css b/gestaoRaul/templates/static/products/css/products.css
index d822f5c..3dfd91a 100644
--- a/gestaoRaul/templates/static/products/css/products.css
+++ b/gestaoRaul/templates/static/products/css/products.css
@@ -72,8 +72,8 @@ input, textarea {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: 20px;
- max-width: 1000px; /* Define a largura máxima do grid */
- margin: 0 auto; /* Centraliza o grid na página */
+ max-width: 1300px;
+ margin: 0 auto;
}
.card {
|