Merge pull request #344 from Kitzanos/mail-content-prod
Cherry-pick (Changes mail content for call #23)
This commit is contained in:
@@ -577,6 +577,23 @@ public class GepafinConstant {
|
|||||||
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";
|
public static final String PEC_EMAIL_IS_REQUIRED = "pec.email.required";
|
||||||
|
public static final String APPLICATION_SUBMISSION_MAIL_BODY="<html>\n" +
|
||||||
|
"<body style=\"font-family: Arial, sans-serif; color: #333; line-height: 1.6;\">\n" +
|
||||||
|
" <div style=\"padding: 20px; border: 1px solid #ddd; border-radius: 8px; max-width: 600px; margin: auto;\">\n" +
|
||||||
|
" <p>Buongiorno,</p>\n" +
|
||||||
|
" <p>\n" +
|
||||||
|
" Si comunica che, il <strong>“Modello AR1“<strong> di cui all'oggetto, è stato regolarmente acquisito ed è stato registrato con Protocollo n. \n" +
|
||||||
|
" <strong>{{protocol_number}}</strong> del <strong>{{date}}</strong> alle \n" +
|
||||||
|
" <strong>{{time}}</strong>.\n" +
|
||||||
|
" </p>\n" +
|
||||||
|
" <p>Distinti Saluti,</p>\n" +
|
||||||
|
" <p>\n" +
|
||||||
|
" <strong>{{email_signature}}</strong>\n" +
|
||||||
|
" </p>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
"</body>\n" +
|
||||||
|
"</html>";
|
||||||
|
public static final String APPLICATION_SUBMISSION_MAIL_SUBJECT="Modello AR1 GARANZIA PARTECIPAZIONI E FINANZIAMENTI S.P.A. - PER BREVITA' GEPAFIN S.P.A";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,6 +222,9 @@ public class ApplicationDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CallRepository callRepository;
|
private CallRepository callRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SystemEmailTemplatesDao systemEmailTemplatesDao;
|
||||||
|
|
||||||
public final Random random = new Random();
|
public final Random random = new Random();
|
||||||
|
|
||||||
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long formId, Long applicationId) {
|
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long formId, Long applicationId) {
|
||||||
@@ -1199,6 +1202,11 @@ public class ApplicationDao {
|
|||||||
SystemEmailTemplateResponse systemEmailTemplateResponse = systemEmailTemplatesService
|
SystemEmailTemplateResponse systemEmailTemplateResponse = systemEmailTemplatesService
|
||||||
.retrieveTemplateByTypeAndCall(SystemEmailTemplatesEntityTypeEnum.APPLICATION_SUBMISSION_TO_USER_AND_COMPANY,
|
.retrieveTemplateByTypeAndCall(SystemEmailTemplatesEntityTypeEnum.APPLICATION_SUBMISSION_TO_USER_AND_COMPANY,
|
||||||
hub, null);
|
hub, null);
|
||||||
|
if (Boolean.TRUE.equals(validator.isProductionProfileActivated()) && applicationEntity.getCall().getId().equals(23l)) {
|
||||||
|
systemEmailTemplateResponse.setHtmlContent(GepafinConstant.APPLICATION_SUBMISSION_MAIL_BODY);
|
||||||
|
systemEmailTemplateResponse.setHtmlContent(systemEmailTemplatesDao.replaceEmailSignature(hub,GepafinConstant.APPLICATION_SUBMISSION_MAIL_BODY,null));
|
||||||
|
systemEmailTemplateResponse.setSubject(GepafinConstant.APPLICATION_SUBMISSION_MAIL_SUBJECT);
|
||||||
|
}
|
||||||
|
|
||||||
// Create the map for subject placeholders
|
// Create the map for subject placeholders
|
||||||
Map<String, String> subjectPlaceholders = new HashMap<>();
|
Map<String, String> subjectPlaceholders = new HashMap<>();
|
||||||
@@ -1272,6 +1280,8 @@ public class ApplicationDao {
|
|||||||
.retrieveTemplateByTypeAndCall(SystemEmailTemplatesEntityTypeEnum.APPLICATION_SUBMISSION_TO_GEPAFIN,
|
.retrieveTemplateByTypeAndCall(SystemEmailTemplatesEntityTypeEnum.APPLICATION_SUBMISSION_TO_GEPAFIN,
|
||||||
hub, null);
|
hub, null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create the map for subject placeholders
|
// Create the map for subject placeholders
|
||||||
Map<String, String> subjectPlaceholders = new HashMap<>();
|
Map<String, String> subjectPlaceholders = new HashMap<>();
|
||||||
subjectPlaceholders.put("{{call_name}}", call.getName());
|
subjectPlaceholders.put("{{call_name}}", call.getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user