Remove final result usage on admin poll officer assignments results
This commit is contained in:
@@ -31,23 +31,23 @@
|
||||
|
||||
<% final_officer_assignments = @officer_assignments.select{|oa| oa.final == true} %>
|
||||
<% if final_officer_assignments.any? %>
|
||||
<h3><%= t("admin.poll_officer_assignments.by_officer.final_recounts") %></h3>
|
||||
<table id="final_recount_list" class="fixed">
|
||||
<h3><%= t("admin.poll_officer_assignments.by_officer.total_recounts") %></h3>
|
||||
<table id="total_recount_list" class="fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.poll_officer_assignments.by_officer.date") %></th>
|
||||
<th><%= t("admin.poll_officer_assignments.by_officer.booth") %></th>
|
||||
<th class="text-right"><%= t("admin.poll_officer_assignments.by_officer.final_recount") %></th>
|
||||
<th class="text-right"><%= t("admin.poll_officer_assignments.by_officer.total_recount") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% final_officer_assignments.each do |officer_assignment| %>
|
||||
<tr id="final_recount_<%= officer_assignment.date.to_date.strftime('%Y%m%d') %>">
|
||||
<tr id="total_recount_<%= officer_assignment.date.to_date.strftime('%Y%m%d') %>">
|
||||
<td><%= l(officer_assignment.date.to_date) %></td>
|
||||
<td><%= booth_name_with_location(officer_assignment.booth_assignment.booth) %></td>
|
||||
<td class="text-right">
|
||||
<% if officer_assignment.final_recounts.any? %>
|
||||
<%= officer_assignment.final_recounts.to_a.sum(&:count) %>
|
||||
<% if officer_assignment.total_recounts.any? %>
|
||||
<%= officer_assignment.total_recounts.to_a.sum(&:amount) %>
|
||||
<% else %>
|
||||
<span>-</span>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user