mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 21:45:41 +00:00
56 lines
1.3 KiB
HTML
56 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
|
|
{% block 'title' %}
|
|
Comandas
|
|
{% endblock %}
|
|
|
|
{% block 'head' %}
|
|
<link rel="stylesheet" href="{% static 'comandas/css/comandas.css' %}">
|
|
{% endblock %}
|
|
|
|
{% block 'body' %}
|
|
|
|
<body>
|
|
<button id="openModal">Abrir Comanda</button>
|
|
<div class="container ">
|
|
|
|
{% for comanda in comandas %}
|
|
|
|
<a href="{% url 'viewcomanda' %}?parametro={{ comanda.id }}"><article >
|
|
<header> {{comanda.name}} </header><br>
|
|
{{comanda.mesa}}
|
|
|
|
</article></a>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
</div>
|
|
|
|
<dialog id="Modal-create-comanda">
|
|
<article >
|
|
<form id="form-comanda" method="post" action="{% url 'createComanda' %}">
|
|
{% csrf_token %}
|
|
<h2>Abrir Comanda</h2>
|
|
<input type="text" id="name-comanda" name="name-comanda" required placeholder="Nome"><br>
|
|
<select name="select-mesa" >
|
|
|
|
{% for mesa in mesas %}
|
|
<option value="{{mesa.id}}">{{mesa.name}}</option>
|
|
{% endfor %}
|
|
|
|
</select>
|
|
<button type="submit">Abrir</button>
|
|
<button type="button" onclick="closeModal()" style="background-color:red;">Fechar</button>
|
|
</form>
|
|
</article>
|
|
</dialog >
|
|
</body>
|
|
<script src="{% static 'comandas/js/comandas.js' %}"></script>
|
|
|
|
|
|
|
|
|
|
{% endblock %} |