|
1 | 1 | <% if gillick_assessment || can_assess? %>
|
2 |
| - <%= render AppCardComponent.new do |card| %> |
3 |
| - <% card.with_heading { "Gillick assessment" } %> |
| 2 | + <h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-3">Gillick assessment</h3> |
4 | 3 |
|
5 |
| - <% if gillick_assessment %> |
6 |
| - <% if gillick_assessment.gillick_competent? %> |
7 |
| - <p class="app-status app-status--aqua-green"> |
8 |
| - <svg class="nhsuk-icon nhsuk-icon__tick" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"> |
9 |
| - <path d="M18.4 7.8l-8.5 8.4L5.6 12" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"></path> |
10 |
| - </svg> |
11 |
| - Child assessed as Gillick competent |
12 |
| - </p> |
13 |
| - <% else %> |
14 |
| - <p class="app-status app-status--red"> |
15 |
| - <svg class="nhsuk-icon nhsuk-icon__cross" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"> |
16 |
| - <path d="M18.6 6.5c.5.5.5 1.5 0 2l-4 4 4 4c.5.6.5 1.4 0 2-.4.4-.7.4-1 .4-.5 0-.9 0-1.2-.3l-3.9-4-4 4c-.3.3-.5.3-1 .3a1.5 1.5 0 0 1-1-2.4l3.9-4-4-4c-.5-.5-.5-1.4 0-2 .6-.7 1.5-.7 2.2 0l3.9 3.9 4-4c.6-.6 1.4-.6 2 0Z" fill="currentColor"></path> |
17 |
| - </svg> |
18 |
| - Child assessed as not Gillick competent |
19 |
| - </p> |
20 |
| - <% end %> |
| 4 | + <% if gillick_assessment %> |
| 5 | + <% if gillick_assessment.gillick_competent? %> |
| 6 | + <p class="app-status app-status--aqua-green"> |
| 7 | + <svg class="nhsuk-icon nhsuk-icon__tick" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"> |
| 8 | + <path d="M18.4 7.8l-8.5 8.4L5.6 12" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"></path> |
| 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" aria-hidden="true"> |
| 15 | + <path d="M18.6 6.5c.5.5.5 1.5 0 2l-4 4 4 4c.5.6.5 1.4 0 2-.4.4-.7.4-1 .4-.5 0-.9 0-1.2-.3l-3.9-4-4 4c-.3.3-.5.3-1 .3a1.5 1.5 0 0 1-1-2.4l3.9-4-4-4c-.5-.5-.5-1.4 0-2 .6-.7 1.5-.7 2.2 0l3.9 3.9 4-4c.6-.6 1.4-.6 2 0Z" fill="currentColor"></path> |
| 16 | + </svg> |
| 17 | + Child assessed as not Gillick competent |
| 18 | + </p> |
| 19 | + <% end %> |
21 | 20 |
|
22 |
| - <% if (notes = gillick_assessment.notes).present? %> |
23 |
| - <p class="nhsuk-body"><%= notes %></p> |
24 |
| - <% end %> |
| 21 | + <% if (notes = gillick_assessment.notes).present? %> |
| 22 | + <p class="nhsuk-body"><%= notes %></p> |
| 23 | + <% end %> |
25 | 24 |
|
26 |
| - <% if helpers.policy(gillick_assessment).edit? %> |
27 |
| - <p class="nhsuk-body"> |
28 |
| - <%= govuk_button_link_to "Edit Gillick competence", |
29 |
| - edit_session_patient_programme_gillick_assessment_path( |
30 |
| - session, |
31 |
| - patient, |
32 |
| - programme, |
33 |
| - ), class: "app-button--secondary nhsuk-u-margin-bottom-0" %> |
34 |
| - </p> |
35 |
| - <% end %> |
36 |
| - <% elsif can_assess? %> |
| 25 | + <% if helpers.policy(gillick_assessment).edit? %> |
37 | 26 | <p class="nhsuk-body">
|
38 |
| - <%= govuk_button_link_to "Assess Gillick competence", |
| 27 | + <%= govuk_button_link_to "Edit Gillick competence", |
39 | 28 | edit_session_patient_programme_gillick_assessment_path(
|
40 | 29 | session,
|
41 | 30 | patient,
|
42 | 31 | programme,
|
43 | 32 | ), class: "app-button--secondary nhsuk-u-margin-bottom-0" %>
|
44 | 33 | </p>
|
45 | 34 | <% end %>
|
| 35 | + <% elsif can_assess? %> |
| 36 | + <p class="nhsuk-body"> |
| 37 | + <%= govuk_button_link_to "Assess Gillick competence", |
| 38 | + edit_session_patient_programme_gillick_assessment_path( |
| 39 | + session, |
| 40 | + patient, |
| 41 | + programme, |
| 42 | + ), class: "app-button--secondary nhsuk-u-margin-bottom-0" %> |
| 43 | + </p> |
46 | 44 | <% end %>
|
47 | 45 | <% end %>
|
0 commit comments