Merge Angular 16 Irish Monitor to develop #33

Merged
k.triantafyllou merged 151 commits from angular-16-irish-monitor into develop 2024-02-13 09:32:41 +01:00
1 changed files with 23 additions and 20 deletions
Showing only changes of commit 89ba510256 - Show all commits

View File

@ -1,6 +1,7 @@
import {Email} from "./email"; import {Email} from "./email";
import {Body} from "./body"; import {Body} from "./body";
import {properties} from "../../../../environments/environment"; import {properties} from "../../../../environments/environment";
import {User} from "../../login/utils/helper.class";
export class Composer { export class Composer {
private static noteBodySize = "14px"; private static noteBodySize = "14px";
@ -93,14 +94,16 @@ export class Composer {
return email; return email;
} }
public static composeEmailForDevelop(contactForm: any, admins: any): Email { public static composeEmailForDevelop(contactForm: any, admins: any, user: User): Email {
let email: Email = new Email(); let email: Email = new Email();
email.subject = "OpenAIRE - Develop [" + properties.environment.toUpperCase() + "]"; email.subject = "OpenAIRE - Develop [" + properties.environment.toUpperCase() + "]";
email.body = "<div style='font-size:" + this.noteBodySize + "'>" email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+ "<span><b>Subject</b>: " + (contactForm.subject ? contactForm.subject : '-') + "</span><br>" + "<span><b>Name</b>: " + user.firstname + "</span><br>"
+ "<p>" + contactForm.message + "</p>" + "<span><b>Surname</b>: " + user.lastname + "</span><br>"
+ "</div>"; + "<span><b>Email</b>: " + user.email + "</span><br>"
+ "<span><b>Subject</b>: " + (contactForm.subject ? contactForm.subject : '-') + "</span><br>"
+ "<p>" + contactForm.message + "</p>"
+ "</div>";
email.recipients = admins; email.recipients = admins;
return email; return email;
} }