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 6ed377f046..867a014da9 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" @@ -772,6 +774,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 diff --git a/spec/support/admin_view_claim_feature_shared_examples.rb b/spec/support/admin_view_claim_feature_shared_examples.rb index 0e211b8b0b..939e59cbcc 100644 --- a/spec/support/admin_view_claim_feature_shared_examples.rb +++ b/spec/support/admin_view_claim_feature_shared_examples.rb @@ -179,7 +179,7 @@ def expect_page_to_have_policy_sections(policy) when Policies::EarlyCareerPayments ["Identity confirmation", "Qualifications", "Induction confirmation", "Census subjects taught", "Employment", "Student loan plan", "Decision"] when Policies::InternationalRelocationPayments - ["Decision"] + ["Identity confirmation", "Decision"] else raise "Unimplemented policy: #{policy}" end