confirmation accepts deletion of revoked registrations
This commit is contained in:
		| @@ -121,19 +121,20 @@ div { | ||||
| 		!important; | ||||
| } | ||||
|  | ||||
| .acc_true { | ||||
| 	background-image: linear-gradient(to bottom right, #cfc, #afa) | ||||
| 		!important; | ||||
| .acc_approved { | ||||
| 	background: #aaffaa !important; | ||||
| } | ||||
|  | ||||
| .acc_false { | ||||
| 	background-image: linear-gradient(to bottom right, #fcc, #faa) | ||||
| 		!important; | ||||
| .acc_rejected { | ||||
| 	background: #ffaaaa !important; | ||||
| } | ||||
|  | ||||
| .acc_null { | ||||
| 	background-image: linear-gradient(to bottom right, #fdb, #fca) | ||||
| 		!important; | ||||
| .acc_revoked { | ||||
| 	background:  rgb(220, 138, 221) !important; | ||||
| } | ||||
|  | ||||
| .acc_requested { | ||||
| 	background:  rgb(255, 190, 111) !important; | ||||
| } | ||||
|  | ||||
| .right-dist { | ||||
| @@ -303,6 +304,17 @@ div { | ||||
| 	margin: 0px 2px 0px 2px; | ||||
| } | ||||
|  | ||||
| .badgeerror { | ||||
| 	border-radius: 8px; | ||||
| 	border: 1px solid black; | ||||
| 	color: white; | ||||
| 	font-weight: bolder; | ||||
| 	background-image: linear-gradient(to right bottom, rgb(246, 97, 81), | ||||
| 		rgb(165, 29, 45)); | ||||
| 	padding: 2px 4px 2px 4px; | ||||
| 	margin: 0px 2px 0px 2px; | ||||
| } | ||||
|  | ||||
| .dist8 { | ||||
| 	margin: 8px; | ||||
| } | ||||
| @@ -333,19 +345,19 @@ div { | ||||
| } | ||||
|  | ||||
| .framed-green { | ||||
| 	background: linear-gradient(to bottom right, lime, darkgreen); | ||||
| 	background: linear-gradient(to bottom right, darkgreen, lime); | ||||
| 	color: white; | ||||
| 	border: 1px solid green; | ||||
| } | ||||
|  | ||||
| .framed-red { | ||||
| 	background: linear-gradient(to bottom right, red, darkred); | ||||
| 	background: linear-gradient(to bottom right, darkred, red); | ||||
| 	color: white; | ||||
| 	border: 1px solid red; | ||||
| } | ||||
|  | ||||
| .framed-orange { | ||||
| 	background: linear-gradient(to bottom right, orange, #bf6c06); | ||||
| 	background: linear-gradient(to bottom right, #bf6c06, orange); | ||||
| 	color: white; | ||||
| 	border: 1px solid orange; | ||||
| } | ||||
| @@ -357,9 +369,9 @@ div { | ||||
| } | ||||
|  | ||||
| .framed-pink { | ||||
| 	background: linear-gradient(to bottom right, #9141ac, #613583); | ||||
| 	color: #9141ac; | ||||
| 	border: 1px solid #613583; | ||||
| 	background: linear-gradient(to bottom right, #3b115b, #d18be8); | ||||
| 	color: #f8effb; | ||||
| 	border: 1px solid #4a0084; | ||||
| } | ||||
|  | ||||
| .nomaxwidth { | ||||
|   | ||||
| @@ -44,7 +44,7 @@ | ||||
| 			</div> | ||||
| 			<div class="accordion-item"> | ||||
| 				<h2 class="accordion-header" id="approvedpanel"> | ||||
| 					<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#approveddiv" aria-expanded="true" aria-control="approveddiv">kürzlich bestätigte | ||||
| 					<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#approveddiv" aria-expanded="true" aria-control="approveddiv">bestätigte | ||||
| 						Anmeldungen</button> | ||||
| 				</h2> | ||||
| 				<div id="approveddiv" class="accordion-collapse collapse dist8" aria-labelled="approvedpanel" data-bs-parent="#mainacc"> | ||||
| @@ -79,7 +79,7 @@ | ||||
| 			</div> | ||||
| 			<div class="accordion-item"> | ||||
| 				<h2 class="accordion-header" id="rejectedpanel"> | ||||
| 					<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#rejecteddiv" aria-expanded="true" aria-control="rejecteddiv">kürzlich abgelehnte | ||||
| 					<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#rejecteddiv" aria-expanded="true" aria-control="rejecteddiv">abgelehnte | ||||
| 						Anmeldungen</button> | ||||
| 				</h2> | ||||
| 				<div id="rejecteddiv" class="accordion-collapse collapse dist8" aria-labelled="rejectedpanel" data-bs-parent="#mainacc"> | ||||
| @@ -112,6 +112,41 @@ | ||||
| 					</script> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="accordion-item"> | ||||
| 				<h2 class="accordion-header" id="revokedpanel"> | ||||
| 					<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#revokeddiv" aria-expanded="true" aria-control="revokeddiv">stornierte | ||||
| 						Anmeldungen</button> | ||||
| 				</h2> | ||||
| 				<div id="revokeddiv" class="accordion-collapse collapse dist8" aria-labelled="revokedpanel" data-bs-parent="#mainacc"> | ||||
| 					<table id="revoked"> | ||||
| 						<thead> | ||||
| 							<tr> | ||||
| 								<th>Freizeit</th> | ||||
| 								<th>Name</th> | ||||
| 								<th>Rolle</th> | ||||
| 								<th>Anmeldedatum</th> | ||||
| 							</tr> | ||||
| 						</thead> | ||||
| 						<tbody> | ||||
| 							<tr th:each="u : ${revoked}"> | ||||
| 								<td><a th:href="@{'/confirmation/person/' + ${u.pkPerson}}" th:text="${u.camp} + ' ' + ${#temporals.format(u.date, 'yyyy')}"></a></td> | ||||
| 								<td><a th:href="@{'/confirmation/person/' + ${u.pkPerson}}" th:text="${u.fullname}"></a></td> | ||||
| 								<td><a th:href="@{'/confirmation/person/' + ${u.pkPerson}}" th:text="${u.rolename}"></a></td> | ||||
| 								<td><a th:href="@{'/confirmation/person/' + ${u.pkPerson}}" th:text="${#temporals.format(u.registered, 'yyyy-MM-dd')}"></a></td> | ||||
| 							</tr> | ||||
| 						</tbody> | ||||
| 					</table> | ||||
| 					<script type="text/javascript"> | ||||
| 						$(document).ready(function() { | ||||
| 							$("#revoked").DataTable({ | ||||
| 								language : locale_de, | ||||
| 								pageLength : 5, | ||||
| 								lengthMenu : [ [ 5, 25, 50, -1 ], [ 5, 25, 50, "Alle" ] ] | ||||
| 							}); | ||||
| 						}); | ||||
| 					</script> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="accordion-item"> | ||||
| 				<h2 class="accordion-header" id="overviewpanel"> | ||||
| 					<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#overviewdiv" aria-expanded="true" aria-control="overviewdiv">Freizeitenübersicht</button> | ||||
| @@ -127,14 +162,14 @@ | ||||
| 						<tbody> | ||||
| 							<tr th:each="o : ${campoverview}"> | ||||
| 								<td th:text="${o.camp} + ' ' + ${#temporals.format(o.date, 'yyyy')}"></td> | ||||
| 								<td><span th:text="${o.untouched}" class="badgetodo"></span> / <span th:text="${o.rejected}" class="badgewarn"></span> / <span th:text="${o.approved}" class="badgeinfo"></span></td> | ||||
| 								<td><span th:text="${o.untouched}" class="badgetodo"></span> / <span th:text="${o.rejected}" class="badgewarn"></span> / <span th:text="${o.approved}" class="badgeinfo"></span> / <span th:text="${o.revoked}" class="badgeerror"></span></td> | ||||
| 							</tr> | ||||
| 						</tbody> | ||||
| 						<tfoot> | ||||
| 							<tr> | ||||
| 								<td>Zusammenfassung</td> | ||||
| 								<td><span th:text="${campoverviewsummary.untouched}" class="badgetodo"></span> / <span th:text="${campoverviewsummary.rejected}" class="badgewarn"></span> / <span | ||||
| 									th:text="${campoverviewsummary.approved}" class="badgeinfo"></span></td> | ||||
| 									th:text="${campoverviewsummary.approved}" class="badgeinfo"></span> / <span	th:text="${campoverviewsummary.revoked}" class="badgeerror"></span></td> | ||||
| 						</tfoot> | ||||
| 					</table> | ||||
| 					<script type="text/javascript"> | ||||
| @@ -146,7 +181,7 @@ | ||||
| 							}); | ||||
| 						}); | ||||
| 					</script> | ||||
| 					<span>Legende:</span><span class="badgetodo">unbearbeitet</span><span class="badgewarn">abgelehnt</span><span class="badgeinfo">bestätigt</span> | ||||
| 					<span>Legende:</span><span class="badgetodo">unbearbeitet</span><span class="badgewarn">abgelehnt</span><span class="badgeinfo">bestätigt</span><span class="badgeerror">storniert</span> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="accordion-item"> | ||||
|   | ||||
| @@ -112,11 +112,22 @@ | ||||
|           </div> | ||||
|           <div class="row mb-2"> | ||||
|             <label for="inputAccept" class="col-sm-2 col-form-label">Status</label> | ||||
|             <div class="col-sm-10"> | ||||
|               <select th:field="*{progress}"> | ||||
|               	<option th:each="p : ${progresses}" value="${p}"><th:block th:text="${p}"></th:block></option> | ||||
|             <span class="col-sm-2 btn btn-outline-warning" th:if="${person.progress} == 'requested'">offen</span> | ||||
|             <span class="col-sm-2 btn btn-outline-success" th:if="${person.progress} == 'approved'">bestätigt</span> | ||||
|             <span class="col-sm-2 btn btn-outline-danger" th:if="${person.progress} == 'rejected'">abgelehnt</span> | ||||
|             <span class="col-sm-2 btn btn-outline-secondary" th:if="${person.progress} == 'revoked'">storniert</span> | ||||
|             <div class="col-sm-8" th:if="${#lists.contains({'requested', 'approved', 'rejected'}, person.progress)}"> | ||||
|               <select th:field="*{progress}" class="form-select"> | ||||
|               	<option value="requested">offen</option> | ||||
|               	<option value="approved">bestätigt</option> | ||||
|               	<option value="rejected">abgelehnt</option> | ||||
|               </select> | ||||
|             </div> | ||||
|             <div class="col-sm-8" th:if="${person.progress} == 'revoked'"> | ||||
|               <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal"> | ||||
|   							<i class="fas fa-trash"></i> endgültig löschen | ||||
| 							</button> | ||||
|             </div> | ||||
|           </div> | ||||
|           <div class="row mb-2"> | ||||
|             <label for="inputAccept" class="col-sm-2 col-form-label"></label> | ||||
| @@ -126,6 +137,26 @@ | ||||
|             </div> | ||||
|           </div> | ||||
|         </form> | ||||
| 				<div class="modal fade" id="deleteModal" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true"> | ||||
| 				  <div class="modal-dialog"> | ||||
| 				    <div class="modal-content"> | ||||
| 				      <div class="modal-header bg-danger"> | ||||
| 				        <h1 class="modal-title fs-5" id="deleteModalLabel">Löschen der Anmeldung</h1> | ||||
| 				        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||||
| 				      </div> | ||||
| 				      <div class="modal-body"> | ||||
| 				        Willst du wirklich die Anmeldung von <span th:text="${person.forename}" class="text-danger"></span> <span th:text="${person.surname}" class="text-danger"></span> an der Freizeit | ||||
| 				        <select class="form-select locked" th:field="${person.fkCamp}" disabled="disabled"> | ||||
|              				<option th:each="c : ${camps}" th:value="${c.pk}" th:text="${c.name} + ' ' + ${#temporals.format(c.arrive, 'yyyy')} + ' in ' + ${c.location}"></option> | ||||
|            				</select> löschen? Sie geht damit unwiederbringlich verloren. | ||||
| 				      </div> | ||||
| 				      <div class="modal-footer"> | ||||
| 				        <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Abbrechen</button> | ||||
| 				        <a th:href="@{/registration/remove/{id}(id=${person.pk})}" class="btn btn-danger">ja, wirklich löschen</a> | ||||
| 				      </div> | ||||
| 				    </div> | ||||
| 				  </div> | ||||
| 				</div> | ||||
|         <div th:if="${person == null}" class="error">In der Datenbank wurde keine Person mit entsprechender ID gefunden.</div> | ||||
|       </div> | ||||
|     </div> | ||||
|   | ||||
| @@ -32,11 +32,13 @@ | ||||
| 			<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.progress == 'approved'}" 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}" 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.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> | ||||
| 							<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> | ||||
| 							<i class="fas fa-trash framed framed-pink" th:if="${b.progress} == 'revoked'"></i> | ||||
| 							<span th:text="${b.forename + ' ' + b.surname + ' @ ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" class="headlinefont"></span> | ||||
| 						</button> | ||||
| 					</h2> | ||||
| 					<div th:id="'acc-body-' + ${b.pk}" class="accordion-collapse collapse" th:aria-labelledby="'acc-head-' + ${b.pk}"> | ||||
| @@ -139,8 +141,11 @@ | ||||
| 												<div class="col-sm-8"> | ||||
| 													<input type="submit" class="btn btn-primary" value="Änderungen übernehmen" /> | ||||
| 												</div> | ||||
| 												<div class="col-sm-2"> | ||||
| 													<a th:href="@{/registration/cancel/{id}(id=${b.pk})}" class="btn btn-outline-danger" th:if="${!b.isOver}">stornieren</a> | ||||
| 												<div class="col-sm-2" th:if="${b.progress != 'revoked'}"> | ||||
| 													<a th:href="@{/registration/revoke/{id}(id=${b.pk})}" class="btn btn-outline-danger" th:if="${!b.isOver}">stornieren</a> | ||||
| 												</div> | ||||
| 												<div class="col-sm-2" th:if="${b.progress == 'revoked'}"> | ||||
| 													<a th:href="@{/registration/unrevoke/{id}(id=${b.pk})}" class="btn btn-outline-success" th:if="${!b.isOver}">Stornierung aufheben</a> | ||||
| 												</div> | ||||
| 											</div> | ||||
| 										</div> | ||||
| @@ -150,8 +155,12 @@ | ||||
| 							<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.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 class="alert alert-danger" th:if="${b.progress == 'revoked'}"> | ||||
| 								storniert von <span th:text="${b.subscriber}"></span> | ||||
| 							</div> | ||||
| 							<div th:class="'alert alert-' + (${b.progress} == 'approved' ? 'success' : 'danger')" th:if="${#lists.contains({'approved', 'rejected'}, b.progress)}"> | ||||
| 								<span th:if="${b.progress} == 'approved'">bestätigt</span> | ||||
| 								<span th:if="${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> | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
| 						th:if="${bean.isDirector}">Leiter</span><span th:if="${bean.isFeeder}">Küchenhilfe</span> | ||||
| 				</div> | ||||
| 				<div class="card-footer"> | ||||
| 					<a th:href="@{/registration/remove/{id}(id=${bean.pk})}" class="btn btn-danger">Ja, stornieren</a>  <a th:href="@{/dashboard}" class="btn btn-outline-success">Stornierung abbrechen</a> | ||||
| 					<a th:href="@{/registration/revoke/{id}(id=${bean.pk})}" class="btn btn-danger">Ja, stornieren</a>  <a th:href="@{/dashboard}" class="btn btn-outline-success">Stornierung abbrechen</a> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user