Update:
All checks were successful
Docker Image CI / build-and-push (push) Successful in 11m9s
Docker Image CI / deploy (push) Successful in 27s
Docker Image CI / notify-failure (push) Has been skipped

-delen van agenda toegevoegd
-popup aangepast
-accepteren van uitnodiging toegevoegd
-koppelen van gebruiker aan bedrijf
-versturen van uitnodiging via mail
This commit is contained in:
2025-04-18 22:41:17 +02:00
parent ebce9820d2
commit a497b8162b
28 changed files with 908 additions and 55 deletions

View File

@@ -0,0 +1,28 @@
package nl.veenm.paypoint.service;
import jakarta.enterprise.context.ApplicationScoped;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;
@ApplicationScoped
public class EmailTemplateService {
public String loadTemplate(String templatePath, Map<String, String> replacements) {
try {
String content = Files.readString(Path.of(templatePath), StandardCharsets.UTF_8);
for (Map.Entry<String, String> entry : replacements.entrySet()) {
content = content.replace("{{" + entry.getKey() + "}}", entry.getValue());
}
return content;
} catch (IOException e) {
throw new RuntimeException("Kon e-mailtemplate niet inladen: " + templatePath, e);
}
}
}