added customer/orderhistory

This commit is contained in:
Jannik 2020-01-22 19:27:45 +01:00
parent c204a5e5a0
commit de8aaae8cc
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
11 changed files with 165 additions and 323 deletions

View File

@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.UUID; import java.util.UUID;
/** /**
@ -112,28 +111,44 @@ public class RequestController {
} }
@GetMapping("/intern/customers_allOrders_overview") @GetMapping("/intern/customers_allOrders_overview")
public String customers_allOrders_overview() {return "intern/customers_allOrders_overview"; } public String customers_allOrders_overview() {
return "intern/customers_allOrders_overview";
}
@GetMapping("/intern/customers_order_detailview") @GetMapping("/intern/customers_order_detailview")
public String customers_order_detailview() {return "intern/customers_order_detailview"; } public String customers_order_detailview() {
return "intern/customers_order_detailview";
}
@GetMapping("/intern/customers_overview") @GetMapping("/intern/customers_overview")
public String customers_overview() {return "intern/customers_overview"; } public String customers_overview() {
return "intern/customers_overview";
}
@GetMapping("/intern/customers_detailview_bookings_orders") @GetMapping("/intern/customers_detailview_bookings_orders")
public String customers_detailview_bookings_orders() {return "intern/customers_detailview_bookings_orders"; } public String customers_detailview_bookings_orders() {
return "intern/customers_detailview_bookings_orders";
}
@GetMapping("/intern/suppliers_overview") @GetMapping("/intern/suppliers_overview")
public String suppliers_overview() {return "intern/suppliers_overview"; } public String suppliers_overview() {
return "intern/suppliers_overview";
}
@GetMapping("/intern/suppliers_detailview_bookings_orders") @GetMapping("/intern/suppliers_detailview_bookings_orders")
public String suppliers_detailview_bookings_orders() {return "intern/suppliers_detailview_bookings_orders"; } public String suppliers_detailview_bookings_orders() {
return "intern/suppliers_detailview_bookings_orders";
}
@GetMapping("/intern/suppliers_allOrders_overview") @GetMapping("/intern/suppliers_allOrders_overview")
public String suppliers_allOrders_overview() {return "intern/suppliers_allOrders_overview"; } public String suppliers_allOrders_overview() {
return "intern/suppliers_allOrders_overview";
}
@GetMapping("/intern/suppliers_order_detailview") @GetMapping("/intern/suppliers_order_detailview")
public String suppliers_order_detailview() {return "intern/suppliers_order_detailview"; } public String suppliers_order_detailview() {
return "intern/suppliers_order_detailview";
}
@GetMapping("/customer/accountsettings") @GetMapping("/customer/accountsettings")
public String customerAccountSettings(Model model) { public String customerAccountSettings(Model model) {
@ -155,6 +170,16 @@ public class RequestController {
return "/customer/accountSettings"; return "/customer/accountSettings";
} }
@GetMapping("/customer/orderhistory")
public String customerOrderHistory() {
return "customer/orderHistory";
}
@GetMapping("/customer/bonusprogram")
public String customerBonusProgram() {
return "customer/bonusProgram";
}
@RequestMapping(value = "/updateAccountSettings", method = RequestMethod.POST, params = "action=updateAccountSettings") @RequestMapping(value = "/updateAccountSettings", method = RequestMethod.POST, params = "action=updateAccountSettings")
public String updateAccountSettings(@ModelAttribute Customer customer, HttpServletResponse response) { public String updateAccountSettings(@ModelAttribute Customer customer, HttpServletResponse response) {
// do the login magic and get a loginToken // do the login magic and get a loginToken
@ -171,6 +196,7 @@ public class RequestController {
System.out.println(loginToken); // TODO if cookie is present, redirect to home System.out.println(loginToken); // TODO if cookie is present, redirect to home
return "login"; return "login";
} }
@RequestMapping(value = "/login", method = RequestMethod.POST, params = "action=login") @RequestMapping(value = "/login", method = RequestMethod.POST, params = "action=login")
public String loginAction(@ModelAttribute Customer customer, HttpServletResponse response) { public String loginAction(@ModelAttribute Customer customer, HttpServletResponse response) {
Cookie cookie = new Login(customerRepo).getLoginToken(customer); Cookie cookie = new Login(customerRepo).getLoginToken(customer);
@ -191,7 +217,6 @@ public class RequestController {
} }
@RequestMapping(value = "/register", method = RequestMethod.POST, params = "action=register") @RequestMapping(value = "/register", method = RequestMethod.POST, params = "action=register")
public String registerAction(@ModelAttribute Customer customer, HttpServletResponse response) { public String registerAction(@ModelAttribute Customer customer, HttpServletResponse response) {
// do the register magic and get a loginToken // do the register magic and get a loginToken

View File

@ -0,0 +1,15 @@
<!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}"/>
</head>
<body>
<nav th:replace="fragments/header :: header">Header</nav>
<main>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>
</html>

View File

@ -0,0 +1,58 @@
<!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/NoFocus.css}" />
</head>
<body>
<nav th:replace="fragments/header :: header">Header</nav>
<main>
<div class="content-width">
<h1>Übersicht ihrer Bestellungen</h1>
<br>
<h2>Bestellungen</h2>
<div class='spacer input-icon border backgroundprimary'>
<input type="text" class="nofocus" placeholder="Bestellungen Filtern"/>
<button class="nofocus">Filtern</button>
</div>
<p>
<table>
<tr>
<th>Bestellnummer</th>
<th>Bestelldatum</th>
<th>Artikel</th>
<th>Menge</th>
<th>Gesamtpreis</th>
<th>Details</th>
<th>Status</th>
</tr>
<tr>
<td>1</td>
<td>31-02-2020</td>
<td>E-Shop Simulator</td>
<td>1 Stk.</td>
<td>60,00 EUR</td>
<td><button class="smaller">Details</button></td>
<td><button class="smaller">Angekommen</button></td>
</tr>
<tr>
<td>1</td>
<td>31-02-2020</td>
<td>Buran 11F35 K1</td>
<td>10 Stk.</td>
<td>600.000.000,00 EUR</td>
<td><button class="smaller">Details</button></td>
<td><button class="smaller">Angekommen</button></td>
</tr>
</table>
</p>
<br>
</div>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>
</html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -53,28 +43,6 @@
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -79,28 +69,6 @@
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -74,28 +64,6 @@
</div> </div>
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -106,28 +96,6 @@
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -61,28 +51,6 @@
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -84,28 +74,6 @@
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -64,28 +54,6 @@
</div> </div>
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>

View File

@ -8,17 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head> </head>
<body> <body>
<nav class='hero'> <nav th:replace="fragments/header :: header">Header</nav>
<div class='content-width bar-flex'>
<h1>Project eCommerce</h1>
<button>Angebote</button>
<div class='spacer input-icon secondary'>
<input type="text" placeholder="Nach Produkten suchen..."/>
<button>Finden</button>
</div>
<button>Login</button>
</div>
</nav>
<main> <main>
<div class="content-width"> <div class="content-width">
@ -49,28 +39,6 @@
</div> </div>
</main> </main>
<footer class="hero-black"> <footer th:replace="fragments/footer :: footer"></footer>
<div class='content-width bar-flex'>
<h3>Project eCommerce</h3>
<div class="spacer"></div>
<div>
<h4>Seite</h4>
<ul>
<li><a>Login</a></li>
<li><a>Angebote</a></li>
<li><a>Suche</a></li>
<li><a>Mitarbeiter Login</a></li>
</ul>
</div>
<div>
<h4>Mehr</h4>
<ul>
<li><a>Nutzungsbedingungen</a></li>
<li><a>Datenschutz</a></li>
<li><a>Über</a></li>
</ul>
</div>
</div>
</footer>
</body> </body>
</html> </html>