Remove final result usage on admin poll officer assignments results
This commit is contained in:
@@ -15,7 +15,7 @@ class Admin::Poll::BoothAssignmentsController < Admin::BaseController
|
||||
end
|
||||
|
||||
def show
|
||||
@booth_assignment = @poll.booth_assignments.includes(:final_recounts, :voters,
|
||||
@booth_assignment = @poll.booth_assignments.includes(:total_results, :voters,
|
||||
officer_assignments: [officer: [:user]]).find(params[:id])
|
||||
@voters_by_date = @booth_assignment.voters.group_by {|v| v.created_at.to_date}
|
||||
end
|
||||
|
||||
@@ -18,7 +18,7 @@ class Admin::Poll::OfficerAssignmentsController < Admin::BaseController
|
||||
@officer = ::Poll::Officer.includes(:user).find(officer_assignment_params[:officer_id])
|
||||
@officer_assignments = ::Poll::OfficerAssignment.
|
||||
joins(:booth_assignment).
|
||||
includes(:final_recounts, booth_assignment: :booth).
|
||||
includes(:total_results, booth_assignment: :booth).
|
||||
where("officer_id = ? AND poll_booth_assignments.poll_id = ?", @officer.id, @poll.id).
|
||||
order(:date)
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ class Admin::Poll::RecountsController < Admin::BaseController
|
||||
|
||||
def index
|
||||
@booth_assignments = @poll.booth_assignments.
|
||||
includes(:booth, :final_recounts, :voters).
|
||||
includes(:booth, :total_results, :voters).
|
||||
order("poll_booths.name").
|
||||
page(params[:page]).per(50)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user