Skip to content

feat(events): mail on changing status to European event for online event #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

<!DOCTYPE html>
<html lang="en">

<%= render(OmsmailerWeb.SnippetsView, "head.html", title: "MyAEGEE: Event status changed") %>


<body style="width:100% !important;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;">
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="margin:0; padding:0; width:100% !important; line-height: 100% !important; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;background-color: #F9FAFB;"
width="100%">
<tbody>
<tr>
<td width="10" valign="top">&nbsp;</td>
<td valign="top" align="center">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width: 100%; max-width: 600px; background-color: #FFF; border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;"
id="contentTable">
<tbody>
<tr>
<td width="600" valign="top" align="center" style="border-collapse:collapse;">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
<tbody>
<tr>
<td align="center" valign="top">
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;">&nbsp;</div>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #E0E4E8;"
width="100%">
<tbody>
<tr>
<td align="center" style="padding: 56px 56px 28px 56px;" valign="top">
<a style="color: #3498DB; text-decoration: none;" href="my.aegee.eu"
target="_blank"><img style="width: 56px; height: 56px; border: 0;" alt="Logo"
src="https://my.aegee.eu/images/logo.png">
</a></td>
</tr>
<tr>
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 20px; color: #333;"><strong>Your event's status was changed</strong></div>
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; color: #333;">
The status of your event,
<strong>"<%= @parameters["event"]["name"] %>"</strong>,
has changed and is <strong>approved</strong> as European Event.
</div>
</td>
</tr>
<tr>
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
<div>
<a href="https://my.aegee.eu/events/<%= @parameters["event"]["url"] %>" style="background-color:#1468C5;border-radius:50px;color:#ffffff;display:inline-block;font-family: 'lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:18px;font-weight: bold;line-height:40px;text-align:center;text-decoration:none;width:270px;-webkit-text-size-adjust:none;"
target="_blank">Go to the event page</a>
</div>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
<tbody>
<tr>
<td align="center" style="padding: 28px 56px;" valign="top">
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; line-height: 24px; color: #A7ADB5;">This email was autogenerated by MyAEGEE mailer.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>



</body>

</html>
9 changes: 9 additions & 0 deletions test/omsmailer_web/controllers/page_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ defmodule OmsmailerWeb.PageControllerTest do
assert_email_delivered_with(subject: "pirates")
end

# Events European status changed
test "POST / event European status changed should work", %{conn: conn} do
conn = post conn, "/", %{template: "events_european_status_changed.html", parameters: %{
event: %{name: "test"}
}, from: "[email protected]", to: "[email protected]", subject: "pirates"}

assert json_response(conn, 200)
assert_email_delivered_with(subject: "pirates")
end

# Events applied
test "POST / events applied should work with questions and answers", %{conn: conn} do
Expand Down