Skip to content

Commit f8eb152

Browse files
committed
Add "Invited to clinic" checkbox
This adds a new checkbox which users will use to filter on patients who have been invited to the clinic. Jira-Issue: MAV-3885
1 parent d23dd2f commit f8eb152

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

app/components/app_patient_search_form_component.html.erb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
<% end %>
2222
<% end %>
2323

24+
<% if show_invited_to_clinic %>
25+
<%= f.govuk_check_boxes_fieldset :clinic_invitations,
26+
multiple: false,
27+
legend: { text: "Clinic invitations", size: "s" },
28+
small: true do %>
29+
<%= f.govuk_check_box :invited_to_clinic,
30+
1, 0,
31+
multiple: false,
32+
checked: form.invited_to_clinic,
33+
label: { text: "Invited to clinic" } %>
34+
<% end %>
35+
<% end %>
36+
2437
<% if show_vaccine_criteria && has_vaccine_criteria? %>
2538
<% programmes.each do |programme| %>
2639
<% if (programme_vaccine_criteria = vaccine_criteria_for(programme:)).present? %>

app/components/app_patient_search_form_component.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def initialize(
1313
heading_level: 3,
1414
show_aged_out_of_programmes: false,
1515
show_archived_records: true,
16+
show_invited_to_clinic: false,
1617
show_vaccine_criteria: false
1718
)
1819
@form = form
@@ -28,6 +29,7 @@ def initialize(
2829
@show_aged_out_of_programmes = show_aged_out_of_programmes
2930
@show_archived_records = show_archived_records
3031
@show_vaccine_criteria = show_vaccine_criteria
32+
@show_invited_to_clinic = show_invited_to_clinic
3133
end
3234

3335
private
@@ -44,6 +46,7 @@ def initialize(
4446
:heading_level,
4547
:show_archived_records,
4648
:show_aged_out_of_programmes,
49+
:show_invited_to_clinic,
4750
:show_vaccine_criteria
4851

4952
delegate :format_year_group,

app/views/schools/patients.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
programmes: current_team.programmes,
2121
programme_statuses: @programme_statuses,
2222
year_groups: @location.year_groups,
23+
show_invited_to_clinic: true,
2324
) %>
2425
</div>
2526

0 commit comments

Comments
 (0)