adds recounts to poll_officer view in admin zone

Admin can see recounts and final recounts made by poll_officer next to
their officing shifts
This commit is contained in:
Juanjo Bazán
2017-01-31 12:38:53 +01:00
parent 0c34c030e9
commit 547168be3f
5 changed files with 93 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ class Admin::Poll::OfficerAssignmentsController < Admin::BaseController
@officer = ::Poll::Officer.includes(:user).find(officer_assignment_params[:officer])
@officer_assignments = ::Poll::OfficerAssignment.
joins(:booth_assignment).
includes(booth_assignment: :booth).
includes(:recount, :final_recounts, booth_assignment: :booth).
where("officer_id = ? AND poll_booth_assignments.poll_id = ?", @officer.id, @poll.id).
order(:date)
end