Applied check for PEC email

This commit is contained in:
rajesh
2025-09-10 17:42:04 +05:30
parent 6f7acbcdfe
commit 94a3095ab3
4 changed files with 9 additions and 0 deletions

View File

@@ -577,6 +577,8 @@ public class GepafinConstant {
public static final String COMPANY_NAME_JSON="denominazione"; public static final String COMPANY_NAME_JSON="denominazione";
public static final String USER_REQUEST_COMPLETED="user.request.completed"; 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 END_DATE_GREATER_THAN_NOW="end.date.greater.than.now";
public static final String PEC_EMAIL_IS_REQUIRED = "pec.email.required";
} }

View File

@@ -1493,6 +1493,11 @@ public class ApplicationDao {
log.warn("Invalid amount requested | amount: {}", applicationEntity.getAmountRequested()); log.warn("Invalid amount requested | amount: {}", applicationEntity.getAmountRequested());
throw new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.AMOUNT_REQUEST_SHOULD_GREATED_THEN_ZERO)); 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()); List<FlowEdgesEntity> flowEdgesList = flowEdgesRepository.findByCallId(applicationEntity.getCall().getId());
Long totalSteps = flowFormDao.calculateTotalSteps(flowEdgesList); Long totalSteps = flowFormDao.calculateTotalSteps(flowEdgesList);
Integer completedSteps = flowFormDao.getCompletedSteps(applicationEntity, true); Integer completedSteps = flowFormDao.getCompletedSteps(applicationEntity, true);

View File

@@ -412,4 +412,5 @@ ndg.not.found=NDG not found.
email.pec.cannot.null=Email pec is required. email.pec.cannot.null=Email pec is required.
user.request.completed=User request completed successfully. user.request.completed=User request completed successfully.
end.date.greater.than.now=End date must be greater than the current date and time. end.date.greater.than.now=End date must be greater than the current date and time.
pec.email.required=PEC email is required.

View File

@@ -403,4 +403,5 @@ ndg.not.found=NDG non trovato.
email.pec.cannot.null=L'indirizzo email pec è obbligatorio. email.pec.cannot.null=L'indirizzo email pec è obbligatorio.
user.request.completed=Richiesta utente completata con successo. user.request.completed=Richiesta utente completata con successo.
end.date.greater.than.now=La data di fine deve essere successiva alla data e all'ora correnti. end.date.greater.than.now=La data di fine deve essere successiva alla data e all'ora correnti.
pec.email.required=Obbligatorio l'indirizzo e-mail PEC.