small changes
This commit is contained in:
parent
92cb571ca3
commit
3b33368374
@ -18,7 +18,7 @@ apply plugin: 'war'
|
||||
apply plugin: 'application'
|
||||
|
||||
group = 'de.jottyfan.camporganizer'
|
||||
version = '0.0.1'
|
||||
version = '0.0.2'
|
||||
sourceCompatibility = 17
|
||||
mainClassName = "de.jottyfan.camporganizer.Main"
|
||||
|
||||
|
@ -38,6 +38,7 @@ public class BookingsController {
|
||||
String username = indexService.getCurrentUser(request);
|
||||
model.addAttribute("currentUser", username);
|
||||
model.addAttribute("bookers", bookingsService.getBookers(username));
|
||||
model.addAttribute("addBean", new AddPaymentBean());
|
||||
return "business/bookings";
|
||||
}
|
||||
|
||||
@ -57,6 +58,6 @@ public class BookingsController {
|
||||
public String addBooking(Model model, @ModelAttribute AddPaymentBean bean, @PathVariable Integer id) {
|
||||
Double payment = bean.getPayment();
|
||||
bookingsService.addPayment(id, payment);
|
||||
return getBooking(model, id);
|
||||
return getBookings(model);
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a th:href="@{/}" class="btn btn-secondary btn-icon-silent" title="zur Hauptseite"><i class="fas fa-home"></i></a>
|
||||
<a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent" title="zur Finanzübersicht"><i class="far fa-money-bill-alt"></i></a>
|
||||
<a th:href="@{/business/bookings}" class="btn btn-secondary btn-icon-silent" title="aktualisieren"><i class="fas fa-sync"></i></a>
|
||||
<a th:href="@{/}" class="btn btn-secondary btn-icon-silent" title="zur Hauptseite"><i class="fas fa-home"></i></a> <a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent"
|
||||
title="zur Finanzübersicht"><i class="far fa-money-bill-alt"></i></a> <a th:href="@{/business/bookings}" class="btn btn-secondary btn-icon-silent" title="aktualisieren"><i
|
||||
class="fas fa-sync"></i></a>
|
||||
</header>
|
||||
<content>
|
||||
<div class="mainpage">
|
||||
@ -31,12 +31,14 @@
|
||||
<tbody>
|
||||
<th:block th:each="b : ${bookers}">
|
||||
<tr>
|
||||
<td th:text="${b.name}"></td>
|
||||
<td><a class="btn btn-icon-silent" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
|
||||
<td th:text="${b.sex}"></td>
|
||||
<td th:text="${b.camp}"></td>
|
||||
<td th:text="${b.role}"></td>
|
||||
<td><span th:text="${#strings.replace(#numbers.formatCurrency(b.paid), '¤', '€')}"></span> <a class="btn btn-icon-silent" th:href="@{/business/bookings/{id}(id=${b.pk})}"
|
||||
title="bearbeiten"><i class="fas fa-edit"></i></a></td>
|
||||
<td><span th:text="${#strings.replace(#numbers.formatCurrency(b.paid), '¤', '€')}"></span>
|
||||
<form action="#" th:action="@{'/business/bookings/payment/' + ${b.pk}}" th:object="${addBean}" method="post">
|
||||
<input type="number" step="0.01" th:field="*{payment}"> <input type="submit" style="padding: 4px" value="einzahlen">
|
||||
</form></td>
|
||||
<td th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
|
||||
<td th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
|
||||
</tr>
|
||||
|
@ -76,7 +76,7 @@
|
||||
<tbody>
|
||||
<th:block th:each="b : ${bookers}">
|
||||
<tr>
|
||||
<td th:text="${b.name}"></td>
|
||||
<td><a class="btn btn-icon-silent" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
|
||||
<td th:text="${b.sex}"></td>
|
||||
<td th:text="${b.role}"></td>
|
||||
<td th:text="${#strings.replace(#numbers.formatCurrency(b.paid), '¤', '€')}"></td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user