Remove daily officer recounts from admin poll recounts list

This commit is contained in:
Bertocq
2017-07-19 12:59:39 +02:00
parent c40294e931
commit d98425f45b
5 changed files with 3 additions and 28 deletions

View File

@@ -3,7 +3,7 @@ class Admin::Poll::RecountsController < Admin::BaseController
def index
@booth_assignments = @poll.booth_assignments.
includes(:booth, :recounts, :final_recounts, :voters).
includes(:booth, :final_recounts, :voters).
order("poll_booths.name").
page(params[:page]).per(50)
end
@@ -13,4 +13,4 @@ class Admin::Poll::RecountsController < Admin::BaseController
def load_poll
@poll = ::Poll.find(params[:poll_id])
end
end
end

View File

@@ -12,7 +12,6 @@
<table class="fixed margin">
<thead>
<th><%= t("admin.recounts.index.table_booth_name") %></th>
<th class="text-center"><%= t("admin.recounts.index.table_recounts") %></th>
<th class="text-center"><%= t("admin.recounts.index.table_final_recount") %></th>
<th class="text-center"><%= t("admin.recounts.index.table_system_count") %></th>
</thead>
@@ -27,13 +26,6 @@
<%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: 'tab-recounts') %>
</strong>
</td>
<td class="text-center <%= 'count-error' if recount.to_i != system_count %>">
<% if recount.present? %>
<%= recount %>
<% else %>
<span>-</span>
<% end %>
</td>
<td class="text-center <%= 'count-error' if final_recount.to_i != system_count %>">
<% if final_recount.present? %>
<strong><%= final_recount %></strong>
@@ -55,4 +47,4 @@
<%= paginate @booth_assignments %>
<% end %>
</div>
</div>

View File

@@ -595,7 +595,6 @@ en:
title: "Recounts"
no_recounts: "There is nothing to be recounted"
table_booth_name: "Booth"
table_recounts: "Accumulated daily recounts (by officer)"
table_final_recount: "Final recount (by officer)"
table_system_count: "Votes (automatic)"
results:

View File

@@ -595,7 +595,6 @@ es:
title: "Recuentos"
no_recounts: "No hay nada de lo que hacer recuento"
table_booth_name: "Urna"
table_recounts: "Recuentos diarios acumulados (presidente de mesa)"
table_final_recount: "Recuento final (presidente de mesa)"
table_system_count: "Votos (automático)"
results:

View File

@@ -248,13 +248,6 @@ feature 'Admin polls' do
booth_assignment_recounted = create(:poll_booth_assignment, poll: poll)
booth_assignment_final_recounted = create(:poll_booth_assignment, poll: poll)
3.times do |i|
create(:poll_recount,
booth_assignment: booth_assignment,
date: poll.starts_at + i.days,
count: 33)
end
3.times do |i|
create(:poll_final_recount,
booth_assignment: booth_assignment,
@@ -264,11 +257,6 @@ feature 'Admin polls' do
2.times { create(:poll_voter, booth_assignment: booth_assignment_final_recounted) }
create(:poll_recount,
booth_assignment: booth_assignment_recounted,
date: poll.ends_at,
count: 777)
create(:poll_final_recount,
booth_assignment: booth_assignment_final_recounted,
date: poll.ends_at,
@@ -282,19 +270,16 @@ feature 'Admin polls' do
within("#poll_booth_assignment_#{booth_assignment.id}_recounts") do
expect(page).to have_content(booth_assignment.booth.name)
expect(page).to have_content('99')
expect(page).to have_content('63')
end
within("#poll_booth_assignment_#{booth_assignment_recounted.id}_recounts") do
expect(page).to have_content(booth_assignment_recounted.booth.name)
expect(page).to have_content('777')
expect(page).to have_content('-')
end
within("#poll_booth_assignment_#{booth_assignment_final_recounted.id}_recounts") do
expect(page).to have_content(booth_assignment_final_recounted.booth.name)
expect(page).to have_content('-')
expect(page).to have_content('55555')
expect(page).to have_content('2')
end