Skip to content

Commit 2db5730

Browse files
authored
Merge pull request #4311 from nhsuk/hide-import-class-list-clinic
Hide "Import class list" for community clinics
2 parents a9316e0 + 2a7f623 commit 2db5730

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/components/app_session_details_summary_component.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ def patient_sessions
2626

2727
def cohort_row
2828
count = patient_sessions.count
29-
href = import_session_path(session)
29+
30+
actions =
31+
if @session.school?
32+
href = import_session_path(session)
33+
[{ text: "Import class lists", href: }]
34+
else
35+
[]
36+
end
3037

3138
{
3239
key: {
@@ -35,7 +42,7 @@ def cohort_row
3542
value: {
3643
text: I18n.t("children", count:)
3744
},
38-
actions: [{ text: "Import class lists", href: }]
45+
actions:
3946
}
4047
end
4148

spec/features/manage_clinic_sessions_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def then_i_should_see_the_session_details
210210

211211
def then_i_see_the_community_clinic
212212
expect(page).to have_content("Community clinic")
213+
expect(page).not_to have_content("Import class list")
213214
end
214215

215216
def when_the_patient_has_been_invited

0 commit comments

Comments
 (0)