2022-06-25 12:48:46 +00:00
|
|
|
<p style="color: green"><%= notice %></p>
|
|
|
|
|
|
|
|
<h1><%= t('members.show.title') %></h1>
|
|
|
|
|
2022-06-25 20:27:02 +00:00
|
|
|
<table class='lined'>
|
2023-02-26 13:03:36 +00:00
|
|
|
<tr><td><%= t('members.attributes.display_name') %></td><td><%= @member.number %>. <%= @member.display_name %></td></tr>
|
2023-03-31 01:24:16 +00:00
|
|
|
<tr><td><%= t('members.attributes.legal_name') %></td><td><%= @member.legal_name %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.pronouns') %></td><td><%= @member.pronouns %></td></tr>
|
2022-06-25 12:48:46 +00:00
|
|
|
<tr><td><%= t('members.attributes.email') %></td><td><%= @member.email %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.category') %></td><td><%= @member.category %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.identification_number') %></td><td><%= @member.identification_number %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.address') %></td><td><%= simple_format @member.address %></td></tr>
|
2022-06-26 09:44:30 +00:00
|
|
|
<tr><td><%= t('members.attributes.wants_mailing_list') %></td><td><%= bool_option @member.wants_mailing_list %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.prefers_postal') %></td><td><%= bool_option @member.prefers_postal %></td></tr>
|
2022-06-25 12:48:46 +00:00
|
|
|
<tr><td><%= t('members.attributes.joined_on') %></td><td><%= @member.joined_on %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.expires_on') %></td><td><%= @member.expires_on %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.status') %></td><td><%= @member.status %></td></tr>
|
2023-02-26 13:03:36 +00:00
|
|
|
<tr><td><%= t('members.attributes.regular_ifthenpay_link') %></td><td><% if @member.regular_ifthenpay_link %><%= link_to @member.regular_ifthenpay_link, @member.regular_ifthenpay_link %><% end %></td></tr>
|
|
|
|
<tr><td><%= t('members.attributes.reduced_ifthenpay_link') %></td><td><% if @member.reduced_ifthenpay_link %><%= link_to @member.reduced_ifthenpay_link, @member.reduced_ifthenpay_link %><% end %></td></tr>
|
2022-06-25 12:48:46 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<%= link_to t('members.show.actions.edit'), edit_member_path(@member) %>
|
|
|
|
</div>
|
2023-02-26 13:03:36 +00:00
|
|
|
<div>
|
|
|
|
<%= link_to t('members.show.actions.delete'), delete_member_path(@member) %>
|
|
|
|
</div>
|
2022-06-25 12:48:46 +00:00
|
|
|
|
|
|
|
<h2><%= t('members.show.contribution_history') %></h2>
|
|
|
|
|
2022-06-25 20:27:02 +00:00
|
|
|
<table class='zebra'>
|
2022-06-25 12:48:46 +00:00
|
|
|
<tr>
|
2022-06-25 20:27:02 +00:00
|
|
|
<th><%= t('contributions.attributes.payment_on') %></th>
|
|
|
|
<th><%= t('contributions.attributes.payment_method') %></th>
|
|
|
|
<th><%= t('contributions.attributes.payment_reference') %></th>
|
|
|
|
<th><%= t('contributions.attributes.amount') %></th>
|
2022-06-25 12:48:46 +00:00
|
|
|
</tr>
|
2023-03-19 15:38:19 +00:00
|
|
|
<% @member.contributions.order(payment_on: :asc).each do |contribution| %>
|
2022-06-25 12:48:46 +00:00
|
|
|
<tr>
|
|
|
|
<td><%= contribution.payment_on %></td>
|
|
|
|
<td><%= contribution.payment_method %></td>
|
|
|
|
<td><%= contribution.payment_reference %></td>
|
|
|
|
<td>€<%= contribution.eurocents %></td>
|
|
|
|
<td>
|
2023-03-31 01:24:16 +00:00
|
|
|
<ul class='contribution-actions'>
|
2022-06-25 20:27:02 +00:00
|
|
|
<li><%= link_to t('members.show.actions.edit_contribution'), edit_contribution_path(contribution) %></div>
|
|
|
|
<li><%= link_to t('members.show.actions.delete_contribution'), delete_contribution_path(contribution) %></li>
|
|
|
|
</ul>
|
2022-06-25 12:48:46 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
2022-06-25 20:27:02 +00:00
|
|
|
|
2023-01-25 14:33:08 +00:00
|
|
|
<div>
|
|
|
|
<%= link_to t('members.index.actions.new_contribution'), new_member_contribution_path(@member) %>
|
|
|
|
</div>
|
2022-06-25 20:27:02 +00:00
|
|
|
|
|
|
|
<h2><%= t('members.show.notifications') %></h2>
|
|
|
|
|
|
|
|
<table class='zebra'>
|
|
|
|
<tr>
|
|
|
|
<th><%= t('notifications.attributes.to_be_sent_on') %></th>
|
|
|
|
<th><%= t('notifications.attributes.template') %></th>
|
|
|
|
<th><%= t('notifications.attributes.status') %></th>
|
2022-07-16 10:27:43 +00:00
|
|
|
<th><%= t('members.show.contribution_actions') %></th>
|
2022-06-25 20:27:02 +00:00
|
|
|
</tr>
|
2022-10-06 14:17:57 +00:00
|
|
|
<% @member.notifications.order(to_be_sent_on: :asc).each do |notification| %>
|
2022-06-25 20:27:02 +00:00
|
|
|
<tr>
|
|
|
|
<td><%= notification.to_be_sent_on %></td>
|
|
|
|
<td><code><%= notification.template %></code></td>
|
2023-01-25 14:01:24 +00:00
|
|
|
<td>
|
|
|
|
<%= notification_status(notification.status) %>
|
|
|
|
<% if notification.status == 'sent' %>
|
|
|
|
(<%= notification.sent_at %>)
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2022-07-16 10:27:43 +00:00
|
|
|
<td>
|
|
|
|
<% if notification.status == 'scheduled' %>
|
|
|
|
<%= form_with url: deliver_notification_path(notification) do |form| %>
|
|
|
|
<%= form.submit t('members.show.actions.deliver_notification') %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2022-06-25 20:27:02 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|