Skip to content
Snippets Groups Projects

Thymeleaf

Merged Michal Badin requested to merge mailing into develop
2 files
+ 70
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -38,12 +38,16 @@ public class NotificationService {
public ConfirmationDto notifyNewComponent(CarComponentNotificationDto carComponentNotificationDto) {
var c = carComponentNotificationDto.getCarComponent();
var subject = "New component: " + c.getInformation();
var text = "New component was added to Formula team management core.\n"
+ "\nType: " + c.getComponentType()
+ "\nInformation: " + c.getInformation()
+ "\nWeight: " + c.getWeight();
return sendEmail(subject, text, carComponentNotificationDto.getReceivers());
Context ctx = new Context();
ctx.setVariable("id", c.getId());
ctx.setVariable("type", c.getComponentType());
ctx.setVariable("info", c.getInformation());
ctx.setVariable("weight", c.getWeight());
var htmlContent = templateEngine.process("new-component-email", ctx);
return sendEmail(subject, htmlContent, carComponentNotificationDto.getReceivers());
}
public ConfirmationDto notifyNewApplication(ApplicationNotificationDto applicationNotificationDto) {
Loading