From d874b94c16d04175a2c70a8f47f5e68567446116 Mon Sep 17 00:00:00 2001 From: Welton Moura Date: Wed, 8 Jan 2025 19:43:53 -0300 Subject: [PATCH] style | clean --- .../balcao/__pycache__/views.cpython-310.pyc | Bin 1080 -> 1061 bytes gestaoRaul/balcao/views.py | 3 +- .../__pycache__/htmx_views.cpython-310.pyc | Bin 2352 -> 2330 bytes .../__pycache__/views.cpython-310.pyc | Bin 1715 -> 1715 bytes gestaoRaul/comandas/htmx_views.py | 4 +- .../comandas/templates/viewcomanda.html | 49 ++++-------------- .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 168 bytes .../custom_filter_tag.cpython-310.pyc | Bin 0 -> 632 bytes gestaoRaul/comandas/views.py | 5 -- gestaoRaul/db.sqlite3 | Bin 241664 -> 241664 bytes gestaoRaul/products/templates/products.html | 32 ++++-------- .../htmx_components/htmx_list_products.html | 9 +++- gestaoRaul/templates/static/base.css | 1 + .../static/comandas/css/comandas.css | 8 +-- .../static/comandas/css/viewcomanda.css | 18 +++---- .../static/comandas/js/viewcomanda.js | 7 --- 16 files changed, 43 insertions(+), 93 deletions(-) create mode 100644 gestaoRaul/comandas/templatetags/__pycache__/__init__.cpython-310.pyc create mode 100644 gestaoRaul/comandas/templatetags/__pycache__/custom_filter_tag.cpython-310.pyc diff --git a/gestaoRaul/balcao/__pycache__/views.cpython-310.pyc b/gestaoRaul/balcao/__pycache__/views.cpython-310.pyc index 1c90ca48a8fdd3e9c76ba1d25294b246b8108b80..20f1b176df0f96108e70d132e3396d65a5c29dbf 100644 GIT binary patch delta 410 zcmX|8u};G<5Y5?X;*^GFKwW4hR60E1od@8Vg+HjdjKox7ih+2=YQT%Hn9o&xO|kN^%d%?y{^ z_|k7U*DVvspuxTljgZ1bG9unm!ILN3D!lN<;>-Dtp$;%#s2tzc8X&HIVE|FpXL~!G zq*-}$o725qk~_AmSGF5O zZg9K$V0}ocZ#EKLYP@(jta`kB^aX4~kKu@#XXC9pQS)>$vy65Nc2iwaq)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FoKgt0!KX#s)&6HhH?Hng1o3%U9{JWqoB_Mm_}+wK&2szp@UNr zuH`?qJNhk=pZ*!oSM~jqapVZXB*K&c-vJa;%4lFDwM>YpFc}Yd#-%WrLr%&vr7SvB ziCHhT>>V+uDLQWFh};OyzsV!sfi7so8z_{PFhYnE?i_mTsVo!c4Ou z8>BERk~6Jz0!;vvcIDJ>#vEA^r|$0HiG{iTbZ2+tQK9d2H@3mY)p!5fg3CPMal-qR z`Xw=y;(Kh68qtZVx&&78cjgBZ&xG;(zO_Uq^1zxnxre*$sspL-f`cnAgqLQ{$F~I;nGFU)BBVh#rZ@<*1>Ph~xJDm}wCH%$D)@;YFiNEDKe*s5w-hluB diff --git a/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/views.cpython-310.pyc index 8d2635e7b3e33251ee139c4eece3b55bd2c8efde..8419fad214db6038667e2a5545430f74e221dc5b 100644 GIT binary patch delta 65 zcmdnYyP20apO=@50SKo3uS=KP$lJui$Uk`ki#{Xc<^wDujH2p5sbU@=!NVxR$j8XT Q$N_|tU$P!&X5*0n0N5f7aR2}S delta 65 zcmdnYyP20apO=@50SF$itxZ?i$lJuiC@^^fi#{XM<^wDujG~%AsbU@=!NVxR$j8XT R$ic|LH2Ed#ab|WNNdVaM40r$l diff --git a/gestaoRaul/comandas/htmx_views.py b/gestaoRaul/comandas/htmx_views.py index 15c1ad3..f3831c2 100644 --- a/gestaoRaul/comandas/htmx_views.py +++ b/gestaoRaul/comandas/htmx_views.py @@ -1,4 +1,4 @@ -from django.shortcuts import render, redirect, HttpResponse +from django.shortcuts import render, redirect from comandas.models import Comanda, ProductComanda from products.models import Product @@ -38,7 +38,6 @@ def closeComanda(request, comanda_id): comanda = Comanda.objects.get(id=comanda_id) comanda.status = "PAYING" comanda.save() - # return redirect('back') def reopenComanda(request, comanda_id): @@ -48,7 +47,6 @@ def reopenComanda(request, comanda_id): else: comanda.status = "OPEN" comanda.save() - # return redirect('back') def paymentComanda(request, comanda_id): typePayment = TypePay.objects.get(id=1) diff --git a/gestaoRaul/comandas/templates/viewcomanda.html b/gestaoRaul/comandas/templates/viewcomanda.html index 844ba61..afc3acb 100644 --- a/gestaoRaul/comandas/templates/viewcomanda.html +++ b/gestaoRaul/comandas/templates/viewcomanda.html @@ -2,15 +2,13 @@ {% load static %} - - {% block 'title' %} + Detalhes {{comanda.name}} + {% endblock %} - - {% block 'head' %} {% endblock %} @@ -25,13 +23,13 @@ Detalhes {{comanda.name}} {% if comanda.status != 'OPEN'%} disabled {% endif %} - >Adicionar Produto + >Add Produto + >Fechar Conta {% if comanda.status == 'PAYING' %} @@ -46,7 +44,7 @@ Detalhes {{comanda.name}} {% if comanda.status != 'OPEN'%} style="display: none;" {% endif %} - onclick="imprimirFichas()">Imprimir Fichas + onclick="imprimirFichas()">Fichas
@@ -122,37 +118,15 @@ Detalhes {{comanda.name}} {% endfor %} - - - - - - - - - - {% endblock %} \ No newline at end of file diff --git a/gestaoRaul/comandas/templatetags/__pycache__/__init__.cpython-310.pyc b/gestaoRaul/comandas/templatetags/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6241ef5696dc90c70bbbc22d41a237915140fa5 GIT binary patch literal 168 zcmd1j<>g`kf+oeo$g*PE2xsZem_aVsT7KYHmSJVo7RA lVtR2*e0*kJW=VX!UP0w84x8Nkl+v73JCG&COhAH#0RZeVD?k7M literal 0 HcmV?d00001 diff --git a/gestaoRaul/comandas/templatetags/__pycache__/custom_filter_tag.cpython-310.pyc b/gestaoRaul/comandas/templatetags/__pycache__/custom_filter_tag.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..349bc95ccb1c5c105620bfbf5de5f2475a8a2e4c GIT binary patch literal 632 zcmYjPyN=Z`5cN3DgR9-k^8+Yo(rk-_Rx89^I@g-m1Srx$ z0T61cXcrYx#|j2S!ngQ4DH55qsfYx-0uhVk6S;&U6X^?*XTOkv9VZ zm6fwTdDAE-jZfEG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BL@7ccQG{@o$VWIs=sE{xv02qM!Ez#_Gz?@f{3(!)uQTSyj+kVhS;DlQ z6e!X}xVdchTaDJJwONdcK~W=4iY#$Rq!^|Vps$H-YKNDF#arR#1N}I*V-wb4HI|t@ zn2nj%AiAwuD^0A5_hQbRRBkW(B8*t;kF_c^}nW_q}8_2A_gVwSR_2UBh2{(wJ5;};l655GR655D&5?YBF35s|n z;W{xPp@kTc&`k78Xd-M0jl=^94MdLw4{=ArHKIepRiar!Jy9>Aj;Ik5Y8?*$QW-R5 z^DH|S>CiA^eaeXSDNnI6gVU>|rPsMp2Be{3|+r`%}pxaw?`-o_&^(dA4| qcDY>1Rz_U)k$)}8nUa#2ynC0w9rd>`^ - - {% endblock %} {% block 'title' %} @@ -13,19 +11,15 @@ Produtos {% endblock %} - {% block 'body' %} -
+ margin: 5px 10px 20px 10px;" + onclick="openModal()" id="openModal">Novo Produto
@@ -84,20 +78,14 @@ Produtos - {% endfor %} - -
- - - -
- + +
{% csrf_token %} @@ -106,20 +94,20 @@ Produtos


- - {% for categorie in categories %} - - {% endfor %} + {% for categorie in categories %} + + {% endfor %} - +
-
+
diff --git a/gestaoRaul/templates/htmx_components/htmx_list_products.html b/gestaoRaul/templates/htmx_components/htmx_list_products.html index a94e512..453b3fa 100644 --- a/gestaoRaul/templates/htmx_components/htmx_list_products.html +++ b/gestaoRaul/templates/htmx_components/htmx_list_products.html @@ -2,10 +2,15 @@ {% for product in products %} -
+
{{product.name}}
R$ {{product.price}} -
+
{% endfor %} diff --git a/gestaoRaul/templates/static/base.css b/gestaoRaul/templates/static/base.css index bb494c6..391b3d5 100644 --- a/gestaoRaul/templates/static/base.css +++ b/gestaoRaul/templates/static/base.css @@ -117,5 +117,6 @@ body { } .open { display: block; + transition: transform 0.2s; } } diff --git a/gestaoRaul/templates/static/comandas/css/comandas.css b/gestaoRaul/templates/static/comandas/css/comandas.css index 2f854d0..73af2b7 100644 --- a/gestaoRaul/templates/static/comandas/css/comandas.css +++ b/gestaoRaul/templates/static/comandas/css/comandas.css @@ -10,14 +10,14 @@ .card-comanda { width: 80%; - /* gap: 5px; */ + gap: 3px; /* min-width: 220px; min-height: 250px; */ background-color: #292929; border-radius: 5px; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; - line-height: 15px; + line-height: 12px; font-size: 15px; font-weight: bold; color: #333; @@ -87,11 +87,13 @@ input, textarea { .grid-container { display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: center; } .card-comanda { width: 31%; + gap: 3px; + flex-wrap: wrap; font-size: 15px; font-weight: bold; color: #333; diff --git a/gestaoRaul/templates/static/comandas/css/viewcomanda.css b/gestaoRaul/templates/static/comandas/css/viewcomanda.css index 2f9dbbb..5a91843 100644 --- a/gestaoRaul/templates/static/comandas/css/viewcomanda.css +++ b/gestaoRaul/templates/static/comandas/css/viewcomanda.css @@ -2,16 +2,18 @@ display: grid; grid-template-columns: repeat(1, 2fr); gap: 10px; - max-width: 800px; /* Define a largura máxima do grid */ - margin: 0 auto; /* Centraliza o grid na página */ + max-width: 800px; + margin: 0 auto; } .grid-list-products { + + justify-items: center; display: grid; - grid-template-columns: repeat(3, 2fr); - gap: 10px; - max-width: 800px; /* Define a largura máxima do grid */ - margin: 0 auto; /* Centraliza o grid na página */ + grid-template-columns: repeat(3, 1fr); + gap: 8px; + max-width: 800px; + margin: 0 auto; } .card { @@ -21,7 +23,7 @@ border-radius: 15px; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; - line-height: 40px; /* Centraliza o texto verticalmente */ + line-height: 40px; font-size: 20px; font-weight: bold; color: #333; @@ -39,8 +41,6 @@ } - - button { background-color: #007BFF; color: white; diff --git a/gestaoRaul/templates/static/comandas/js/viewcomanda.js b/gestaoRaul/templates/static/comandas/js/viewcomanda.js index cd05dd7..d9c97ff 100644 --- a/gestaoRaul/templates/static/comandas/js/viewcomanda.js +++ b/gestaoRaul/templates/static/comandas/js/viewcomanda.js @@ -6,10 +6,6 @@ function openModal() { } -// function open_remove_product_comanda() { -// document.getElementById('remove-product-comanda').style.display = 'block'; -// // alert('Produto removido com sucesso!'); -// } function modal_payment_comanda() { document.getElementById('payment-comanda').style.display = 'block'; @@ -24,9 +20,6 @@ function closeModal() { } -// function removeCloseModal() { -// document.getElementById('remove-product-comanda').style.display = 'none'; -// } function imprimirFichas() { const element = document.getElementById("list-products-comanda");