Nueva propiedad para guardar el displayName del usuario logeado.

This commit is contained in:
Marcos Garcia Nuñez
2019-12-23 16:23:51 +01:00
parent 74ec842f54
commit b0f5c69a47
4 changed files with 39 additions and 26 deletions

View File

@@ -300,19 +300,19 @@ public class UpdateProfileMBean extends ManagedBeanBase implements Serializable
case PATIENT:
PatientTO pat = this.getRemoteManagerProfile().updatePatientData(id, nif, name, surname, password, email);
this.setPatientData(pat);
usr = new LoggedUserTO(pat.getId().toString(), pat.getName(), pat.getPassword(), this.userType);
usr = new LoggedUserTO(pat.getId().toString(), pat.getName(), pat.getPassword(), this.userType, pat.getDisplayName());
break;
case FAMILY_DOCTOR:
FamilyDoctorTO fd = this.getRemoteManagerProfile().updateFamilyDoctorData(id, nif, name, surname, password, email, this.primaryHealthCareCenter);
this.setFamilyDoctorData(fd);
usr = new LoggedUserTO(fd.getId().toString(), fd.getName(), fd.getPassword(), this.userType);
usr = new LoggedUserTO(fd.getId().toString(), fd.getName(), fd.getPassword(), this.userType, fd.getDisplayName());
break;
case SPECIALIST_DOCTOR:
SpecialistDoctorTO sd = this.getRemoteManagerProfile().updateSpecialistDoctorData(id, nif, name, surname, password, email, this.medicalSpecialty);
this.setSpecialistDoctorData(sd);
usr = new LoggedUserTO(sd.getId().toString(), sd.getName(), sd.getPassword(), this.userType);
usr = new LoggedUserTO(sd.getId().toString(), sd.getName(), sd.getPassword(), this.userType, sd.getDisplayName());
break;
case ADMINISTRATOR: