diff --git a/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml b/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml index e902330..1e39fd3 100644 --- a/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml +++ b/1.sources/MyHealth/docroot/WEB-INF/faces-config.xml @@ -2,114 +2,4 @@ - - - home - /home.xhtml - - - RegisterUser - /profile/RegisterUser.xhtml - - - RegisterUserResult - /profile/RegisterUserResult.xhtml - - - AddPatient - /profile/AddPatient.xhtml - - - AddFamilyDoctor - /profile/AddFamilyDoctor.xhtml - - - AddSpecialistDoctor - /profile/AddSpecialistDoctor.xhtml - - - ChangeFamilyDoctor - /profile/ChangeFamilyDoctor.xhtml - - - ShowPatient - /profile/ShowPatient.xhtml - - - ShowFamilyDoctor - /profile/ShowFamilyDoctor.xhtml - - - ShowSpecialistDoctor - /profile/ShowSpecialistDoctor.xhtml - - - UpdateSpecialistDoctor - /profile/UpdateSpecialistDoctor.xhtml - - - UpdateFamilyDoctor - /profile/UpdateFamilyDoctor.xhtml - - - UpdatePatient - /profile/UpdatePatient.xhtml - - - UpdateProfile - /profile/UpdateProfile.xhtml - - - changecap - /profile/ChangePrimaryHealthCareCenter.xhtml - - - AddMedicalTest - /medicaltest/MedicalTests.xhtml - - - VisitView - /visit/VisitView.xhtml - - - ManageCAPs - /systemAdmin/ManageSpecialties.xhtml - - - ManageMedicalSpecialties - /systemAdmin/ManageSpecialties.xhtml - - - AddUserAdmin - /systemAdmin/ManageSpecialties.xhtml - - - ScheduleVisit - /visit/VisitView.xhtml - - - QueryVisit - /visit/VisitView.xhtml - - - MedicaltestManage - /medicaltest/MedicalTests.xhtml - - - QueryDoctorBySpecialty - /medicaltest/MedicalTests.xhtml - - - ListDoctorsbySpecialty - /medicaltest/MedicalTests.xhtml - - - AskQuestion - /medicaltest/MedicalTests.xhtml - - - AnswerQuestion - /medicaltest/MedicalTests.xhtml - - diff --git a/1.sources/MyHealth/docroot/WEB-INF/web.xml b/1.sources/MyHealth/docroot/WEB-INF/web.xml index 99dda7f..f3dd3be 100644 --- a/1.sources/MyHealth/docroot/WEB-INF/web.xml +++ b/1.sources/MyHealth/docroot/WEB-INF/web.xml @@ -27,8 +27,8 @@ primefaces.FONT_AWESOME true - - + + primefaces.THEME #{sessionPreferences.currentTheme} @@ -59,14 +59,10 @@ *.xhtml - - - - - - - - + + 500 + /error.xhtml + 30 diff --git a/1.sources/MyHealth/docroot/header.xhtml b/1.sources/MyHealth/docroot/header.xhtml index 1ce0ce5..1f3cc9f 100644 --- a/1.sources/MyHealth/docroot/header.xhtml +++ b/1.sources/MyHealth/docroot/header.xhtml @@ -77,7 +77,7 @@ - + diff --git a/1.sources/MyHealth/docroot/login.xhtml b/1.sources/MyHealth/docroot/login.xhtml index 9151d21..eb77bfa 100644 --- a/1.sources/MyHealth/docroot/login.xhtml +++ b/1.sources/MyHealth/docroot/login.xhtml @@ -43,7 +43,7 @@ oncomplete="handleLoginRequest(xhr, status, args)" />
- +
diff --git a/1.sources/MyHealth/docroot/profile/AddFamilyDoctor.xhtml b/1.sources/MyHealth/docroot/profile/AddFamilyDoctor.xhtml index 3f9e53e..10a6c27 100644 --- a/1.sources/MyHealth/docroot/profile/AddFamilyDoctor.xhtml +++ b/1.sources/MyHealth/docroot/profile/AddFamilyDoctor.xhtml @@ -27,7 +27,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/AddPatient.xhtml b/1.sources/MyHealth/docroot/profile/AddPatient.xhtml index a7a1d59..6959621 100644 --- a/1.sources/MyHealth/docroot/profile/AddPatient.xhtml +++ b/1.sources/MyHealth/docroot/profile/AddPatient.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/AddSpecialistDoctor.xhtml b/1.sources/MyHealth/docroot/profile/AddSpecialistDoctor.xhtml index 129e462..575abb2 100644 --- a/1.sources/MyHealth/docroot/profile/AddSpecialistDoctor.xhtml +++ b/1.sources/MyHealth/docroot/profile/AddSpecialistDoctor.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/ChangePrimaryHealthCareCenter.xhtml b/1.sources/MyHealth/docroot/profile/ChangePrimaryHealthCareCenter.xhtml index 3856934..138dbaf 100644 --- a/1.sources/MyHealth/docroot/profile/ChangePrimaryHealthCareCenter.xhtml +++ b/1.sources/MyHealth/docroot/profile/ChangePrimaryHealthCareCenter.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/RegisterUser.xhtml b/1.sources/MyHealth/docroot/profile/RegisterUser.xhtml index f5ef679..3d41690 100644 --- a/1.sources/MyHealth/docroot/profile/RegisterUser.xhtml +++ b/1.sources/MyHealth/docroot/profile/RegisterUser.xhtml @@ -6,7 +6,7 @@ - +
@@ -15,24 +15,24 @@
Enhorabuena - - , se ha registrado correctamente, el sistema le ha asignado un - + + , se ha registrado correctamente, el sistema le ha asignado un + , por favor recuerdelo ya que deberá utilizarlo para logearse en el sistema.
- - + +
- +
- +
@@ -42,7 +42,7 @@
- + function handleRequest(xhr, status, args) { if(args.specs) { @@ -65,9 +65,9 @@
- - - + + +
@@ -80,7 +80,7 @@
- +
@@ -90,7 +90,7 @@
- +
@@ -100,7 +100,7 @@
- +
@@ -110,7 +110,7 @@
- +
@@ -119,7 +119,7 @@
-
@@ -130,7 +130,7 @@
- +
@@ -141,10 +141,10 @@
- - + #{phc.name} #{phc.location} @@ -159,10 +159,10 @@
- - + #{ms.name} #{ms.description} @@ -175,10 +175,10 @@
- +
- +
diff --git a/1.sources/MyHealth/docroot/profile/ShowFamilyDoctor.xhtml b/1.sources/MyHealth/docroot/profile/ShowFamilyDoctor.xhtml index 2f26ec6..5f4928b 100644 --- a/1.sources/MyHealth/docroot/profile/ShowFamilyDoctor.xhtml +++ b/1.sources/MyHealth/docroot/profile/ShowFamilyDoctor.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/ShowPaciente.xhtml b/1.sources/MyHealth/docroot/profile/ShowPaciente.xhtml index 12f2cb1..01c461c 100644 --- a/1.sources/MyHealth/docroot/profile/ShowPaciente.xhtml +++ b/1.sources/MyHealth/docroot/profile/ShowPaciente.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/ShowSpecialistDoctor.xhtml b/1.sources/MyHealth/docroot/profile/ShowSpecialistDoctor.xhtml index 33662cd..2beebdf 100644 --- a/1.sources/MyHealth/docroot/profile/ShowSpecialistDoctor.xhtml +++ b/1.sources/MyHealth/docroot/profile/ShowSpecialistDoctor.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/UpdateFamilyDoctor.xhtml b/1.sources/MyHealth/docroot/profile/UpdateFamilyDoctor.xhtml index 2636796..711a727 100644 --- a/1.sources/MyHealth/docroot/profile/UpdateFamilyDoctor.xhtml +++ b/1.sources/MyHealth/docroot/profile/UpdateFamilyDoctor.xhtml @@ -27,7 +27,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/UpdatePatient.xhtml b/1.sources/MyHealth/docroot/profile/UpdatePatient.xhtml index 143ea1e..b014f7b 100644 --- a/1.sources/MyHealth/docroot/profile/UpdatePatient.xhtml +++ b/1.sources/MyHealth/docroot/profile/UpdatePatient.xhtml @@ -27,7 +27,7 @@
- +
diff --git a/1.sources/MyHealth/docroot/profile/UpdateProfile.xhtml b/1.sources/MyHealth/docroot/profile/UpdateProfile.xhtml index 60a768a..974ecea 100644 --- a/1.sources/MyHealth/docroot/profile/UpdateProfile.xhtml +++ b/1.sources/MyHealth/docroot/profile/UpdateProfile.xhtml @@ -30,23 +30,24 @@
- - +
+
- - + +
- +
@@ -56,7 +57,7 @@
- +
@@ -66,7 +67,7 @@
- +
@@ -76,7 +77,7 @@
- +
@@ -86,7 +87,7 @@
- +
@@ -95,7 +96,7 @@
-
@@ -106,7 +107,7 @@
- +
@@ -117,10 +118,10 @@
- - + #{phc.name} #{phc.location} @@ -135,10 +136,10 @@
- - + #{ms.name} #{ms.description} @@ -151,10 +152,10 @@
- +
- +
diff --git a/1.sources/MyHealth/docroot/profile/UpdateSpecialistDoctor.xhtml b/1.sources/MyHealth/docroot/profile/UpdateSpecialistDoctor.xhtml index 5888622..e24bb46 100644 --- a/1.sources/MyHealth/docroot/profile/UpdateSpecialistDoctor.xhtml +++ b/1.sources/MyHealth/docroot/profile/UpdateSpecialistDoctor.xhtml @@ -26,7 +26,7 @@
- +
diff --git a/1.sources/MyHealth/src/managedbean/common/MenuMBean.java b/1.sources/MyHealth/src/managedbean/common/MenuMBean.java index 5b9323a..c59e05d 100644 --- a/1.sources/MyHealth/src/managedbean/common/MenuMBean.java +++ b/1.sources/MyHealth/src/managedbean/common/MenuMBean.java @@ -34,7 +34,7 @@ public class MenuMBean implements Serializable { DefaultMenuItem item; DefaultSubMenu subMenu; - model.addElement(createMenuItem("Home", "pi pi-home", "home", null)); + model.addElement(createMenuItem("Home", "pi pi-home", "/home", null)); if (SessionUtils.isLogedIn() == true) { @@ -42,10 +42,10 @@ public class MenuMBean implements Serializable { // TODO: mostrar este menú solo si el usuario es administrador if (1 == 1) { subMenu = new DefaultSubMenu("Administración del sistema", "pi pi-cog"); - subMenu.addElement(createMenuItem("Esp. médicas", "pi pi-calendar", "ManageMedicalSpecialties", null)); - subMenu.addElement(createMenuItem("Centros At. Primaria", "pi pi-briefcase", "ManageCAPs", null)); + subMenu.addElement(createMenuItem("Esp. médicas", "pi pi-calendar", "/systemAdmin/ManageSpecialties", null)); + subMenu.addElement(createMenuItem("Centros At. Primaria", "pi pi-briefcase", "/systemAdmin/ManageSpecialties", null)); subMenu.addElement(new DefaultSeparator()); - subMenu.addElement(createMenuItem("Añadir usuario Admin", "pi pi-calendar", "AddUserAdmin", null)); + subMenu.addElement(createMenuItem("Añadir usuario Admin", "pi pi-calendar", "/systemAdmin/ManageSpecialties", null)); model.addElement(subMenu); } @@ -53,8 +53,8 @@ public class MenuMBean implements Serializable { // TODO: mostrar este menú solo si el usuario es paciente if (1 == 1) { subMenu = new DefaultSubMenu("Visitas", "pi pi-calendar"); - subMenu.addElement(createMenuItem("Agendar", "pi pi-calendar", "ScheduleVisit", null)); - subMenu.addElement(createMenuItem("Consultar", "pi pi-briefcase", "QueryVisit", null)); + subMenu.addElement(createMenuItem("Agendar", "pi pi-calendar", "/visit/VisitView", null)); + subMenu.addElement(createMenuItem("Consultar", "pi pi-briefcase", "/visit/VisitView", null)); model.addElement(subMenu); } @@ -63,12 +63,12 @@ public class MenuMBean implements Serializable { if (1 == 1) { subMenu = new DefaultSubMenu("Pruebas Medicas", "pi pi-clone"); - subMenu.addElement(createMenuItem("Añadir", "pi pi-clone", "AddMedicalTest", null)); - subMenu.addElement(createMenuItem("Gestionar", "pi pi-briefcase", "MedicaltestManage", null)); + subMenu.addElement(createMenuItem("Añadir", "pi pi-clone", "/medicaltest/MedicalTests", null)); + subMenu.addElement(createMenuItem("Gestionar", "pi pi-briefcase", "/medicaltest/MedicalTests", null)); subMenu.addElement(new DefaultSeparator()); - subMenu.addElement(createMenuItem("Consultar médicos pro esp.", "pi pi-search", "QueryDoctorBySpecialty", null)); + subMenu.addElement(createMenuItem("Consultar médicos pro esp.", "pi pi-search", "/medicaltest/MedicalTests", null)); subMenu.addElement(new DefaultSeparator()); - subMenu.addElement(createMenuItem("Listar médicos", "pi pi-list", "ListDoctorsbySpecialty", null)); + subMenu.addElement(createMenuItem("Listar médicos", "pi pi-list", "/medicaltest/MedicalTests", null)); model.addElement(subMenu); } @@ -78,10 +78,10 @@ public class MenuMBean implements Serializable { subMenu = new DefaultSubMenu("Preguntas", "pi pi-clone"); // TODO: Si es paciente puede preguntar if (true == true) - subMenu.addElement(createMenuItem("Añadir pregunta", "pi pi-clone", "AskQuestion", null)); + subMenu.addElement(createMenuItem("Añadir pregunta", "pi pi-clone", "/medicaltest/MedicalTests", null)); // TODO: Si es medico de familia puede responder if (true == true) - subMenu.addElement(createMenuItem("Responder pregunta", "pi pi-question", "AnswerQuestion", null)); + subMenu.addElement(createMenuItem("Responder pregunta", "pi pi-question", "/medicaltest/MedicalTests", null)); model.addElement(subMenu); } @@ -90,24 +90,24 @@ public class MenuMBean implements Serializable { // Perfil subMenu = new DefaultSubMenu("Gestionar perfil", "pi pi-id-card"); if (SessionUtils.isLogedIn() == false) { - subMenu.addElement(createMenuItem("Registro de usuario", "pi pi-users", "RegisterUser", null)); - subMenu.addElement(createMenuItem("Registro de paciente", "pi pi-user-plus", "AddPatient", null)); - subMenu.addElement(createMenuItem("Registro de médico", "pi pi-user-plus", "AddFamilyDoctor", null)); - subMenu.addElement(createMenuItem("Registro de especialista", "pi pi-user-plus", "AddFamilyDoctor", null)); - subMenu.addElement(createMenuItem("Registro de médico", "pi pi-user-plus", "AddSpecialistDoctor", null)); + subMenu.addElement(createMenuItem("Registro de usuario", "pi pi-users", "/profile/RegisterUser", null)); + subMenu.addElement(createMenuItem("Registro de paciente", "pi pi-user-plus", "/profile/AddPatient", null)); + subMenu.addElement(createMenuItem("Registro de médico", "pi pi-user-plus", "/profile/AddFamilyDoctor", null)); + subMenu.addElement(createMenuItem("Registro de especialista", "pi pi-user-plus", "/profile/AddFamilyDoctor", null)); + subMenu.addElement(createMenuItem("Registro de médico", "pi pi-user-plus", "/profile/AddSpecialistDoctor", null)); subMenu.addElement(new DefaultSeparator()); } else { - subMenu.addElement(createMenuItem("Actualizar mi perfil", "pi pi-user-edit", "UpdateProfile", null)); + subMenu.addElement(createMenuItem("Actualizar mi perfil", "pi pi-user-edit", "/profile/UpdateProfile", null)); subMenu.addElement(new DefaultSeparator()); // TODO: mostrar este menú solo si el usuario es paciente if (true == true) { - subMenu.addElement(createMenuItem("Cambiar médico de familia", "pi pi-chevron-circle-right", "ChangeFamilyDoctor", null)); + subMenu.addElement(createMenuItem("Cambiar médico de familia", "pi pi-chevron-circle-right", "/profile/ChangeFamilyDoctor", null)); subMenu.addElement(new DefaultSeparator()); } // TODO: mostrar este menú solo si el usuario es médico de familia if (true == true) - subMenu.addElement(createMenuItem("Cambiar CAP", "fa fa-h-square", "changecap", null)); + subMenu.addElement(createMenuItem("Cambiar CAP", "fa fa-h-square", "/profile/ChangePrimaryHealthCareCenter", null)); } model.addElement(subMenu); } diff --git a/1.sources/MyHealth/src/managedbean/profile/RegisterUserMBean.java b/1.sources/MyHealth/src/managedbean/profile/RegisterUserMBean.java index be90da8..60f10d7 100644 --- a/1.sources/MyHealth/src/managedbean/profile/RegisterUserMBean.java +++ b/1.sources/MyHealth/src/managedbean/profile/RegisterUserMBean.java @@ -36,7 +36,7 @@ import managedbean.common.ValidationUtils; * @author Marcos García Núñez (mgarcianun@uoc.edu) * */ -@Named("registerUser") +@Named("RegisterUser") @ViewScoped public class RegisterUserMBean extends ManagedBeanBase implements Serializable { diff --git a/1.sources/MyHealth/src/managedbean/systemAdmin/LoginMBean.java b/1.sources/MyHealth/src/managedbean/systemAdmin/LoginMBean.java index 847452f..f86bf7e 100644 --- a/1.sources/MyHealth/src/managedbean/systemAdmin/LoginMBean.java +++ b/1.sources/MyHealth/src/managedbean/systemAdmin/LoginMBean.java @@ -41,7 +41,6 @@ public class LoginMBean extends ManagedBeanBase { } public String login() { - FacesMessage message = null; boolean loggedIn = false; LoggedUserTO usr = null; @@ -56,7 +55,7 @@ public class LoginMBean extends ManagedBeanBase { this.addFacesMessageKeep(FacesMessage.SEVERITY_INFO, "Login correcto", "Bienvenido " + usr.getName()); - return ("home?faces-redirect=true"); + return ("/home?faces-redirect=true"); } else this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Loggin Error", "El usuario o la contraseña son incorrectos"); } catch (Exception ex) { @@ -66,7 +65,6 @@ public class LoginMBean extends ManagedBeanBase { } else this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Loggin Error", "El usuario o la contraseña son incorrectos"); - FacesContext.getCurrentInstance().addMessage(null, message); PrimeFaces.current().ajax().addCallbackParam("loggedIn", loggedIn); return ""; @@ -78,6 +76,6 @@ public class LoginMBean extends ManagedBeanBase { SessionUtils.DestroySession(); - return "home?faces-redirect=true"; + return "/home?faces-redirect=true"; } }