diff --git a/backend/src/main/java/com/printcalculator/event/listener/OrderEmailListener.java b/backend/src/main/java/com/printcalculator/event/listener/OrderEmailListener.java index 27b349c..8772f60 100644 --- a/backend/src/main/java/com/printcalculator/event/listener/OrderEmailListener.java +++ b/backend/src/main/java/com/printcalculator/event/listener/OrderEmailListener.java @@ -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 templateData, String language, String orderNumber) { return switch (language) { case "en" -> { diff --git a/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java b/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java index 6c6d53c..84e4eaf 100644 --- a/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java +++ b/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java @@ -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"; + } } diff --git a/backend/src/main/resources/templates/email/contact-request-admin.html b/backend/src/main/resources/templates/email/contact-request-admin.html index 4341c34..dcecd57 100644 --- a/backend/src/main/resources/templates/email/contact-request-admin.html +++ b/backend/src/main/resources/templates/email/contact-request-admin.html @@ -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 @@
-

Nuova richiesta di contatto

+
+ +

Nuova richiesta di contatto

+

E' stata ricevuta una nuova richiesta dal form contatti/su misura.

diff --git a/backend/src/main/resources/templates/email/contact-request-customer.html b/backend/src/main/resources/templates/email/contact-request-customer.html index d308b0c..35def67 100644 --- a/backend/src/main/resources/templates/email/contact-request-customer.html +++ b/backend/src/main/resources/templates/email/contact-request-customer.html @@ -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 @@
-

We received your contact request

+
+ +

We received your contact request

+

Hi customer,

Thank you for contacting us. Our team will reply as soon as possible.

diff --git a/backend/src/main/resources/templates/email/order-confirmation.html b/backend/src/main/resources/templates/email/order-confirmation.html index 37a6082..d8e4b86 100644 --- a/backend/src/main/resources/templates/email/order-confirmation.html +++ b/backend/src/main/resources/templates/email/order-confirmation.html @@ -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 @@

+

Thank you for your order #00000000

diff --git a/backend/src/main/resources/templates/email/order-shipped.html b/backend/src/main/resources/templates/email/order-shipped.html index 74f5aa7..1d06f44 100644 --- a/backend/src/main/resources/templates/email/order-shipped.html +++ b/backend/src/main/resources/templates/email/order-shipped.html @@ -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 @@
+

Your order #00000000 has been shipped

diff --git a/backend/src/main/resources/templates/email/payment-confirmed.html b/backend/src/main/resources/templates/email/payment-confirmed.html index 657f1ef..c8c0f75 100644 --- a/backend/src/main/resources/templates/email/payment-confirmed.html +++ b/backend/src/main/resources/templates/email/payment-confirmed.html @@ -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 @@
+

Payment confirmed for order #00000000

diff --git a/backend/src/main/resources/templates/email/payment-reported.html b/backend/src/main/resources/templates/email/payment-reported.html index c7d2b72..94abd0f 100644 --- a/backend/src/main/resources/templates/email/payment-reported.html +++ b/backend/src/main/resources/templates/email/payment-reported.html @@ -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 @@
+

Payment reported for order #00000000

diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico index 6be3dac..6bfeebb 100644 Binary files a/frontend/public/favicon.ico and b/frontend/public/favicon.ico differ diff --git a/frontend/src/app/core/layout/footer.component.html b/frontend/src/app/core/layout/footer.component.html index 2e3116c..164cf80 100644 --- a/frontend/src/app/core/layout/footer.component.html +++ b/frontend/src/app/core/layout/footer.component.html @@ -1,7 +1,11 @@