Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last update #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Reception/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import datetime
from itertools import chain

from PyPDF2 import PdfMerger
from decimal import Decimal

Expand Down Expand Up @@ -554,6 +556,17 @@ def booking_filter_check_out(request):
def lost_item_list(request):
if request.user.has_perm('recepcionist'):
items = LostItem.objects.all()
if request.method == 'GET':
room_number = request.GET.get('nombre_habitacion')
date = request.GET.get('fecha')
if room_number and date:
list1 = LostItem.objects.filter(room_number=room_number)
list2 = LostItem.objects.filter(date=date)
items=chain(list1,list2)
elif date:
items = LostItem.objects.filter(encounter_date=date)
if room_number:
items = LostItem.objects.filter(room_number=get_object_or_404(Room,room_number=room_number))

return render(request, 'reception/lost_items_list.html', {'items': items})
return redirect('home')
Expand Down
2 changes: 1 addition & 1 deletion Restaurant/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def create_order_pdf_bytes(reservation):
t.setStyle(style)
t.setStyle(style)
t.wrapOn(c, 0, 0)
t.drawOn(c, 30, 600)
t.drawOn(c, 30, 550)

c.save()
return buffer
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/item_photo/entrecot.webp
Binary file not shown.
Binary file added media/item_photo/helado.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/item_photo/macarrones-con-tomate.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/item_photo/natilla-hero-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/item_photo/sopa-de-fideos.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,22 @@
</a>
<ul class="dropdown-menu bg-light my-0 py-0 text-black-50" aria-labelledby="navbarContable">
<div class="nav-link-div" onclick="navigateToURL('{% url 'list_offers' %}')">
<li class="dropdown-item rounded no-blue">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'list_offers' %}">
Ofertas
</a>
</li>
</div>
<div class="nav-link-div" onclick="navigateToURL('{% url 'list_coupons' %}')">
<li class="dropdown-item rounded no-blue">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'list_coupons' %}">
Cupones
</a>
</li>
</div>
<div class="nav-link-div" onclick="navigateToURL('{% url 'list_restaurant_and_room' %}')">
<li class="dropdown-item rounded no-blue">
<div class="nav-link-div"
onclick="navigateToURL('{% url 'list_restaurant_and_room' %}')">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'list_restaurant_and_room' %}">
Listado de Reservas
</a>
Expand All @@ -190,7 +191,7 @@
RRHH
</a>
<ul class="dropdown-menu bg-light my-0 py-0 text-black-50" aria-labelledby="navbarRecepcio">
<li class="dropdown-item rounded no-blue">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'list_users' %}">
Usuarios
</a>
Expand All @@ -205,21 +206,21 @@
</a>
<ul class="dropdown-menu bg-light my-0 py-0 text-black-50" aria-labelledby="navbarUsuari">
<div class="nav-link-div" onclick="navigateToURL('{% url 'user_profile' %}')">
<li class="dropdown-item rounded no-blue">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'user_profile' %}">
Perfil
</a>
</li>
</div>
<div class="nav-link-div" onclick="navigateToURL('{% url 'list_reservations_user' %}')">
<li class="dropdown-item rounded no-blue">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'list_reservations_user' %}">
Mis Habitaciones
</a>
</li>
</div>
<div class="nav-link-div" onclick="navigateToURL('{% url 'list_restaurant_user' %}')">
<li class="dropdown-item rounded no-blue">
<li class="dropdown-item my-2 no-blue">
<a href="{% url 'list_restaurant_user' %}">
Mis Comidas
</a>
Expand Down
29 changes: 14 additions & 15 deletions templates/reception/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,24 @@
<div id="carouselPromotion" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="20000">
<a href="#">
<img src="{% static promotions.0.image %}"
<img src="{% static promotions.0.image %}"
class="d-block overflow-hidden w-100"
style="height: 300px; overflow: hidden; object-fit: cover;" alt="...">
<div class="carousel-caption d-md-block endark-promo">
<h5><b>{{ promotions.0.title }}<br></b><span
class="fs-5 ">Codigo: {{ promotions.0.discount_code.discount_code }}</span>
</h5>
</div>
</div>
{% for promotion in promotions|slice:"1:" %}
<div class="carousel-item" data-bs-interval="20000">
<img src="{% static promotion.image %}"
class="d-block overflow-hidden w-100"
style="height: 300px; overflow: hidden; object-fit: cover;" alt="...">
<div class="carousel-caption d-md-block endark-promo">
<h5><b>{{ promotions.0.title }}</b></h5>
<h5><b>{{ promotion.title }}</b></h5>
<p>{{ promotion.discount_code.discount_code }}</p>
</div>
</a>
</div>
{% for promotion in promotions|slice:"1:" %}
<div class="carousel-item" data-bs-interval="20000">
<a href="#">
<img src="{% static promotion.image %}"
class="d-block overflow-hidden w-100"
style="height: 300px; overflow: hidden; object-fit: cover;" alt="...">
<div class="carousel-caption d-md-block endark-promo">
<h5><b>{{ promotion.title }}</b></h5>
</div>
</a>
</div>
{% endfor %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/restaurant/validated_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h1 class="mx-3 my-3">Lista de comensales</h1>
</table>
</div>
</div>
{% if not reserves %}
{% if not reservas %}
<p class="mx-3 my-3"><strong>No hay reservas en este día</strong></p>
{% endif %}
{% endblock %}
Expand Down
Loading