Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.6 KiB

<% item_label = format_label(@pagy.count, "managing agents") %>
<% if current_user.support? %>
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %>
<%= render SubNavigationComponent.new(
items: secondary_items(request.path, @organisation.id),
) %>
<h2 class="govuk-visually-hidden">Managing Agents</h2>
<p class="govuk-body">A managing agent can submit logs for this organisation.</p>
<% if @total_count == 0 %>
<p class="govuk-body">This organisation does not currently have any managing agents.</p>
<% end %>
<% else %>
<%= render partial: "organisations/headings", locals: { main: "Your managing agents", sub: current_user.organisation.name } %>
<p class="govuk-body">A managing agent can submit logs for this organisation.</p>
<% if @total_count == 0 %>
<p class="govuk-body">This organisation does not currently have any managing agents.</p>
<% end %>
<% end %>
Cldc 1663 remove housing provider (#957) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: add core removal functionality * fix: make secondary navbar display selected org not user org for support users * refactor: tidy up code and add single quotes instead of apostrophes * refactor: remove unnecessary lines * test: add housing provider removal tests * feat: use path helpers and beng methods * refactor: linting * refactor: erblinting * refactor: renaming and tidying * refactor: simplify format response and paths and remove redundant rendering * feat: user flash notices instead of explicit notification banners * test: update tests with new urls * feat: add target org helper * feat: add target org helper fix * feat: add related org helper * test: update paths in tests Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
<% if current_user.support? || current_user.data_coordinator? %>
<%= govuk_button_link_to "Add a managing agent", managing_agents_add_organisation_path, html: { method: :get } %>
<% end %>
<% if @total_count != 0 %>
<%= render SearchComponent.new(current_user:, search_label: "Search for a managing agent", value: @searched) %>
<%= render partial: "organisation_relationships/managing_agent_list", locals: { index: @managing_agents, title: "Managing agents", pagy: @pagy, searched: @searched, item_label:, total_count: @total_count } %>
<%= render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "Managing agents" } %>
<% end %>