mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-23 05:13:42 +02:00
75 lines
3.4 KiB
HTML
75 lines
3.4 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
layout:decorate="~{layout.html(title='Katalog bearbeiten')}">
|
|
|
|
<body>
|
|
<div layout:fragment="content">
|
|
<input type="hidden" name="addCatalog">
|
|
<div class="content">
|
|
<h2>Dienstleistung</h2>
|
|
<label class="form-label" for="events"></label>
|
|
<form th:object="${formCatalogEntry}" method="post" th:action="@{/catalog_editor/chooseEvent}">
|
|
<select class="form-select w-auto d-inline-block" name="events" id="events">
|
|
<option value="event_catering">Eventcatering</option>
|
|
<option value="party_service">Partyservice</option>
|
|
<option value="mobile_breakfast">Mobile Breakfast</option>
|
|
<option value="rent_a_cook">Rent-a-Cook</option>
|
|
</select>
|
|
<button class="btn btn-secondary" type="submit">Event auswählen</button>
|
|
</form>
|
|
Eventbasispreis: 500€
|
|
|
|
<h2>Mindestzeitraum</h2>
|
|
<form th:object="${formCatalogEntry}" method="post" th:action="@{/catalog_editor/add_time}">
|
|
<label class="form-label">Mindestzeitraum:</label>
|
|
<input type="hidden" th:field="*{eventType}">
|
|
<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>
|
|
</form>
|
|
|
|
<h2>Basisausstattung</h2>
|
|
<table class="table">
|
|
<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}">
|
|
<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>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<form method="post" th:action="@{/catalog_editor/product_add}">
|
|
<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>
|
|
<input type="hidden" name="cost" value="50.0">
|
|
<button class="btn btn-primary" type="submit">Artikel hinzufügen</button>
|
|
</form>
|
|
<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()}">
|
|
<button class="btn btn-primary" type="submit">Zum Katalog hinzufügen</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|