feat(front-end): new logo edited
This commit is contained in:
@@ -223,10 +223,15 @@ public class OrderEmailListener {
|
||||
order.getCreatedAt().format(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM).withLocale(locale))
|
||||
);
|
||||
templateData.put("totalCost", currencyFormatter.format(order.getTotalChf()));
|
||||
templateData.put("logoUrl", buildLogoUrl());
|
||||
templateData.put("currentYear", Year.now().getValue());
|
||||
return templateData;
|
||||
}
|
||||
|
||||
private String buildLogoUrl() {
|
||||
return frontendBaseUrl.replaceAll("/+$", "") + "/assets/images/brand-logo-yellow.svg";
|
||||
}
|
||||
|
||||
private String applyOrderConfirmationTexts(Map<String, Object> templateData, String language, String orderNumber) {
|
||||
return switch (language) {
|
||||
case "en" -> {
|
||||
|
||||
@@ -30,6 +30,9 @@ public class CustomQuoteRequestNotificationService {
|
||||
@Value("${app.mail.contact-request.customer.enabled:true}")
|
||||
private boolean contactRequestCustomerMailEnabled;
|
||||
|
||||
@Value("${app.frontend.base-url:http://localhost:4200}")
|
||||
private String frontendBaseUrl;
|
||||
|
||||
public CustomQuoteRequestNotificationService(EmailNotificationService emailNotificationService,
|
||||
ContactRequestLocalizationService localizationService) {
|
||||
this.emailNotificationService = emailNotificationService;
|
||||
@@ -63,6 +66,7 @@ public class CustomQuoteRequestNotificationService {
|
||||
templateData.put("phone", safeValue(request.getPhone()));
|
||||
templateData.put("message", safeValue(request.getMessage()));
|
||||
templateData.put("attachmentsCount", attachmentsCount);
|
||||
templateData.put("logoUrl", buildLogoUrl());
|
||||
templateData.put("currentYear", Year.now().getValue());
|
||||
|
||||
emailNotificationService.sendEmail(
|
||||
@@ -101,6 +105,7 @@ public class CustomQuoteRequestNotificationService {
|
||||
templateData.put("phone", safeValue(request.getPhone()));
|
||||
templateData.put("message", safeValue(request.getMessage()));
|
||||
templateData.put("attachmentsCount", attachmentsCount);
|
||||
templateData.put("logoUrl", buildLogoUrl());
|
||||
templateData.put("currentYear", Year.now().getValue());
|
||||
|
||||
String subject = localizationService.applyCustomerContactRequestTexts(templateData, language, request.getId());
|
||||
@@ -119,4 +124,8 @@ public class CustomQuoteRequestNotificationService {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private String buildLogoUrl() {
|
||||
return frontendBaseUrl.replaceAll("/+$", "") + "/assets/images/brand-logo-yellow.svg";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,21 @@
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: block;
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #444444;
|
||||
line-height: 1.5;
|
||||
@@ -63,7 +78,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Nuova richiesta di contatto</h1>
|
||||
<div class="header">
|
||||
<img class="brand-logo" th:src="${logoUrl}" src="https://example.com/assets/images/brand-logo-yellow.svg" alt="3D-Fab">
|
||||
<h1>Nuova richiesta di contatto</h1>
|
||||
</div>
|
||||
<p>E' stata ricevuta una nuova richiesta dal form contatti/su misura.</p>
|
||||
|
||||
<table>
|
||||
|
||||
@@ -25,6 +25,21 @@
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: block;
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 18px;
|
||||
color: #222222;
|
||||
@@ -69,7 +84,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 th:text="${headlineText}">We received your contact request</h1>
|
||||
<div class="header">
|
||||
<img class="brand-logo" th:src="${logoUrl}" src="https://example.com/assets/images/brand-logo-yellow.svg" alt="3D-Fab">
|
||||
<h1 th:text="${headlineText}">We received your contact request</h1>
|
||||
</div>
|
||||
<p th:text="${greetingText}">Hi customer,</p>
|
||||
<p th:text="${introText}">Thank you for contacting us. Our team will reply as soon as possible.</p>
|
||||
<p>
|
||||
|
||||
@@ -27,8 +27,17 @@
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: block;
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -67,6 +76,7 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<img class="brand-logo" th:src="${logoUrl}" src="https://example.com/assets/images/brand-logo-yellow.svg" alt="3D-Fab">
|
||||
<h1 th:text="${headlineText}">Thank you for your order #00000000</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,8 +27,17 @@
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: block;
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -70,6 +79,7 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<img class="brand-logo" th:src="${logoUrl}" src="https://example.com/assets/images/brand-logo-yellow.svg" alt="3D-Fab">
|
||||
<h1 th:text="${headlineText}">Your order #00000000 has been shipped</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,8 +27,17 @@
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: block;
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -70,6 +79,7 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<img class="brand-logo" th:src="${logoUrl}" src="https://example.com/assets/images/brand-logo-yellow.svg" alt="3D-Fab">
|
||||
<h1 th:text="${headlineText}">Payment confirmed for order #00000000</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,8 +27,17 @@
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
display: block;
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
margin: 0 auto 16px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
color: #333333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -70,6 +79,7 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<img class="brand-logo" th:src="${logoUrl}" src="https://example.com/assets/images/brand-logo-yellow.svg" alt="3D-Fab">
|
||||
<h1 th:text="${headlineText}">Payment reported for order #00000000</h1>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user