Division de la aplicacion:

El sector inicial esta dirigido a los clientes, mientras que las herramientos coma el CRUD solo son solo para empleados.
master
Araozu 2018-07-14 10:29:59 -05:00
parent e45470c263
commit 1e96f6f222
63 changed files with 1874 additions and 1180 deletions

View File

@ -1,10 +1,10 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="API AppEngine 1"> <library name="API AppEngine 1">
<CLASSES> <CLASSES>
<root url="file://$USER_HOME$/Desktop/Java EE/API AppEngine 1.9" /> <root url="file://$USER_HOME$/Desktop/Universidad/Java EE/API AppEngine 1.9" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />
<jarDirectory url="file://$USER_HOME$/Desktop/Java EE/API AppEngine 1.9" recursive="false" /> <jarDirectory url="file://$USER_HOME$/Desktop/Universidad/Java EE/API AppEngine 1.9" recursive="false" />
</library> </library>
</component> </component>

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES5" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

File diff suppressed because it is too large Load Diff

View File

@ -38,8 +38,7 @@
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content> </content>
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="com.google.appengine.eclipse.core.GAE_CONTAINER/appengine-java-sdk-1.9.54" level="application" /> <orderEntry type="jdk" jdkName="1.7" jdkType="JavaSDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="library" name="API AppEngine 1" level="project" /> <orderEntry type="library" name="API AppEngine 1" level="project" />
<orderEntry type="library" name="platform" level="application" /> <orderEntry type="library" name="platform" level="application" />
</component> </component>

View File

@ -1,9 +1,9 @@
package controller.access; package controller.employee.access;
import controller.PMF; import controller.PMF;
import controller.resources.ResourcesControllerView; import controller.employee.resources.ResourcesControllerView;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Access; import model.Access;
import model.Resource; import model.Resource;
import model.Role; import model.Role;
@ -93,7 +93,7 @@ public class AccessControllerAdd extends HttpServlet {
try{ try{
if (redirect){ if (redirect){
request.setAttribute("serverResponse",""); request.setAttribute("serverResponse","");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }
} }
//Al redirigr al jsp para crear, se usa RequestDispatcher, y este entra en conflicto con sendRedirect. //Al redirigr al jsp para crear, se usa RequestDispatcher, y este entra en conflicto con sendRedirect.
@ -104,7 +104,7 @@ public class AccessControllerAdd extends HttpServlet {
}else{ }else{
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to create an access.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to create an access.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }

View File

@ -1,10 +1,7 @@
package controller.access; package controller.employee.access;
import java.io.IOException; import java.io.IOException;
import javax.servlet.http.*; import javax.servlet.http.*;
import java.util.Date;
import java.util.List;
import java.text.DateFormat;
import javax.servlet.*; import javax.servlet.*;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;
import model.*; import model.*;
@ -30,14 +27,14 @@ public class AccessControllerDelete extends HttpServlet {
pm.deletePersistent(r); pm.deletePersistent(r);
request.getSession().setAttribute("serverResponse","{\"color\": \"#26a69a\",\"response\":\"Access deleted successfully.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"#26a69a\",\"response\":\"Access deleted successfully.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} catch(javax.jdo.JDOObjectNotFoundException nf) { } catch(javax.jdo.JDOObjectNotFoundException nf) {
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }
} else { } else {
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to delete an access.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to delete an access.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }
} catch (NullPointerException e){ } catch (NullPointerException e){

View File

@ -1,9 +1,9 @@
package controller.access; package controller.employee.access;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.PMF; import controller.PMF;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Access; import model.Access;
import model.Resource; import model.Resource;
import model.Role; import model.Role;
@ -69,7 +69,7 @@ public class AccessControllerEdit extends HttpServlet {
request.getSession().setAttribute("serverResponse","{\"color\": \"#26a69a\",\"response\":\"Access updated successfully.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"#26a69a\",\"response\":\"Access updated successfully.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }
} else if(request.getParameter("info").equals("redirect")){ } else if(request.getParameter("info").equals("redirect")){
@ -85,15 +85,15 @@ public class AccessControllerEdit extends HttpServlet {
} }
} catch(javax.jdo.JDOObjectNotFoundException nf) { } catch(javax.jdo.JDOObjectNotFoundException nf) {
response.sendRedirect("/index.jsp"); response.sendRedirect("/");
} catch (NumberFormatException e){ } catch (NumberFormatException e){
response.sendRedirect("/users"); response.sendRedirect("/e/users");
} }
}else{ }else{
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to edit an access.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to edit an access.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }

View File

@ -1,8 +1,7 @@
package controller.access; package controller.employee.access;
import controller.PMF; import controller.PMF;
import controller.resources.ResourcesControllerView; import controller.employee.users.UsersControllerView;
import controller.users.UsersControllerView;
import model.Access; import model.Access;
import model.User; import model.User;

View File

@ -1,11 +1,11 @@
package controller.access; package controller.employee.access;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.PMF; import controller.PMF;
import controller.resources.ResourcesControllerView; import controller.employee.resources.ResourcesControllerView;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Access; import model.Access;
import model.Resource; import model.Resource;
import model.Role; import model.Role;
@ -51,7 +51,7 @@ public class AccessControllerView extends HttpServlet {
} else { } else {
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to view an access.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to view an access.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} }
@ -60,7 +60,7 @@ public class AccessControllerView extends HttpServlet {
System.err.println("JDOObjectNotFound -> AccessControllerView"); System.err.println("JDOObjectNotFound -> AccessControllerView");
nf.printStackTrace(); nf.printStackTrace();
request.getSession().setAttribute("serverResponse","{\"color\": \"darkorange\",\"response\":\"Error trying to view the Access.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"darkorange\",\"response\":\"Error trying to view the Access.\"}");
response.sendRedirect("/access"); response.sendRedirect("/e/access");
} catch (NullPointerException e){ } catch (NullPointerException e){
System.err.println("NPE -> Trying to access a servlet without logging in."); System.err.println("NPE -> Trying to access a servlet without logging in.");
@ -104,15 +104,16 @@ public class AccessControllerView extends HttpServlet {
public static boolean checkPermission(String userID, String uri){ public static boolean checkPermission(String userID, String uri){
User user = UsersControllerView.getUser(userID); User user = UsersControllerView.getUser(userID);
String userRoleName = user.getRoleName();
String userRoleKey = user.getRoleKey(); String userRoleKey = user.getRoleKey();
if (userRoleKey == null) if (userRoleKey == null)
userRoleKey = ""; userRoleKey = "";
for (Access access: getAllAccess()){ if (user.getRoleName().equals("admin")) {
if (userRoleName.equals("admin")){
return true; return true;
} else if (access.getRoleKey().equals(userRoleKey) && access.getStatus()){ }
for (Access access: getAllAccess()){
if (access.getRoleKey().equals(userRoleKey) && access.getStatus()){
if (access.getResourceName().equals(uri) && ResourcesControllerView.getResource(access.getResourceKey()).getStatus()){ if (access.getResourceName().equals(uri) && ResourcesControllerView.getResource(access.getResourceKey()).getStatus()){
return true; return true;
} }

View File

@ -1,8 +1,8 @@
package controller.resources; package controller.employee.resources;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Resource; import model.Resource;
import javax.jdo.JDOObjectNotFoundException; import javax.jdo.JDOObjectNotFoundException;
@ -61,7 +61,7 @@ public class ResourcesControllerAdd extends HttpServlet {
pm.close(); pm.close();
try{ try{
response.sendRedirect("/resources"); response.sendRedirect("/e/resources");
} }
//Al redirigr al jsp para crear, se usa RequestDispatcher, y este entra en conflicto con sendRedirect. //Al redirigr al jsp para crear, se usa RequestDispatcher, y este entra en conflicto con sendRedirect.
catch (IllegalStateException e){ catch (IllegalStateException e){

View File

@ -1,4 +1,4 @@
package controller.resources; package controller.employee.resources;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
@ -35,7 +35,7 @@ public class ResourcesControllerDelete extends HttpServlet {
System.err.println("Exception captured -> " + e.getMessage()); System.err.println("Exception captured -> " + e.getMessage());
} }
response.sendRedirect("/resources"); response.sendRedirect("/e/resources");
} }

View File

@ -1,7 +1,7 @@
package controller.resources; package controller.employee.resources;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.User; import model.User;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;

View File

@ -1,8 +1,8 @@
package controller.resources; package controller.employee.resources;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Resource; import model.Resource;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;
@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import static controller.roles.RolesControllerView.getRole; import static controller.employee.roles.RolesControllerView.getRole;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class ResourcesControllerView extends HttpServlet { public class ResourcesControllerView extends HttpServlet {

View File

@ -1,8 +1,8 @@
package controller.roles; package controller.employee.roles;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Role; import model.Role;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;
@ -75,7 +75,7 @@ public class RolesControllerAdd extends HttpServlet {
pm.close(); pm.close();
try{ try{
response.sendRedirect("/roles"); response.sendRedirect("/e/roles");
} }
//Al redirigr al jsp para crear, se usa RequestDispatcher, y este entra en conflicto con sendRedirect. //Al redirigr al jsp para crear, se usa RequestDispatcher, y este entra en conflicto con sendRedirect.
catch (IllegalStateException e){ catch (IllegalStateException e){

View File

@ -1,4 +1,4 @@
package controller.roles; package controller.employee.roles;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
@ -32,7 +32,7 @@ public class RolesControllerDelete extends HttpServlet {
System.err.println("Exception captured -> " + e.getMessage()); System.err.println("Exception captured -> " + e.getMessage());
} }
response.sendRedirect("/roles"); response.sendRedirect("/e/roles");
} }

View File

@ -1,6 +1,6 @@
package controller.roles; package controller.employee.roles;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.User; import model.User;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;

View File

@ -1,8 +1,8 @@
package controller.roles; package controller.employee.roles;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Role; import model.Role;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;

View File

@ -1,7 +1,6 @@
package controller.services; package controller.employee.services;
import java.io.IOException; import java.io.IOException;
import java.util.List;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
@ -15,10 +14,8 @@ import javax.servlet.http.HttpSession;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.PMF; import controller.PMF;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import controller.roles.RolesControllerView; import controller.employee.users.UsersControllerView;
import controller.users.UsersControllerView;
import model.Access;
import model.Service; import model.Service;
@SuppressWarnings("serial") @SuppressWarnings("serial")

View File

@ -1,9 +1,9 @@
package controller.services; package controller.employee.services;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.PMF; import controller.PMF;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import model.Service; import model.Service;
import javax.jdo.JDOObjectNotFoundException; import javax.jdo.JDOObjectNotFoundException;
@ -12,7 +12,6 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.List;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class ServicesControllerDelete extends HttpServlet { public class ServicesControllerDelete extends HttpServlet {

View File

@ -1,7 +1,7 @@
package controller.services; package controller.employee.services;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.User; import model.User;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
@ -11,7 +11,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.io.IOException; import java.io.IOException;
import static controller.services.ServicesControllerView.getAllServices; import static controller.employee.services.ServicesControllerView.getAllServices;
public class ServicesControllerIndex extends HttpServlet { public class ServicesControllerIndex extends HttpServlet {

View File

@ -1,13 +1,12 @@
package controller.services; package controller.employee.services;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.PMF; import controller.PMF;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.Service; import model.Service;
import javax.jdo.JDOObjectNotFoundException;
import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManager;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;

View File

@ -1,8 +1,8 @@
package controller.users; package controller.employee.users;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import controller.roles.RolesControllerAdd; import controller.employee.roles.RolesControllerAdd;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import model.Role; import model.Role;
import model.User; import model.User;
@ -57,7 +57,7 @@ public class UsersControllerAdd extends HttpServlet {
String userImg = request.getParameter("userImg"); String userImg = request.getParameter("userImg");
String userRole = request.getParameter("userRole"); String userRole = request.getParameter("userRole");
String rutaRedireccion = "/users"; String rutaRedireccion = "/e/users";
switch (action) { switch (action) {
//Si se quiere iniciar sesion y/o registrar un usuario desde el inicio de sesion de Google //Si se quiere iniciar sesion y/o registrar un usuario desde el inicio de sesion de Google
@ -137,7 +137,7 @@ public class UsersControllerAdd extends HttpServlet {
} else { } else {
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to create a user.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to create a user.\"}");
response.sendRedirect("/users"); response.sendRedirect("/e/users");
} }

View File

@ -1,6 +1,6 @@
package controller.users; package controller.employee.users;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import model.User; import model.User;
import javax.jdo.JDOObjectNotFoundException; import javax.jdo.JDOObjectNotFoundException;
@ -32,12 +32,12 @@ public class UsersControllerDelete extends HttpServlet {
pm.close(); pm.close();
response.sendRedirect("/users"); response.sendRedirect("/e/users");
} else { } else {
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to delete a user.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to delete a user.\"}");
response.sendRedirect("/users"); response.sendRedirect("/e/users");
} }

View File

@ -1,6 +1,6 @@
package controller.users; package controller.employee.users;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import model.User; import model.User;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
@ -20,6 +20,7 @@ public class UsersControllerIndex extends HttpServlet {
//Se usa para revisar si hay una sesion activa //Se usa para revisar si hay una sesion activa
HttpSession sesion= request.getSession(); HttpSession sesion= request.getSession();
System.out.println("URI de peticion -> " + request.getRequestURI());
if (AccessControllerView.checkPermission(sesion.getAttribute("userID").toString(),request.getRequestURI())){ if (AccessControllerView.checkPermission(sesion.getAttribute("userID").toString(),request.getRequestURI())){
//Intenta hallar una sesion activa //Intenta hallar una sesion activa

View File

@ -1,7 +1,7 @@
package controller.users; package controller.employee.users;
import controller.access.AccessControllerView; import controller.employee.access.AccessControllerView;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import model.User; import model.User;
import javax.jdo.JDOObjectNotFoundException; import javax.jdo.JDOObjectNotFoundException;
@ -13,7 +13,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.io.IOException; import java.io.IOException;
import java.util.Iterator;
import java.util.List; import java.util.List;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@ -80,7 +79,7 @@ public class UsersControllerView extends HttpServlet {
} else { } else {
request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to edit/view a user.\"}"); request.getSession().setAttribute("serverResponse","{\"color\": \"red\",\"response\":\"You don\\'t have permission to edit/view a user.\"}");
response.sendRedirect("/users"); response.sendRedirect("/e/users");
} }

View File

@ -1,6 +1,6 @@
package controller; package controller;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
import model.User; import model.User;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;

View File

@ -1,7 +1,7 @@
package model; package model;
import controller.resources.ResourcesControllerView; import controller.employee.resources.ResourcesControllerView;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.IdentityType;

View File

@ -3,7 +3,7 @@ package model;
import javax.jdo.annotations.*; import javax.jdo.annotations.*;
import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory; import com.google.appengine.api.datastore.KeyFactory;
import controller.users.UsersControllerView; import controller.employee.users.UsersControllerView;
@PersistenceCapable(identityType=IdentityType.APPLICATION) @PersistenceCapable(identityType=IdentityType.APPLICATION)
public class Service { public class Service {

View File

@ -1,6 +1,6 @@
package model; package model;
import controller.roles.RolesControllerView; import controller.employee.roles.RolesControllerView;
import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.PersistenceCapable;

View File

@ -18,23 +18,23 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../..//css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -59,8 +59,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -70,24 +70,29 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="../reports">Reportes de Ingresos</a></li>
<li class="active"><a class="whiteLink" href="../access">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a href="#" style="background-color: lightgray">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab active"><a class="active" href="../access">Access</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -99,7 +104,7 @@
<div> <div>
<div style="float: left; display: inline;"> <div style="float: left; display: inline;">
<i class="material-icons large" style=" color: #67c9b3">info_outline</i> <i class="material-icons large" style=" color: #3f51b5">info_outline</i>
</div> </div>
<div style="font-size: x-large; clear: right; min-height: 87px;"> <div style="font-size: x-large; clear: right; min-height: 87px;">
The admin Role has full access by default. The admin Role has full access by default.
@ -150,7 +155,7 @@
<br /> <br />
<button id="sendButton" class="btn waves-effect waves-light" type="submit" name="action">Submit <button id="sendButton" class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
@ -158,7 +163,7 @@
<hr /> <hr />
<br /> <br />
<a href="../access" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../access" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -18,22 +18,22 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -58,8 +58,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -69,24 +69,29 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="../reports">Reportes de Ingresos</a></li>
<li class="active"><a href="" class="whiteLink">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a href="#" style="background-color: lightgray">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab active"><a class="active" href="../access">Access</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -95,7 +100,7 @@
<br /> <br />
<br /> <br />
<form id="mainForm" name="post" method="post" action="edit" onsubmit="return safeSend()"> <form id="mainForm" name="post" method="post" action="./edit" onsubmit="return safeSend()">
<input type="hidden" name="id" value="<%= a.getId() %>"/> <input type="hidden" name="id" value="<%= a.getId() %>"/>
@ -134,12 +139,16 @@
<% } %> <% } %>
</select><br /> </select><br />
<button id="sendButton" class="btn waves-effect waves-light" type="submit" name="action">Edit <button id="sendButton" class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Edit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
</form> </form>
<hr />
<br />
<a href="../access" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -19,22 +19,22 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="/css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -59,8 +59,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -70,22 +70,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('./roles')">Roles</a></li> <li class="active"><a class="whiteLink active" onclick="postRedirect('./roles')">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Users</a></li> <li><a class="whiteLink" href="./services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./resources')">Resources</a></li> <li><a class="whiteLink" href="./reports">Reportes de Ingresos</a></li>
<li class="active"><a class="whiteLink">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('./services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('./roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('./users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('./resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a href="#" style="background-color: lightgray">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="./roles">Roles</a></li>
<li class="tab"><a href="./users">Users</a></li>
<li class="tab"><a href="./resources">Resources</a></li>
<li class="tab active"><a class="active" href="#">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -108,10 +114,13 @@
respDiv.style.backgroundColor = responseData["color"]; respDiv.style.backgroundColor = responseData["color"];
respDiv.innerHTML = "<div style=\"margin: 10px\">" + responseData["response"] + "</div>"; respDiv.innerHTML = "<div style=\"margin: 10px\">" + responseData["response"] + "</div>";
setTimeout(function () {
respDiv.style.maxHeight = "500px"; respDiv.style.maxHeight = "500px";
setTimeout(function () { setTimeout(function () {
respDiv.style.maxHeight = "0"; respDiv.style.maxHeight = "0";
},1500); },1500);
},10);
</script> </script>
@ -121,15 +130,15 @@
<div> <div>
<div style="float: left; display: inline;"> <div style="float: left; display: inline;">
<i class="material-icons large" style=" color: #67c9b3">info_outline</i> <i class="material-icons large" style=" color: #3f51b5">info_outline</i>
</div> </div>
<div style="font-size: x-large; clear: right; min-height: 87px;"> <div style="font-size: x-large; clear: right; min-height: 87px;">
The admin Role has full access by default. El Rol "admin" tiene acceso total.
</div> </div>
</div> </div>
<br /> <br />
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/access/add')"><i class="material-icons left">add</i>Create</a> <a class="waves-effect waves-light btn whiteLink indigo darken-1" onclick="postRedirect('/e/access/add')"><i class="material-icons left">add</i>Create</a>
<br /> <br />
<br /> <br />
@ -158,12 +167,19 @@
<td><%= e.getResourceName() %></td> <td><%= e.getResourceName() %></td>
<td><%= e.getStatus() %></td> <td><%= e.getStatus() %></td>
<td> <td>
<a onclick="postRedirect('/access/view',{id: '<%=e.getId() %>'})" class="postLink">View</a> | <a onclick="postRedirect('./access/view',{id: '<%=e.getId() %>'})" class="postLink">View</a> |
<a onclick="postRedirect('/access/edit',{id:'<%= e.getId() %>', info:'redirect'})" class="postLink">Edit</a> | <a onclick="postRedirect('./access/edit',{id:'<%= e.getId() %>', info:'redirect'})" class="postLink">Edit</a> |
<form name="post_<%= e.getId() %>" style="display:none;" method="post" action="/access/delete"><input type="hidden" name="accessId" value="<%= e.getId() %>"/> <form name="post_<%= e.getId() %>" style="display:none;" method="post" action="./access/delete"><input type="hidden" name="accessId" value="<%= e.getId() %>"/>
</form> </form>
<a href="#" class="postLink" onclick="if (confirm('Are you sure you want to delete # <%= e.getId() %>?')) { document.post_<%= e.getId() %>.submit(); } event.returnValue = false; return false;">Delete</a></td> <a href="#" class="postLink" onclick="
if (confirm('¿Estás seguro de que quieres eliminar #<%= e.getId() %>?')) {
document.post_<%= e.getId() %>.submit();
}
event.returnValue = false; return false;">
Delete
</a>
</td>
</tr> </tr>
<% } %> <% } %>

View File

@ -12,22 +12,22 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title> <title>Insert title here</title>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -52,8 +52,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -63,24 +63,29 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="../reports">Reportes de Ingresos</a></li>
<li class="active"><a href="" class="whiteLink">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a href="#" style="background-color: lightgray">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab active"><a class="active" href="../access">Access</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -97,7 +102,7 @@
<hr/> <hr/>
<br /> <br />
<a href="../access" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../access" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -18,21 +18,21 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -57,8 +57,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -68,22 +68,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li class="active"><a class="whiteLink" href="">Resources</a></li> <li><a class="whiteLink" href="../reports">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a href="#" style="background-color: lightgray">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab active"><a class="active" href="#">Resources</a></li>
<li class="tab"><a href="../access">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -96,7 +102,7 @@
<form method="post" action="./add"> <form method="post" action="./add">
<input name="action" value="create" type="hidden"> <input name="action" value="create" type="hidden">
Url of the Resource:<br /> Uri of the Resource:<br />
<input name="url" placeholder="Url of the Resource" required><br /> <input name="url" placeholder="Url of the Resource" required><br />
Status of the Resource:<br /> Status of the Resource:<br />
<select name="status" class="browser-default" required> <select name="status" class="browser-default" required>
@ -106,14 +112,14 @@
</select> </select>
<br /> <br />
<button class="btn waves-effect waves-light" type="submit" name="action">Submit <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
</form> </form>
<hr /> <hr />
<br /> <br />
<a href="../resources" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../resources" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -23,22 +23,22 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="/css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -63,8 +63,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -74,24 +74,29 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('./roles')">Roles</a></li> <li class="active"><a class="whiteLink active">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="./services">Administración de recursos</a></li>
<li class="active"><a class="whiteLink" href="">Resources</a></li> <li><a class="whiteLink" href="./reports">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('./services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('./roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('./users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a href="#" style="background-color: lightgray">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="./roles">Roles</a></li>
<li class="tab"><a href="./users">Users</a></li>
<li class="tab active"><a class="active" href="#">Resources</a></li>
<li class="tab"><a href="./access">Access</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -124,14 +129,14 @@
<br /> <br />
<br /> <br />
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/resources/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a> <a class="waves-effect waves-light btn whiteLink indigo darken-1" onclick="postRedirect('/e/resources/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a>
<br /> <br />
<br /> <br />
<table class="striped responsive-table"> <table class="striped responsive-table">
<thead> <thead>
<tr> <tr>
<td>URL</td> <td>URI</td>
<td>Status</td> <td>Status</td>
<td>Date created</td> <td>Date created</td>
<td>Actions</td> <td>Actions</td>

View File

@ -22,21 +22,21 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -61,8 +61,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -72,22 +72,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li class="active"><a class="whiteLink" href="">Resources</a></li> <li><a class="whiteLink" href="../reports">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a href="#" style="background-color: lightgray">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab active"><a class="active" href="#">Resources</a></li>
<li class="tab"><a href="../access">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -104,7 +110,7 @@
<input name="key" value="<%=resource.getKey()%>" type="hidden"> <input name="key" value="<%=resource.getKey()%>" type="hidden">
<input name="action" value="update" type="hidden"> <input name="action" value="update" type="hidden">
Url:<br /> Uri:<br />
<input name="url" value="<%=resource.getUrl()%>" placeholder="url" required><br/> <input name="url" value="<%=resource.getUrl()%>" placeholder="url" required><br/>
<br/> <br/>
Status:<br /> Status:<br />
@ -115,7 +121,7 @@
</select> </select>
<br /> <br />
<button class="btn waves-effect waves-light" type="submit" name="action">Submit <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
@ -125,7 +131,7 @@
<div style="font-size: x-large"> <div style="font-size: x-large">
Url: <%=resource.getUrl()%><br /> Uri: <%=resource.getUrl()%><br />
Status: <%=resource.getStatus()%><br /> Status: <%=resource.getStatus()%><br />
</div> </div>
@ -134,7 +140,7 @@
<hr /> <hr />
<br /> <br />
<a href="../resources" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../resources" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -17,21 +17,21 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="#" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -56,8 +56,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -67,22 +67,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li class="active"><a class="whiteLink" href="">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="./azopotamadre">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a href="#" style="background-color: lightgray">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab"><a href="../access">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -98,21 +104,45 @@
Name of the Role:<br /> Name of the Role:<br />
<input name="roleName" placeholder="Name of the Role" required><br /> <input name="roleName" placeholder="Name of the Role" required><br />
Status of the Role:<br /> Status of the Role:<br />
<select name="roleStatus" class="browser-default" required> <br />
<!--<select name="roleStatus" class="browser-default" required>
<option value="" disabled selected>Choose a status</option> <option value="" disabled selected>Choose a status</option>
<option value="true">true</option> <option value="true">true</option>
<option value="false">false</option> <option value="false">false</option>
</select> </select>-->
<div class="switch" id="siwtchContainer">
<label>
False
<input id="sivth" type="checkbox" name="roleStatus" value="false">
<span class="lever"></span>
True
</label>
</div>
<br /> <br />
<button class="btn waves-effect waves-light" type="submit" name="action">Submit <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
<script>
document.getElementById("siwtchContainer").addEventListener("mouseup",changeSwitch);
var elSwitch = document.getElementById("sivth");
function changeSwitch() {
if (elSwitch.value === "false") {
elSwitch.value = "true";
} else {
elSwitch.value = "false";
}
console.log("anumaaa -> " + elSwitch.value);
}
</script>
</form> </form>
<hr /> <hr />
<br /> <br />
<a href="../roles" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../roles" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -15,28 +15,45 @@
%> %>
<html lang="es"> <html lang="es">
<head> <head>
<title>Roles - Hotel Services</title> <meta charset="UTF-8">
<title>Home - Hotel Service</title>
<meta name="google-signin-client_id" content="746890482047-c734fgap3p3vb6bdoquufn60bsh2p8l9.apps.googleusercontent.com"> <!--<link type="text/css" rel="stylesheet" href="./css/Diseno.css">-->
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="../css/Elements.css?v=2">
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="../js/GlobalJs.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="/css/Diseno.css">
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="google-signin-client_id" content="746890482047-c734fgap3p3vb6bdoquufn60bsh2p8l9.apps.googleusercontent.com">
<style>
body{
margin: 0;
padding: 0;
background-color: white;
font-family: Roboto, serif;
}
.transition{
overflow: hidden;
height: auto;
transition: max-height 250ms ease-in;
}
</style>
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -61,8 +78,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -72,24 +89,29 @@
</svg> </svg>
</a> </a>
</li> </li>
<li class="active"><a class="whiteLink" href="">Roles</a></li> <li class="active"><a class="whiteLink active" href="#">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Users</a></li> <li><a class="whiteLink" href="./services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./resources')">Resources</a></li> <li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('./services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a href="#" style="background-color: lightgray">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('./users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('./resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="#">Roles</a></li>
<li class="tab"><a href="./users">Users</a></li>
<li class="tab"><a href="./resources">Resources</a></li>
<li class="tab"><a href="./access">Access</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -111,10 +133,12 @@
respDiv.style.backgroundColor = responseData["color"]; respDiv.style.backgroundColor = responseData["color"];
respDiv.innerHTML = "<div style=\"margin: 10px\">" + responseData["response"] + "</div>"; respDiv.innerHTML = "<div style=\"margin: 10px\">" + responseData["response"] + "</div>";
setTimeout(function () {
respDiv.style.maxHeight = "500px"; respDiv.style.maxHeight = "500px";
setTimeout(function () { setTimeout(function () {
respDiv.style.maxHeight = "0"; respDiv.style.maxHeight = "0";
},1500); },1500);
},10);
</script> </script>
@ -122,7 +146,7 @@
<br /> <br />
<br /> <br />
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/roles/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a> <a class="waves-effect waves-light btn whiteLink indigo darken-1" onclick="postRedirect('./roles/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a>
<br /> <br />
<br /> <br />
@ -159,19 +183,45 @@
<td><%= roleKey.getStatus()%></td> <td><%= roleKey.getStatus()%></td>
<td><%= roleKey.getCreateDate()%></td> <td><%= roleKey.getCreateDate()%></td>
<td> <td>
<a class="postLink" onclick="postRedirect('roles/view',{action:'viewRedirect',key:'<%=key%>'})">View</a> <a class="postLink" onclick="postRedirect('./roles/view',{action:'viewRedirect',key:'<%=key%>'})">View</a>
| <a class="postLink" onclick="postRedirect('roles/view',{action:'editRedirect',key:'<%=key%>'})">Edit</a> | <a class="postLink" onclick="postRedirect('./roles/view',{action:'editRedirect',key:'<%=key%>'})">Edit</a>
| <a class="postLink" onclick="postRedirect('roles/delete',{key:'<%=key%>'})">Delete</a></td> | <a class="postLink" onclick="postRedirect('./roles/delete',{key:'<%=key%>'})">Delete</a></td>
</tr> </tr>
<% } %> <% } %>
</tbody> </tbody>
</table> </table>
</div> </div>
<script>
function postRedirect(url, postData){
var postForm = document.createElement("form");
postForm.action = url;
postForm.method = "POST";
postForm.style.display = "none";
for (var key in postData){
if (postData.hasOwnProperty(key)){
var input = document.createElement("input");
input.type = "hidden";
input.name = key;
input.value = postData[key];
postForm.appendChild(input);
}
}
document.body.appendChild(postForm);
postForm.submit();
}
</script>
</body> </body>
</html> </html>

View File

@ -21,21 +21,21 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="#" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -60,8 +60,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -71,24 +71,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li class="active"><a class="whiteLink" href="/roles">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="../azopotamadre">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()"> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
Show Services
</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a href="#" style="background-color: lightgray">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="../roles">Roles</a></li>
<li class="tab"><a href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab"><a href="../access">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -107,16 +111,39 @@
Name:<br /> Name:<br />
<input name="roleName" value="<%=roleKey.getName()%>" placeholder="Name" required><br/> <input name="roleName" value="<%=roleKey.getName()%>" placeholder="Name" required><br/>
<br/>
Status:<br /> Status:<br />
<select name="roleStatus" class="browser-default" required> <br />
<option value="" disabled selected>Choose a status</option> <div class="switch" id="siwtchContainer">
<option value="true">true</option> <label>
<option value="false">false</option> False
</select> <input id="sivth" type="checkbox" name="roleStatus" value="false">
<span class="lever"></span>
True
</label>
</div>
<br /> <br />
<button class="btn waves-effect waves-light" type="submit" name="action">Submit <script>
document.getElementById("siwtchContainer").addEventListener("mouseup",changeSwitch);
var elSwitch = document.getElementById("sivth");
if ("<%=roleKey.getStatus()%>" === "true"){
elSwitch.checked = "true";
elSwitch.value = "true";
}
function changeSwitch() {
if (elSwitch.value === "false") {
elSwitch.value = "true";
} else {
elSwitch.value = "false";
}
console.log("anumaaa -> " + elSwitch.value);
}
</script>
<button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
@ -127,7 +154,7 @@
<div style="font-size: x-large"> <div style="font-size: x-large">
Name: <%=roleKey.getName()%><br /> Name: <%=roleKey.getName()%><br />
Email: <%=roleKey.getStatus()%><br /> Status: <%=roleKey.getStatus()%><br />
</div> </div>
@ -135,7 +162,7 @@
<hr /> <hr />
<br /> <br />
<a href="../roles" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../roles" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -18,32 +18,36 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer;" onclick="changeUserOptions()"> <span style="min-width: 80px;">
<%= user.getName()%> <%= user.getName()%>
</span>
<img src="<%=user.getImgUrl()%>" alt="" class="circle responsive-img" style="padding: 5px" width="50px"> <img src="<%=user.getImgUrl()%>" alt="" class="circle responsive-img" style="padding: 5px" width="50px">
<i class="material-icons right">arrow_drop_down</i> <i class="material-icons">arrow_drop_down</i>
<div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute; width: auto; display: none;"> <div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute;
width: auto; display: none;">
<ul style="color: black"> <ul style="color: black">
<li style="padding: 0 5px;"> <li style="padding: 0 5px;">
<a style="color: black" onclick="postRedirect('../view',{action:'closeSession'})">Log Out</a> <a style="color: black" onclick="postRedirect('./users/view',{action:'closeSession'})">Log Out</a>
</li> </li>
<li id="cerrar" style="padding: 0 5px; cursor: pointer"> <li id="cerrar" style="padding: 0 5px; cursor: pointer">
@ -54,8 +58,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -65,22 +69,26 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li><a class="whiteLink" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li class="active"><a class="whiteLink active" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li class="active"><a class="whiteLink" href="">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="../services">Servicios</a></li>
<li class="tab"><a href="./users">Otros</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -104,14 +112,14 @@
<input type="hidden" name="userId" value="<%=user.getId()%>"> <input type="hidden" name="userId" value="<%=user.getId()%>">
<button class="btn waves-effect waves-light" type="submit" name="action">Create <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Create
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
</form> </form>
<hr /> <hr />
<br /> <br />
<a href="../services" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../services" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -22,22 +22,22 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="/css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css?v=2"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css?v=2">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -62,8 +62,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -73,24 +73,27 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('./roles')">Roles</a></li> <li><a class="whiteLink" href="./roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Users</a></li> <li class="active"><a class="whiteLink active" href="./services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./resources')">Resources</a></li> <li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./access')">Access</a></li>
<li>|</li>
<li class="active"><a class="whiteLink" href="">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('./roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('./resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="#">Servicios</a></li>
<li class="tab"><a href="./users">Otros</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -123,7 +126,7 @@
<br /> <br />
<br /> <br />
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/services/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a> <a class="waves-effect waves-light btn whiteLink indigo darken-1" onclick="postRedirect('/e/services/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a>
<br /> <br />
<br /> <br />

View File

@ -21,21 +21,21 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -60,8 +60,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -71,24 +71,26 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li><a class="whiteLink" href="../roles">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('../users')">Users</a></li> <li class="active"><a class="whiteLink active" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li class="active"><a class="whiteLink" href="">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()"> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
Show Services
</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a href="#" style="background-color: lightgray">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a onclick="postRedirect('../users')">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="../services">Servicios</a></li>
<li class="tab"><a href="./users">Otros</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -115,7 +117,7 @@
<input name="Description" placeholder="Description" required value="<%= service.getDescription() %>"><br /> <input name="Description" placeholder="Description" required value="<%= service.getDescription() %>"><br />
<button class="btn waves-effect waves-light" type="submit" name="action">Edit <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Edit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
@ -128,7 +130,7 @@
Name: <%= service.getName() %><br /> Name: <%= service.getName() %><br />
Price: <%= service.getPrice() %><br /> Price: <%= service.getPrice() %><br />
Description: <%= service.getDescription() %><br /> Description: <%= service.getDescription() %><br />
Created by: <a style="cursor:pointer;" onclick="postRedirect('/users/view',{action:'viewRedirect',userID:'<%=service.getCreatorUserId()%>'})"><%= service.getCreatorUserName() %></a> Created by: <a style="cursor:pointer;" onclick="postRedirect('/e/users/view',{action:'viewRedirect',userID:'<%=service.getCreatorUserId()%>'})"><%= service.getCreatorUserName() %></a>
</div> </div>
@ -136,7 +138,7 @@
<hr /> <hr />
<br /> <br />
<a href="../roles" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../services" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -19,32 +19,36 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer;" onclick="changeUserOptions()"> <span style="min-width: 80px;">
<%= user.getName()%> <%= user.getName()%>
</span>
<img src="<%=user.getImgUrl()%>" alt="" class="circle responsive-img" style="padding: 5px" width="50px"> <img src="<%=user.getImgUrl()%>" alt="" class="circle responsive-img" style="padding: 5px" width="50px">
<i class="material-icons right">arrow_drop_down</i> <i class="material-icons">arrow_drop_down</i>
<div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute; width: auto; display: none;"> <div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute;
width: auto; display: none;">
<ul style="color: black"> <ul style="color: black">
<li style="padding: 0 5px;"> <li style="padding: 0 5px;">
<a style="color: black" onclick="postRedirect('../view',{action:'closeSession'})">Log Out</a> <a style="color: black" onclick="postRedirect('./users/view',{action:'closeSession'})">Log Out</a>
</li> </li>
<li id="cerrar" style="padding: 0 5px; cursor: pointer"> <li id="cerrar" style="padding: 0 5px; cursor: pointer">
@ -55,8 +59,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -66,22 +70,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="../roles">Administración de Usuarios</a></li>
<li class="active"><a class="whiteLink" href="">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab active"><a class="active" href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab"><a href="../access">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -119,14 +129,14 @@
</select> </select>
<br /> <br />
<button class="btn waves-effect waves-light" type="submit" name="action">Submit <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
</form> </form>
<hr /> <hr />
<br /> <br />
<a href="../users" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../users" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

View File

@ -21,22 +21,22 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="/css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css?v=2"> <link type="text/css" rel="stylesheet" href="../css/Elements.css?v=2">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -61,8 +61,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -72,24 +72,29 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('./roles')">Roles</a></li> <li class="active"><a class="whiteLink active">Administración de Usuarios</a></li>
<li class="active"><a class="whiteLink" href="">Users</a></li> <li><a class="whiteLink" href="./services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./resources')">Resources</a></li> <li><a class="whiteLink" href="./azopotomadre">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('./services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('./roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('./resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div> </div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="./roles">Roles</a></li>
<li class="tab active"><a class="active" href="">Users</a></li>
<li class="tab"><a href="./resources">Resources</a></li>
<li class="tab"><a href="./access">Access</a></li>
</ul>
</div>
</nav> </nav>
<div class="container"> <div class="container">
@ -122,7 +127,7 @@
<br /> <br />
<br /> <br />
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/users/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a> <a class="waves-effect waves-light btn whiteLink indigo darken-1" onclick="postRedirect('/e/users/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a>
<br /> <br />
<br /> <br />

View File

@ -23,22 +23,22 @@
<script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="../css/Diseno.css"> <link type="text/css" rel="stylesheet" href="../../css/Diseno.css">
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css"> <link type="text/css" rel="stylesheet" href="../../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css"> <link type="text/css" rel="stylesheet" href="../../css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script> <script src="../../js/GlobalJs.js" async defer></script>
</head> </head>
<body> <body>
<nav style="background-color: #67c9b3"> <nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper"> <div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a> <a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()"> <div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;"> <span style="min-width: 80px;">
@ -63,8 +63,8 @@
</div> </div>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li> <li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank"> <a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg"> <svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon"> <title id="simpleicons-github-icon">
GitHub icon GitHub icon
@ -74,22 +74,28 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('../roles')">Roles</a></li> <li class="active"><a class="whiteLink active" href="#">Administración de Usuarios</a></li>
<li class="active"><a class="whiteLink" href="">Users</a></li> <li><a class="whiteLink" href="../services">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../resources')">Resources</a></li> <li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li><a class="whiteLink" onclick="postRedirect('../access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('../services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div> <!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent"> <div id="dropdownContent">
<a onclick="postRedirect('../roles')">Roles</a> <a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a> <a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('../resources')">Resources</a> <a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('../access')">Access</a> <a onclick="postRedirect('./access')">Access</a>
</div>-->
</div> </div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="../roles">Roles</a></li>
<li class="tab active"><a class="active" href="../users">Users</a></li>
<li class="tab"><a href="../resources">Resources</a></li>
<li class="tab"><a href="../access">Access</a></li>
</ul>
</div> </div>
</nav> </nav>
@ -133,7 +139,7 @@
</select> </select>
<br /> <br />
<button class="btn waves-effect waves-light" type="submit" name="action">Submit <button class="btn waves-effect waves-light indigo darken-1" type="submit" name="action">Submit
<i class="material-icons right">send</i> <i class="material-icons right">send</i>
</button> </button>
@ -157,7 +163,7 @@
<hr /> <hr />
<br /> <br />
<a href="../users" class="waves-effect waves-light btn whiteLink"><i class="material-icons left">arrow_back</i>Go Back</a> <a href="../users" class="waves-effect waves-light btn whiteLink indigo darken-1"><i class="material-icons left">arrow_back</i>Go Back</a>
</div> </div>

Binary file not shown.

View File

@ -2,38 +2,38 @@
<servlet> <servlet>
<servlet-name>UsersControllerAdd</servlet-name> <servlet-name>UsersControllerAdd</servlet-name>
<servlet-class>controller.users.UsersControllerAdd</servlet-class> <servlet-class>controller.employee.users.UsersControllerAdd</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UsersControllerAdd</servlet-name> <servlet-name>UsersControllerAdd</servlet-name>
<url-pattern>/users/add</url-pattern> <url-pattern>/e/users/add</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>UsersControllerIndex</servlet-name> <servlet-name>UsersControllerIndex</servlet-name>
<servlet-class>controller.users.UsersControllerIndex</servlet-class> <servlet-class>controller.employee.users.UsersControllerIndex</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UsersControllerIndex</servlet-name> <servlet-name>UsersControllerIndex</servlet-name>
<url-pattern>/users</url-pattern> <url-pattern>/e/users</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>UsersControllerView</servlet-name> <servlet-name>UsersControllerView</servlet-name>
<servlet-class>controller.users.UsersControllerView</servlet-class> <servlet-class>controller.employee.users.UsersControllerView</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UsersControllerView</servlet-name> <servlet-name>UsersControllerView</servlet-name>
<url-pattern>/users/view</url-pattern> <url-pattern>/e/users/view</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>UsersControllerDelete</servlet-name> <servlet-name>UsersControllerDelete</servlet-name>
<servlet-class>controller.users.UsersControllerDelete</servlet-class> <servlet-class>controller.employee.users.UsersControllerDelete</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>UsersControllerDelete</servlet-name> <servlet-name>UsersControllerDelete</servlet-name>
<url-pattern>/users/delete</url-pattern> <url-pattern>/e/users/delete</url-pattern>
</servlet-mapping> </servlet-mapping>
@ -41,38 +41,38 @@
<servlet> <servlet>
<servlet-name>RolesControllerAdd</servlet-name> <servlet-name>RolesControllerAdd</servlet-name>
<servlet-class>controller.roles.RolesControllerAdd</servlet-class> <servlet-class>controller.employee.roles.RolesControllerAdd</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>RolesControllerAdd</servlet-name> <servlet-name>RolesControllerAdd</servlet-name>
<url-pattern>/roles/add</url-pattern> <url-pattern>/e/roles/add</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>RolesControllerIndex</servlet-name> <servlet-name>RolesControllerIndex</servlet-name>
<servlet-class>controller.roles.RolesControllerIndex</servlet-class> <servlet-class>controller.employee.roles.RolesControllerIndex</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>RolesControllerIndex</servlet-name> <servlet-name>RolesControllerIndex</servlet-name>
<url-pattern>/roles</url-pattern> <url-pattern>/e/roles</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>RolesControllerView</servlet-name> <servlet-name>RolesControllerView</servlet-name>
<servlet-class>controller.roles.RolesControllerView</servlet-class> <servlet-class>controller.employee.roles.RolesControllerView</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>RolesControllerView</servlet-name> <servlet-name>RolesControllerView</servlet-name>
<url-pattern>/roles/view</url-pattern> <url-pattern>/e/roles/view</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>RolesControllerDelete</servlet-name> <servlet-name>RolesControllerDelete</servlet-name>
<servlet-class>controller.roles.RolesControllerDelete</servlet-class> <servlet-class>controller.employee.roles.RolesControllerDelete</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>RolesControllerDelete</servlet-name> <servlet-name>RolesControllerDelete</servlet-name>
<url-pattern>/roles/delete</url-pattern> <url-pattern>/e/roles/delete</url-pattern>
</servlet-mapping> </servlet-mapping>
@ -80,38 +80,38 @@
<servlet> <servlet>
<servlet-name>ResourcesControllerAdd</servlet-name> <servlet-name>ResourcesControllerAdd</servlet-name>
<servlet-class>controller.resources.ResourcesControllerAdd</servlet-class> <servlet-class>controller.employee.resources.ResourcesControllerAdd</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ResourcesControllerAdd</servlet-name> <servlet-name>ResourcesControllerAdd</servlet-name>
<url-pattern>/resources/add</url-pattern> <url-pattern>/e/resources/add</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>ResourcesControllerIndex</servlet-name> <servlet-name>ResourcesControllerIndex</servlet-name>
<servlet-class>controller.resources.ResourcesControllerIndex</servlet-class> <servlet-class>controller.employee.resources.ResourcesControllerIndex</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ResourcesControllerIndex</servlet-name> <servlet-name>ResourcesControllerIndex</servlet-name>
<url-pattern>/resources</url-pattern> <url-pattern>/e/resources</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>ResourcesControllerView</servlet-name> <servlet-name>ResourcesControllerView</servlet-name>
<servlet-class>controller.resources.ResourcesControllerView</servlet-class> <servlet-class>controller.employee.resources.ResourcesControllerView</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ResourcesControllerView</servlet-name> <servlet-name>ResourcesControllerView</servlet-name>
<url-pattern>/resources/view</url-pattern> <url-pattern>/e/resources/view</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>ResourcesControllerDelete</servlet-name> <servlet-name>ResourcesControllerDelete</servlet-name>
<servlet-class>controller.resources.ResourcesControllerDelete</servlet-class> <servlet-class>controller.employee.resources.ResourcesControllerDelete</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ResourcesControllerDelete</servlet-name> <servlet-name>ResourcesControllerDelete</servlet-name>
<url-pattern>/resources/delete</url-pattern> <url-pattern>/e/resources/delete</url-pattern>
</servlet-mapping> </servlet-mapping>
@ -119,47 +119,47 @@
<servlet> <servlet>
<servlet-name>AccessControllerEdit</servlet-name> <servlet-name>AccessControllerEdit</servlet-name>
<servlet-class>controller.access.AccessControllerEdit</servlet-class> <servlet-class>controller.employee.access.AccessControllerEdit</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>AccessControllerEdit</servlet-name> <servlet-name>AccessControllerEdit</servlet-name>
<url-pattern>/access/edit</url-pattern> <url-pattern>/e/access/edit</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>AccessControllerAdd</servlet-name> <servlet-name>AccessControllerAdd</servlet-name>
<servlet-class>controller.access.AccessControllerAdd</servlet-class> <servlet-class>controller.employee.access.AccessControllerAdd</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>AccessControllerAdd</servlet-name> <servlet-name>AccessControllerAdd</servlet-name>
<url-pattern>/access/add</url-pattern> <url-pattern>/e/access/add</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>AccessControllerIndex</servlet-name> <servlet-name>AccessControllerIndex</servlet-name>
<servlet-class>controller.access.AccessControllerIndex</servlet-class> <servlet-class>controller.employee.access.AccessControllerIndex</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>AccessControllerIndex</servlet-name> <servlet-name>AccessControllerIndex</servlet-name>
<url-pattern>/access</url-pattern> <url-pattern>/e/access</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>AccessControllerView</servlet-name> <servlet-name>AccessControllerView</servlet-name>
<servlet-class>controller.access.AccessControllerView</servlet-class> <servlet-class>controller.employee.access.AccessControllerView</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>AccessControllerView</servlet-name> <servlet-name>AccessControllerView</servlet-name>
<url-pattern>/access/view</url-pattern> <url-pattern>/e/access/view</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>AccessControllerDelete</servlet-name> <servlet-name>AccessControllerDelete</servlet-name>
<servlet-class>controller.access.AccessControllerDelete</servlet-class> <servlet-class>controller.employee.access.AccessControllerDelete</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>AccessControllerDelete</servlet-name> <servlet-name>AccessControllerDelete</servlet-name>
<url-pattern>/access/delete</url-pattern> <url-pattern>/e/access/delete</url-pattern>
</servlet-mapping> </servlet-mapping>
@ -168,38 +168,38 @@
--> -->
<servlet> <servlet>
<servlet-name>ServicesControllerAdd</servlet-name> <servlet-name>ServicesControllerAdd</servlet-name>
<servlet-class>controller.services.ServicesControllerAdd</servlet-class> <servlet-class>controller.employee.services.ServicesControllerAdd</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ServicesControllerAdd</servlet-name> <servlet-name>ServicesControllerAdd</servlet-name>
<url-pattern>/services/add</url-pattern> <url-pattern>/e/services/add</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>ServicesControllerDelete</servlet-name> <servlet-name>ServicesControllerDelete</servlet-name>
<servlet-class>controller.services.ServicesControllerDelete</servlet-class> <servlet-class>controller.employee.services.ServicesControllerDelete</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ServicesControllerDelete</servlet-name> <servlet-name>ServicesControllerDelete</servlet-name>
<url-pattern>/services/delete</url-pattern> <url-pattern>/e/services/delete</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>ServicesControllerIndex</servlet-name> <servlet-name>ServicesControllerIndex</servlet-name>
<servlet-class>controller.services.ServicesControllerIndex</servlet-class> <servlet-class>controller.employee.services.ServicesControllerIndex</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ServicesControllerIndex</servlet-name> <servlet-name>ServicesControllerIndex</servlet-name>
<url-pattern>/services</url-pattern> <url-pattern>/e/services</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet> <servlet>
<servlet-name>ServicesControllerView</servlet-name> <servlet-name>ServicesControllerView</servlet-name>
<servlet-class>controller.services.ServicesControllerView</servlet-class> <servlet-class>controller.employee.services.ServicesControllerView</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>ServicesControllerView</servlet-name> <servlet-name>ServicesControllerView</servlet-name>
<url-pattern>/services/view</url-pattern> <url-pattern>/e/services/view</url-pattern>
</servlet-mapping> </servlet-mapping>
@ -232,7 +232,7 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<servlet> <servlet>
<servlet-name>AccessControllerAdd</servlet-name> <servlet-name>AccessControllerAdd</servlet-name>
<servlet-class>controller.access.AccessControllerAdd</servlet-class> <servlet-class>controller.employee.access.AccessControllerAdd</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>AccessControllerAdd</servlet-name> <servlet-name>AccessControllerAdd</servlet-name>

View File

@ -156,11 +156,11 @@
document.getElementById("mainHeader").style.padding = "0"; document.getElementById("mainHeader").style.padding = "0";
setTimeout(function () { setTimeout(function () {
postRedirect("/users/add",{ postRedirect("/e/users/add",{
userEmail : profile.getEmail(), userEmail : profile.getEmail(),
userName : profile.getName(), userName : profile.getName(),
userImg : profile.getImageUrl(), userImg : profile.getImageUrl(),
userRole : "User", userRole : "Cliente",
action : "logIn" action : "logIn"
}); });
},500); },500);
@ -208,12 +208,9 @@
</svg> </svg>
</a> </a>
</li> </li>
<li><a class="whiteLink" onclick="postRedirect('./roles')">Roles</a></li> <li><a class="whiteLink" onclick="postRedirect('./roles')">Mis Servicios</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Users</a></li> <li><a class="whiteLink" onclick="postRedirect('./users')">Recibos y Facturas</a></li>
<li><a class="whiteLink" onclick="postRedirect('./resources')">Resources</a></li> <li><a class="whiteLink" onclick="postRedirect('./users')">Historial</a></li>
<li><a class="whiteLink" onclick="postRedirect('./access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('./services')">Services</a></li>
<li>|</li> <li>|</li>
</ul> </ul>
@ -276,6 +273,7 @@
</div> </div>
<br /> <br />
<a class="waves-effect waves-light btn whiteLink indigo darken-1" href="./e/roles"><i class="material-icons left">how_to_reg</i>Empleados</a>
</div> </div>

384
war/test.jsp Normal file
View File

@ -0,0 +1,384 @@
<%@ page import="model.User" %>
<%@ page import="model.Role" %>
<%@ page import="java.util.List" %>
<% User usuario = (User) request.getAttribute("User");
List<Role> roleList = (List<Role>) request.getAttribute("RoleList");
String serverResponse = (String) request.getAttribute("serverResponse");
if (serverResponse == null) serverResponse = "!";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home - Hotel Service</title>
<!--<link type="text/css" rel="stylesheet" href="./css/Diseno.css">-->
<link type="text/css" rel="stylesheet" href="./css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="./css/Elements.css?v=2">
<script src="./js/GlobalJs.js" async defer></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="google-signin-client_id" content="746890482047-c734fgap3p3vb6bdoquufn60bsh2p8l9.apps.googleusercontent.com">
<style>
body{
margin: 0;
padding: 0;
background-color: white;
font-family: Roboto, serif;
}
.transition{
overflow: hidden;
height: auto;
transition: max-height 250ms ease-in;
}
</style>
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="#" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;">
<%= usuario.getName()%>
</span>
<img src="<%=usuario.getImgUrl()%>" alt="" class="circle responsive-img" style="padding: 5px" width="50px">
<i class="material-icons">arrow_drop_down</i>
<div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute;
width: auto; display: none;">
<ul style="color: black">
<li style="padding: 0 5px;">
<a style="color: black" onclick="postRedirect('./users/view',{action:'closeSession'})">Log Out</a>
</li>
<li id="cerrar" style="padding: 0 5px; cursor: pointer">
<i class="small material-icons">arrow_drop_up</i>
</li>
</ul>
</div>
</div>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon">
GitHub icon
</title>
<path fill="white" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12">
</path>
</svg>
</a>
</li>
<li class="active"><a class="whiteLink active" onclick="postRedirect('./roles')">Administración de Usuarios</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Administración de recursos</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Reportes de Ingresos</a></li>
<li>|</li>
</ul>
<!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent">
<a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a>
</div>-->
</div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab active"><a class="active" href="#">Roles</a></li>
<li class="tab"><a onclick="postRedirect('./users')">Users</a></li>
<li class="tab"><a onclick="postRedirect('./resources')">Resources</a></li>
<li class="tab"><a onclick="postRedirect('./access')">Access</a></li>
</ul>
</div>
</nav>
<div class="container">
<br />
<span style="font-size: xx-large; font-family: 'Product Sans',Roboto,serif">Area de Empleados - Roles</span>
<br />
<br />
<%if (!serverResponse.equals("!")){ %>
<div id="serverResponse">
<div style="margin: 10px"></div>
</div>
<script>
var respDiv = document.getElementById("serverResponse");
var responseData = JSON.parse('<%=serverResponse%>');
respDiv.style.backgroundColor = responseData["color"];
respDiv.innerHTML = "<div style=\"margin: 10px\">" + responseData["response"] + "</div>";
respDiv.style.maxHeight = "500px";
setTimeout(function () {
respDiv.style.maxHeight = "0";
},1500);
</script>
<% } %>
<br />
<div style="font-size: x-large">
Bienvenido, <%= usuario.getName()%><br />
</div>
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/roles/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a>
<br />
<table class="striped responsive-table">
<thead>
<tr>
<td>Name</td>
<td>Status</td>
<td>Date created</td>
<td>Actions</td>
</tr>
</thead>
<tbody>
<% for (int i = 0; i < roleList.size(); i++) {%>
<% Role roleKey = roleList.get(i); %>
<% String key = roleKey.getKey();
String[] arr = key.split("");
key = "";
for (String a : arr) {
if (a.equals("\"")){
key += "&quot;";
} else{
key += a;
}
}
%>
<tr>
<td><%= roleKey.getName()%></td>
<td><%= roleKey.getStatus()%></td>
<td><%= roleKey.getCreateDate()%></td>
<td>
<a class="postLink" onclick="postRedirect('roles/view',{action:'viewRedirect',key:'<%=key%>'})">View</a>
| <a class="postLink" onclick="postRedirect('roles/view',{action:'editRedirect',key:'<%=key%>'})">Edit</a>
| <a class="postLink" onclick="postRedirect('roles/delete',{key:'<%=key%>'})">Delete</a></td>
</tr>
<% } %>
</tbody>
</table>
</div>
<script>
function postRedirect(url, postData){
var postForm = document.createElement("form");
postForm.action = url;
postForm.method = "POST";
postForm.style.display = "none";
for (var key in postData){
if (postData.hasOwnProperty(key)){
var input = document.createElement("input");
input.type = "hidden";
input.name = key;
input.value = postData[key];
postForm.appendChild(input);
}
}
document.body.appendChild(postForm);
postForm.submit();
}
</script>
</body>
</html>
<html lang="es">
<head>
<title>Roles - Hotel Services</title>
<meta name="google-signin-client_id" content="746890482047-c734fgap3p3vb6bdoquufn60bsh2p8l9.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="/css/Diseno.css">
<link type="text/css" rel="stylesheet" href="/css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="/css/Elements.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="/js/GlobalJs.js" async defer></script>
</head>
<body>
<nav style="background-color: #67c9b3">
<div class="nav-wrapper">
<a class="whiteLink hide-on-small-only" href="../" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;">
<%= usuario.getName()%>
</span>
<img src="<%=usuario.getImgUrl()%>" alt="" class="circle responsive-img" style="padding: 5px" width="50px">
<i class="material-icons">arrow_drop_down</i>
<div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute;
width: auto; display: none;">
<ul style="color: black">
<li style="padding: 0 5px;">
<a style="color: black" onclick="postRedirect('./users/view',{action:'closeSession'})">Log Out</a>
</li>
<li id="cerrar" style="padding: 0 5px; cursor: pointer">
<i class="small material-icons">arrow_drop_up</i>
</li>
</ul>
</div>
</div>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li>
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon">
GitHub icon
</title>
<path fill="white" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12">
</path>
</svg>
</a>
</li>
<li class="active"><a class="whiteLink" href="">Roles</a></li>
<li><a class="whiteLink" onclick="postRedirect('./users')">Users</a></li>
<li><a class="whiteLink" onclick="postRedirect('./resources')">Resources</a></li>
<li><a class="whiteLink" onclick="postRedirect('./access')">Access</a></li>
<li>|</li>
<li><a class="whiteLink" onclick="postRedirect('./services')">Services</a></li>
<li>|</li>
</ul>
<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent">
<a href="#" style="background-color: lightgray">Roles</a>
<a onclick="postRedirect('./users')">Users</a>
<a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a>
</div>
</div>
</nav>
<div class="container">
<br />
<span style="font-size: xx-large; font-family: 'Product Sans',Roboto,serif">Roles</span>
<br />
<br />
<%if (!serverResponse.equals("!")){ %>
<div id="serverResponse">
<div style="margin: 10px"></div>
</div>
<script>
var respDiv = document.getElementById("serverResponse");
var responseData = JSON.parse('<%=serverResponse%>');
respDiv.style.backgroundColor = responseData["color"];
respDiv.innerHTML = "<div style=\"margin: 10px\">" + responseData["response"] + "</div>";
respDiv.style.maxHeight = "500px";
setTimeout(function () {
respDiv.style.maxHeight = "0";
},1500);
</script>
<% } %>
<br />
<br />
<a class="waves-effect waves-light btn whiteLink" onclick="postRedirect('/roles/add',{action:'redirect'})"><i class="material-icons left">add</i>Create</a>
<br />
<br />
<table class="striped responsive-table">
<thead>
<tr>
<td>Name</td>
<td>Status</td>
<td>Date created</td>
<td>Actions</td>
</tr>
</thead>
<tbody>
<% for (int i = 0; i < roleList.size(); i++) {%>
<% Role roleKey = roleList.get(i); %>
<% String key = roleKey.getKey();
String[] arr = key.split("");
key = "";
for (String a : arr) {
if (a.equals("\"")){
key += "&quot;";
} else{
key += a;
}
}
%>
<tr>
<td><%= roleKey.getName()%></td>
<td><%= roleKey.getStatus()%></td>
<td><%= roleKey.getCreateDate()%></td>
<td>
<a class="postLink" onclick="postRedirect('roles/view',{action:'viewRedirect',key:'<%=key%>'})">View</a>
| <a class="postLink" onclick="postRedirect('roles/view',{action:'editRedirect',key:'<%=key%>'})">Edit</a>
| <a class="postLink" onclick="postRedirect('roles/delete',{key:'<%=key%>'})">Delete</a></td>
</tr>
<% } %>
</tbody>
</table>
</div>
</body>
</html>

159
war/usersAdminIndex.jsp Normal file
View File

@ -0,0 +1,159 @@
<%@ page import="model.Role" %>
<%@ page import="model.User" %>
<%@ page import="java.util.List" %><%--
Created by IntelliJ IDEA.
User: Fernando
Date: 07/06/2018
Time: 16:39
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Home - Hotel Service</title>
<!--<link type="text/css" rel="stylesheet" href="./css/Diseno.css">-->
<link type="text/css" rel="stylesheet" href="../css/materialize.min.css">
<link type="text/css" rel="stylesheet" href="../css/Elements.css?v=2">
<script src="../js/GlobalJs.js" async defer></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="google-signin-client_id" content="746890482047-c734fgap3p3vb6bdoquufn60bsh2p8l9.apps.googleusercontent.com">
<style>
body{
margin: 0;
padding: 0;
background-color: white;
font-family: Roboto, serif;
}
.transition{
overflow: hidden;
height: auto;
transition: max-height 250ms ease-in;
}
</style>
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<nav class="nav-extended" style="background-color: #3f51b5">
<div class="nav-wrapper" style="max-height: 64px">
<a class="whiteLink hide-on-small-only" href="/" style="padding: 0 0 0 20px; font-family: 'Product Sans', Roboto, serif; font-size: xx-large">Hotel Services</a>
&nbsp;&nbsp;Empleados
<div class="right valign-wrapper" style="padding: 0 0 0 10px; cursor: pointer; min-width: 150px;" onclick="changeUserOptions()">
<span style="min-width: 80px;">
user
</span>
<img src="" alt="" class="circle responsive-img" style="padding: 5px" width="50px">
<i class="material-icons">arrow_drop_down</i>
<div id="userOptions" style="background-color: white; border:solid 2px #67c9b3; position: absolute;
width: auto; display: none;">
<ul style="color: black">
<li style="padding: 0 5px;">
<a style="color: black" onclick="postRedirect('./users/view',{action:'closeSession'})">Log Out</a>
</li>
<li id="cerrar" style="padding: 0 5px; cursor: pointer">
<i class="small material-icons">arrow_drop_up</i>
</li>
</ul>
</div>
</div>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li style="max-height: 62px">
<a href="https://github.com/Grupo-PW2/Lab08" target="_blank" style="max-height: 62px">
<svg style="width: 32px; height: 32px; margin: 20px 0" aria-labelledby="simpleicons-github-icon" roleKey="img" xmlns="http://www.w3.org/2000/svg">
<title id="simpleicons-github-icon">
GitHub icon
</title>
<path fill="white" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12">
</path>
</svg>
</a>
</li>
<li class="active"><a class="whiteLink active" href="#">Administración de Usuarios</a></li>
<li><a class="whiteLink" href="./services">Administración de recursos</a></li>
<li><a class="whiteLink" href="">Reportes de Ingresos</a></li>
<li>|</li>
</ul>
<!--<div class="dropdown hide-on-large-only" style="padding: 0 10px; font-weight: bold" onclick="toggleDropdown()">Show Services</div>
<div id="dropdownContent">
<a href="#" onclick="postRedirect('./roles')">Roles</a>
<a href="#" style="background-color: lightgray">Users</a>
<a onclick="postRedirect('./resources')">Resources</a>
<a onclick="postRedirect('./access')">Access</a>
</div>-->
</div>
<div class="nav-content" style="background-color: #3949a3">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="./roles">Roles</a></li>
<li class="tab"><a href="./users">Users</a></li>
<li class="tab"><a href="./resources">Resources</a></li>
<li class="tab"><a href="./access">Access</a></li>
</ul>
</div>
</nav>
<div class="container">
<br />
<span style="font-size: xx-large; font-family: 'Product Sans',Roboto,serif">Administración de Usuarios.</span>
<br />
<br />
Usuario, puedes realizar las siguientes acciones:<br />
<br />
Administrar Roles.<br />
Administrar Usuarios.<br />
Administrar Recursos.<br />
Administrar Accesos.<br />
<br />
<br />
</div>
<script>
function postRedirect(url, postData){
var postForm = document.createElement("form");
postForm.action = url;
postForm.method = "POST";
postForm.style.display = "none";
for (var key in postData){
if (postData.hasOwnProperty(key)){
var input = document.createElement("input");
input.type = "hidden";
input.name = key;
input.value = postData[key];
postForm.appendChild(input);
}
}
document.body.appendChild(postForm);
postForm.submit();
}
</script>
</body>
</html>