Skip to content

Commit eb8cfea

Browse files
authored
Merge pull request #5864 from nhsuk/next
Version 6.14.0
2 parents 677d443 + 5f638a2 commit eb8cfea

175 files changed

Lines changed: 2711 additions & 1372 deletions

File tree

Some content is hidden

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

.github/workflows/deploy-application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- sandbox-alpha
1818
- sandbox-beta
1919
- performance
20+
- pentest
2021
server_types:
2122
description: Server types to deploy
2223
required: true
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
- next
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy-documentation:
14+
name: Generate and Publish RDoc
15+
runs-on: ubuntu-latest
16+
concurrency:
17+
group: deploy-documentation-${{ github.ref_name }}
18+
cancel-in-progress: true
19+
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
bundler-cache: true
25+
26+
- name: Generate Documentation
27+
run: bundle exec rake rdoc:generate
28+
29+
- name: Deploy to GitHub Pages
30+
uses: JamesIves/github-pages-deploy-action@v4
31+
with:
32+
branch: gh-pages
33+
folder: docs/rdoc
34+
target-folder: docs/rdoc/${{ github.ref_name }}
35+
clean: false

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ on:
3434
- sandbox-alpha
3535
- sandbox-beta
3636
- performance
37+
- pentest
3738
server_types:
3839
description: Server types to deploy
3940
required: true

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/alphagov/rubocop-govuk.git
3-
revision: 58ff3290bf5c267d0228d0910fa0bc92a405ec81
3+
revision: cb59fb73abfb010ea000ed53dcc84a3e20c28974
44
branch: main
55
specs:
66
rubocop-govuk (5.1.20)
@@ -136,7 +136,7 @@ GEM
136136
ast (2.4.3)
137137
attr_required (1.0.2)
138138
aws-eventstream (1.4.0)
139-
aws-partitions (1.1206.0)
139+
aws-partitions (1.1208.0)
140140
aws-sdk-accessanalyzer (1.85.0)
141141
aws-sdk-core (~> 3, >= 3.241.4)
142142
aws-sigv4 (~> 1.5)
@@ -148,7 +148,7 @@ GEM
148148
bigdecimal
149149
jmespath (~> 1, >= 1.6.1)
150150
logger
151-
aws-sdk-ec2 (1.591.0)
151+
aws-sdk-ec2 (1.592.0)
152152
aws-sdk-core (~> 3, >= 3.241.4)
153153
aws-sigv4 (~> 1.5)
154154
aws-sdk-ecr (1.119.0)
@@ -243,7 +243,7 @@ GEM
243243
docile (1.4.1)
244244
domain_name (0.6.20240107)
245245
drb (2.2.3)
246-
dry-cli (1.4.0)
246+
dry-cli (1.4.1)
247247
email_validator (2.2.4)
248248
activemodel
249249
erb (6.0.1)
@@ -486,7 +486,7 @@ GEM
486486
date
487487
stringio
488488
public_suffix (7.0.2)
489-
puma (7.1.0)
489+
puma (7.2.0)
490490
nio4r (~> 2.0)
491491
pundit (2.5.2)
492492
activesupport (>= 3.0.0)
@@ -674,7 +674,7 @@ GEM
674674
sidekiq-scheduler (6.0.1)
675675
rufus-scheduler (~> 3.2)
676676
sidekiq (>= 7.3, < 9)
677-
sidekiq-throttled (2.0.0)
677+
sidekiq-throttled (2.1.0)
678678
concurrent-ruby (>= 1.2.0)
679679
redis-prescription (~> 2.2)
680680
sidekiq (>= 8.0)
@@ -786,7 +786,7 @@ GEM
786786
websocket-extensions (0.1.5)
787787
wicked (2.0.0)
788788
railties (>= 3.0.7)
789-
with_advisory_lock (7.0.2)
789+
with_advisory_lock (7.5.0)
790790
activerecord (>= 7.2)
791791
zeitwerk (>= 2.7)
792792
xpath (3.2.0)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ This is a service used within the NHS for managing and recording school-aged vac
1313
| [Training](https://github.com/nhsuk/manage-vaccinations-in-schools/deployments/training) | [training.manage-vaccinations-in-schools.nhs.uk](https://training.manage-vaccinations-in-schools.nhs.uk) | External training || `release` branch | manual | [`staging`](config/environments/staging.rb) |
1414
| [Production](https://github.com/nhsuk/manage-vaccinations-in-schools/deployments/production) | [www.manage-vaccinations-in-schools.nhs.uk](https://www.manage-vaccinations-in-schools.nhs.uk) | Live service || `release` branch | manual | [`production`](config/environments/production.rb) |
1515

16+
## Documentation
17+
18+
We have two Rdoc versions:
19+
20+
1. [next](https://nhsuk.github.io/manage-vaccinations-in-schools/rdoc/next) - useful for dev work (based off the `next` branch).
21+
2. [release](https://nhsuk.github.io/manage-vaccinations-in-schools/rdoc/release) - useful for ops to debug live issues (based off the `release` branch).
22+
1623
## Development
1724

1825
### Prerequisites

app/assets/stylesheets/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@forward "session-banner";
1515
@forward "status";
1616
@forward "sticky-navigation";
17+
@forward "sub-navigation";
1718
@forward "summary-list";
1819
@forward "tables";
1920
@forward "tag";
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
3+
$_current-indicator-width: 4px;
4+
5+
.app-sub-navigation {
6+
@include nhsuk-font(16);
7+
}
8+
9+
.app-sub-navigation__section {
10+
margin: 0 0 nhsuk-spacing(4);
11+
padding: 0;
12+
list-style-type: none;
13+
14+
@include nhsuk-font(16);
15+
}
16+
17+
.app-sub-navigation__link {
18+
padding-top: nhsuk-spacing(1);
19+
padding-bottom: nhsuk-spacing(1);
20+
21+
@include nhsuk-link-style-default;
22+
@include nhsuk-link-style-no-visited-state;
23+
24+
&:link {
25+
text-decoration: none;
26+
}
27+
28+
&:not(:focus):hover {
29+
color: $nhsuk-link-colour;
30+
}
31+
}
32+
33+
.app-sub-navigation__section-item {
34+
margin-bottom: nhsuk-spacing(1);
35+
padding-top: nhsuk-spacing(1);
36+
padding-bottom: nhsuk-spacing(1);
37+
}
38+
39+
.app-sub-navigation__section-item--current {
40+
margin-left: -(nhsuk-spacing(2) + $_current-indicator-width);
41+
padding-left: nhsuk-spacing(2);
42+
border-left: $_current-indicator-width solid $nhsuk-link-colour;
43+
}
44+
45+
.app-sub-navigation__link[aria-current] {
46+
font-weight: bold;
47+
}
48+
49+
.app-sub-navigation__section--nested {
50+
margin-top: nhsuk-spacing(2);
51+
margin-bottom: 0;
52+
padding-left: nhsuk-spacing(4);
53+
}
54+
55+
.app-sub-navigation__section--nested .app-sub-navigation__section-item::before {
56+
content: "";
57+
margin-left: nhsuk-spacing(-4);
58+
color: $nhsuk-secondary-text-colour;
59+
}
60+
61+
.app-sub-navigation__theme {
62+
margin: 0;
63+
padding: nhsuk-spacing(2) nhsuk-spacing(3) nhsuk-spacing(2) 0;
64+
color: $nhsuk-secondary-text-colour;
65+
66+
@include nhsuk-font(19, $weight: bold);
67+
}

app/components/app_activity_log_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,12 @@ def expiration_events
203203

204204
not_vaccinated_programmes =
205205
all_programmes.reject do |programme|
206-
patient.vaccination_status(programme:, academic_year:).vaccinated?
206+
patient.programme_status(programme, academic_year:).vaccinated?
207207
end
208208

209209
vaccinated_but_seasonal_programmes =
210210
all_programmes.select do |programme|
211-
patient.vaccination_status(programme:, academic_year:).vaccinated? &&
211+
patient.programme_status(programme, academic_year:).vaccinated? &&
212212
programme.seasonal?
213213
end
214214

app/components/app_imports_navigation_component.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ def call
2020
selected: active == :imported
2121
)
2222

23-
nav.with_item(
24-
href: imports_issues_path,
25-
text: issues_text,
26-
selected: active == :issues
27-
)
23+
if policy(%i[import issue]).index?
24+
nav.with_item(
25+
href: imports_issues_path,
26+
text: issues_text,
27+
selected: active == :issues
28+
)
29+
end
2830

2931
if policy(ImportantNotice).index?
3032
nav.with_item(

app/components/app_patient_programmes_table_component.rb

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ def non_seasonal_programme_rows(programme:)
4949
end
5050

5151
def build_row(programme:, academic_year:)
52+
programme_type = programme.type
53+
5254
[
5355
name_for_programme(programme:, academic_year:),
54-
status_for_programme(programme:, academic_year:),
55-
notes_for_programme(programme:, academic_year:)
56+
status_for_programme(programme_type:, academic_year:),
57+
notes_for_programme(programme_type:, academic_year:)
5658
]
5759
end
5860

@@ -64,25 +66,26 @@ def name_for_programme(programme:, academic_year:)
6466
end
6567
end
6668

67-
def status_for_programme(programme:, academic_year:)
68-
hash = programme_status_hash(programme:, academic_year:)
69+
def status_for_programme(programme_type:, academic_year:)
70+
hash = programme_status_hash(programme_type:, academic_year:)
6971
tag.strong(hash[:text], class: "nhsuk-tag nhsuk-tag--#{hash[:colour]}")
7072
end
7173

72-
def notes_for_programme(programme:, academic_year:)
73-
programme_status_hash(programme:, academic_year:)[:details_text].presence ||
74-
""
74+
def notes_for_programme(programme_type:, academic_year:)
75+
programme_status_hash(programme_type:, academic_year:)[
76+
:details_text
77+
].presence || ""
7578
end
7679

77-
def programme_status_hash(programme:, academic_year:)
80+
def programme_status_hash(programme_type:, academic_year:)
7881
@programme_status_hash ||= {}
79-
@programme_status_hash[programme.type] ||= {}
80-
@programme_status_hash[programme.type][
82+
@programme_status_hash[programme_type] ||= {}
83+
@programme_status_hash[programme_type][
8184
academic_year
82-
] ||= PatientStatusResolver.new(
85+
] ||= PatientProgrammeStatusResolver.call(
8386
patient,
84-
programme:,
87+
programme_type:,
8588
academic_year:
86-
).programme
89+
)
8790
end
8891
end

0 commit comments

Comments
 (0)