BathHacked/energy-sparks

View on GitHub
app/views/schools/alert_subscription_events/show.html.erb

Summary

Maintainability
Test Coverage
<h1>Messages sent - <%= @school.name %></h1>
<p><%= link_to "Back", school_subscription_generation_run_path(@school, @alert_subscription_event.subscription_generation_run) %>

<h2><%= @alert_subscription_event.communication_type.humanize.titleize %> - <%= @alert_subscription_event.status.humanize.titleize %></h2>

<dl>
  <dt>Contact</dt><dd><%= link_to @alert_subscription_event.contact.name, school_contact_path(@school, @alert_subscription_event.contact) %></dd>
  <dt>Alert Type</dt><dd><%= @alert_subscription_event.alert.title %></dd>
  <dt>Created At</dt><dd><%= nice_date_times @alert_subscription_event.created_at %></dd>
  <dt>Error Message</dt><dd><%= @alert_subscription_event.message %></dd>

  <% @alert_subscription_event.alert.priority_data.each do |key, value| %>
    <dt><%= key %>:</dt><dd><%= value %></dd>
  <% end %>

  <dt>Email weighting:</dt><dd><%= @alert_subscription_event.content_version.email_weighting %></dd>
  <dt>Priority</dt><dd><%= @alert_subscription_event.priority %></dd>
</dl>