Browse Source

Visualización de lista de espera

politica
Celestino Rey 1 year ago
parent
commit
b1cb927356
4 changed files with 37 additions and 5 deletions
  1. +1
    -1
      JugarAlPadel/K8S/Makefile
  2. +10
    -3
      JugarAlPadel/gestion_reservas/eventos/views.py
  3. +1
    -0
      JugarAlPadel/gestion_reservas/templates/base.html
  4. +25
    -1
      JugarAlPadel/gestion_reservas/templates/eventos/detalle_evento.html

+ 1
- 1
JugarAlPadel/K8S/Makefile View File

@ -1,7 +1,7 @@
export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
#export REGISTRY=localhost:5000
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.15
export IMG_VERSION = 0.16
export IMG_NGINX_VERSION = 2.3
# limpia todo


+ 10
- 3
JugarAlPadel/gestion_reservas/eventos/views.py View File

@ -98,10 +98,17 @@ def detalle_evento(request, evento_id):
reservas = Reserva.objects.filter(evento=evento_id)
for i in reservas:
print("Reserva: ", i.usuario.nombre)
lista_espera = ListaEspera.objects.filter(evento=evento_id)
return render(request, 'eventos/detalle_evento.html', {'evento': evento, 'reservas': reservas})
for elemento in lista_espera:
print("Lista de espera: ", elemento.usuario.nombre)
print("Apuntado en: ", elemento.fecha_apuntado)
for booking in reservas:
print(booking.evento)
print(booking.usuario.nombre)
return render(request, 'eventos/detalle_evento.html', {'evento': evento, 'reservas': reservas, 'lista': lista_espera})
# Verificar si el usuario es administrador


+ 1
- 0
JugarAlPadel/gestion_reservas/templates/base.html View File

@ -118,6 +118,7 @@
<span class="nav-link-text">Crear un nuevo evento</span>
</a><!--//nav-link-->
</li><!--//nav-item-->
{% endif %}
<li class="nav-item">


+ 25
- 1
JugarAlPadel/gestion_reservas/templates/eventos/detalle_evento.html View File

@ -26,10 +26,11 @@
</div><!--//app-card-header-->
<div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start">
{% if reservas %}
<table class="table app-table-hover mb-0 text-left">
<thead>
<tr>
<th class="cell">Nombre</th>
<th class="cell">Apuntados</th>
</tr>
</thead>
<tbody>
@ -40,6 +41,29 @@
{% endfor %}
</tbody>
</table>
{% else %}
<p>No hay nadie apuntado</p>
{% endif %}
{% if lista %}
<p></p>
<table class="table app-table-hover mb-0 text-left">
<thead>
<tr>
<th class="cell">Lista de espera</th>
<th class="cell">En lista desde...</th>
</tr>
</thead>
<tbody>
{% for l in lista %}
<tr>
<td class="cell">{{ l.usuario.nombre }}</td>
<td class="cell">{{ l.fecha_apuntado }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</div>
</div><!--//app-card-->


Loading…
Cancel
Save