Skip to content

Commit

Permalink
Just use visible locations (#2506)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinssa authored Jul 15, 2024
1 parent fe82a8e commit 9e35b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/helpers/question_view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def answer_option_synonyms(resource)
def answer_option_append(resource)
return unless resource.instance_of?(Scheme)

confirmed_locations_count = resource.locations.confirmed.size
unconfirmed_locations_count = resource.locations.unconfirmed.size
confirmed_locations_count = resource.locations.visible.confirmed.size
unconfirmed_locations_count = resource.locations.visible.unconfirmed.size
"#{confirmed_locations_count} completed #{'location'.pluralize(confirmed_locations_count)}, #{unconfirmed_locations_count} incomplete #{'location'.pluralize(unconfirmed_locations_count)}"
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/schemes/_scheme_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% row.with_cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %>
<% row.with_cell(text: scheme.owning_organisation&.name) %>
<% row.with_cell(text: scheme.id_to_display) %>
<% row.with_cell(text: scheme.locations&.count) %>
<% row.with_cell(text: scheme.locations.visible&.count) %>
<% row.with_cell(text: status_tag_from_resource(scheme)) %>
<% end %>
<% end %>
Expand Down

0 comments on commit 9e35b26

Please sign in to comment.