Skip to content

Commit 471ae17

Browse files
authored
Merge pull request #6114 from NHSDigital/next
Version 6.21.0
2 parents 7262703 + ef82042 commit 471ae17

File tree

182 files changed

+2558
-979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+2558
-979
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
* @nhsuk/mavis-devs-application
2-
.github/ @nhsuk/vaccine-digital-service
3-
docs/ @nhsuk/vaccine-digital-service
1+
* @NHSDigital/mavis

.github/workflows/end-to-end-tests.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,3 @@ jobs:
345345
aws-region: eu-west-2
346346
- name: Stop dockerized dev image
347347
run: aws ecs stop-task --cluster assurance-testing --task ${{ needs.wait-for-task-stability.outputs.task_arn }}
348-
enforce-end-to-end-tests:
349-
name: Check if end-to-end tests passed if required
350-
needs: [ call-end-to-end-tests ]
351-
if: ${{ always() && github.event_name == 'pull_request' }}
352-
runs-on: ubuntu-latest
353-
steps:
354-
- name: Check end-to-end tests passed or were skipped
355-
run: |
356-
echo "All good" # TODO: Remove in followup PR

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ jobs:
2424
- uses: jdx/mise-action@v3
2525
with:
2626
install_args: hk pkl
27+
- run: hk check --all

Gemfile.lock

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/citizensadvice/capybara_accessible_selectors.git
3-
revision: 3feb17c2e2723bc2e177ce00765a50d6cddf479e
3+
revision: b01f8eae5cc083b9151d5e711c36713e28c487e7
44
specs:
55
capybara_accessible_selectors (0.15.0)
66
capybara (~> 3.36)
@@ -122,7 +122,7 @@ GEM
122122
public_suffix (>= 2.0.2, < 8.0)
123123
aes_key_wrap (1.1.0)
124124
amazing_print (2.0.0)
125-
annotaterb (4.21.0)
125+
annotaterb (4.22.0)
126126
activerecord (>= 6.0.0)
127127
activesupport (>= 6.0.0)
128128
array_enum (1.6.0)
@@ -134,7 +134,7 @@ GEM
134134
ast (2.4.3)
135135
attr_required (1.0.2)
136136
aws-eventstream (1.4.0)
137-
aws-partitions (1.1213.0)
137+
aws-partitions (1.1219.0)
138138
aws-sdk-accessanalyzer (1.85.0)
139139
aws-sdk-core (~> 3, >= 3.241.4)
140140
aws-sigv4 (~> 1.5)
@@ -146,10 +146,10 @@ GEM
146146
bigdecimal
147147
jmespath (~> 1, >= 1.6.1)
148148
logger
149-
aws-sdk-ec2 (1.598.0)
149+
aws-sdk-ec2 (1.604.0)
150150
aws-sdk-core (~> 3, >= 3.241.4)
151151
aws-sigv4 (~> 1.5)
152-
aws-sdk-ecr (1.119.0)
152+
aws-sdk-ecr (1.121.0)
153153
aws-sdk-core (~> 3, >= 3.241.4)
154154
aws-sigv4 (~> 1.5)
155155
aws-sdk-iam (1.140.0)
@@ -158,7 +158,7 @@ GEM
158158
aws-sdk-kms (1.121.0)
159159
aws-sdk-core (~> 3, >= 3.241.4)
160160
aws-sigv4 (~> 1.5)
161-
aws-sdk-rds (1.307.0)
161+
aws-sdk-rds (1.308.0)
162162
aws-sdk-core (~> 3, >= 3.241.4)
163163
aws-sigv4 (~> 1.5)
164164
aws-sdk-s3 (1.213.0)
@@ -176,7 +176,7 @@ GEM
176176
bigdecimal (4.0.1)
177177
bindata (2.5.1)
178178
bindex (0.8.1)
179-
bootsnap (1.22.0)
179+
bootsnap (1.23.0)
180180
msgpack (~> 1.2)
181181
brakeman (8.0.2)
182182
racc
@@ -229,7 +229,7 @@ GEM
229229
irb (~> 1.10)
230230
reline (>= 0.3.8)
231231
deep_merge (1.2.2)
232-
devise (5.0.0)
232+
devise (5.0.2)
233233
bcrypt (~> 3.0)
234234
orm_adapter (~> 0.1)
235235
railties (>= 7.0)
@@ -244,7 +244,7 @@ GEM
244244
dry-cli (1.4.1)
245245
email_validator (2.2.4)
246246
activemodel
247-
erb (6.0.1)
247+
erb (6.0.2)
248248
erubi (1.13.1)
249249
et-orbi (1.4.0)
250250
tzinfo
@@ -324,8 +324,9 @@ GEM
324324
indefinite_article (0.2.5)
325325
activesupport
326326
io-console (0.8.2)
327-
irb (1.16.0)
327+
irb (1.17.0)
328328
pp (>= 0.6.0)
329+
prism (>= 1.3.0)
329330
rdoc (>= 4.0.0)
330331
reline (>= 0.4.2)
331332
its (0.2.0)
@@ -342,7 +343,7 @@ GEM
342343
bindata
343344
faraday (~> 2.0)
344345
faraday-follow_redirects
345-
jsonb_accessor (1.4)
346+
jsonb_accessor (1.4.1)
346347
activerecord (>= 6.1)
347348
activesupport (>= 6.1)
348349
pg (>= 0.18.1)
@@ -393,7 +394,8 @@ GEM
393394
mime-types-data (~> 3.2025, >= 3.2025.0507)
394395
mime-types-data (3.2025.0924)
395396
mini_mime (1.1.5)
396-
minitest (6.0.1)
397+
minitest (6.0.2)
398+
drb (~> 2.0)
397399
prism (~> 1.5)
398400
msgpack (1.8.0)
399401
net-http (0.9.1)
@@ -412,9 +414,9 @@ GEM
412414
net-protocol
413415
nio4r (2.7.5)
414416
nkf (0.2.0)
415-
nokogiri (1.19.0-arm64-darwin)
417+
nokogiri (1.19.1-arm64-darwin)
416418
racc (~> 1.4)
417-
nokogiri (1.19.0-x86_64-linux-gnu)
419+
nokogiri (1.19.1-x86_64-linux-gnu)
418420
racc (~> 1.4)
419421
notifications-ruby-client (6.3.0)
420422
jwt (>= 1.5, < 4)
@@ -485,7 +487,7 @@ GEM
485487
activesupport (>= 3.0.0)
486488
raabro (1.4.0)
487489
racc (1.8.1)
488-
rack (3.2.4)
490+
rack (3.2.5)
489491
rack-oauth2 (2.3.0)
490492
activesupport
491493
attr_required
@@ -548,14 +550,14 @@ GEM
548550
ffi (~> 1.0)
549551
rbs (3.10.2)
550552
logger
551-
rdoc (7.1.0)
553+
rdoc (7.2.0)
552554
erb
553555
psych (>= 4.0.0)
554556
tsort
555557
redcarpet (3.6.1)
556558
redis (5.4.1)
557559
redis-client (>= 0.22.0)
558-
redis-client (0.26.3)
560+
redis-client (0.26.4)
559561
connection_pool
560562
redis-prescription (2.6.0)
561563
regexp_parser (2.11.3)
@@ -591,12 +593,12 @@ GEM
591593
rspec-expectations (~> 3.13)
592594
rspec-mocks (~> 3.13)
593595
rspec-support (~> 3.13)
594-
rspec-sidekiq (5.2.0)
596+
rspec-sidekiq (5.3.0)
595597
rspec-core (~> 3.0)
596598
rspec-expectations (~> 3.0)
597599
rspec-mocks (~> 3.0)
598600
sidekiq (>= 5, < 9)
599-
rspec-support (3.13.6)
601+
rspec-support (3.13.7)
600602
rubocop (1.82.1)
601603
json (~> 2.3)
602604
language_server-protocol (~> 3.17.0.2)
@@ -633,8 +635,9 @@ GEM
633635
rubocop-rspec (3.9.0)
634636
lint_roller (~> 1.1)
635637
rubocop (~> 1.81)
636-
ruby-prof (1.7.2)
638+
ruby-prof (2.0.2)
637639
base64
640+
ostruct
638641
ruby-progressbar (1.13.0)
639642
rubyXL (3.4.35)
640643
nokogiri (>= 1.10.8)
@@ -654,18 +657,19 @@ GEM
654657
securerandom (0.4.1)
655658
semantic_logger (4.17.0)
656659
concurrent-ruby (~> 1.0)
657-
sentry-rails (6.3.0)
660+
sentry-rails (6.3.1)
658661
railties (>= 5.2.0)
659-
sentry-ruby (~> 6.3.0)
660-
sentry-ruby (6.3.0)
662+
sentry-ruby (~> 6.3.1)
663+
sentry-ruby (6.3.1)
661664
bigdecimal
662665
concurrent-ruby (~> 1.0, >= 1.0.2)
663-
sentry-sidekiq (6.3.0)
664-
sentry-ruby (~> 6.3.0)
666+
logger
667+
sentry-sidekiq (6.3.1)
668+
sentry-ruby (~> 6.3.1)
665669
sidekiq (>= 5.0)
666670
shoulda-matchers (7.0.1)
667671
activesupport (>= 7.1)
668-
sidekiq (8.1.0)
672+
sidekiq (8.1.1)
669673
connection_pool (>= 3.0.0)
670674
json (>= 2.16.0)
671675
logger (>= 1.7.0)
@@ -715,7 +719,7 @@ GEM
715719
activesupport
716720
solargraph (>= 0.48.0)
717721
splunk-sdk-ruby (1.0.5)
718-
stackprof (0.2.27)
722+
stackprof (0.2.28)
719723
stringio (3.2.0)
720724
swd (2.0.3)
721725
activesupport (>= 3)
@@ -765,11 +769,10 @@ GEM
765769
concurrent-ruby (~> 1)
766770
warden (1.2.9)
767771
rack (>= 2.0.9)
768-
web-console (4.2.1)
769-
actionview (>= 6.0.0)
770-
activemodel (>= 6.0.0)
772+
web-console (4.3.0)
773+
actionview (>= 8.0.0)
771774
bindex (>= 0.4.0)
772-
railties (>= 6.0.0)
775+
railties (>= 8.0.0)
773776
webfinger (2.1.3)
774777
activesupport
775778
faraday (~> 2.0)
@@ -796,7 +799,7 @@ GEM
796799
yard (>= 0.8)
797800
yard-solargraph (0.1.0)
798801
yard (~> 0.9)
799-
zeitwerk (2.7.4)
802+
zeitwerk (2.7.5)
800803

801804
PLATFORMS
802805
arm64-darwin-22

app/components/app_activity_log_component.rb

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,19 +400,38 @@ def vaccination_events
400400
if vaccination_record.administered?
401401
if (vaccine = vaccination_record.vaccine)
402402
"Vaccinated with #{vaccine.brand}"
403+
elsif vaccination_record.sourced_from_manual_report?
404+
"Vaccination record added manually"
405+
elsif vaccination_record.sourced_from_historical_upload?
406+
"Vaccination record uploaded"
403407
else
404408
"Vaccinated"
405409
end
406410
else
407411
"Vaccination not given: #{vaccination_record.human_enum_name(:outcome)}"
408412
end
409413

414+
subtitle =
415+
if historical_vaccination_event?(vaccination_record)
416+
"Record added to Mavis #{vaccination_record.reported_at.to_fs(:long)}. " \
417+
"Vaccination given #{vaccination_record.performed_at.to_date.to_fs(:long)}."
418+
end
419+
at =
420+
(
421+
if historical_vaccination_event?(vaccination_record)
422+
vaccination_record.reported_at
423+
else
424+
vaccination_record.performed_at
425+
end
426+
)
427+
410428
kept = {
411429
title:,
412430
body: vaccination_record.notes,
413-
at: vaccination_record.performed_at,
431+
at:,
414432
by: vaccination_record.performed_by,
415-
programmes: [vaccination_record.programme]
433+
programmes: [vaccination_record.programme],
434+
subtitle:
416435
}
417436

418437
discarded =
@@ -428,6 +447,14 @@ def vaccination_events
428447
end
429448
end
430449

450+
def historical_vaccination_event?(vaccination_record)
451+
vaccination_record.reported_at.present? &&
452+
(
453+
vaccination_record.sourced_from_manual_report? ||
454+
vaccination_record.sourced_from_historical_upload?
455+
)
456+
end
457+
431458
def attendance_events
432459
attendance_records.map do |attendance_record|
433460
title =

app/components/app_import_review_issues_summary_component.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ def review_link(record, type)
132132
full_name =
133133
record.is_a?(Patient) ? record.full_name : record.patient&.full_name
134134

135-
helpers.link_to(imports_issue_path(record, type:)) do
135+
helpers.link_to(
136+
imports_issue_path(record, type:, return_to: url_for(import))
137+
) do
136138
helpers.safe_join(
137139
["Review ", tag.span(full_name, class: "nhsuk-u-visually-hidden")]
138140
)

app/components/app_imports_table_component.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<%= render AppCardComponent.new(feature: true) do |card| %>
22
<% card.with_heading(level: 3) do %>
3-
<%= pluralize(imports.count, "import") %>
3+
<%= pluralize(imports.count, "upload") %>
44
<% end %>
55

66
<%= govuk_table(html_attributes: {
77
class: "nhsuk-table-responsive",
88
}) do |table| %>
99
<% table.with_head do |head| %>
1010
<% head.with_row do |row| %>
11-
<% row.with_cell(text: "Imported on") %>
11+
<% row.with_cell(text: "Uploaded on") %>
1212
<% unless @team.has_national_reporting_access? %>
1313
<% row.with_cell(text: "Type") %>
1414
<% end %>
@@ -21,7 +21,7 @@
2121
<% imports.each do |import| %>
2222
<% body.with_row do |row| %>
2323
<% row.with_cell do %>
24-
<span class="nhsuk-table-responsive__heading">Imported on</span>
24+
<span class="nhsuk-table-responsive__heading">Uploaded on</span>
2525
<%= link_to import.created_at.to_fs(:long), path(import) %>
2626
<br />
2727
<span class="nhsuk-u-secondary-text-color nhsuk-u-font-size-16">

app/components/app_log_event_component.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def initialize(
3838
by: nil,
3939
programmes: [],
4040
invalidated: false,
41-
card: false
41+
card: false,
42+
subtitle: nil
4243
)
4344
@title = title
4445
@body = body
@@ -47,13 +48,14 @@ def initialize(
4748
@programmes = programmes
4849
@invalidated = invalidated
4950
@card = card
51+
@subtitle = subtitle
5052
end
5153

5254
private
5355

5456
attr_reader :title, :body, :programmes, :invalidated, :card
5557

5658
def subtitle
57-
safe_join([@at, @by].compact, " &middot; ".html_safe)
59+
@subtitle || safe_join([@at, @by].compact, " &middot; ".html_safe)
5860
end
5961
end

0 commit comments

Comments
 (0)