|
1 | 1 | <%= render AppCardComponent.new(colour:) do |card| %> |
2 | 2 | <% card.with_heading { heading } %> |
3 | 3 |
|
4 | | - <% if consent_status.no_response? %> |
5 | | - <% if latest_consent_request %> |
6 | | - <p>No-one responded to our requests for consent.</p> |
7 | | - <p>A request was sent on <%= latest_consent_request.sent_at.to_fs(:long) %>.</p> |
8 | | - <% else %> |
9 | | - <p>No requests have been sent.</p> |
| 4 | + <% unless vaccination_status.vaccinated? %> |
| 5 | + <% if consent_status.no_response? %> |
| 6 | + <% if latest_consent_request %> |
| 7 | + <p>No-one responded to our requests for consent.</p> |
| 8 | + <p>A request was sent on <%= latest_consent_request.sent_at.to_fs(:long) %>.</p> |
| 9 | + <% else %> |
| 10 | + <p>No requests have been sent.</p> |
| 11 | + <% end %> |
| 12 | + <% elsif consent_status.conflicts? %> |
| 13 | + <p>You can only vaccinate if all respondents give consent.</p> |
| 14 | + <% elsif consent_status.refused? %> |
| 15 | + <p><%= who_refused %> refused to give consent.</p> |
| 16 | + <% elsif consent_status.given? %> |
| 17 | + <p><%= patient.full_name %> is ready for the vaccinator.</p> |
10 | 18 | <% end %> |
11 | | - <% elsif consent_status.conflicts? %> |
12 | | - <p>You can only vaccinate if all respondents give consent.</p> |
13 | | - <% elsif consent_status.refused? %> |
14 | | - <p><%= who_refused %> refused to give consent.</p> |
15 | | - <% elsif consent_status.given? %> |
16 | | - <p><%= patient.full_name %> is ready for the vaccinator.</p> |
17 | | - <% end %> |
18 | 19 |
|
19 | | - <div class="app-button-group nhsuk-u-margin-bottom-4"> |
20 | | - <% if can_send_consent_request? %> |
21 | | - <%= govuk_button_to "Send consent request", |
22 | | - send_request_session_patient_programme_consents_path( |
| 20 | + <div class="app-button-group nhsuk-u-margin-bottom-4"> |
| 21 | + <% if can_send_consent_request? %> |
| 22 | + <%= govuk_button_to "Send consent request", |
| 23 | + send_request_session_patient_programme_consents_path( |
| 24 | + session, patient, programme |
| 25 | + ), |
| 26 | + secondary: true %> |
| 27 | + <% end %> |
| 28 | + |
| 29 | + <%= govuk_button_to "Get verbal consent", |
| 30 | + session_patient_programme_consents_path( |
23 | 31 | session, patient, programme |
24 | 32 | ), |
25 | 33 | secondary: true %> |
26 | | - <% end %> |
| 34 | + </div> |
27 | 35 |
|
28 | | - <%= govuk_button_to "Get verbal consent", |
29 | | - session_patient_programme_consents_path( |
30 | | - session, patient, programme |
31 | | - ), |
32 | | - secondary: true %> |
33 | | - </div> |
34 | | - |
35 | | - <%= render AppGillickAssessmentComponent.new(patient_session:, programme:) %> |
| 36 | + <%= render AppGillickAssessmentComponent.new(patient_session:, programme:) %> |
| 37 | + <% end %> |
36 | 38 |
|
37 | 39 | <%= render AppConsentTableComponent.new(patient_session:, programme:) %> |
38 | 40 | <% end %> |
0 commit comments