adds final recounting to poll officers' zone

This commit is contained in:
Juanjo Bazán
2017-01-30 17:44:20 +01:00
parent 4a55840ec9
commit 72ac75abeb
20 changed files with 391 additions and 9 deletions

View File

@@ -5,4 +5,11 @@ class Officing::PollsController < Officing::BaseController
@polls = @polls.select {|poll| poll.current?(Time.current) || poll.current?(1.day.ago)}
end
def final
@polls = current_user.poll_officer? ? current_user.poll_officer.final_days_assigned_polls : []
return unless current_user.poll_officer?
@polls = @polls.select {|poll| poll.ends_at > 1.week.ago && poll.expired?}
end
end