restrict business camp overview by current year

This commit is contained in:
Jottyfan
2025-07-19 20:29:23 +02:00
parent 27c1669ed3
commit 30c2bd5fc0
9 changed files with 74 additions and 25 deletions

View File

@@ -8,7 +8,14 @@
<th:block layout:fragment="content">
<div class="mainpage">
<div class="card" sec:authorize="hasRole('business_booking')">
<div class="card-header">Angemeldete Personen</div>
<div class="card-header d-flex justify-content-between">
<div>Angemeldete Personen</div>
<div>im Jahr
<span class="ml-2" th:each="y : ${years}">
<a th:class="${year == y ? '' : 'tablelink'}" th:href="@{/business/bookings/{year}(year=${y})}" th:text="${y}"></a>
</span>
</div>
</div>
<div class="card-body">
<table id="bookers" class="table table-striped">
<thead>
@@ -25,12 +32,12 @@
<tbody>
<th:block th:each="b : ${bookers}">
<tr>
<td class="middled"><a class="tablelink" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td class="middled"><a class="tablelink" th:href="@{/business/bookings_by_id/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td class="middled" th:text="${b.sex}"></td>
<td class="middled" th:text="${b.camp}"></td>
<td class="middled" th:text="${b.role}"></td>
<td class="middled">
<form action="#" th:action="@{'/business/bookings/listpayment/' + ${b.pk}}" th:object="${addBean}" method="post">
<form action="#" th:action="@{'/business/bookings/listpayment/{id}/{year}(id=${b.pk},year=${year})'}" th:object="${addBean}" method="post">
<input th:id="'searchfield' + ${b.pk}" type="hidden" th:name="search" />
<div class="container">
<div class="row">

View File

@@ -70,7 +70,7 @@
<tbody>
<th:block th:each="b : ${bookers}">
<tr>
<td><a class="tablelink" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td><a class="tablelink" th:href="@{/business/bookings_by_id/{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>