Browse Source

feat: update scheme and log displays

pull/1190/head
natdeanlewissoftwire 3 years ago
parent
commit
f3673363fb
  1. 4
      app/helpers/tab_nav_helper.rb
  2. 4
      app/views/locations/index.html.erb

4
app/helpers/tab_nav_helper.rb

@ -8,13 +8,13 @@ module TabNavHelper
def location_cell_postcode(location, link)
link_text = location.postcode || "Add postcode"
[govuk_link_to(link_text, link, method: :patch), "<span class=\"govuk-visually-hidden\">Location </span><span class=\"govuk-!-font-weight-regular app-!-colour-muted\">#{location.name}</span>"].join("\n")
[govuk_link_to(link_text, link, method: :patch), "<span class=\"govuk-visually-hidden\">Location</span>"].join("\n")
end
def scheme_cell(scheme)
link_text = scheme.service_name
link = scheme.confirmed? ? scheme : scheme_check_answers_path(scheme)
[govuk_link_to(link_text, link), "<span class=\"govuk-visually-hidden\">Scheme </span><span class=\"govuk-!-font-weight-regular app-!-colour-muted\">#{scheme.primary_client_group}</span>"].join("\n")
[govuk_link_to(link_text, link), "<span class=\"govuk-visually-hidden\">Scheme</span>"].join("\n")
end
def org_cell(user)

4
app/views/locations/index.html.erb

@ -39,6 +39,9 @@
<% row.cell(header: true, text: "Postcode", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Name", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Location code", html_attributes: {
scope: "col",
}) %>
@ -55,6 +58,7 @@
else
location.postcode.present? ? scheme_location_check_answers_path(@scheme, location, route: "locations") : scheme_location_postcode_path(@scheme, location)
end), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %>
<% row.cell(text: location.name) %>
<% row.cell(text: location.id) %>
<% row.cell(text: status_tag(location.status)) %>
<% end %>

Loading…
Cancel
Save