From 19f9ba0a03d4028f8d433ec9a5a13f28e519e22e Mon Sep 17 00:00:00 2001 From: Felix Clack Date: Mon, 1 Jul 2024 07:42:19 +0100 Subject: [PATCH] Add the home office identity confirmation task for IRP THe first admin task for the IRP journey is verifying the Home Office identity check. We request the nationality and passport number for the individual submitting the claim and present that as the check for the admin task. --- app/models/claim_checking_tasks.rb | 2 +- .../admin_tasks_presenter.rb | 11 +++++++++++ config/locales/en.yml | 6 ++++++ spec/requests/admin_tasks_spec.rb | 12 ++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/app/models/claim_checking_tasks.rb b/app/models/claim_checking_tasks.rb index 2fcdbc5620..e00040e4dc 100644 --- a/app/models/claim_checking_tasks.rb +++ b/app/models/claim_checking_tasks.rb @@ -12,7 +12,7 @@ def initialize(claim) delegate :policy, to: :claim def applicable_task_names - return [] if policy.international_relocation_payments? + return ["identity_confirmation"] if policy.international_relocation_payments? @applicable_task_names ||= Task::NAMES.dup.tap do |task_names| task_names.delete("induction_confirmation") unless claim.policy == Policies::EarlyCareerPayments diff --git a/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb b/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb index e50adb3676..e64aa294ea 100644 --- a/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb +++ b/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb @@ -8,6 +8,17 @@ class AdminTasksPresenter def initialize(claim) @claim = claim end + + def identity_confirmation + [ + ["Nationality", eligibility.nationality], + ["Passport number", eligibility.passport_number] + ] + end + + private + + delegate :eligibility, to: :claim end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index b2fb520b3a..519e2dc889 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -119,6 +119,8 @@ en: claim_route: "Claim route" claim_route_not_tid: "Not signed in with DfE Identity" claim_route_with_tid: "Signed in with DfE Identity" + passport_number: "Passport number" + nationality: "Nationality" decision: created_at: "Created at" result: "Result" @@ -779,6 +781,10 @@ en: <<: *get_a_teacher_relocation_payment policy_short_name: "International Relocation Payments" policy_acronym: "IRP" + admin: + task_questions: + identity_confirmation: + title: "Did %{claim_full_name} submit the claim?" further_education_payments: landing_page: Find out if you are eligible for any incentive payments for further education teachers diff --git a/spec/requests/admin_tasks_spec.rb b/spec/requests/admin_tasks_spec.rb index f47861a025..9c88e5cbc5 100644 --- a/spec/requests/admin_tasks_spec.rb +++ b/spec/requests/admin_tasks_spec.rb @@ -105,6 +105,18 @@ end end end + + context "with an International Relocation Payments claim" do + let(:claim) { create(:claim, :submitted, policy: Policies::InternationalRelocationPayments) } + + describe "tasks#show" do + it "renders the requested page" do + get admin_claim_task_path(claim, "identity_confirmation") + expect(response.body).to include(I18n.t("admin.nationality")) + expect(response.body).to include(I18n.t("admin.passport_number")) + end + end + end end context "when signed in as a payroll operator or a support agent" do