Voucher dummy implementation, closing #3 and #4 for now

This commit is contained in:
Kumi 2021-05-30 12:55:21 +02:00
parent 9db5b528be
commit 12e04ab4d4
3 changed files with 16 additions and 6 deletions

View file

@ -4,4 +4,6 @@ from django.contrib.auth import get_user_model
from localauth.models import Profile from localauth.models import Profile
class ClientProfile(Profile): class ClientProfile(Profile):
pass @property
def balance(self):
return 0.0

View file

@ -242,6 +242,14 @@
<span>2</span> <span>2</span>
<h3>{% trans "Zahlungsdaten" %}</h3> <h3>{% trans "Zahlungsdaten" %}</h3>
</div><!-- end lg-bform-heading --> </div><!-- end lg-bform-heading -->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>{% trans "Gutscheincode" %} (aktuelles Guthaben: € {{ request.user.clientprofile.balance | floatformat:2 }})</label>
<input type="text" class="form-control" id="id_state" name="voucher" {% if not request.user.is_authenticated %}disabled{% endif %} value=""/><button class="btn btn-secondary" type="button">Gutschein anwenden</button>
</div>
</div><!-- end columns -->
<input type="hidden" name="gateway" id="id_gateway" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} /> <input type="hidden" name="gateway" id="id_gateway" {% if request.user.is_authenticated %}required{% else %}disabled{% endif %} />
<div id="payment-tabs" class="payment-tabs"> <div id="payment-tabs" class="payment-tabs">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">

View file

@ -7,7 +7,7 @@
<div class="col-md-6 col-lg-3"> <div class="col-md-6 col-lg-3">
<div class="stat-block"> <div class="stat-block">
<span><i class="fa fa-heart"></i></span> <span><i class="fa fa-heart"></i></span>
<h3>4</h3> <h3>0</h3>
<p>Bewertungen</p> <p>Bewertungen</p>
</div><!-- end stat-block --> </div><!-- end stat-block -->
</div><!-- end columns --> </div><!-- end columns -->
@ -15,15 +15,15 @@
<div class="col-md-6 col-lg-3"> <div class="col-md-6 col-lg-3">
<div class="stat-block"> <div class="stat-block">
<span><i class="fa fa-euro-sign"></i></span> <span><i class="fa fa-euro-sign"></i></span>
<h3>12345</h3> <h3>{{ object.balance | floatformat:2 }}</h3>
<p>Euro</p> <p>Euro Guthaben</p>
</div><!-- end stat-block --> </div><!-- end stat-block -->
</div><!-- end columns --> </div><!-- end columns -->
<div class="col-md-6 col-lg-3"> <div class="col-md-6 col-lg-3">
<div class="stat-block"> <div class="stat-block">
<span><i class="fa fa-building"></i></span> <span><i class="fa fa-building"></i></span>
<h3>12</h3> <h3>1</h3>
<p>Städte</p> <p>Städte</p>
</div><!-- end stat-block --> </div><!-- end stat-block -->
</div><!-- end columns --> </div><!-- end columns -->
@ -31,7 +31,7 @@
<div class="col-md-6 col-lg-3"> <div class="col-md-6 col-lg-3">
<div class="stat-block"> <div class="stat-block">
<span><i class="fa fa-paper-plane"></i></span> <span><i class="fa fa-paper-plane"></i></span>
<h3>102</h3> <h3>3</h3>
<p>Reisen</p> <p>Reisen</p>
</div><!-- end stat-block --> </div><!-- end stat-block -->
</div><!-- end columns --> </div><!-- end columns -->