Resolved Conflicts

This commit is contained in:
Piyush
2025-03-17 16:43:26 +05:30
49 changed files with 594 additions and 107 deletions

View File

@@ -195,7 +195,7 @@ public class UserDao {
private BeneficiaryEntity createBeneficiary(RoleEntity roleEntity, UserReq userReq, HubEntity hub) {
BeneficiaryEntity beneficiaryEntity = null;
if (RoleStatusEnum.ROLE_BENEFICIARY.getValue().equals(roleEntity.getRoleType())) {
if (RoleStatusEnum.ROLE_BENEFICIARY.getValue().equals(roleEntity.getRoleType()) || RoleStatusEnum.ROLE_CONFIDI.getValue().equals(roleEntity.getRoleType())) {
beneficiaryEntity = new BeneficiaryEntity();
beneficiaryEntity.setAddress(userReq.getAddress());
beneficiaryEntity.setCity(userReq.getCity());
@@ -791,7 +791,7 @@ public class UserDao {
HubEntity hubEntity = hubService.valdateHub(userEntity.getHub().getId());
String beneficiaryRoleType = RoleStatusEnum.ROLE_BENEFICIARY.getValue();
if (validator.checkIsBeneficiary()) {
if (Boolean.TRUE.equals(validator.checkIsBeneficiary()) || Boolean.TRUE.equals(validator.checkIsConfidi())) {
// Validate if the new email already exists for another beneficiary in the same hub
boolean emailExistsForBeneficiary = userRepository.existsByEmailIgnoreCaseForBeneficiaries(
userReq.getEmail(), hubEntity.getUniqueUuid(), beneficiaryRoleType);