Skip to content

Commit 9a59d10

Browse files
Merge pull request #6504 from NHSDigital/alistair/national-reporting-cut-off-banner-improve-content
Improve content of national reporting cut off banner
2 parents defc1de + 69cfb69 commit 9a59d10

2 files changed

Lines changed: 36 additions & 13 deletions

File tree

app/views/immunisation_imports/new.html.erb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66

77
<% content_for :page_title, title %>
88

9-
<% if (cutoff_date = current_team.national_reporting_cut_off_date) && cutoff_date.today? %>
10-
<%= govuk_notification_banner(title_text: "#{cutoff_date.to_fs(:long)} - Check where to upload records") do |notification_banner| %>
11-
<% notification_banner.with_heading(text: "Vaccinations given:") %>
12-
<ul>
13-
<li>before <%= cutoff_date.to_fs(:long) %> must be uploaded to NIVS by the end of today</li>
14-
<li>on or after <%= cutoff_date.to_fs(:long) %> must be uploaded to Mavis national reporting only</li>
15-
</ul>
9+
<% if (cutoff_date = current_team.national_reporting_cut_off_date) && Date.today <= cutoff_date %>
10+
<%= govuk_notification_banner(title_text: "Important") do %>
11+
<h3 class="nhsuk-notification-banner__heading">
12+
Mavis national reporting replaces NIVS on <%= cutoff_date.to_fs(:long) %>
13+
</h3>
14+
15+
<h4 class="nhsuk-u-margin-bottom-2">Vaccinations given before <%= cutoff_date.to_fs(:long) %></h4>
16+
<p>Upload to NIVS by <%= cutoff_date.to_fs(:long) %>. After this, NIVS will no longer be available.</p>
17+
18+
<h4 class="nhsuk-u-margin-bottom-2">Vaccinations given on or after <%= cutoff_date.to_fs(:long) %></h4>
19+
<p>Upload to Mavis national reporting only.</p>
1620
<% end %>
1721
<% end %>
1822

spec/features/import_vaccination_records_national_reporting_spec.rb

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
context "cutoff date banner" do
5757
let(:cutoff_date) { Date.new(2026, 4, 20) }
5858

59-
context "when today is not the cutoff date" do
60-
around { |example| travel_to(cutoff_date - 1.day) { example.run } }
59+
context "when today is after the cutoff date" do
60+
around { |example| travel_to(cutoff_date + 1.day) { example.run } }
6161

6262
scenario "banner is not shown" do
6363
given_mavis_logins_are_configured(
@@ -69,6 +69,22 @@
6969
end
7070
end
7171

72+
context "when today is before the cutoff date" do
73+
around { |example| travel_to(cutoff_date - 1.day) { example.run } }
74+
75+
scenario "banner is shown" do
76+
given_mavis_logins_are_configured(
77+
national_reporting_cut_off_date: cutoff_date
78+
)
79+
given_i_am_signed_in_as_a_national_reporting_user
80+
when_i_navigate_to_the_upload_page
81+
expect(page).to have_css(".nhsuk-notification-banner")
82+
expect(page).to have_content(
83+
"Mavis national reporting replaces NIVS on 20 April 2026"
84+
)
85+
end
86+
end
87+
7288
context "when today is the cutoff date" do
7389
around { |example| travel_to(cutoff_date) { example.run } }
7490

@@ -79,14 +95,17 @@
7995
given_i_am_signed_in_as_a_national_reporting_user
8096
when_i_navigate_to_the_upload_page
8197
expect(page).to have_css(".nhsuk-notification-banner")
82-
expect(page).to have_content("20 April 2026")
83-
expect(page).to have_content("Check where to upload records")
8498
expect(page).to have_content(
85-
"before 20 April 2026 must be uploaded to NIVS by the end of today"
99+
"Mavis national reporting replaces NIVS on 20 April 2026"
100+
)
101+
expect(page).to have_content("Vaccinations given before 20 April 2026")
102+
expect(page).to have_content(
103+
"Upload to NIVS by 20 April 2026. After this, NIVS will no longer be available."
86104
)
87105
expect(page).to have_content(
88-
"on or after 20 April 2026 must be uploaded to Mavis national reporting only"
106+
"Vaccinations given on or after 20 April 2026"
89107
)
108+
expect(page).to have_content("Upload to Mavis national reporting only.")
90109
end
91110
end
92111
end

0 commit comments

Comments
 (0)