Hides sidebar menus if officer has no shifts assigned
This commit is contained in:
@@ -4,4 +4,12 @@ module OfficersHelper
|
||||
truncate([officer.name, officer.email].compact.join(' - '), length: 100)
|
||||
end
|
||||
|
||||
end
|
||||
def vote_collection_shift?
|
||||
current_user.poll_officer.officer_assignments.where(date: Time.current.to_date).any?
|
||||
end
|
||||
|
||||
def final_recount_shift?
|
||||
current_user.poll_officer.officer_assignments.final.where(date: Time.current.to_date).any?
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user