mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 21:45:41 +00:00
form create product | add product in comanda
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
{% load static %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'title' %}
|
||||
Comandas{% endblock %}
|
||||
Comandas
|
||||
{% endblock %}
|
||||
|
||||
{% block 'head' %}
|
||||
<link rel="stylesheet" href="{% static 'comandas/css/comandas.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block 'body' %}
|
||||
|
||||
<body>
|
||||
@@ -17,12 +18,11 @@ Comandas{% endblock %}
|
||||
|
||||
{% for comanda in comandas %}
|
||||
|
||||
<div href="{% url 'viewcomanda' %}?parametro={{ comanda.id }}" class="card">
|
||||
<a href="{% url 'viewcomanda' %}?parametro={{ comanda.id }}">{{comanda.name}} </a> <br>
|
||||
<a href="{% url 'viewcomanda' %}?parametro={{ comanda.id }}">{{comanda.mesa}}</a>
|
||||
<a href="{% url 'viewcomanda' %}?parametro={{ comanda.id }}"><div class="card" >
|
||||
{{comanda.name}} <br>
|
||||
{{comanda.mesa}}
|
||||
|
||||
|
||||
</div>
|
||||
</div></a>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
@@ -41,11 +41,6 @@ Comandas{% endblock %}
|
||||
<option value="{{mesa.id}}">{{mesa.name}}</option>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
<!-- <option value="opcao1">Opção 1</option>
|
||||
<option value="opcao2">Opção 2</option>
|
||||
<option value="opcao3" >Opção 3</option> -->
|
||||
</select>
|
||||
<button type="submit">Abrir</button>
|
||||
<button type="button" onclick="closeModal()" style="background-color:red;">Fechar</button>
|
||||
|
||||
@@ -19,7 +19,7 @@ Detalhes {{comanda.name}}
|
||||
{% block 'body' %}
|
||||
|
||||
<body>
|
||||
<div class="grid-container">
|
||||
<div class="grid-container" >
|
||||
<button class="button" id="openModal">Adicionar Produto</button>
|
||||
<!-- <p>{{comanda.id}}</p> -->
|
||||
<p>{{comanda.name}}</p>
|
||||
@@ -27,7 +27,7 @@ Detalhes {{comanda.name}}
|
||||
<p>{{comanda.dt_open}}</p>
|
||||
|
||||
|
||||
<table>
|
||||
<table id="list-products-comanda">
|
||||
<tr>
|
||||
<th style="text-align: left;">Produto</th>
|
||||
<th style="text-align: left;">Preço</th>
|
||||
@@ -58,12 +58,13 @@ Detalhes {{comanda.name}}
|
||||
<div class="modal-content">
|
||||
<form id="productForm" >
|
||||
<h2>Adicionar Produto <button type="button" onclick="closeModal()" style="background-color:red;">Fechar</button></h2>
|
||||
<input type="text" id="search-product" name="search-product" placeholder="Buscar Produto" hx-get="{% url 'listProduct' %}" hx-trigger="keyup" hx-target="#product-list"><br>
|
||||
<input type="text" id="search-product" name="search-product" placeholder="Buscar Produto" hx-get="{% url 'listProduct' comanda.id %}" hx-trigger="keyup" hx-target="#product-list"><br>
|
||||
<div id="product-list" class="grid-list-products">
|
||||
{% for product in products %}
|
||||
|
||||
<div class="card" hx-get="{% url 'addProduct' product.id comanda.id %} " hx-trigger="click" hx-target="#product-list">
|
||||
{{product.name}}
|
||||
<div class="card" hx-get="{% url 'addProduct' product.id comanda.id %} " hx-trigger="click" hx-target="#list-products-comanda">
|
||||
{{product.name}} <br>
|
||||
R$ {{product.price}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user