diff --git a/app/components/task_list/component.html.erb b/app/components/task_list/component.html.erb
index a5b35fe21b..77c88ec73d 100644
--- a/app/components/task_list/component.html.erb
+++ b/app/components/task_list/component.html.erb
@@ -11,6 +11,10 @@
<% end %>
+ <% if (description = section[:description]).present? %>
+
<%= description %>
+ <% end %>
+
<% section[:items].each do |item| %>
-
diff --git a/app/components/task_list/component.rb b/app/components/task_list/component.rb
index ac12461ce6..ea8b3c6af1 100644
--- a/app/components/task_list/component.rb
+++ b/app/components/task_list/component.rb
@@ -8,6 +8,7 @@ class Component < ViewComponent::Base
# sections: [
# {
# title: "Title",
+ # description: "Description",
# items: [
# {
# name: "Do this thing",
diff --git a/app/view_objects/assessor_interface/qualification_requests_view_object.rb b/app/view_objects/assessor_interface/qualification_requests_view_object.rb
new file mode 100644
index 0000000000..9011c299a0
--- /dev/null
+++ b/app/view_objects/assessor_interface/qualification_requests_view_object.rb
@@ -0,0 +1,171 @@
+# frozen_string_literal: true
+
+module AssessorInterface
+ class QualificationRequestsViewObject
+ include QualificationHelper
+
+ def initialize(application_form:)
+ @application_form = application_form
+ end
+
+ def all_task_items
+ items = [
+ check_consent_method_task_item,
+ if generate_consent_document_in_all_qualifications?
+ generate_consent_document_task_item
+ end,
+ ].compact
+
+ if show_individual_task_items?
+ items
+ else
+ items +
+ individual_task_items_for(
+ qualification_request: qualification_requests.first,
+ )
+ end
+ end
+
+ def show_individual_task_items?
+ all_consent_methods_selected? && qualification_requests.count > 1
+ end
+
+ def individual_task_items_for(qualification_request:)
+ return [] if qualification_request.consent_method_unknown?
+
+ if qualification_request.consent_method_unsigned?
+ unsigned_consent_method_task_items(qualification_request)
+ else
+ signed_consent_method_task_items(qualification_request)
+ end + ecctis_task_items(qualification_request)
+ end
+
+ private
+
+ attr_reader :application_form
+
+ delegate :assessment, to: :application_form
+
+ def qualification_requests
+ @qualification_requests ||=
+ application_form.assessment.qualification_requests.order_by_user
+ end
+
+ def all_consent_methods_selected?
+ qualification_requests.none?(&:consent_method_unknown?)
+ end
+
+ def check_consent_method_task_item
+ status =
+ if qualification_requests.all?(&:consent_method_unknown?)
+ "not_started"
+ elsif all_consent_methods_selected?
+ "completed"
+ else
+ "in_progress"
+ end
+
+ { name: "Check and select consent method", link: "#", status: }
+ end
+
+ def generate_consent_document_in_all_qualifications?
+ all_consent_methods_selected? &&
+ qualification_requests.consent_method_unsigned.count >= 2
+ end
+
+ def generate_consent_document_task_item
+ {
+ name: "Generate consent document",
+ link: "#",
+ status:
+ (
+ if assessment.unsigned_consent_document_generated
+ "completed"
+ else
+ "not_started"
+ end
+ ),
+ }
+ end
+
+ def unsigned_consent_method_task_items(_qualification_request)
+ if generate_consent_document_in_all_qualifications?
+ []
+ else
+ [generate_consent_document_task_item]
+ end
+ end
+
+ def signed_consent_method_task_items(qualification_request)
+ document_uploaded =
+ qualification_request.unsigned_consent_document.completed?
+
+ [
+ {
+ name: "Upload consent document",
+ link: "#",
+ status: document_uploaded ? "completed" : "not_started",
+ },
+ {
+ name: "Send consent document to applicant",
+ link: "#",
+ status:
+ if document_uploaded
+ if qualification_request.consent_requested?
+ "completed"
+ else
+ "not_started"
+ end
+ else
+ "cannot_start"
+ end,
+ },
+ {
+ name: "Record applicant response",
+ link: "#",
+ status:
+ if document_uploaded
+ if qualification_request.consent_received?
+ "completed"
+ else
+ "not_started"
+ end
+ else
+ "cannot_start"
+ end,
+ },
+ ]
+ end
+
+ def ecctis_task_items(qualification_request)
+ can_start =
+ (
+ qualification_request.consent_method_unsigned? &&
+ assessment.unsigned_consent_document_generated
+ ) || qualification_request.consent_received?
+
+ [
+ {
+ name: "Request Ecctis verification",
+ link: "#",
+ status:
+ if can_start
+ qualification_request.requested? ? "completed" : "not_started"
+ else
+ "cannot_start"
+ end,
+ },
+ {
+ name: "Record Ecctis response",
+ link: "#",
+ status:
+ if can_start && qualification_request.requested?
+ qualification_request.received? ? "completed" : "not_started"
+ else
+ "cannot_start"
+ end,
+ },
+ ]
+ end
+ end
+end
diff --git a/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb b/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb
new file mode 100644
index 0000000000..f483c343d5
--- /dev/null
+++ b/spec/view_objects/assessor_interface/qualification_requests_view_object_spec.rb
@@ -0,0 +1,158 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+RSpec.describe AssessorInterface::QualificationRequestsViewObject do
+ subject(:view_object) { described_class.new(application_form:) }
+
+ let(:application_form) do
+ create(:application_form, :verification_stage, :with_assessment)
+ end
+
+ let!(:qualification_request) do
+ create(
+ :qualification_request,
+ assessment: application_form.assessment,
+ qualification: create(:qualification, application_form:),
+ )
+ end
+
+ describe "#all_task_items" do
+ subject(:all_task_items) { view_object.all_task_items }
+
+ it do
+ is_expected.to eq(
+ [
+ {
+ name: "Check and select consent method",
+ link: "#",
+ status: "not_started",
+ },
+ ],
+ )
+ end
+
+ context "when consent methods are chosen" do
+ before { qualification_request.consent_method_unsigned! }
+
+ it do
+ is_expected.to eq(
+ [
+ {
+ name: "Check and select consent method",
+ link: "#",
+ status: "completed",
+ },
+ {
+ name: "Generate consent document",
+ link: "#",
+ status: "not_started",
+ },
+ {
+ name: "Request Ecctis verification",
+ link: "#",
+ status: "cannot_start",
+ },
+ {
+ name: "Record Ecctis response",
+ link: "#",
+ status: "cannot_start",
+ },
+ ],
+ )
+ end
+ end
+ end
+
+ describe "#show_individual_task_items?" do
+ subject(:show_individual_task_items?) do
+ view_object.show_individual_task_items?
+ end
+
+ it { is_expected.to be false }
+
+ context "with more than one qualification request" do
+ before do
+ qualification_request.consent_method_unsigned!
+ create(
+ :qualification_request,
+ assessment: application_form.assessment,
+ consent_method: "unsigned",
+ qualification: create(:qualification, application_form:),
+ )
+ end
+
+ it { is_expected.to be true }
+ end
+ end
+
+ describe "#individual_task_items_for" do
+ subject(:individual_task_items_for) do
+ view_object.individual_task_items_for(qualification_request:)
+ end
+
+ it { is_expected.to be_empty }
+
+ context "when unsigned consent method" do
+ before { qualification_request.consent_method_unsigned! }
+
+ it do
+ is_expected.to eq(
+ [
+ {
+ name: "Generate consent document",
+ link: "#",
+ status: "not_started",
+ },
+ {
+ name: "Request Ecctis verification",
+ link: "#",
+ status: "cannot_start",
+ },
+ {
+ name: "Record Ecctis response",
+ link: "#",
+ status: "cannot_start",
+ },
+ ],
+ )
+ end
+ end
+
+ context "when signed consent method" do
+ before { qualification_request.consent_method_signed_ecctis! }
+
+ it do
+ is_expected.to eq(
+ [
+ {
+ name: "Upload consent document",
+ link: "#",
+ status: "not_started",
+ },
+ {
+ name: "Send consent document to applicant",
+ link: "#",
+ status: "cannot_start",
+ },
+ {
+ name: "Record applicant response",
+ link: "#",
+ status: "cannot_start",
+ },
+ {
+ name: "Request Ecctis verification",
+ link: "#",
+ status: "cannot_start",
+ },
+ {
+ name: "Record Ecctis response",
+ link: "#",
+ status: "cannot_start",
+ },
+ ],
+ )
+ end
+ end
+ end
+end