From a840781473c895c004e84cd09596dac18380c108 Mon Sep 17 00:00:00 2001 From: Welton Moura Date: Sun, 15 Dec 2024 18:53:16 -0300 Subject: [PATCH] form create product | add product in comanda --- .../__pycache__/htmx_views.cpython-310.pyc | Bin 872 -> 1030 bytes .../comandas/__pycache__/urls.cpython-310.pyc | Bin 591 -> 608 bytes .../__pycache__/views.cpython-310.pyc | Bin 1321 -> 1321 bytes gestaoRaul/comandas/htmx_views.py | 10 ++++++--- gestaoRaul/comandas/templates/comandas.html | 21 +++++++----------- .../comandas/templates/viewcomanda.html | 11 ++++----- gestaoRaul/comandas/urls.py | 3 ++- gestaoRaul/db.sqlite3 | Bin 188416 -> 188416 bytes .../products/__pycache__/urls.cpython-310.pyc | Bin 354 -> 336 bytes .../__pycache__/views.cpython-310.pyc | Bin 878 -> 907 bytes gestaoRaul/products/templates/products.html | 17 +++++++++----- gestaoRaul/products/urls.py | 4 +--- gestaoRaul/products/views.py | 3 +-- .../htmx_components/htmx_list_products.html | 8 +++++-- .../htmx_list_products_in_comanda.html | 20 +++++++++++++++++ .../static/comandas/css/viewcomanda.css | 5 +++-- .../templates/static/products/js/products.js | 11 ++++----- 17 files changed, 72 insertions(+), 41 deletions(-) create mode 100644 gestaoRaul/templates/htmx_components/htmx_list_products_in_comanda.html diff --git a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc index 72a74a0cfeead4d19f8344c03b483a9744f4727a..61034dee488e8b52459a1b0f269b84da1c41763c 100644 GIT binary patch delta 539 zcmYLFyGjE=6rDSd-6fhtMIngbqjFI!MDPPtu#h0cN|0sA1kGZy$?U{JX0Z_LEMzS$ zjGZ6g&&(It`vcxdHhN*s%zbdrne**E1+}zVtq_c_o#^_Ez0^KVs7uS>czbw`@MOCP zh9u-2B#a@ankFpahD!PjIn%-r$qX|f`5S%tX*EJ>gMmursI4{=_XHFZm;2deIB6Ij5Pt;ABEPd#@mnPZuU0BXP|h=w)_ UOD|TPt*YVRf5UW5amqG+0k(vA@c;k- delta 377 zcmYjM%}T>S5Z>8Mn-J2pO1y}O9t7jT7x37-6zWNYm}Y}ESfi7zh-^=Sw;oDfp!L>Q z+6NF{z`L_06$id=zWHH3=EM7Lhh?YZGYaS8=5E9n;b$Lg*@U3nBJ>H>8IfiMTY`iY z%s}x%6pjYT=P=`{rI{4c(R>VxpP_HOCoJVOQ&oKnrw78gm_JYRN*T8qpi2kW48wX2 z$*2d|qdK#e+i*x&Z0rw7D5g0X!ko{97E4$$V2YD5f9FFMi_4fBKPxBcqfC>rG=5`6 z`t77XhP^>5Wzsay@73fX7HA(dPL;mo$VtWy29$8u(hkvecYCF|jG-NEs9O(26tt-h XzylvJs$a#`zWoHFzpelKU*hN&cZgC4 diff --git a/gestaoRaul/comandas/__pycache__/urls.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/urls.cpython-310.pyc index f654cbf6c67a186aec44f18ee9be9cb39fe2ab7e..26a183657ec1b5e26259c12a1032fbf663e9f9f4 100644 GIT binary patch delta 65 zcmX@l@_>ampO=@50SMk`#i#Gv$ScVxE1Q#9ToO=}pHiA!qHmL#S7Mc%pPQJMk{F+v TVz=3dQH+tDhmVovFAoO*gHaO# delta 48 zcmaFBa-M}ZpO=@50SM|XW71PL@=7xD@Z@9`mjo2$r<5j_Y<6Z8V`S&%V`TZq!wvu~ Ch71S* diff --git a/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc index 44580ae9b1ea0cb0cb282dcf78ec358751f3eea1..b0aeeda396e66a152a4747967076f1c84d3a899f 100644 GIT binary patch delta 18 YcmZ3 {% endblock %} + {% block 'body' %} @@ -17,12 +18,11 @@ Comandas{% endblock %} {% for comanda in comandas %} - {% endfor %} @@ -41,11 +41,6 @@ Comandas{% endblock %} {% endfor %} - - - diff --git a/gestaoRaul/comandas/templates/viewcomanda.html b/gestaoRaul/comandas/templates/viewcomanda.html index dc9dfa9..c8da7db 100644 --- a/gestaoRaul/comandas/templates/viewcomanda.html +++ b/gestaoRaul/comandas/templates/viewcomanda.html @@ -19,7 +19,7 @@ Detalhes {{comanda.name}} {% block 'body' %} -
+

{{comanda.name}}

@@ -27,7 +27,7 @@ Detalhes {{comanda.name}}

{{comanda.dt_open}}

- +
@@ -58,12 +58,13 @@ Detalhes {{comanda.name}} + + + + +{% for item in consumo%} + + + + + + +{% endfor %} + + + + + + +
Produto Preço
ProdutoPreço
{{item.product.name}}R$ {{item.product.price}}
Total R$ {{total}}
diff --git a/gestaoRaul/templates/static/comandas/css/viewcomanda.css b/gestaoRaul/templates/static/comandas/css/viewcomanda.css index 09c07cf..412ccb5 100644 --- a/gestaoRaul/templates/static/comandas/css/viewcomanda.css +++ b/gestaoRaul/templates/static/comandas/css/viewcomanda.css @@ -17,15 +17,16 @@ .card { width: 120px; height: 120px; - background-color: #f2f2f2; + background-color: #c9ffbc; border-radius: 15px; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; - line-height: 120px; /* Centraliza o texto verticalmente */ + line-height: 40px; /* Centraliza o texto verticalmente */ font-size: 20px; font-weight: bold; color: #333; transition: transform 0.2s; + cursor: pointer; } .card:hover { diff --git a/gestaoRaul/templates/static/products/js/products.js b/gestaoRaul/templates/static/products/js/products.js index 53c34a0..7e135a4 100644 --- a/gestaoRaul/templates/static/products/js/products.js +++ b/gestaoRaul/templates/static/products/js/products.js @@ -1,20 +1,21 @@ function openModal() { - document.getElementById('myModal').style.display = 'block'; + document.getElementById('Modal-create-product').style.display = 'block'; } function closeModal() { - document.getElementById('myModal').style.display = 'none'; + document.getElementById('Modal-create-product').style.display = 'none'; } document.getElementById('openModal').addEventListener('click', openModal); -document.getElementById('productForm').addEventListener('submit', function(event) { - event.preventDefault(); +// document.getElementById('productForm').addEventListener('submit', function(event) { +// event.preventDefault(); // const productName = document.getElementById('productName').value; // const productPrice = document.getElementById('productPrice').value; // const productDescription = document.getElementById('productDescription').value; // closeModal(); -}); +// } +// ); \ No newline at end of file