(Partial) Implement of listedArticlesEdit.html

This commit is contained in:
CodeSteak 2020-01-12 19:42:04 +01:00
parent c162b4d59e
commit 4d153b8d87
4 changed files with 162 additions and 5 deletions

View File

@ -49,6 +49,9 @@ public class RequestController {
@GetMapping("/employee/listedarticles")
public String listedarticles() { return "listedArticles";}
@GetMapping("/employee/listedarticlesedit")
public String listedarticlesedit() { return "listedArticlesEdit";}
@GetMapping("/login")
public String login(@CookieValue(value = "loginToken", defaultValue = "") String loginToken, Model model) {
model.addAttribute(new Customer());

View File

@ -6,6 +6,11 @@ img.s {
width: var(--u4);
}
img.m {
width: var(--u8);
}
.full-width {
width: 100%;
}
@ -17,3 +22,34 @@ span.checked::after {
span.unchecked::after {
content: "❌";
}
input.linestyle {
background-color: transparent;
border-bottom: var(--u-4) solid var(--c-primary);
border-radius: 0px;
padding: 0px;
}
.formgrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
grid-template-rows: auto;
grid-column-gap: var(--u0);
}
.formgrid > .s {
grid-column: span 1;
}
.formgrid > .m {
grid-column: span 2;
}
.formgrid > .l {
grid-column: span 3;
}
.formgrid > .spacer {
grid-column: span 3;
height: 0px;
}

View File

@ -67,7 +67,7 @@
<td>Úberwachung, Elektronik</td>
<td><span class="checked"></span></td>
<td><a th:href="@{/employee/articles}">A-5051</a></td>
<td><a th:href="@{/employee/listedArticlesDetail}">L-890</a></td>
<td><a th:href="@{/employee/listedarticlesedit}">L-890</a></td>
</tr>
<tr>
<td><img th:src="@{/img/product-2.jpg}" class="s" /></td>
@ -77,7 +77,7 @@
<td>Kopfhörer, Elektronik</td>
<td><span class="checked"></span></td>
<td><a th:href="@{/employee/articles}">A-840</a></td>
<td><a th:href="@{/employee/listedArticlesDetail}">L-13850</a></td>
<td><a th:href="@{/employee/listedarticlesedit}">L-13850</a></td>
</tr>
<tr>
<td><img th:src="@{/img/product-3.jpg}" class="s" /></td>
@ -87,7 +87,7 @@
<td>Sonstiges, Elektronik</td>
<td><span class="unchecked"></span></td>
<td><a th:href="@{/employee/articles}">A-8401</a></td>
<td><a th:href="@{/employee/listedArticlesDetail}">L-5784</a></td>
<td><a th:href="@{/employee/listedarticlesedit}">L-5784</a></td>
</tr>
<tr>
<td><img th:src="@{/img/product-4.jpg}" class="s" /></td>
@ -97,7 +97,7 @@
<td>Úberwachung, Elektronik</td>
<td><span class="checked"></span></td>
<td><a th:href="@{/employee/articles}">A-2135</a></td>
<td><a th:href="@{/employee/listedArticlesDetail}">L-4564</a></td>
<td><a th:href="@{/employee/listedarticlesedit}">L-4564</a></td>
</tr>
<tr>
<td><img th:src="@{/img/product-5.jpg}" class="s" /></td>
@ -107,7 +107,7 @@
<td>Úberwachung, Elektronik</td>
<td><span class="checked"></span></td>
<td><a th:href="@{/employee/articles}">A-4565</a></td>
<td><a th:href="@{/employee/listedArticlesDetail}">L-4566</a></td>
<td><a th:href="@{/employee/listedarticlesedit}">L-4566</a></td>
</tr>
</table>
<p>

View File

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>e-commerce</title>
<link rel="stylesheet" th:href="@{/css/ecom.css}" />
<link rel="stylesheet" th:href="@{/css/listedArticles.css}" />
<script th:src="@{/js/filterTable.js}"></script>
</head>
<body>
<nav th:replace="fragments/header :: header">Header</nav>
<main class="sidebar-layout content-width">
<nav th:replace="fragments/employee :: sidebar">Header</nav>
<div class="content-width">
<h1> Gelistete Artikel </h1>
<!--
ArticleListing (
article : Article
pricePerUnitNetCent : int
unitsPerWarehouseSlot : int
title : String
description : String
tags : Tag[]
image : Blob
)
Article (
manufacturer : string
articleId : string
vatPercent : int
)
-->
<h2>Artikel bearbeiten</h2>
<form class="formgrid">
<p class="m">
<label for="title">Titel</label>
<input class="linestyle full-width" type="text" name="title" value="Kamera" />
</p>
<p class="s">
<label for="ref-article">Refernzierter Artikel</label>
<input class="linestyle full-width" type="text" name="ref-article" value="A-8405" disabled />
</p>
<div class="spacer"></div>
<div class="m">
<p>
<label for="img">Bild Hochladen</label>
<input class="full-width" type="file" name="img" />
</p>
<p>
<img th:src="@{/img/product-1.jpg}" class="m" />
</p>
</div>
<div class="s">
<p>
<label for="price">Preis (Netto)</label>
<input class="linestyle" type="number" step="0.01" name="price" value="84.45" /> EUR
( 19% Mwst. )
<!-- Info von article ref--> <br />
= 105.98 EUR Brutto
</p>
<p>
<label for="max-price-buy">Maximaler Einkaufspreis (Netto)</label>
<input class="linestyle" type="number" step="0.01" name="price" value="80.98" /> EUR
</p>
<p>
<fieldset>
<label for="is-active">Nachkaufen</label>
<input type="radio" id="mc" name="is-active" value="true" checked> Automatisch nachbestellen
<input type="radio" id="mc" name="is-active" value="false"> Nicht mehr nachkaufen
</fieldset>
</p>
</div>
<div class="m">
<label for="tags">Kategorien</label>
<textarea name="tags" class="full-width" rows="6">
Überwachung
Elektronik
</textarea>
<p>
Bitte jede Kategorien in eine eigene Zeile
</p>
</div>
<div class="s">
<p>
<label for="price">Einheiten pro Lagherplatz</label>
<input class="linestyle" type="number" name="units-per-slot" value="20" />
</p>
<p>
Der Wert wird nur für zukünftige Lagerbuchungen verwendet.
Bei Problemen kann können Einheiten aus und wieder eingebucht werden.
<a href="/todo" class="button smaller">Lagerbuchung</a>
</p>
</div>
<p class="l">
<label for="description">Beschreibung</label>
<textarea name="description" class="full-width" rows="15">
Eine TOLLE Kamera
Jaja du denkst jetzt bestimmt: "Bei dem Preis kann sie gar nich sooo TOLL sein".
Aber glaub mir, sie is echt echt TOLL!
Indianerehrenwort!
</textarea>
</p>
</form>
</div>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>
</html>