Skip to content

Commit e99b9d2

Browse files
committed
Update following campaign model rename
The campaign model has been renamed to programme (to match the naming we use across the service in the UI), so we need to make changes across the codebase to reference the new model name. Most of these changes were done automatically (find and replace and refactor in RubyMine), however a number of additional fixes were done manually. This should have no functional changes to the service itself.
1 parent 7d362b8 commit e99b9d2

File tree

181 files changed

+968
-963
lines changed

Some content is hidden

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

181 files changed

+968
-963
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ To [generate tests interactively by clicking in a live browser](https://playwrig
205205
yarn playwright codegen http://localhost:4000
206206
```
207207

208-
### Example campaigns
208+
### Example programmes
209209

210-
You can generate an example campaign with a few sessions in development by visiting `/reset`.
210+
You can generate an example programme with a few sessions in development by visiting `/reset`.
211211

212212
#### Adding a test user
213213

adr/00005-offline-security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ requests to the server when the user has no or spotty connectivity, and reply
1616
to those requests with offline pages.
1717

1818
Our pages contain sensitive data, as they need to display the names, NHS
19-
numbers, and date of births of patients involved in a vaccination campaign.
19+
numbers, and date of births of patients involved in a vaccination programme.
2020

2121
This data needs to be stored securely, otherwise any offline capabilities are
2222
functionally equivalent to downloading a plaintext Excel or CSV of patient

adr/00007-consent-form-starting-url.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ GET /sessions/:session_id/consent/confirm -> ParentalConsentController#confirm
9292

9393
### Option 4: Vaccine-specific URL
9494

95-
It may be sufficient to only provide a campaign identifier as part of the URL.
95+
It may be sufficient to only provide a programme identifier as part of the URL.
9696
This would work similarly to the option to provide a session id, however we may
9797
need to get information from the parent about what school their child goes to.
9898

@@ -114,8 +114,8 @@ risks. This could be used by parents who can't locate the consent invitation
114114
email, or ones who never received it but have children in the class.
115115

116116
At the very least we will need to know which vaccine the consent form is for,
117-
and almost certainly we'll need to know which campaign specifically. Having the
118-
campaign will tell us in addition to the vaccine, which year and school. The
117+
and almost certainly we'll need to know which programme specifically. Having the
118+
programme will tell us in addition to the vaccine, which year and school. The
119119
year will be useful as vaccines can change year on year, and the school
120120
information may be part of the consent form to confirm attendance information.
121121

app/components/app_patient_table_component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# frozen_string_literal: true
22

33
class AppPatientTableComponent < ViewComponent::Base
4-
def initialize(patients, campaign:)
4+
def initialize(patients, programme:)
55
super
66

77
@patients = patients
8-
@campaign = campaign
8+
@programme = programme
99
end
1010

1111
private
1212

13-
attr_reader :patients, :campaign
13+
attr_reader :patients, :programme
1414

1515
def heading
1616
"#{pluralize(patients.count, "child")} in this programme’s cohort"
@@ -45,6 +45,6 @@ def href_for(patient:)
4545

4646
def patient_session_for(patient:)
4747
# TODO: handle multiple patient sessions
48-
campaign.patient_sessions.active.order(:created_at).find_by(patient:)
48+
programme.patient_sessions.active.order(:created_at).find_by(patient:)
4949
end
5050
end

app/components/app_session_details_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def school
1212
end
1313

1414
def vaccine
15-
@session.campaign.name
15+
@session.programme.name
1616
end
1717

1818
def date

app/components/app_vaccinate_form_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<div class="nhsuk-card__content">
1111
<h2 class="nhsuk-card__heading nhsuk-heading-m">
12-
Did they get the <%= campaign_name %> vaccine?
12+
Did they get the <%= programme_name %> vaccine?
1313
</h2>
1414

1515
<%= f.govuk_radio_buttons_fieldset(:administered, legend: nil) do %>

app/components/app_vaccinate_form_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def session
3434
@patient_session.session
3535
end
3636

37-
def campaign_name
38-
@patient_session.campaign.name
37+
def programme_name
38+
@patient_session.programme.name
3939
end
4040

4141
def vaccine

app/components/app_vaccination_record_details_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ def call
106106
text: "Change",
107107
visually_hidden_text: "vaccination date",
108108
href:
109-
campaign_vaccination_record_edit_date_and_time_path(
110-
@vaccination_record.campaign,
109+
programme_vaccination_record_edit_date_and_time_path(
110+
@vaccination_record.programme,
111111
@vaccination_record
112112
)
113113
)

app/components/app_vaccination_record_table_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<% body.with_row do |row| %>
1616
<% row.with_cell do %>
1717
<span class="nhsuk-table-responsive__heading">Full name</span>
18-
<%= govuk_link_to vaccination_record.patient.full_name, campaign_vaccination_record_path(vaccination_record.campaign, vaccination_record) %>
18+
<%= govuk_link_to vaccination_record.patient.full_name, programme_vaccination_record_path(vaccination_record.programme, vaccination_record) %>
1919
<% end %>
2020

2121
<% row.with_cell do %>

app/controllers/campaigns/edit_controller.rb

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)