diff --git a/app/components/missing_stock_owners_banner_component.html.erb b/app/components/missing_stock_owners_banner_component.html.erb index 1e961f4f9..157a4a625 100644 --- a/app/components/missing_stock_owners_banner_component.html.erb +++ b/app/components/missing_stock_owners_banner_component.html.erb @@ -3,6 +3,8 @@
- <%= banner_text %> +
+ <%= banner_text %> +
<% end %> <% end %> diff --git a/app/components/missing_stock_owners_banner_component.rb b/app/components/missing_stock_owners_banner_component.rb index edfa90382..f2cee801c 100644 --- a/app/components/missing_stock_owners_banner_component.rb +++ b/app/components/missing_stock_owners_banner_component.rb @@ -28,7 +28,7 @@ class MissingStockOwnersBannerComponent < ViewComponent::Base if user.data_coordinator? || user.support? "If your organisation does own stock, #{contact_helpdesk_link} to update your details.".html_safe else - "Ask a data coordinator to add a stock owner. Find your data coordinators on the #{users_link}. + "Ask a data coordinator to add a stock owner. Find your data coordinators on the #{users_link}. If your organisation does own stock, #{contact_helpdesk_link} to update your details.".html_safe end end diff --git a/app/views/logs/index.html.erb b/app/views/logs/index.html.erb index 603384a31..15b8f79d4 100644 --- a/app/views/logs/index.html.erb +++ b/app/views/logs/index.html.erb @@ -3,16 +3,18 @@ <% content_for :title, title %> -<%= render DataProtectionConfirmationBannerComponent.new( +<% dpo_confirmation_banner = DataProtectionConfirmationBannerComponent.new( user: current_user, organisation: @organisation, ) %> +<%= render dpo_confirmation_banner %> -<%= render MissingStockOwnersBannerComponent.new( +<% missing_stock_owner_banner = MissingStockOwnersBannerComponent.new( user: current_user, ) %> +<%= render missing_stock_owner_banner %> -<% if @duplicate_sets_count&.positive? %> +<% if @duplicate_sets_count&.positive? && !dpo_confirmation_banner.display_banner? && !missing_stock_owner_banner.display_banner? %> <%= govuk_notification_banner(title_text: "Important", text: govuk_link_to("Review logs", duplicate_logs_path(referrer: "duplicate_logs_banner"))) do |banner| %> <% banner.with_heading(text: I18n.t("notification.duplicate_sets", count: @duplicate_sets_count)) %> <% end %> diff --git a/app/views/organisations/logs.html.erb b/app/views/organisations/logs.html.erb index 000eb4179..e172a76a9 100644 --- a/app/views/organisations/logs.html.erb +++ b/app/views/organisations/logs.html.erb @@ -12,17 +12,19 @@