2020-02-01 22:57:09 +01:00
<!DOCTYPE html>
< html lang = "de" dir = "ltr" xmlns:th = "http://www.thymeleaf.org" >
< head >
2020-04-27 09:48:24 +02:00
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=0.75, user-scalable=no" >
2020-02-01 22:57:09 +01:00
2020-04-27 09:48:24 +02:00
< title > Kunden Details< / title >
< script th:src = "@{/js/filterTable.js}" > < / script >
2020-02-06 19:22:41 +01:00
2020-04-27 09:48:24 +02:00
< script >
2020-02-06 19:22:41 +01:00
function toggle(id) {
document.getElementById(id).classList.toggle("invisible");
}
2020-04-27 09:48:24 +02:00
< / script >
< link rel = "stylesheet" th:href = "@{/css/ecom.css}" / >
2020-02-01 22:57:09 +01:00
< / head >
< body >
2020-04-27 09:48:24 +02:00
< nav th:replace = "fragments/header :: header" > Header< / nav >
< div class = "sidebar-layout content-width" >
< nav > < / nav >
< div >
2020-06-17 18:43:06 +02:00
< h1 th:text = "|Kunde ${user.id}|" > < / h1 >
2020-04-27 09:48:24 +02:00
< script th:src = "@{/js/back.js}" > < / script >
< div class = "back" data-group = "intern" data-insert = "true" > < / div >
< / div >
< / div >
< main class = "sidebar-layout content-width" >
< nav th:replace = "fragments/intern :: sidebar" > < / nav >
< div class = "content-width" >
< h2 > Allgemein< / h2 >
< p >
< table class = "key-value" >
< tr >
< th > Nutzer< / th >
2020-06-05 12:30:51 +02:00
< td > < a th:href = "@{/intern/customers/{id}(id=${user.id})}" th:text = "${user.id}" > < / a > < / td >
2020-04-27 09:48:24 +02:00
< / tr >
< tr >
< th > Name< / th >
2020-06-05 12:30:51 +02:00
< td th:text = "${user.name}" > < / td >
2020-04-27 09:48:24 +02:00
< / tr >
< tr >
< th > E-Mail< / th >
2020-06-05 12:30:51 +02:00
< td th:text = "${user.email}" > < / td >
2020-04-27 09:48:24 +02:00
< / tr >
< tr >
< th > Status< / th >
2020-06-05 12:30:51 +02:00
< td >
< span th:text = "${user.isActive} ? 'Aktiv,' : 'Inaktiv,'" > < / span >
< span th:text = "${user.isEmployee} ? 'Mitarbeiter' : 'Kunde'" > < / span >
< / td >
2020-04-27 09:48:24 +02:00
< / tr >
< tr >
< th > Adresse< / th >
2020-06-05 12:30:51 +02:00
< td th:Text = "${user.defaultDeliveryAddress}" > < / td >
2020-04-27 09:48:24 +02:00
< / tr >
< / table >
< / p >
< p >
< a class = "button smaller" href = "javascript:void(0)" onclick = "toggle('add-actions');" > Weitere Aktionen
anzeigen< / a >
< / p >
< div id = "add-actions" class = "invisible info-box secondary hero" >
2020-02-06 19:22:41 +01:00
< h2 > Status bearbeiten< / h2 >
< p >
2020-06-05 12:30:51 +02:00
< form method = "POST" th:action = "@{/intern/customers/{id}/changeState(id=${user.id})}" >
2020-04-27 09:48:24 +02:00
< fieldset >
2020-06-05 12:30:51 +02:00
< input type = "checkbox" name = "active" id = "active" th:checked = "${user.isActive}" >
< label for = "active" > Aktiv< / label > < br / >
2020-04-27 09:48:24 +02:00
< / fieldset >
< fieldset >
2020-06-05 12:30:51 +02:00
< input type = "checkbox" name = "ma" id = "ma" th:checked = "${user.isEmployee}" >
2020-04-27 09:48:24 +02:00
< label for = "ma" > Mitarbeiter-Status< / label > < br / >
< / fieldset >
< button class = "smaller" type = "submit" name = "action" value = "login"
onclick="return confirm('Sind Sie sicher, dass Sie den Status dieses Accounts setzen möchten?');">
Speichern
< / button >
< / form >
2020-02-06 19:22:41 +01:00
< / p >
< h2 > Passwort zurücksetzen< / h2 >
< p >
2020-06-05 12:30:51 +02:00
< form method = "POST" th:action = "@{/intern/customers/{id}/resetPassword(id=${user.id})}" >
2020-04-27 09:48:24 +02:00
< div >
< label for = "password" > Passwort< / label >
< input class = "full-width" type = "password" name = "password" placeholder = "Passwort" id = "password"
required>
< / div >
< div >
< label for = "password2" > Passwort wiederholen< / label >
< input class = "full-width" type = "password" name = "password2" placeholder = "Passwort" id = "password2"
required>
< / div >
< button class = "smaller" type = "submit" name = "action" value = "login"
onclick="return confirm('Sind Sie sicher, dass Sie das Passwort dieses Accounts zurücksetzen móchten?');">
Speichern
< / button >
< / form >
2020-02-06 19:22:41 +01:00
< / p >
2020-04-27 09:48:24 +02:00
< / div >
< h2 > Bestellungen< / h2 >
< p >
< table id = "main-table" >
< tr >
< th > Bestellnummer< / th >
< th > Bestelldatum< / th >
< th > Betrag< / th >
< th > Status< / th >
< th > < / th >
< / tr >
2020-06-05 12:30:51 +02:00
< tr th:each = "order: ${orders}" >
< td th:text = "${order.id}" > < / td >
< td th:text = "${order.formatCreated()}" > < / td >
< td th:text = "${#numbers.formatDecimal(order.totalGrossCent * 0.01, 1, 'POINT', 2, 'COMMA')}" > < / td >
< td th:if = "${order.deliveredAt == null}" > In Zustellung< / td >
< td th:if = "${order.deliveredAt != null}" > Zugestellt< / td >
2020-04-27 09:48:24 +02:00
< / tr >
< / table >
< / p >
2020-06-07 13:38:01 +02:00
2020-04-27 09:48:24 +02:00
< h2 > Buchungen< / h2 >
< div >
2020-02-01 22:57:09 +01:00
< h4 > Kontostand < / h4 >
2020-06-05 07:49:11 +02:00
< h3 th:text = "${balance}" / >
2020-04-27 09:48:24 +02:00
< / div >
< p >
< table id = "main-table" >
< tr >
< th colspan = "8" >
< input type = "text" placeholder = "Filtern" class = "jsFilterTable full-width"
data-target-id="main-table">
< / th >
< / tr >
< tr >
< th > Zeitpunkt< / th >
< th > Betrag< / th >
< th > Von< / th >
< th > Kontostand< / th >
< th > Grund< / th >
< th > Referenz< / th >
< / tr >
2020-06-05 07:49:11 +02:00
< tr th:each = "booking: ${bookings}" >
< td th:text = "${booking.datetime}" / >
< td th:text = "${booking.amount}" / >
< td th:if = "${booking.sourceAddr}" > < a th:href = "@{${booking.sourceAddr}}" th:text = "${booking.source}" / > < / td >
< td th:unless = "${booking.sourceAddr}" th:text = "${booking.source}" / >
< td th:text = "${booking.balance}" / >
< td th:text = "${booking.reason}" / >
< td th:if = "${booking.referenceAddr}" > < a th:href = "@{${booking.referenceAddr}}" th:text = "${booking.reference}" / > < / td >
< td th:unless = "${booking.referenceAddr}" th:text = "${booking.reference}" / >
2020-04-27 09:48:24 +02:00
< / tr >
< / table >
< / p >
< / div >
< / main >
< footer th:replace = "fragments/footer :: footer" > < / footer >
2020-02-01 22:57:09 +01:00
< / body >
< / html >