Skip to content

Commit 0e4a15f

Browse files
Don't show programme status row if there are no statuses
If there are no statuses to show on the child's search card, then remove the entire "Programme status" row
1 parent 3acad6e commit 0e4a15f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/components/app_patient_search_result_card_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ def call
105105
to: :helpers
106106

107107
def programme_status_tag
108-
return if programmes.empty?
109-
110108
status_by_programme =
111109
programmes.each_with_object({}) do |programme, hash|
112110
resolved_status =
@@ -119,6 +117,8 @@ def programme_status_tag
119117
hash[resolved_status.fetch(:prefix)] = resolved_status
120118
end
121119

120+
return if status_by_programme.empty?
121+
122122
render AppAttachedTagsComponent.new(status_by_programme)
123123
end
124124

0 commit comments

Comments
 (0)