Merge branch 'develop' of https://github.com/Kitzanos/GEPAFIN-BE into develop
This commit is contained in:
@@ -94,7 +94,15 @@ public class EmailNotificationDao {
|
||||
subjectPlaceholders.put("{{company_name}}", company.getCompanyName());
|
||||
// bodyPlaceholders.put("{{legal_mail}}", legalMail);
|
||||
String subject = Utils.replacePlaceholders(systemEmailTemplateResponse.getSubject(), subjectPlaceholders);
|
||||
String body = Utils.replacePlaceholders(systemEmailTemplateResponse.getHtmlContent(), bodyPlaceholders);
|
||||
String body;
|
||||
if ("t7jh5wfg9QXylNaTZkPoE".equals(hubEntity.getUniqueUuid()) && templateType.equals(SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum.DOCUMENTATION_INTEGRATION_REQUEST)) {
|
||||
bodyPlaceholders.put("{{email_signature}}", hubEntity.getEmailSignature());
|
||||
bodyPlaceholders.put("{{platform_link}}",hubEntity.getDomainName());
|
||||
body = Utils.replacePlaceholders(GepafinConstant.DOCUMENTATION_INTEGRATION_REQUEST_SVILUPPUMBRIA, bodyPlaceholders);
|
||||
}
|
||||
else {
|
||||
body = Utils.replacePlaceholders(systemEmailTemplateResponse.getHtmlContent(), bodyPlaceholders);
|
||||
}
|
||||
|
||||
return new EmailContentResponse(subject, body, systemEmailTemplateResponse);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ import java.util.stream.Collectors;
|
||||
@Component
|
||||
public class FormDao {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(FormDao.class);
|
||||
|
||||
@Autowired
|
||||
private FormRepository formRepository;
|
||||
|
||||
@@ -203,8 +205,9 @@ public class FormDao {
|
||||
String formFieldId,Long evaluationCriteriaId) {
|
||||
EvaluationCriteriaEntity evaluationCriteria = evaluationCriteriaService.validateEvaluationCriteria(evaluationCriteriaId);
|
||||
if (Boolean.FALSE.equals(evaluationCriteria.getCall().getId().equals(callEntity.getId()))) {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||
Translator.toLocale(GepafinConstant.EVALUATIONCRITERIA_INVALID));
|
||||
log.info("This evaluation criterion does not belong to the current call. Expected Call ID = {}, Found Call ID = {}",
|
||||
callEntity.getId(), evaluationCriteria.getCall().getId());
|
||||
return;
|
||||
}
|
||||
CriteriaFormFieldEntity criteriaFormField = new CriteriaFormFieldEntity();
|
||||
criteriaFormField.setCallId(callEntity.getId());
|
||||
@@ -471,7 +474,9 @@ public class FormDao {
|
||||
|
||||
FieldValidatorBean fieldValidatorBean = Utils.convertSourceObjectToDestinationObject(contentResponseBean.getValidators(), FieldValidatorBean.class);
|
||||
String fieldValue = getFieldValue(contentResponseBean);
|
||||
validator.isRequired(value, fieldValidatorBean.getIsRequired(), fieldValue);
|
||||
|
||||
validator.isRequired(value, fieldValidatorBean.getIsRequired(), fieldValue)
|
||||
.validateCustomTableValidation(value,fieldValidatorBean.getCustom(),fieldValue,contentResponseBean);
|
||||
});
|
||||
if (Boolean.TRUE.equals(isSendValidationError)) {
|
||||
validator.validate();
|
||||
|
||||
Reference in New Issue
Block a user