Browse Source

display correct values in the organisations table

pull/557/head
Kat 3 years ago
parent
commit
8d592efc26
  1. 5
      app/helpers/organisation_helper.rb
  2. 4
      app/views/organisations/_organisation_list.html.erb

5
app/helpers/organisation_helper.rb

@ -8,4 +8,9 @@ module OrganisationHelper
current_organisation.name current_organisation.name
end end
end end
DISPLAY_PROVIDER_TYPE = { "LA": "Local authority", "PRP": "Private registered provider" }.freeze
def display_provider_type(provider_type)
DISPLAY_PROVIDER_TYPE[provider_type.to_sym]
end
end end

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

@ -21,10 +21,10 @@
<%= govuk_link_to organisation.name, "organisations/#{organisation.id}/logs" %> <%= govuk_link_to organisation.name, "organisations/#{organisation.id}/logs" %>
</th> </th>
<td class="govuk-table__cell app-!-font-tabular"> <td class="govuk-table__cell app-!-font-tabular">
<%= organisation.id %> <%= organisation.housing_registration_no %>
</td> </td>
<td class="govuk-table__cell app-!-font-tabular"> <td class="govuk-table__cell app-!-font-tabular">
<%= organisation.provider_type %> <%= display_provider_type(organisation.provider_type) %>
</td> </td>
</tr> </tr>
<% end %> <% end %>

Loading…
Cancel
Save