<% 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), ) %>

Managing Agents

A managing agent can submit logs for this organisation.

<% if @total_count == 0 %>

This organisation does not currently have any managing agents.

<% end %> <% else %> <%= render partial: "organisations/headings", locals: { main: "Your managing agents", sub: current_user.organisation.name } %>

A managing agent can submit logs for this organisation.

<% if @total_count == 0 %>

This organisation does not currently have any managing agents.

<% end %> <% end %> <% 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 %>