From 8d592efc268b3e8529343d7e486591c072adb6dd Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 23 May 2022 10:25:37 +0100 Subject: [PATCH] display correct values in the organisations table --- app/helpers/organisation_helper.rb | 5 +++++ app/views/organisations/_organisation_list.html.erb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/helpers/organisation_helper.rb b/app/helpers/organisation_helper.rb index 68fa98242..c600f61da 100644 --- a/app/helpers/organisation_helper.rb +++ b/app/helpers/organisation_helper.rb @@ -8,4 +8,9 @@ module OrganisationHelper current_organisation.name 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 diff --git a/app/views/organisations/_organisation_list.html.erb b/app/views/organisations/_organisation_list.html.erb index 177281c2e..55ec8efe1 100644 --- a/app/views/organisations/_organisation_list.html.erb +++ b/app/views/organisations/_organisation_list.html.erb @@ -21,10 +21,10 @@ <%= govuk_link_to organisation.name, "organisations/#{organisation.id}/logs" %> - <%= organisation.id %> + <%= organisation.housing_registration_no %> - <%= organisation.provider_type %> + <%= display_provider_type(organisation.provider_type) %> <% end %>