From 2dc302b8fc70581a96744b84840f3b08b04a5a7c Mon Sep 17 00:00:00 2001 From: Frank Poetzsch-Heffter <p-h@katharineum.de> Date: Sat, 28 Dec 2019 18:56:08 +0100 Subject: [PATCH] reredesign and peanuts --- .../migrations/0003_auto_20191228_1553.py | 18 ++++++++++++++++++ schoolapps/fibu/models.py | 2 +- .../fibu/templates/fibu/booking/index.html | 6 ++++-- schoolapps/fibu/templates/fibu/index.html | 19 +++++++++++++------ schoolapps/fibu/views.py | 2 +- 5 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 schoolapps/fibu/migrations/0003_auto_20191228_1553.py diff --git a/schoolapps/fibu/migrations/0003_auto_20191228_1553.py b/schoolapps/fibu/migrations/0003_auto_20191228_1553.py new file mode 100644 index 000000000..6674b3d95 --- /dev/null +++ b/schoolapps/fibu/migrations/0003_auto_20191228_1553.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.8 on 2019-12-28 14:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('fibu', '0002_auto_20191228_1357'), + ] + + operations = [ + migrations.AlterField( + model_name='account', + name='budget', + field=models.IntegerField(default=0, verbose_name='Budget'), + ), + ] diff --git a/schoolapps/fibu/models.py b/schoolapps/fibu/models.py index aa6d69a4c..43f1bf01c 100644 --- a/schoolapps/fibu/models.py +++ b/schoolapps/fibu/models.py @@ -20,7 +20,7 @@ status_list = [ Status(name='beantragt', style_class='red'), Status(name='abgelehnt', style_class='black'), Status(name='bewilligt', style_class='orange'), - Status(name='bestellt', style_class='darkyellow'), + Status(name='bestellt', style_class='yellow darken-1'), Status(name='eingereicht', style_class='blue'), Status(name='bezahlt', style_class='green'), ] diff --git a/schoolapps/fibu/templates/fibu/booking/index.html b/schoolapps/fibu/templates/fibu/booking/index.html index 92299a9eb..7a843f8c3 100755 --- a/schoolapps/fibu/templates/fibu/booking/index.html +++ b/schoolapps/fibu/templates/fibu/booking/index.html @@ -17,8 +17,9 @@ <table> <thead> <tr> - <th>Anschaffungswunsch</th> - <th class="right-align">Geplanter Betrag</th> + <th>Artikelbeschreibung</th> + <th class="right-align">erwarteter Betrag</th> + <th class="right-align">Rechnungsbetrag</th> <th>Buchungskonto</th> <th>Antragsteller</th> <th>Status</th> @@ -31,6 +32,7 @@ <a href="{% url "booking_book" booking.id %}">{{ booking.description }}</a> </td> <td class="right-align">{{ booking.planned_amount }} €</td> + <td class="right-align">{{ booking.amount }} €</td> <td>{{ booking.account|default:"" }}</td> <td>{{ booking.contact.get_full_name }}</td> <td> diff --git a/schoolapps/fibu/templates/fibu/index.html b/schoolapps/fibu/templates/fibu/index.html index 85fc802f4..51d38be8e 100755 --- a/schoolapps/fibu/templates/fibu/index.html +++ b/schoolapps/fibu/templates/fibu/index.html @@ -34,16 +34,23 @@ </div> </form> - +<div class="collection-item row"> + <div class="col s5"><strong>Beschreibung</strong></div> + <div class="col s2 right-align"><strong>erwarteter Betrag</strong></div> + <div class="col s2 right-align"><strong>Rechnungsbetrag</strong></div> + <div class="col s1 center-align"><strong>Status</strong></div> + <div class="col s2 center-align"><strong>Aktionen</strong></div> + </div> <div class="collection"> {% for booking in bookings %} <div class="collection-item row"> - <div class="col s12 m7">{{ booking.description }}</div> - <span class="col s12 m1 right-align">{{ booking.planned_amount }} €</span> - <div class="col s12 m1"> + <div class="col s5">{{ booking.description }}</div> + <div class="col s2 right-align">{{ booking.planned_amount }} €</div> + <div class="col s2 right-align">{{ booking.amount }} €</div> + <div class="col s1"> <span class="badge new {{ booking.get_status.style_class }}">{{ booking.get_status.name }}</span> </div> - <span class="col s12 m3"> + <div class="col s2"> {# Delete #} {% if booking.status < 3 %} <form action="" method="POST" class="right"> @@ -93,7 +100,7 @@ </button> {% endif %} </form> - </span> + </div> </div> {% endfor %} </div> diff --git a/schoolapps/fibu/views.py b/schoolapps/fibu/views.py index 2abc201e0..01047ee50 100644 --- a/schoolapps/fibu/views.py +++ b/schoolapps/fibu/views.py @@ -209,7 +209,7 @@ def account(request): messages.success(request, "Das Buchungskonto wurde erfolgreich angelegt.") return redirect('account') - accounts = Account.objects.filter() + accounts = Account.objects.filter().order_by('costcenter','-income','name') context = {'accounts': accounts, 'form': form} return render(request, 'fibu/account/index.html', context) -- GitLab