From de8aaae8ccb42ea54cb5ca48e4f40ce36967680b Mon Sep 17 00:00:00 2001 From: Seil0 Date: Wed, 22 Jan 2020 19:27:45 +0100 Subject: [PATCH] added customer/orderhistory --- .../hso/ecommerce/app/RequestController.java | 73 ++++++++++----- .../templates/customer/bonusProgram.html | 15 ++++ .../templates/customer/orderHistory.html | 58 ++++++++++++ .../intern/customers_allOrders_overview.html | 36 +------- .../customers_detailview_bookings_orders.html | 36 +------- .../intern/customers_order_detailview.html | 36 +------- .../templates/intern/customers_overview.html | 36 +------- .../intern/suppliers_allOrders_overview.html | 36 +------- .../suppliers_detailview_bookings_orders.html | 36 +------- .../intern/suppliers_order_detailview.html | 36 +------- .../templates/intern/suppliers_overview.html | 90 ++++++------------- 11 files changed, 165 insertions(+), 323 deletions(-) create mode 100644 prototype/src/main/resources/templates/customer/bonusProgram.html create mode 100644 prototype/src/main/resources/templates/customer/orderHistory.html 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 @@ + + + + + e-commerce + + + + +
+ +
+ + + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/customer/orderHistory.html b/prototype/src/main/resources/templates/customer/orderHistory.html new file mode 100644 index 0000000..90652e5 --- /dev/null +++ b/prototype/src/main/resources/templates/customer/orderHistory.html @@ -0,0 +1,58 @@ + + + + + e-commerce + + + + + +
+
+ +

Übersicht ihrer Bestellungen

+
+

Bestellungen

+
+ + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BestellnummerBestelldatumArtikelMengeGesamtpreisDetailsStatus
131-02-2020E-Shop Simulator1 Stk.60,00 EUR
131-02-2020Buran 11F35 K110 Stk.600.000.000,00 EUR
+

+
+ +
+
+ + + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/customers_allOrders_overview.html b/prototype/src/main/resources/templates/intern/customers_allOrders_overview.html index a4b92b0..37b1723 100644 --- a/prototype/src/main/resources/templates/intern/customers_allOrders_overview.html +++ b/prototype/src/main/resources/templates/intern/customers_allOrders_overview.html @@ -8,17 +8,7 @@ - +
@@ -53,28 +43,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/customers_detailview_bookings_orders.html b/prototype/src/main/resources/templates/intern/customers_detailview_bookings_orders.html index 6fc8f3e..676ba31 100644 --- a/prototype/src/main/resources/templates/intern/customers_detailview_bookings_orders.html +++ b/prototype/src/main/resources/templates/intern/customers_detailview_bookings_orders.html @@ -8,17 +8,7 @@ - +
@@ -79,28 +69,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/customers_order_detailview.html b/prototype/src/main/resources/templates/intern/customers_order_detailview.html index 9eea06a..5a19427 100644 --- a/prototype/src/main/resources/templates/intern/customers_order_detailview.html +++ b/prototype/src/main/resources/templates/intern/customers_order_detailview.html @@ -8,17 +8,7 @@ - +
@@ -74,28 +64,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/customers_overview.html b/prototype/src/main/resources/templates/intern/customers_overview.html index 28ff1f4..ac832ce 100644 --- a/prototype/src/main/resources/templates/intern/customers_overview.html +++ b/prototype/src/main/resources/templates/intern/customers_overview.html @@ -8,17 +8,7 @@ - +
@@ -106,28 +96,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/suppliers_allOrders_overview.html b/prototype/src/main/resources/templates/intern/suppliers_allOrders_overview.html index 37d6fae..53f71d3 100644 --- a/prototype/src/main/resources/templates/intern/suppliers_allOrders_overview.html +++ b/prototype/src/main/resources/templates/intern/suppliers_allOrders_overview.html @@ -8,17 +8,7 @@ - +
@@ -61,28 +51,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/suppliers_detailview_bookings_orders.html b/prototype/src/main/resources/templates/intern/suppliers_detailview_bookings_orders.html index 1d5e6a7..9eb7cb5 100644 --- a/prototype/src/main/resources/templates/intern/suppliers_detailview_bookings_orders.html +++ b/prototype/src/main/resources/templates/intern/suppliers_detailview_bookings_orders.html @@ -8,17 +8,7 @@ - +
@@ -84,28 +74,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/suppliers_order_detailview.html b/prototype/src/main/resources/templates/intern/suppliers_order_detailview.html index cae208c..2d31d30 100644 --- a/prototype/src/main/resources/templates/intern/suppliers_order_detailview.html +++ b/prototype/src/main/resources/templates/intern/suppliers_order_detailview.html @@ -8,17 +8,7 @@ - +
@@ -64,28 +54,6 @@
- + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/suppliers_overview.html b/prototype/src/main/resources/templates/intern/suppliers_overview.html index 89f3fbc..68c79f6 100644 --- a/prototype/src/main/resources/templates/intern/suppliers_overview.html +++ b/prototype/src/main/resources/templates/intern/suppliers_overview.html @@ -8,69 +8,37 @@ - + -
-
-

Kunden

-
- - +
+
+

Kunden

+
+ + +
+

+ + + + + + + + + + + + + + + + +
LieferrantennummerName
1Nike
1Adidas
+

-

- - - - - - - - - - - - - - - - -
LieferrantennummerName
1Nike
1Adidas
-

-
-
+ - + \ No newline at end of file