|
1 | 1 | <% if gillick_assessment || can_assess? %> |
2 | | - <h5 class="nhsuk-heading-s">Gillick assessment</h5> |
| 2 | + <%= render AppCardComponent.new(section: true) do |card| %> |
| 3 | + <% card.with_heading(level: 2) { "Gillick assessment" } %> |
3 | 4 |
|
4 | | - <% if gillick_assessment %> |
5 | | - <% if gillick_assessment.gillick_competent? %> |
6 | | - <p class="app-status app-status--green"> |
7 | | - <svg class="nhsuk-icon nhsuk-icon--tick" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" focusable="false" aria-hidden="true"> |
8 | | - <path d="M11.4 18.8a2 2 0 0 1-2.7.1h-.1L4 14.1a1.5 1.5 0 0 1 2.1-2L10 16l8.1-8.1a1.5 1.5 0 1 1 2.2 2l-8.9 9Z"/> |
9 | | - </svg> |
10 | | - Child assessed as Gillick competent |
11 | | - </p> |
12 | | - <% else %> |
13 | | - <p class="app-status app-status--red"> |
14 | | - <svg class="nhsuk-icon nhsuk-icon--cross" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" focusable="false" aria-hidden="true"> |
15 | | - <path d="M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"/> |
16 | | - </svg> |
17 | | - Child assessed as not Gillick competent |
18 | | - </p> |
19 | | - <% end %> |
| 5 | + <% if gillick_assessment %> |
| 6 | + <% if gillick_assessment.gillick_competent? %> |
| 7 | + <%= render AppStatusComponent.new(text: "Child assessed as Gillick competent", colour: "green", icon: :tick) %> |
| 8 | + <% else %> |
| 9 | + <%= render AppStatusComponent.new(text: "Child assessed as not Gillick competent", colour: "red", icon: :cross) %> |
| 10 | + <% end %> |
20 | 11 |
|
21 | | - <% if (notes = gillick_assessment.notes).present? %> |
22 | | - <p><%= notes %></p> |
23 | | - <% end %> |
| 12 | + <% if (notes = gillick_assessment.notes).present? %> |
| 13 | + <p><%= notes %></p> |
| 14 | + <% end %> |
24 | 15 |
|
25 | | - <% if policy(gillick_assessment).edit? %> |
26 | | - <p> |
27 | | - <%= govuk_button_link_to "Edit Gillick competence", |
28 | | - edit_session_patient_programme_gillick_assessment_path( |
29 | | - session, |
30 | | - patient, |
31 | | - programme, |
32 | | - ), |
33 | | - secondary: true, |
34 | | - class: "nhsuk-u-margin-bottom-0" %> |
35 | | - </p> |
| 16 | + <% if policy(gillick_assessment).edit? %> |
| 17 | + <%= render AppActionLinkComponent.new(text: "Update Gillick competence", |
| 18 | + href: edit_session_patient_programme_gillick_assessment_path( |
| 19 | + session, |
| 20 | + patient, |
| 21 | + programme, |
| 22 | + )) %> |
| 23 | + <% end %> |
| 24 | + <% elsif can_assess? %> |
| 25 | + <%= render AppActionLinkComponent.new(text: "Assess Gillick competence", |
| 26 | + href: edit_session_patient_programme_gillick_assessment_path( |
| 27 | + session, |
| 28 | + patient, |
| 29 | + programme, |
| 30 | + )) %> |
36 | 31 | <% end %> |
37 | | - <% elsif can_assess? %> |
38 | | - <p> |
39 | | - <%= govuk_button_link_to "Assess Gillick competence", |
40 | | - edit_session_patient_programme_gillick_assessment_path( |
41 | | - session, |
42 | | - patient, |
43 | | - programme, |
44 | | - ), |
45 | | - secondary: true, |
46 | | - class: "nhsuk-u-margin-bottom-0" %> |
47 | | - </p> |
48 | 32 | <% end %> |
49 | 33 | <% end %> |
0 commit comments