diff --git a/auction/views.py b/auction/views.py index e67dfc2..a472a9d 100644 --- a/auction/views.py +++ b/auction/views.py @@ -198,4 +198,11 @@ class BiddingListView(InConstructionMixin, PartnerProfileRequiredMixin, ListView def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["establishment"] = self.establishment - return context \ No newline at end of file + 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) \ No newline at end of file diff --git a/clients/urls.py b/clients/urls.py index a4d8706..ee12cb9 100644 --- a/clients/urls.py +++ b/clients/urls.py @@ -1,7 +1,9 @@ from django.urls import path, reverse_lazy 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" @@ -10,6 +12,6 @@ urlpatterns = [ path('register/', ClientRegistrationView.as_view(), name="register"), path('profile/', ClientProfileView.as_view(), name="profile"), path('bookings/', ClientBookingsView.as_view(), name="bookings"), - path('bookings//', ClientBookingView.as_view(), name="booking_view"), + path('bookings//', BookingView.as_view(), name="booking_view"), path('', RedirectView.as_view(url=reverse_lazy("clients:dashboard"))), ] \ No newline at end of file diff --git a/clients/views.py b/clients/views.py index 303b87d..5d8c52e 100644 --- a/clients/views.py +++ b/clients/views.py @@ -84,10 +84,3 @@ class ClientBookingsView(ClientBaseMixin, ListView): def get_queryset(self): 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) \ No newline at end of file diff --git a/templates/auction/booking.html b/templates/auction/booking.html new file mode 100644 index 0000000..03a977d --- /dev/null +++ b/templates/auction/booking.html @@ -0,0 +1,136 @@ +{% extends "frontend/base.html" %} +{% load i18n %} +{% load static %} + +{% block "content" %} + +
+
+
+
+ +
+
+
+

Die Buchung wurde bestätigt! Vielen Dank und gute Reise!

+

Drucken Sie diese Seite bitte für Ihre Unterlagen aus.

+ Details drucken +
+ +
+

Reisedetails

+
+ + + + + + + + + + + + + + + + + + + + + + + +
Buchungsnummer:{{ object.id }}
Vorname:{{ object.client.first_name }}
Nachname:{{ object.client.last_name }}
E-Mail-Adresse:{{ object.client.user.email }}
Adresse:{{ object.client.full_address }}
+
+ +
+

Zahlung

+

Die Zahlung wurde durchgeführt mit:

+
    +
  • payment-img
  • +
  • payment-img
  • +
  • payment-img
  • +
  • payment-img
  • +
+
+
+
+
+ + + +
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/clients/booking.html b/templates/clients/booking.html deleted file mode 100644 index 3588eaa..0000000 --- a/templates/clients/booking.html +++ /dev/null @@ -1,40 +0,0 @@ -{% extends "frontend/base.html" %} -{% load i18n %} -{% block "content" %} - -
-
-
-
-
-
-

{% blocktrans with booking=object.id %}Buchung #{{ booking }} erfolgreich{% endblocktrans %}

-

{% blocktrans with currency=object.invoice.currency|upper amount=object.budget %}Die Zahlung über {{ currency }} {{ amount }} wurde erfolgreich freigegeben!{% endblocktrans %}

- - -
- - - - - - - - - - - - - - - -
{% trans "Kategorie" %}{% trans "Beschreibung" %}{% trans "Preis" %}
Buchung{{ object.accepted.roomcategory.establishment.name }}
{{ object.arrival }} – {{ object.accepted.departure }}
{{ object.invoice.currency|upper }} {{ object.budget }}
-
- Buchungsbestätigung drucken

-
-
-
-
-
-
-{% endblock %} \ No newline at end of file