2023-11-10 17:09:39 +01:00
|
|
|
<!DOCTYPE html>
|
2023-11-16 17:24:49 +01:00
|
|
|
<html
|
|
|
|
xmlns:th="http://www.thymeleaf.org"
|
2023-11-13 20:09:39 +01:00
|
|
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
2023-11-16 17:24:49 +01:00
|
|
|
layout:decorate="~{layout.html(title='Angestellte')}"
|
|
|
|
>
|
|
|
|
<head> </head>
|
2023-11-10 17:09:39 +01:00
|
|
|
<body>
|
2023-11-15 17:27:04 +01:00
|
|
|
<div layout:fragment="content">
|
|
|
|
<div>
|
2023-11-13 20:09:39 +01:00
|
|
|
<h2>Mitarbeiterdetails</h2>
|
2023-11-15 17:27:04 +01:00
|
|
|
<table class="table">
|
2023-11-13 20:09:39 +01:00
|
|
|
<tr>
|
2023-11-16 17:24:49 +01:00
|
|
|
<th>Name</th>
|
2023-11-13 20:09:39 +01:00
|
|
|
<th>Beruf</th>
|
2023-12-04 11:34:07 +01:00
|
|
|
<th>Lohn</th>
|
2023-11-15 17:27:04 +01:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
2023-11-13 20:09:39 +01:00
|
|
|
</tr>
|
2023-11-10 17:09:39 +01:00
|
|
|
|
2023-11-23 16:57:44 +01:00
|
|
|
<tr th:each="employee : ${staff}">
|
|
|
|
<td th:text="${employee.name}">Max</td>
|
|
|
|
<td th:text="${employee.job}">Koch</td>
|
2023-12-04 11:34:07 +01:00
|
|
|
<td th:text="${employee.wage}"></td>
|
2023-11-13 20:09:39 +01:00
|
|
|
<td>
|
2023-11-23 16:57:44 +01:00
|
|
|
<a th:href="@{'/staff/edit/' + ${employee.id}}"
|
2023-11-16 17:24:49 +01:00
|
|
|
><button class="btn btn-warning">Bearbeiten</button></a
|
|
|
|
>
|
2023-11-13 20:09:39 +01:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form th:action="@{/staff/remove}" method="post">
|
2023-11-23 16:57:44 +01:00
|
|
|
<input type="hidden" th:name="id" th:value="${employee.id}" />
|
2023-11-15 17:27:04 +01:00
|
|
|
<button type="submit" class="btn btn-danger">Entfernen</button>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
<div>
|
2023-11-13 20:09:39 +01:00
|
|
|
<h2>Personal Hinzufügen</h2>
|
2023-11-28 09:48:06 +01:00
|
|
|
<form th:object="${form}" th:action="@{/staff/add}" method="post">
|
2023-11-15 17:27:04 +01:00
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="name">Name</label>
|
2023-11-28 09:48:06 +01:00
|
|
|
<input class="form-control" type="text" th:field="*{name}" th:errorclass="is-invalid" required>
|
|
|
|
<div th:if="${#fields.hasErrors('name')}" class="invalid-feedback">Ungültiger Name</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
</div>
|
2023-12-04 11:34:07 +01:00
|
|
|
<div class="mb-3">
|
|
|
|
<label class="form-label" for="wage">Lohn</label>
|
|
|
|
<input class="form-control" type="text" th:field="*{wage}" th:errorclass="is-invalid" required>
|
|
|
|
<div th:if="${#fields.hasErrors('wage')}" class="invalid-feedback">Ungültiger Lohn</div>
|
|
|
|
</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
<div class="mb-3">
|
2023-11-21 16:02:42 +01:00
|
|
|
<label class="form-label" for="job">Beruf:</label>
|
2023-11-28 09:48:06 +01:00
|
|
|
<select th:field="*{job}" class="form-select" th:errorclass="is-invalid">
|
2023-11-21 16:02:42 +01:00
|
|
|
<option th:each="type : ${T(catering.staff.JobType).values()}" th:value="${type}" th:text="${type}" required></option>
|
|
|
|
</select>
|
2023-11-28 09:48:06 +01:00
|
|
|
<div th:if="${#fields.hasErrors('job')}" class="invalid-feedback">Ungültiger Job</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
</div>
|
|
|
|
<button class="btn btn-primary" type="submit">Hinzufügen</button>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
</div>
|
2023-11-10 17:09:39 +01:00
|
|
|
</body>
|
|
|
|
</html>
|