diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index ba6a706..a943193 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc index 70948c8..c55ffd8 100644 Binary files a/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc and b/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc differ diff --git a/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc index deb4687..01d5fc5 100644 Binary files a/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc and b/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc differ diff --git a/gestaoRaul/mesas/templates/mesas_map.html b/gestaoRaul/mesas/templates/mesas_map.html new file mode 100644 index 0000000..e330ff3 --- /dev/null +++ b/gestaoRaul/mesas/templates/mesas_map.html @@ -0,0 +1,63 @@ +{% extends "base.html" %} +{% load static %} + + + +{% block 'head' %} + +{% endblock %} + +{% block 'title' %} +RRB&C - Mapa de Mesas +{% endblock %} + +{% block 'body' %} + + + + + +
+ {% for mesa in mesas %} + + + {% if mesa.active == True %} +
{{mesa.name}}
+ {% else %} +
{{mesa.name}}
+ {% endif %} + + {% endfor %} +
+ + + + + + + +{% endblock %} \ No newline at end of file diff --git a/gestaoRaul/mesas/urls.py b/gestaoRaul/mesas/urls.py index d3dfc51..25ffc3b 100644 --- a/gestaoRaul/mesas/urls.py +++ b/gestaoRaul/mesas/urls.py @@ -4,7 +4,7 @@ from . import views urlpatterns = [ path('', views.mesas, name='mesas'), - path('onOffmesa/', views.onOffmesa, name='onOffmesa'), + path('mapMesas/', views.mapMesas, name='mapMesas'), diff --git a/gestaoRaul/mesas/views.py b/gestaoRaul/mesas/views.py index fc6e1cc..fa0bbb5 100644 --- a/gestaoRaul/mesas/views.py +++ b/gestaoRaul/mesas/views.py @@ -9,11 +9,14 @@ def mesas(request): return render(request, 'mesas.html', {'mesas': mesas}) +def mapMesas(request): + mesas = Mesa.objects.all() + return render(request, 'mesas_map.html', {'mesas': mesas}) -def onOffmesa(request): - id = request.POST.get('id-mesa') - mesa_id = int(id) - mesa = Mesa.objects.get(id=mesa_id) - mesa.active = not mesa.active - mesa.save() - return redirect('mesas') \ No newline at end of file +# def onOffmesa(request): +# id = request.POST.get('id-mesa') +# mesa_id = int(id) +# mesa = Mesa.objects.get(id=mesa_id) +# mesa.active = not mesa.active +# mesa.save() +# return redirect('mesas') \ No newline at end of file diff --git a/gestaoRaul/templates/base.html b/gestaoRaul/templates/base.html index f2599ba..eef0a34 100644 --- a/gestaoRaul/templates/base.html +++ b/gestaoRaul/templates/base.html @@ -25,6 +25,7 @@
  • Comandas
  • Produtos
  • Balcão
  • +
  • Mapa de Mesas
  • Categorias
  • diff --git a/gestaoRaul/templates/static/mesas/css/mesas.css b/gestaoRaul/templates/static/mesas/css/mesas.css index 0124740..94a8d0e 100644 --- a/gestaoRaul/templates/static/mesas/css/mesas.css +++ b/gestaoRaul/templates/static/mesas/css/mesas.css @@ -19,8 +19,38 @@ color: #333; transition: transform 0.2s; } +.m-card { + width: 80px; + height: 80px; + background-color: #f2f2f2; + border-radius: 15px; + box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); + text-align: center; + line-height: 80px; /* Centraliza o texto verticalmente */ + font-size: 20px; + font-weight: bold; + color: #333; + position: absolute; + transition: transform 0.2s; + } .card:hover { transform: scale(1.05); box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3); - } \ No newline at end of file + } +.m-card:hover { + transform: scale(1.05); + box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3); + } + + + #mapa { + width: 1200px; + height: 800px; + background-image: url('https://payload.cargocollective.com/1/22/714749/12741186/FAENG-ANTES_1216.png'); + position: relative; +} + +.elemento { + position: absolute; +} \ No newline at end of file