Corrección de error en el alta de usuarios y formato de la pantalla de
login de usuarios.
This commit is contained in:
1 parent
3a7a27e609
commit
1dff77f32a
13 files changed
+153
-71
No files matched your search
@@ -45,8 +45,11 @@ public class ProfileFacadeBean implements ProfileFacadeRemote {
|
||||
|
||||
public PatientTO registerPatient(Integer id, String nif, String name, String surname, String password, String email) {
|
||||
PatientTO paTO = null;
|
||||
|
||||
if (id == null)
|
||||
id = 1;
|
||||
|
||||
PatientJPA ms = new PatientJPA(id, nif, name, surname, HashUtils.hashMD5(password), email);
|
||||
PatientJPA ms = new PatientJPA(nif, name, surname, HashUtils.hashMD5(password), email);
|
||||
entman.persist(ms);
|
||||
paTO = new PatientTO(ms.getId(), ms.getNif(), ms.getName(), ms.getSurname(), ms.getPassword(), ms.getEmail());
|
||||
|
||||
@@ -60,8 +63,9 @@ public class ProfileFacadeBean implements ProfileFacadeRemote {
|
||||
|
||||
// TODO: Lanzar error si no se encuentra la especialidad.
|
||||
if (ms != null) {
|
||||
SpecialistDoctorJPA sd = new SpecialistDoctorJPA(id, nif, name, surname, HashUtils.hashMD5(password), email);
|
||||
SpecialistDoctorJPA sd = new SpecialistDoctorJPA(nif, name, surname, HashUtils.hashMD5(password), email, ms);
|
||||
entman.persist(sd);
|
||||
|
||||
sdTO = new SpecialistDoctorTO(sd.getId(), sd.getNif(), sd.getName(), sd.getSurname(), sd.getPassword(), sd.getEmail());
|
||||
}
|
||||
|
||||
@@ -76,9 +80,7 @@ public class ProfileFacadeBean implements ProfileFacadeRemote {
|
||||
// TODO: Lanzar error si no encontramos el cap!!!!!
|
||||
if (phcC != null) {
|
||||
|
||||
FamilyDoctorJPA fd = new FamilyDoctorJPA(id, nif, name, surname, HashUtils.hashMD5(password), email);
|
||||
fd.setPrimaryHealthCareCenter(phcC);
|
||||
|
||||
FamilyDoctorJPA fd = new FamilyDoctorJPA(nif, name, surname, HashUtils.hashMD5(password), email, phcC);
|
||||
entman.persist(fd);
|
||||
|
||||
fdTO = new FamilyDoctorTO(fd.getId(), fd.getNif(), fd.getName(), fd.getSurname(), fd.getPassword(), fd.getEmail());
|
||||
|
||||
Reference in new issue
Block a user