respected company in mails.

This commit is contained in:
$(pass /github/name)
2024-07-16 19:15:06 +02:00
parent eeeabd5ad3
commit 9eef7f7681
3 changed files with 10 additions and 3 deletions

View File

@@ -79,12 +79,14 @@ func (s *EmailService) SendVerificationEmail(user *models.User, token *string) e
func (s *EmailService) SendWelcomeEmail(user *models.User) error {
// Prepare data to be injected into the template
data := struct {
Company string
FirstName string
MembershipModel string
MembershipID int64
MembershipFee float32
RentalFee float32
}{
Company: *user.Company,
FirstName: user.FirstName,
MembershipModel: user.Membership.SubscriptionModel.Name,
MembershipID: user.Membership.ID,
@@ -104,6 +106,7 @@ func (s *EmailService) SendWelcomeEmail(user *models.User) error {
func (s *EmailService) NotifyAdminOfNewUser(user *models.User) error {
// Prepare data to be injected into the template
data := struct {
Company string
FirstName string
LastName string
MembershipModel string
@@ -118,6 +121,7 @@ func (s *EmailService) NotifyAdminOfNewUser(user *models.User) error {
Phone string
IBAN string
}{
Company: *user.Company,
FirstName: user.FirstName,
LastName: user.LastName,
MembershipModel: user.Membership.SubscriptionModel.Name,

View File

@@ -76,6 +76,9 @@
<li><strong>Preis/h</strong>: {{.RentalFee}}</li>
</ul>
</li>
{{if .Company}}
<li><strong>Firma:</strong> {{.Company}}</li>
{{end}}
<li><strong>Name:</strong> {{.FirstName}} {{.LastName}}</li>
<li><strong>Mitgliedsnr:</strong> {{.MembershipID}}</li>
<li>

View File

@@ -31,11 +31,11 @@
<td>
<div style="padding: 24px 24px 24px 24px">
<a
href="https://marketbase.app"
href="https://carsharing-hasloh.de"
style="text-decoration: none"
target="_blank"
><img
alt="Marketbase"
alt="Carsharing Hasloh"
src="https://carsharing-hasloh.de/images/CarsharingSH-Hasloh-LOGO.jpeg"
style="
outline: none;
@@ -48,7 +48,7 @@
/></a>
</div>
<div style="font-weight: normal; padding: 0px 24px 16px 24px">
Moin {{.FirstName}} 👋,
Moin {{.FirstName}} {{if .Company}}({{.Company}}){{end}}👋,
</div>
<div style="font-weight: normal; padding: 0px 24px 16px 24px">
wir freuen uns sehr, dich als neues Mitglied bei Carsharing