Skip to content

Commit

Permalink
Merge pull request #2949 from DFE-Digital/admin-tasks
Browse files Browse the repository at this point in the history
Add the Home Office identity confirmation task
  • Loading branch information
felixclack authored Jul 2, 2024
2 parents c0538d4 + 16bf14f commit 670acfb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
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 @@ -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
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
2 changes: 1 addition & 1 deletion spec/support/admin_view_claim_feature_shared_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 670acfb

Please sign in to comment.