diff --git a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java index bad66ca..205d4ff 100644 --- a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java +++ b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java @@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; -import java.util.List; import java.util.UUID; /** @@ -55,14 +54,14 @@ public class RequestController { } @GetMapping("/intern/customerdetail") - public String customerdetail() { - // TODO @PH + public String customerdetail() { + // TODO @PH return "intern/customer"; - } + } @GetMapping("/intern/customerorders") public String customerorders() { - // TODO @PH + // TODO @PH return "intern/customerorders"; } @@ -71,15 +70,15 @@ public class RequestController { return "intern/accounting"; } - @GetMapping("/intern/accountingvat") - public String accountingvat() { - return "intern/accountingvat"; - } + @GetMapping("/intern/accountingvat") + public String accountingvat() { + return "intern/accountingvat"; + } - @GetMapping("/intern/accountingmain") - public String accountingmain() { + @GetMapping("/intern/accountingmain") + public String accountingmain() { return "intern/accountingmain"; - } + } @GetMapping("/intern/accountingmanual") public String accountingmanual() { @@ -112,28 +111,44 @@ public class RequestController { } @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") - public String customers_order_detailview() {return "intern/customers_order_detailview"; } + public String customers_order_detailview() { + return "intern/customers_order_detailview"; + } @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") - 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") - public String suppliers_overview() {return "intern/suppliers_overview"; } + public String suppliers_overview() { + return "intern/suppliers_overview"; + } @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") - 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") - public String suppliers_order_detailview() {return "intern/suppliers_order_detailview"; } + public String suppliers_order_detailview() { + return "intern/suppliers_order_detailview"; + } @GetMapping("/customer/accountsettings") public String customerAccountSettings(Model model) { @@ -155,7 +170,17 @@ public class RequestController { return "/customer/accountSettings"; } - @RequestMapping(value="/updateAccountSettings", method=RequestMethod.POST, params="action=updateAccountSettings") + @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") public String updateAccountSettings(@ModelAttribute Customer customer, HttpServletResponse response) { // do the login magic and get a loginToken System.out.println(customer.username); @@ -171,7 +196,8 @@ public class RequestController { System.out.println(loginToken); // TODO if cookie is present, redirect to home 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) { Cookie cookie = new Login(customerRepo).getLoginToken(customer); if (cookie != null) { @@ -191,8 +217,7 @@ 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) { // do the register magic and get a loginToken System.out.println(customer.username); diff --git a/prototype/src/main/resources/templates/customer/bonusProgram.html b/prototype/src/main/resources/templates/customer/bonusProgram.html new file mode 100644 index 0000000..04acf85 --- /dev/null +++ b/prototype/src/main/resources/templates/customer/bonusProgram.html @@ -0,0 +1,15 @@ + + +
+ ++
Bestellnummer | +Bestelldatum | +Artikel | +Menge | +Gesamtpreis | +Details | +Status | +
---|---|---|---|---|---|---|
1 | +31-02-2020 | +E-Shop Simulator | +1 Stk. | +60,00 EUR | ++ | + |
1 | +31-02-2020 | +Buran 11F35 K1 | +10 Stk. | +600.000.000,00 EUR | ++ | + |