Move booking display template to auction app

Implement mock upsale offers, closing #10
This commit is contained in:
Kumi 2021-05-27 05:46:37 +02:00
parent e055005421
commit 97c4e351c6
5 changed files with 148 additions and 50 deletions

View file

@ -198,4 +198,11 @@ class BiddingListView(InConstructionMixin, PartnerProfileRequiredMixin, ListView
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)
context["establishment"] = self.establishment context["establishment"] = self.establishment
return context return context
class BookingView(ClientBaseMixin, DetailView):
model = Inquiry
template_name = "auction/booking.html"
def get_object(self):
return Inquiry.objects.get(uuid=self.kwargs["uuid"], client=self.request.user.clientprofile)

View file

@ -1,7 +1,9 @@
from django.urls import path, reverse_lazy from django.urls import path, reverse_lazy
from django.views.generic import RedirectView from django.views.generic import RedirectView
from .views import ClientRegistrationView, ClientProfileView, ClientDashboardView, ClientBookingsView, ClientBookingView from .views import ClientRegistrationView, ClientProfileView, ClientDashboardView, ClientBookingsView
from auction.views import BookingView
app_name = "clients" app_name = "clients"
@ -10,6 +12,6 @@ urlpatterns = [
path('register/', ClientRegistrationView.as_view(), name="register"), path('register/', ClientRegistrationView.as_view(), name="register"),
path('profile/', ClientProfileView.as_view(), name="profile"), path('profile/', ClientProfileView.as_view(), name="profile"),
path('bookings/', ClientBookingsView.as_view(), name="bookings"), path('bookings/', ClientBookingsView.as_view(), name="bookings"),
path('bookings/<slug:uuid>/', ClientBookingView.as_view(), name="booking_view"), path('bookings/<slug:uuid>/', BookingView.as_view(), name="booking_view"),
path('', RedirectView.as_view(url=reverse_lazy("clients:dashboard"))), path('', RedirectView.as_view(url=reverse_lazy("clients:dashboard"))),
] ]

View file

@ -84,10 +84,3 @@ class ClientBookingsView(ClientBaseMixin, ListView):
def get_queryset(self): def get_queryset(self):
return Inquiry.objects.filter(client=self.request.user.clientprofile) return Inquiry.objects.filter(client=self.request.user.clientprofile)
class ClientBookingView(ClientBaseMixin, DetailView):
model = Inquiry
template_name = "clients/booking.html"
def get_object(self):
return Inquiry.objects.get(uuid=self.kwargs["uuid"], client=self.request.user.clientprofile)

View file

@ -0,0 +1,136 @@
{% extends "frontend/base.html" %}
{% load i18n %}
{% load static %}
{% block "content" %}
<!--==== INNERPAGE-WRAPPER =====-->
<section class="innerpage-wrapper">
<div id="thank-you" class="innerpage-section-padding">
<div class="container">
<div class="row">
<div class="col-12 col-md-12 col-lg-9 col-xl-9 content-side">
<div class="space-right">
<div class="thank-you-note">
<h3>Die Buchung wurde bestätigt! Vielen Dank und gute Reise!</h3>
<p>Drucken Sie diese Seite bitte für Ihre Unterlagen aus.</p>
<a href="#" class="btn btn-orange">Details drucken</a>
</div><!-- end thank-you-note -->
<div class="traveler-info">
<h3 class="t-info-heading"><span><i class="fa fa-info-circle"></i></span>Reisedetails</h3>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<td>Buchungsnummer:</td>
<td>{{ object.id }}</td>
</tr>
<tr>
<td>Vorname:</td>
<td>{{ object.client.first_name }}</td>
</tr>
<tr>
<td>Nachname:</td>
<td>{{ object.client.last_name }}</td>
</tr>
<tr>
<td>E-Mail-Adresse:</td>
<td>{{ object.client.user.email }}</td>
</tr>
<tr>
<td>Adresse:</td>
<td>{{ object.client.full_address }}</td>
</tr>
</tbody>
</table>
</div><!-- end table-responsive -->
<div class="payment-method">
<h3 class="t-info-heading"><span><i class="fa fa-credit-card"></i></span>Zahlung</h3>
<p>Die Zahlung wurde durchgeführt mit:</p>
<ul class="list-inline">
<li class="list-inline-item"><img src="images/payment-1.png" class="img-fluid" alt="payment-img" /></li>
<li class="list-inline-item"><img src="images/payment-2.png" class="img-fluid" alt="payment-img" /></li>
<li class="list-inline-item active"><img src="images/payment-3.png" class="img-fluid" alt="payment-img" /></li>
<li class="list-inline-item"><img src="images/payment-4.png" class="img-fluid" alt="payment-img" /></li>
</ul>
</div><!-- end payment-method -->
</div><!-- end traveler-info -->
</div><!-- end space-right -->
</div><!-- end columns -->
<div class="col-12 col-md-12 col-lg-3 col-xl-3 side-bar blog-sidebar right-side-bar">
<div class="row">
<div class="col-12 col-md-6 col-lg-12">
<div class="side-bar-block recent-post">
<h2 class="side-bar-heading">Zusatzangebote</h2>
<div class="recent-block">
<div class="recent-img">
<a href="#"><!--<img src="images/holiday-deal-1.jpg" class="img-reponsive" alt="holiday-deal-image" />--></a>
</div><!-- end recent-img -->
<div class="recent-text">
<a href="#"><h5>Mietwagen gefällig?</h5></a>
<span class="date">Bei Sevent schon ab 7 Euro pro Tag!</span>
</div><!-- end recent-text -->
</div><!-- end recent-block -->
<div class="recent-block">
<div class="recent-img">
<a href="#"><i class="fas fa-train"></i></a>
</div><!-- end recent-img -->
<div class="recent-text">
<a href="#"><h5>Lieber gemütlich per Bahn?</h5></a>
<span class="date">Aus ganz Österreich ab 29 Euro mit dem BÖB Geizgleis!</span>
</div><!-- end recent-text -->
</div><!-- end recent-block -->
</div><!-- end side-bar-block -->
</div><!-- end columns -->
<div class="col-12 col-md-6 col-lg-12">
<div class="side-bar-block contact">
<h2 class="side-bar-heading">Kontakt</h2>
<div class="c-list">
<div class="icon"><span><i class="fa fa-envelope"></i></span></div>
<div class="text"><p>kontakt@journeyjoker.at</p></div>
</div><!-- end c-list -->
<div class="c-list">
<div class="icon"><span><i class="fa fa-phone"></i></span></div>
<div class="text"><p>+43 800 093004</p></div>
</div><!-- end c-list -->
<div class="c-list">
<div class="icon"><span><i class="fa fa-map-marker"></i></span></div>
<div class="text"><p>Gartengasse 22/7/3, 8010 Graz, Österreich</p></div>
</div><!-- end c-list -->
</div><!-- end side-bar-block -->
</div><!-- end columns -->
<div class="col-12 col-md-12 col-lg-12">
<div class="side-bar-block follow-us">
<h2 class="side-bar-heading">Folge uns!</h2>
<ul class="list-unstyled list-inline">
<li class="list-inline-item"><a href="#"><span><i class="fa fa-facebook"></i></span></a></li>
<li class="list-inline-item"><a href="#"><span><i class="fa fa-twitter"></i></span></a></li>
<li class="list-inline-item"><a href="#"><span><i class="fa fa-linkedin"></i></span></a></li>
<li class="list-inline-item"><a href="#"><span><i class="fa fa-google-plus"></i></span></a></li>
<li class="list-inline-item"><a href="#"><span><i class="fa fa-pinterest-p"></i></span></a></li>
</ul>
</div><!-- end side-bar-block -->
</div><!-- end columns -->
</div><!-- end row -->
</div><!-- end columns -->
</div><!-- end row -->
</div><!-- end container -->
</div><!-- end thank-you -->
</section><!-- end innerpage-wrapper -->
{% endblock %}

View file

@ -1,40 +0,0 @@
{% extends "frontend/base.html" %}
{% load i18n %}
{% block "content" %}
<!--===== INNERPAGE-WRAPPER ====-->
<section class="innerpage-wrapper">
<div id="payment-success" class="section-padding">
<div class="container text-center">
<div class="row d-flex justify-content-center">
<div class="col-md-12 col-lg-8 col-lg-offset-2">
<div class="payment-success-text">
<h2>{% blocktrans with booking=object.id %}Buchung #{{ booking }} erfolgreich{% endblocktrans %}</h2>
<p>{% blocktrans with currency=object.invoice.currency|upper amount=object.budget %}Die Zahlung über {{ currency }} {{ amount }} wurde erfolgreich freigegeben!{% endblocktrans %}</p>
<span><i class="fa fa-check-circle"></i></span>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<td><span><i class="fa fa-clone"></i></span>{% trans "Kategorie" %}</td>
<td><span><i class="fa fa-diamond"></i></span>{% trans "Beschreibung" %}</td>
<td><span><i class="fa fa-dollar"></i></span>{% trans "Preis" %}</td>
</tr>
</thead>
<tbody>
<tr>
<td><span><i class="fa fa-building"></i></span>Buchung</td>
<td>{{ object.accepted.roomcategory.establishment.name }}<br/>{{ object.arrival }} {{ object.accepted.departure }}</td>
<td>{{ object.invoice.currency|upper }} {{ object.budget }}</td>
</tr>
</tbody>
</table>
</div>
<a href="{% url "auction:offer_selection" object.invoice.inquiry.uuid %}" class="btn btn-orange">Buchungsbestätigung drucken</a><br /><br />
</div>
</div><!-- end columns -->
</div><!-- end row -->
</div><!-- end container -->
</div><!-- end coming-soon-text -->
</section><!-- end innerpage-wrapper -->
{% endblock %}