Browse Source

feat: tidy up routing

pull/954/head
natdeanlewissoftwire 3 years ago
parent
commit
367c783082
  1. 4
      app/views/organisation_relationships/housing_providers.html.erb
  2. 2
      config/routes.rb

4
app/views/organisation_relationships/housing_providers.html.erb

@ -12,9 +12,9 @@
<p class="govuk-body">This organisation does not currently have any housing providers.</p>
<% end %>
<% if current_user.support? %>
<%= govuk_button_link_to "Add a housing provider", add_housing_provider_organisation_path(organisation_id: @organisation.id), html: { method: :get } %>
<%= govuk_button_link_to "Add a housing provider", housing_providers_add_organisation_path(organisation_id: @organisation.id), html: { method: :get } %>
<% elsif current_user.data_coordinator? %>
<%= govuk_button_link_to "Add a housing provider", add_housing_provider_organisation_path, html: { method: :get } %>
<%= govuk_button_link_to "Add a housing provider", housing_providers_add_organisation_path, html: { method: :get } %>
<% end %>
<% if @total_count != 0 %>
<%= render SearchComponent.new(current_user:, search_label: "Search for a housing provider", value: @searched) %>

2
config/routes.rb

@ -80,7 +80,7 @@ Rails.application.routes.draw do
get "logs/csv-confirmation", to: "lettings_logs#csv_confirmation"
get "schemes", to: "organisations#schemes"
get "housing-providers", to: "organisation_relationships#housing_providers"
get "add-housing-provider", to: "organisation_relationships#add_housing_provider"
get "housing-providers/add", to: "organisation_relationships#add_housing_provider"
end
end

Loading…
Cancel
Save