still buggy on rejecting people and loading old bookings

This commit is contained in:
Jottyfan
2024-10-23 22:42:15 +02:00
parent ae9e2018a8
commit b5403ae20c
26 changed files with 198 additions and 155 deletions

View File

@ -32,10 +32,10 @@
<div class="accordion" id="acc" th:if="${mybookings.size() > 0}" style="max-width: 800px; margin-left: auto; margin-right: auto">
<div class="accordion-item" th:each="b : ${mybookings}">
<h2 class="accordion-header" th:id="'acc-head-' + ${b.pk}" th:if="${b.pk}">
<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.accept}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}"
<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.progress == 'approved'}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}"
aria-expanded="true" th:aria-controls="'#acc-body-' + ${b.pk}">
<i class="fas fa-check framed framed-green" th:if="${b.accept}"></i> <i class="fas fa-ban framed framed-red" th:if="${b.accept} == false"></i> <i
class="fas fa-question framed framed-orange" th:if="${b.accept} == null"></i>
<i class="fas fa-check framed framed-green" th:if="${b.progress} == 'approved'"></i> <i class="fas fa-ban framed framed-red" th:if="${b.progress} == 'rejected'"></i> <i
class="fas fa-question framed framed-orange" th:if="${b.progress} == 'requested'"></i>
<span th:text="${b.forename + ' ' + b.surname + ' für ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" class="headlinefont"></span>
</button>
</h2>
@ -62,7 +62,7 @@
</div>
</div>
</div>
<div class="card" th:if="${b.accept}">
<div class="card" th:if="${b.progress} == 'approved'">
<div class="card-header">Dokumente</div>
<div class="card-body">
<div class="container">
@ -150,8 +150,8 @@
<div class="alert alert-primary" th:if="${b.created != null}">
angemeldet am <span th:text="${#temporals.format(b.created, 'dd.MM.yyyy')}"></span> von <span th:text="${b.subscriber}"></span>
</div>
<div th:class="'alert ' + ${b.accept ? 'alert-success' : 'alert-danger'}" th:if="${b.accept != null}">
<span th:text="${b.accept ? 'bestätigt' : 'abgelehnt'}"></span> von <span th:text="${b.registrator}"></span>
<div th:class="'alert ' + ${b.progress} == 'approved' ? 'alert-success' : 'alert-danger'}" th:if="${b.progress} != 'requested'}">
<span th:text="${b.progress} == 'approved'">bestätigt</span><span th:text="${b.progress} == 'rejected'">abgelehnt</span> von <span th:text="${b.registrator}"></span>
</div>
<div class="alert alert-warning" th:if="${b.isOver}">Die Freizeit ist bereits vorbei.</div>
</div>