Applied check for PEC email
This commit is contained in:
@@ -576,6 +576,8 @@ public class GepafinConstant {
|
||||
public static final String EMAIL_PEC_REQUIRED="email.pec.cannot.null";
|
||||
public static final String USER_REQUEST_COMPLETED="user.request.completed";
|
||||
public static final String END_DATE_GREATER_THAN_NOW="end.date.greater.than.now";
|
||||
public static final String PEC_EMAIL_IS_REQUIRED = "pec.email.required";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1493,6 +1493,11 @@ public class ApplicationDao {
|
||||
log.warn("Invalid amount requested | amount: {}", applicationEntity.getAmountRequested());
|
||||
throw new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.AMOUNT_REQUEST_SHOULD_GREATED_THEN_ZERO));
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(applicationEntity.getPecEmail())) {
|
||||
log.warn("PEC email is required");
|
||||
throw new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.PEC_EMAIL_IS_REQUIRED));
|
||||
}
|
||||
List<FlowEdgesEntity> flowEdgesList = flowEdgesRepository.findByCallId(applicationEntity.getCall().getId());
|
||||
Long totalSteps = flowFormDao.calculateTotalSteps(flowEdgesList);
|
||||
Integer completedSteps = flowFormDao.getCompletedSteps(applicationEntity, true);
|
||||
|
||||
Reference in New Issue
Block a user