BathHacked/energy-sparks

View on GitHub
app/views/admin/schools/target_data/_row.html.erb

Summary

Maintainability
Test Coverage
<tr>
  <td><%= fuel_type %></td>
  <% if service.present? %>
    <td>
      <%= fa_icon( service.enough_holidays? ? 'check-circle text-success' : 'times-circle text-danger') %>
    </td>
    <td>
      <%= fa_icon( service.enough_temperature_data? ? 'check-circle text-success' : 'times-circle text-danger') %>
    </td>
    <td>
      <%= fa_icon( service.enough_readings_to_calculate_target? ? 'check-circle text-success' : 'times-circle text-danger') %>
    </td>
    <td>
      <%= fa_icon( service.annual_kwh_estimate_required? ? 'check-circle text-success' : 'times-circle text-danger') %>
    </td>
    <td>
      <%= fa_icon( service.annual_kwh_estimate? ? 'check-circle text-success' : 'times-circle text-danger') %>
    </td>
  <% else %>
    <td>
      N/A
    </td>
    <td>
      N/A
    </td>
    <td>
      N/A
    </td>
    <td>
      N/A
    </td>
    <td>
      N/A
    </td>
  <% end %>
</tr>