Browse Source

feat: just enforce names are strings adn remove humanization to display ID in caps as required

pull/1715/head
natdeanlewissoftwire 3 years ago
parent
commit
11daf0a9bb
  1. 4
      app/models/organisation.rb
  2. 4
      app/views/organisations/show.html.erb

4
app/models/organisation.rb

@ -107,10 +107,10 @@ class Organisation < ApplicationRecord
{ name: "Name", value: name, editable: true },
{ name: "Organisation ID", value: "ORG#{id}", editable: false },
{ name: "Address", value: address_string, editable: true },
{ name: "Telephone_number", value: phone, editable: true },
{ name: "Telephone number", value: phone, editable: true },
{ name: "Type of provider", value: display_provider_type, editable: false },
{ name: "Registration number", value: housing_registration_no || "", editable: false },
{ name: "Rent_periods", value: rent_period_labels, editable: false, format: :bullet },
{ name: "Rent periods", value: rent_period_labels, editable: false, format: :bullet },
{ name: "Owns housing stock", value: holds_own_stock ? "Yes" : "No", editable: false },
].compact

4
app/views/organisations/show.html.erb

@ -17,7 +17,7 @@
<% @organisation.display_organisation_attributes.each do |attr| %>
<% if can_edit_org?(current_user) && attr[:editable] %>
<%= summary_list.row do |row| %>
<% row.key { attr[:name].to_s.humanize } %>
<% row.key { attr[:name] } %>
<% row.value { details_html(attr) } %>
<% row.action(
visually_hidden_text: attr[:name].to_s.humanize.downcase,
@ -27,7 +27,7 @@
<% end %>
<% else %>
<%= summary_list.row do |row| %>
<% row.key { attr[:name].to_s.humanize } %>
<% row.key { attr[:name] } %>
<% row.value { details_html(attr) } %>
<% row.action %>
<% end %>

Loading…
Cancel
Save