2022-10-16 17:19:26 +02:00

105 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html th:replace="~{template :: layout(~{::title}, ~{::libs}, ~{::header}, ~{::content})}" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<title>Camp Organizer Business</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<libs> </libs>
</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/camp/{id}(id=${campId})}" class="btn btn-secondary btn-icon-silent" title="aktualisieren"><i class="fas fa-sync"></i></a>
</header>
<content>
<div class="mainpage">
<div class="container" style="max-width: 100%">
<div class="row">
<div class="col">
<div class="card" style="width: 480px" th:if="${camp != null}">
<div class="card-header">
<span th:text="${camp.name}"></span> von <span th:text="${#numbers.formatInteger(camp.year, 0)}"></span>
</div>
<div class="card-body">
<table class="table">
<tbody>
<tr>
<td>Freizeitname</td>
<th th:text="${camp.name}"></th>
</tr>
<tr>
<td>Zeit</td>
<th><span th:text="${#temporals.format(camp.arrive, 'dd.MM.')}"></span> - <span th:text="${#temporals.format(camp.depart, 'dd.MM.yyyy')}"></span></th>
<tr>
<td>Ort</td>
<th th:text="${camp.locationName}"></th>
</tr>
<tr>
<td>Preis</td>
<th><pre th:utext="${camp.price}"></pre></th>
</tr>
<tr>
<td>bestätigt</td>
<th th:text="${booking.approved}"></th>
</tr>
<tr>
<td>abgelehnt</td>
<th th:text="${booking.rejected}"></th>
</tr>
<tr>
<td>offen</td>
<th th:text="${booking.open}"></th>
</tr>
<tr>
<td>Beiträge</td>
<th><span th:text="${#numbers.formatDecimal(booking.paid, 1, 2) + ' €'}" th:if="${booking.paid != null}"></span></th>
</tbody>
</table>
</div>
</div>
</div>
<div class="col" sec:authorize="hasRole('business_booking')">
<div class="card">
<div class="card-header">Angemeldete Personen</div>
<div class="card-body">
<table id="bookers" class="table">
<thead>
<tr>
<th>Name</th>
<th>Geschlecht</th>
<th>Rolle</th>
<th>Kontostand</th>
<th>Angemeldet</th>
<th>Bestätigt</th>
</tr>
</thead>
<tbody>
<th:block th:each="b : ${bookers}">
<tr>
<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><span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" th:if="${b.paid != null}"></span></td>
<td th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
<td th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#bookers").DataTable({
language: locale_de
});
});
</script>
</div>
</div>
</div>
</div>
</div>
<div class="alert alert-danger" role="alert" th:if="${camp == null}">Es wurde keine Freizeit gefunden, die über diese ID angesprochen werden kann.</div>
</div>
</content>
</body>
</html>