Implementada comprobación de NIFs duplicados para pacientes y todos los

médicos.
This commit is contained in:
Marcos Garcia Nuñez
2019-12-15 19:32:30 +01:00
parent 7193ffd250
commit 5a3ed35c16
9 changed files with 110 additions and 31 deletions

View File

@@ -172,6 +172,11 @@ public class UpdateProfileMBean extends ManagedBeanBase implements Serializable
return this.medicalSpecialitiesList;
}
public void hadleNIFValueChange() {
if (ValidationUtils.checkIfNifAlreadyRegistered(this.getRemoteManagerCommon(), this.userType, this.nif, this.id) == true)
this.addFacesMessage("frmUpdateProfile:nif", FacesMessage.SEVERITY_WARN, "NIF duplicado", "El nif indicado pertenece a otro usuario previamente registrado");
}
public List<FamilyDoctorTO> getFamilyDoctorList() {
return familyDoctorList;
}
@@ -261,6 +266,10 @@ public class UpdateProfileMBean extends ManagedBeanBase implements Serializable
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "El NIF indicado no es válido", "Por favor, especifique un NIF válido.");
error++;
}
if (ValidationUtils.checkIfNifAlreadyRegistered(this.getRemoteManagerCommon(), this.userType, this.nif, this.id) == true) {
this.addFacesMessage("frmUpdateProfile:nif", FacesMessage.SEVERITY_WARN, "NIF duplicado", "El nif indicado pertenece a otro usuario previamente registrado");
error++;
}
if (changePassword == true) {
// el usuario queire cambiar el password Comprobamos que el password
// especificado coincide con el guardado