Skip to content

Commit

Permalink
Merge pull request #2969 from DFE-Digital/admin-teaching-hours
Browse files Browse the repository at this point in the history
Add the payroll admin tasks for IRP
  • Loading branch information
rjlynch authored Jul 8, 2024
2 parents a639325 + fb737e5 commit e6f4f71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions app/models/claim_checking_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,24 @@ def initialize(claim)
delegate :policy, to: :claim

def applicable_task_names
return %w[identity_confirmation visa arrival_date employment employment_contract employment_start subject] 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
task_names.delete("student_loan_amount") unless claim.policy == Policies::StudentLoans
task_names.delete("student_loan_plan") unless claim.has_ecp_or_lupp_policy? && claim.submitted_without_slc_data?
task_names.delete("payroll_details") unless claim.must_manually_validate_bank_details?
task_names.delete("matching_details") unless matching_claims.exists?
task_names.delete("payroll_gender") unless claim.payroll_gender_missing? || task_names_for_claim.include?("payroll_gender")
task_names.delete("visa")
task_names.delete("arrival_date")
task_names.delete("employment_contract")
task_names.delete("employment_start")
task_names.delete("subject")
if claim.policy.international_relocation_payments?
task_names.delete("qualifications")
task_names.delete("census_subjects_taught")
end
unless claim.policy.international_relocation_payments?
task_names.delete("visa")
task_names.delete("arrival_date")
task_names.delete("employment_contract")
task_names.delete("employment_start")
task_names.delete("subject")
end
end
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FactoryBot.define do
factory :international_relocation_payments_eligibility, class: "Policies::InternationalRelocationPayments::Eligibility" do
trait :eligible_home_office do
passport_number { "123456789" }
passport_number { Faker::Number.unique.number(digits: 9).to_s }
nationality { "French" }
end

Expand Down

0 comments on commit e6f4f71

Please sign in to comment.