-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the page that allows the admin to view the response as provided by the applicant and proceed either by accepting the response or sending it to review.
- Loading branch information
1 parent
0f7c85e
commit 87a0c9f
Showing
14 changed files
with
309 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
app/views/assessor_interface/consent_requests/edit_verify.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<% qualification = @consent_request.qualification %> | ||
<% upload = @consent_request.signed_consent_document.uploads.first %> | ||
<% can_update_verify_consent_request = @assessment.verify? && policy([:assessor_interface, @consent_request]).update_verify? %> | ||
|
||
<% title = "Record applicant response" %> | ||
|
||
<% content_for :page_title, title_with_error_prefix(title, error: @form.errors.any?) %> | ||
<% content_for :back_link_url, back_history_path(default: assessor_interface_application_form_assessment_qualification_requests_path) %> | ||
|
||
<%= form_with model: @form, url: [:verify, :assessor_interface, @application_form, @assessment, @consent_request] do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<h1 class="govuk-heading-xl"><%= title %></h1> | ||
|
||
<h2 class="govuk-heading-m"><%= qualification_title(qualification) %></h2> | ||
|
||
<% if @consent_request.received? %> | ||
<div class="govuk-inset-text" style="background-color: #f3f2f1"> | ||
<h2 class="govuk-heading-m">Returned file</h2> | ||
|
||
<p class="govuk-body"> | ||
<%= upload.name %> | ||
</p> | ||
|
||
<div class="govuk-button-group"> | ||
<% if upload.is_pdf? %> | ||
<%= govuk_button_link_to "Download", [:assessor_interface, :application_form, upload.document, upload] %> | ||
<% else %> | ||
<%= govuk_button_link_to "Download original", [:assessor_interface, :application_form, upload.document, upload] %> | ||
<%= govuk_button_link_to "Download as PDF", assessor_interface_application_form_document_pdf_path(upload.document, "original"), inverse: true %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% elsif @consent_request.expired? %> | ||
<%= govuk_warning_text(text: "This consent is overdue.") %> | ||
|
||
<h2 class="govuk-heading-m">Please follow these steps</h2> | ||
|
||
<ul class="govuk-list govuk-list--number"> | ||
<li>Go to Zendesk to email the applicant to remind them.</li> | ||
<li>If no response, escalate to an EO.</li> | ||
</ul> | ||
<% end %> | ||
|
||
<% if can_update_verify_consent_request && (@consent_request.received? || @consent_request.expired?) %> | ||
<% if @consent_request.received? %> | ||
<%= f.govuk_collection_radio_buttons :passed, %i[true false], :itself, | ||
legend: { text: "Is the consent document for this qualification valid?" } %> | ||
<% else %> | ||
<%= f.govuk_collection_radio_buttons :passed, [OpenStruct.new(value: false, label: "Yes, send for review")], :value, :label, | ||
legend: { text: "Do you want to send this reference for review?" } %> | ||
<% end %> | ||
|
||
<%= render "shared/assessor_interface/continue_cancel_button", f: %> | ||
<% end %> | ||
<% end %> |
16 changes: 16 additions & 0 deletions
16
app/views/assessor_interface/consent_requests/edit_verify_failed.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<% title = "Send for review" %> | ||
|
||
<% content_for :page_title, title_with_error_prefix(title, error: @form.errors.any?) %> | ||
<% content_for :back_link_url, back_history_path(default: verify_assessor_interface_application_form_assessment_consent_request_path) %> | ||
|
||
<%= form_with model: @form, url: [:verify_failed, :assessor_interface, @application_form, @assessment, @consent_request] do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<h1 class="govuk-heading-xl"><%= title %></h1> | ||
|
||
<p class="govuk-body">You have opted to send this qualification’s consent request for review.</p> | ||
|
||
<%= f.govuk_text_area :note %> | ||
|
||
<%= render "shared/assessor_interface/continue_cancel_button", f: %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
spec/support/autoload/page_objects/assessor_interface/verify_consent_request.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
module PageObjects | ||
module AssessorInterface | ||
class VerifyConsentRequest < VerifyRequestablePage | ||
set_url "/assessor/applications/{reference}/assessments/{assessment_id}" \ | ||
"/consent-requests/{id}/verify" | ||
|
||
element :download_original_button, | ||
".govuk-button:not(.govuk-button--inverse)" | ||
element :download_as_pdf_button, ".govuk-button.govuk-button--inverse" | ||
end | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
spec/support/autoload/page_objects/assessor_interface/verify_failed_consent_request.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
module PageObjects | ||
module AssessorInterface | ||
class VerifyFailedConsentRequest < VerifyFailedRequestablePage | ||
set_url "/assessor/applications/{reference}/assessments/{assessment_id}" \ | ||
"/consent-requests/{id}/verify-failed" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.