Skip to content

Commit

Permalink
Add the home office identity confirmation task for IRP
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
felixclack committed Jul 1, 2024
1 parent 871bed5 commit 19f9ba0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/claim_checking_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions spec/requests/admin_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19f9ba0

Please sign in to comment.