|
|
|
|
@ -2,19 +2,35 @@
|
|
|
|
|
<% if current_user.support? %> |
|
|
|
|
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> |
|
|
|
|
<%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %> |
|
|
|
|
<% if !@organisation.active? %> |
|
|
|
|
<%= govuk_notification_banner(title_text: "Important") do %> |
|
|
|
|
<p class="govuk-notification-banner__heading govuk-!-width-full" style="max-width: fit-content"> |
|
|
|
|
This organisation is deactivated. |
|
|
|
|
<p> |
|
|
|
|
You cannot add any new stock owners. |
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
<h2 class="govuk-visually-hidden">Stock Owners</h2> |
|
|
|
|
<p class="govuk-body">This organisation can submit logs for its stock owners.</p> |
|
|
|
|
<% if @total_count == 0 %> |
|
|
|
|
<p class="govuk-body">This organisation does not currently have any stock owners.</p> |
|
|
|
|
<% end %> |
|
|
|
|
<% else %> |
|
|
|
|
<% if !@organisation.active? %> |
|
|
|
|
<%= govuk_notification_banner(title_text: "Important") do %> |
|
|
|
|
<p class="govuk-notification-banner__heading govuk-!-width-full" style="max-width: fit-content"> |
|
|
|
|
This organisation is deactivated. |
|
|
|
|
<p> |
|
|
|
|
You cannot add any new stock owners. |
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= render partial: "organisations/headings", locals: { main: "Your stock owners", sub: current_user.organisation.name } %> |
|
|
|
|
<p class="govuk-body">Your organisation can submit logs for its stock owners.</p> |
|
|
|
|
<% if @total_count == 0 %> |
|
|
|
|
<p class="govuk-body">You do not currently have any stock owners.</p> |
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
<% if current_user.support? || current_user.data_coordinator? %> |
|
|
|
|
<% if (current_user.support? || current_user.data_coordinator?) && @organisation.active? %> |
|
|
|
|
<%= govuk_button_link_to "Add a stock owner", stock_owners_add_organisation_path, html: { method: :get } %> |
|
|
|
|
<% end %> |
|
|
|
|
<% if @total_count != 0 %> |
|
|
|
|
|