2023-11-09 20:21:34 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
|
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
2023-11-13 20:09:39 +01:00
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
|
layout:decorate="~{layout.html(title='Katalog bearbeiten')}">
|
|
|
|
|
2023-11-09 20:21:34 +01:00
|
|
|
<body>
|
2023-11-15 17:27:04 +01:00
|
|
|
<div layout:fragment="content">
|
2023-11-13 20:09:39 +01:00
|
|
|
<input type="hidden" name="addCatalog">
|
|
|
|
<div class="content">
|
|
|
|
<h2>Dienstleistung</h2>
|
2023-11-15 17:27:04 +01:00
|
|
|
<label class="form-label" for="events"></label>
|
2023-11-13 20:09:39 +01:00
|
|
|
<form th:object="${formCatalogEntry}" method="post" th:action="@{/catalog_editor/chooseEvent}">
|
2023-11-15 17:27:04 +01:00
|
|
|
<select class="form-select w-auto d-inline-block" name="events" id="events">
|
2023-11-13 20:09:39 +01:00
|
|
|
<option value="event_catering">Eventcatering</option>
|
2023-11-21 11:34:25 +01:00
|
|
|
<option value="sushi_night">Sushi Night</option>
|
2023-11-13 20:09:39 +01:00
|
|
|
<option value="mobile_breakfast">Mobile Breakfast</option>
|
|
|
|
<option value="rent_a_cook">Rent-a-Cook</option>
|
|
|
|
</select>
|
2023-11-15 17:27:04 +01:00
|
|
|
<button class="btn btn-secondary" type="submit">Event auswählen</button>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
|
|
|
Eventbasispreis: 500€
|
2023-11-09 20:21:34 +01:00
|
|
|
|
2023-11-13 20:09:39 +01:00
|
|
|
<h2>Mindestzeitraum</h2>
|
|
|
|
<form th:object="${formCatalogEntry}" method="post" th:action="@{/catalog_editor/add_time}">
|
2023-11-15 17:27:04 +01:00
|
|
|
<label class="form-label">Mindestzeitraum:</label>
|
2023-11-13 20:09:39 +01:00
|
|
|
<input type="hidden" th:field="*{eventType}">
|
2023-11-15 17:27:04 +01:00
|
|
|
<input class="form-control w-auto d-inline-block" th:field="*{minimumTimePeriod}" type="number" min="0" step="1" value="1"/>
|
|
|
|
<button class="btn btn-secondary" type="submit">Zum Model hinzufügen</button>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
2023-11-10 18:35:12 +01:00
|
|
|
|
2023-11-13 20:09:39 +01:00
|
|
|
<h2>Basisausstattung</h2>
|
2023-11-15 17:27:04 +01:00
|
|
|
<table class="table">
|
2023-11-13 20:09:39 +01:00
|
|
|
<tr>
|
|
|
|
<th>Produktname</th>
|
|
|
|
<th>Menge</th>
|
|
|
|
<th>Stückpreis</th>
|
|
|
|
</tr>
|
|
|
|
<tr th:each="item : ${inventory}">
|
|
|
|
<td th:text="${item.getName()}">
|
|
|
|
<td th:text="${item.getAmount()}">
|
|
|
|
<td th:text="${item.getCost()}"> €
|
|
|
|
<td>
|
|
|
|
<form method="post" th:action="@{/catalog_editor/remove_product}">
|
2023-11-15 17:27:04 +01:00
|
|
|
<input class="form-control w-auto d-inline-block" type="hidden" name="id" th:value="${item.getItemId()}">
|
|
|
|
<button class="btn btn-danger" type="submit">Entfernen</button>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
|
|
|
</td>
|
2023-11-15 17:27:04 +01:00
|
|
|
</tr>
|
2023-11-13 20:09:39 +01:00
|
|
|
</table>
|
|
|
|
<form method="post" th:action="@{/catalog_editor/product_add}">
|
2023-11-15 17:27:04 +01:00
|
|
|
<label class="form-label" for="name">Produktname</label>
|
|
|
|
<input class="form-control w-auto d-inline-block" type="text" id="name" name="name" required>
|
|
|
|
<label class="form-label" for="amount">Menge</label>
|
|
|
|
<input class="form-control w-auto d-inline-block" type="number" id="amount" name="amount" min="1" required>
|
2023-11-13 20:09:39 +01:00
|
|
|
<input type="hidden" name="cost" value="50.0">
|
2023-11-15 17:27:04 +01:00
|
|
|
<button class="btn btn-primary" type="submit">Artikel hinzufügen</button>
|
|
|
|
</form>
|
2023-11-13 20:09:39 +01:00
|
|
|
<br>
|
|
|
|
<h3>Momentane Auswahl</h3>
|
|
|
|
Eventtyp: <span th:text="${formCatalogEntry.getEventType()}"></span><br>
|
|
|
|
Mindestzeitraum: <span th:text="${formCatalogEntry.getMinimumTimePeriod()}"></span><br>
|
|
|
|
<span>Gesamtpreis: 90 €</span>
|
|
|
|
<form method="post" th:action="@{/catalog_editor/catalog_add}" th:object="${formCatalogEntry}">
|
|
|
|
<input type="hidden" name="eventType" th:value="${formCatalogEntry.getEventType()}">
|
|
|
|
<input type="hidden" name="products" th:value="${inventory}">
|
|
|
|
<input type="hidden" name="minimumTimePeriod" th:value="${formCatalogEntry.getMinimumTimePeriod}">
|
|
|
|
<input type="hidden" name="totalCost" th:value="${formCatalogEntry.getTotalCost()}">
|
2023-11-15 17:27:04 +01:00
|
|
|
<button class="btn btn-primary" type="submit">Zum Katalog hinzufügen</button>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-11-15 17:27:04 +01:00
|
|
|
</div>
|
2023-11-09 20:21:34 +01:00
|
|
|
</body>
|
|
|
|
</html>
|