Shows message on index if officer has no shifts
This commit is contained in:
@@ -12,4 +12,8 @@ module OfficersHelper
|
||||
current_user.poll_officer.officer_assignments.final.where(date: Time.current.to_date).any?
|
||||
end
|
||||
|
||||
def no_shifts?
|
||||
current_user.poll_officer.officer_assignments.where(date: Time.current.to_date).blank?
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<p><%= t("officing.dashboard.index.info") %></p>
|
||||
|
||||
<% unless final_recount_shift? && vote_collection_shift? %>
|
||||
<% if no_shifts? %>
|
||||
<div class="callout warning">
|
||||
<%= t("officing.dashboard.index.no_shifts") %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user