Skip to content

Commit

Permalink
Refactor expense_email view and update invitation creation in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jan 24, 2025
1 parent df1b4f4 commit 2c18d9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions app/views/maintainer_mailer/expense_email.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="40" style="vertical-align:top;">
<%= image_tag("stone-1.png", alt: " ", class: "bullet-image", size: "24x24") %>
</td>
<td class="explanation">

<td>
<h2 class="green">Accepting this invitation personally</h2>
<p>It's time to submit an expense for this donation. Please follow the link below to submit your expense:</p>

Expand Down Expand Up @@ -97,6 +95,7 @@
</table>
</td>
</tr>
<% end %>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
Expand Down Expand Up @@ -129,7 +128,7 @@
</table>
</td>
</tr>
<% end %>

</table>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion test/mailers/previews/maintainer_mailer_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def invitation_email

def expense_email
data = {"draftKey" => "123"}
invitation = Invitation.create!(email: "[email protected]", project_allocation: ProjectAllocation.first, data: data, member_invitation_id: 123)
invitation = Invitation.create!(email: "[email protected]", project_allocation: ProjectAllocation.first, data: data, member_invitation_id: 123, accepted_at: Time.now)
MaintainerMailer.expense_email(
invitation,
"[email protected]",
Expand Down

0 comments on commit 2c18d9b

Please sign in to comment.