Skip to content

Commit 623e108

Browse files
authored
Merge pull request #6353 from NHSDigital/next
Version 7.4.0
2 parents 7fe89e6 + 15cf159 commit 623e108

File tree

191 files changed

+3592
-3139
lines changed

Some content is hidden

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

191 files changed

+3592
-3139
lines changed

.github/workflows/continuous-deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
steps:
4040
- name: Send Slack notification about failed deployment
4141
if: needs.test.result == 'failure' || needs.deploy.result == 'failure'
42-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
42+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
4343
with:
4444
webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }}
4545
webhook-type: incoming-webhook
@@ -56,7 +56,7 @@ jobs:
5656
# yamllint enable rule:line-length
5757
- name: Send Slack notification about failed E2E tests
5858
if: needs.end-to-end-tests.result == 'failure'
59-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
59+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
6060
with:
6161
webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }}
6262
webhook-type: incoming-webhook

.github/workflows/data-replication-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
steps:
154154
- name: Notify pending approval
155155
if: inputs.environment == 'production'
156-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
156+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
157157
with:
158158
webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }}
159159
webhook-type: incoming-webhook

.github/workflows/deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747
- ops
4848
default: all
4949
run_pre_deploy_migrations:
50-
description: Run data migrations before service deployment.
50+
description: Run `pre-deploy` job (schema-migrations) before service deployment.
5151
required: false
5252
type: boolean
5353
default: true
@@ -159,7 +159,7 @@ jobs:
159159
needs: prepare-deployment
160160
steps:
161161
- name: Notify approval required
162-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
162+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
163163
with:
164164
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
165165
webhook-type: incoming-webhook
@@ -303,7 +303,7 @@ jobs:
303303
# yamllint enable rule:line-length
304304
- name: Notify migrations completed
305305
if: ${{ env.environment == 'production' }}
306-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
306+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
307307
with:
308308
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
309309
webhook-type: incoming-webhook
@@ -483,7 +483,7 @@ jobs:
483483
# yamllint enable rule:line-length
484484
- name: Notify data migrations completed
485485
if: ${{ env.environment == 'production' }}
486-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
486+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
487487
with:
488488
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
489489
webhook-type: incoming-webhook
@@ -503,7 +503,7 @@ jobs:
503503
- name: Notify deployment success
504504
if: >-
505505
${{ needs.deploy-service.result == 'success' || needs.post-deploy.result == 'success' }}
506-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
506+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
507507
with:
508508
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
509509
webhook-type: incoming-webhook
@@ -517,7 +517,7 @@ jobs:
517517
- name: Notify deployment failure
518518
if: >-
519519
${{ needs.deploy-service.result == 'failure' || needs.pre-deploy.result == 'failure' }}
520-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
520+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
521521
with:
522522
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
523523
webhook-type: incoming-webhook

.github/workflows/end-to-end-tests-on-pull-request.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,23 @@ jobs:
343343
outputs:
344344
test_branch: ${{ steps.check-branch.outputs.test_branch }}
345345
steps:
346-
- name: Check if branch exists
346+
- name: Check if head branch or base branch exists
347347
id: check-branch
348348
run: |
349349
if git ls-remote --exit-code \
350350
--heads https://github.com/NHSDigital/manage-vaccinations-in-schools-testing.git \
351-
"$BRANCH_TO_CHECK" > /dev/null 2>&1; then
352-
echo "test_branch=$BRANCH_TO_CHECK" >> "$GITHUB_OUTPUT"
351+
"$HEAD_REF" > /dev/null 2>&1; then
352+
echo "test_branch=$HEAD_REF" >> "$GITHUB_OUTPUT"
353+
elif git ls-remote --exit-code \
354+
--heads https://github.com/NHSDigital/manage-vaccinations-in-schools-testing.git \
355+
"$BASE_REF" > /dev/null 2>&1; then
356+
echo "test_branch=$BASE_REF" >> "$GITHUB_OUTPUT"
353357
else
354358
echo "test_branch=main" >> "$GITHUB_OUTPUT"
355359
fi
356360
env:
357-
BRANCH_TO_CHECK: ${{ github.head_ref }}
361+
HEAD_REF: ${{ github.head_ref }}
362+
BASE_REF: ${{ github.base_ref }}
358363
call-end-to-end-tests:
359364
needs: [launch-dockerized-devimage, wait-for-task-stability, find-correct-test-branch]
360365
if:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
cache: yarn
2222
node-version-file: .tool-versions
2323
- run: yarn install --immutable --immutable-cache --check-cache
24-
- uses: jdx/mise-action@v3
24+
- uses: jdx/mise-action@v4
2525
with:
2626
install_args: actionlint hk pkl shellcheck yamllint
2727
- run: hk check --all

.github/workflows/update-version-numbers-slack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
echo "MAVIS_TECH_TOPIC=$TOPIC" >> "$GITHUB_ENV"
6262
# yamllint enable rule:line-length
6363
- name: Update mavis tech channel topic
64-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
64+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
6565
with:
6666
method: conversations.setTopic
6767
token: ${{ secrets.MAVIS_DEPLOYMENT_BOT_OAUTH_TOKEN }}

Gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ GEM
284284
irb (~> 1.10)
285285
reline (>= 0.3.8)
286286
deep_merge (1.2.2)
287-
devise (5.0.2)
287+
devise (5.0.3)
288288
bcrypt (~> 3.0)
289289
orm_adapter (~> 0.1)
290290
railties (>= 7.0)
@@ -557,7 +557,7 @@ GEM
557557
racc
558558
pg (1.6.3-arm64-darwin)
559559
pg (1.6.3-x86_64-linux)
560-
phonelib (0.10.16)
560+
phonelib (0.10.17)
561561
pp (0.6.3)
562562
prettyprint
563563
prettier_print (1.2.1)
@@ -667,7 +667,7 @@ GEM
667667
redcarpet (3.6.1)
668668
redis (5.4.1)
669669
redis-client (>= 0.22.0)
670-
redis-client (0.26.4)
670+
redis-client (0.27.0)
671671
connection_pool
672672
redis-prescription (2.6.0)
673673
regexp_parser (2.11.3)
@@ -770,15 +770,15 @@ GEM
770770
securerandom (0.4.1)
771771
semantic_logger (4.17.0)
772772
concurrent-ruby (~> 1.0)
773-
sentry-rails (6.4.1)
773+
sentry-rails (6.5.0)
774774
railties (>= 5.2.0)
775-
sentry-ruby (~> 6.4.1)
776-
sentry-ruby (6.4.1)
775+
sentry-ruby (~> 6.5.0)
776+
sentry-ruby (6.5.0)
777777
bigdecimal
778778
concurrent-ruby (~> 1.0, >= 1.0.2)
779779
logger
780-
sentry-sidekiq (6.4.1)
781-
sentry-ruby (~> 6.4.1)
780+
sentry-sidekiq (6.5.0)
781+
sentry-ruby (~> 6.5.0)
782782
sidekiq (>= 5.0)
783783
shoulda-matchers (7.0.1)
784784
activesupport (>= 7.1)

app/components/app_activity_log_component.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,13 @@ def vaccination_events
477477

478478
subtitle =
479479
if historical_vaccination_event?(vaccination_record)
480-
"Record added to Mavis #{vaccination_record.reported_at.to_fs(:long)} · " \
480+
"Record added to Mavis #{vaccination_record.created_at.to_fs(:long)} · " \
481481
"Vaccination given #{vaccination_record.performed_at.to_date.to_fs(:long)}"
482482
end
483483

484484
at =
485485
if historical_vaccination_event?(vaccination_record)
486-
vaccination_record.reported_at
486+
vaccination_record.created_at
487487
else
488488
vaccination_record.performed_at
489489
end
@@ -511,11 +511,8 @@ def vaccination_events
511511
end
512512

513513
def historical_vaccination_event?(vaccination_record)
514-
vaccination_record.reported_at.present? &&
515-
(
516-
vaccination_record.sourced_from_manual_report? ||
517-
vaccination_record.sourced_from_historical_upload?
518-
)
514+
vaccination_record.sourced_from_historical_upload? ||
515+
vaccination_record.sourced_from_manual_report?
519516
end
520517

521518
def attendance_events

app/components/app_patient_navigation_component.rb

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,11 @@ def call
1717
selected: active == :show
1818
)
1919

20-
if Flipper.enabled?(:child_record_redesign)
21-
@programmes.flat_map do |programme|
22-
nav.with_item(
23-
href: patient_programme_path(@patient, programme.type),
24-
text: programme.name,
25-
selected: active == programme.type.to_sym
26-
)
27-
end
28-
end
29-
30-
unless Flipper.enabled?(:child_record_redesign)
20+
@programmes.flat_map do |programme|
3121
nav.with_item(
32-
href: log_patient_path(patient),
33-
text: "Activity log",
34-
selected: active == :log
22+
href: patient_programme_path(@patient, programme.type),
23+
text: programme.name,
24+
selected: active == programme.type.to_sym
3525
)
3626
end
3727
end

app/components/app_patient_session_record_component.rb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ def render?
2121
patient.consent_given_and_safe_to_vaccinate?(
2222
programme:,
2323
academic_year:
24-
) &&
25-
(
26-
registration_status&.attending? || registration_status&.completed? ||
27-
!session.requires_registration?
28-
)
24+
) && can_record_today?
2925
end
3026

3127
private
@@ -39,6 +35,19 @@ def registration_status
3935
@registration_status ||= patient.registration_status(session:)
4036
end
4137

38+
def can_record_today?
39+
return true unless session.requires_registration?
40+
41+
today_attendance_record.present? && today_attendance_record&.attending?
42+
end
43+
44+
def today_attendance_record
45+
patient.attendance_records.find do |attendance_record|
46+
attendance_record.location_id == session.location_id &&
47+
attendance_record.date == Date.current
48+
end
49+
end
50+
4251
def vaccination_record
4352
VaccinationRecord.new(patient:, session:, programme:)
4453
end

0 commit comments

Comments
 (0)