diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3abd9d4..bbe842d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,59 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + - - - @@ -84,11 +38,20 @@ - + - - + + + + + + + + + + + @@ -96,7 +59,7 @@ - + @@ -105,7 +68,7 @@ - + @@ -114,8 +77,17 @@ - - + + + + + + + + + + + @@ -123,6 +95,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -190,23 +189,23 @@ @@ -230,7 +229,7 @@ @@ -240,27 +239,6 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - @@ -437,7 +424,7 @@ - + @@ -586,7 +573,10 @@ - + + + + 1528408256446 @@ -812,11 +802,18 @@ - - @@ -828,8 +825,7 @@ - - + @@ -915,7 +911,6 @@ @@ -951,13 +947,6 @@ - - - - - - - @@ -1063,19 +1052,6 @@ - - - - - - - - - - - - - @@ -1086,13 +1062,6 @@ - - - - - - - @@ -1125,23 +1094,14 @@ - - - - - - - + - - - @@ -1156,17 +1116,6 @@ - - - - - - - - - - - @@ -1174,29 +1123,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -1277,17 +1203,24 @@ - + - - + + - + - - + + + + + + + + + @@ -1298,34 +1231,67 @@ - + - - - - - + + - + - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/controller/clientControllers/transactionsHistory.java b/src/controller/clientControllers/transactionsHistory.java index 3321edb..1e44d90 100644 --- a/src/controller/clientControllers/transactionsHistory.java +++ b/src/controller/clientControllers/transactionsHistory.java @@ -29,11 +29,20 @@ public class transactionsHistory extends HttpServlet { request.setAttribute("serverResponse",sesion.getAttribute("serverResponse")); ArrayList lista = crearArrayList(user.getTransactionList()); - request.setAttribute("transactionList",lista); - sesion.setAttribute("serverResponse","!"); - RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/WEB-INF/View/ClientViews/transactionsHistory.jsp"); - dispatcher.forward(request,response); + if (lista != null){ + request.setAttribute("transactionList",lista); + + sesion.setAttribute("serverResponse","!"); + RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/WEB-INF/View/ClientViews/transactionsHistory.jsp"); + dispatcher.forward(request,response); + + } else { + + request.getSession().setAttribute("serverResponse","{\"color\": \"orange\",\"response\":\"Aún no tienes ninguna transacción..\"}"); + response.sendRedirect("/"); + + } } //Si no la encuentra, redirige a la pagina inicial. @@ -52,14 +61,18 @@ public class transactionsHistory extends HttpServlet { private ArrayList crearArrayList(String datos){ ArrayList lista = new ArrayList<>(); - do - { - lista.add(datos.substring(0,datos.indexOf(","))); - datos = datos.substring(datos.indexOf(",")+1); - } - while (datos.length() > 2); + if (datos.length() > 2){ + do + { + lista.add(datos.substring(0,datos.indexOf(","))); + datos = datos.substring(datos.indexOf(",")+1); + } + while (datos.length() > 2); - return lista; + return lista; + } + + return null; } } diff --git a/src/controller/usersManagement/users/UsersControllerAdd.java b/src/controller/usersManagement/users/UsersControllerAdd.java index 548e0e1..7ac2eb0 100644 --- a/src/controller/usersManagement/users/UsersControllerAdd.java +++ b/src/controller/usersManagement/users/UsersControllerAdd.java @@ -118,7 +118,7 @@ public class UsersControllerAdd extends HttpServlet { user.setImgUrl(userImg); user.setRoleKey(userRole); - serverResponse = "{\"color\": \"#26a69a\",\"response\":\"User updated successfully.\"}"; + serverResponse = "{\"color\": \"#26a69a\",\"response\":\"Usuario editado con éxito.\"}"; break; } @@ -135,7 +135,7 @@ public class UsersControllerAdd extends HttpServlet { } else { - request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to create a user.\"}"); + request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"No tienes permiso para editar un usuario.\"}"); response.sendRedirect("/e/users"); } diff --git a/war/WEB-INF/View/ClientViews/transactionsHistory.jsp b/war/WEB-INF/View/ClientViews/transactionsHistory.jsp index 37864ac..9cc9319 100644 --- a/war/WEB-INF/View/ClientViews/transactionsHistory.jsp +++ b/war/WEB-INF/View/ClientViews/transactionsHistory.jsp @@ -129,6 +129,8 @@ Mi Historial

+ + diff --git a/war/WEB-INF/View/Transactions/index.jsp b/war/WEB-INF/View/Transactions/index.jsp index 1674d8c..d4f8041 100644 --- a/war/WEB-INF/View/Transactions/index.jsp +++ b/war/WEB-INF/View/Transactions/index.jsp @@ -153,7 +153,11 @@
- +
+
+
+
+
diff --git a/war/WEB-INF/View/eIndex.jsp b/war/WEB-INF/View/eIndex.jsp index 9f0e15c..3fb9677 100644 --- a/war/WEB-INF/View/eIndex.jsp +++ b/war/WEB-INF/View/eIndex.jsp @@ -34,6 +34,7 @@ padding: 10px; border-radius: 3px; box-shadow: 2px 2px lightgray; + background: -moz-linear-gradient(left, #3949a3 55%, white 90%); background: -webkit-linear-gradient(left, #3949a3 55%, white 90%); } .cards a{ diff --git a/war/index.jsp b/war/index.jsp index db94660..98db5fa 100644 --- a/war/index.jsp +++ b/war/index.jsp @@ -200,7 +200,7 @@