Skip to content

Commit

Permalink
add placeholders for FE admin tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
asmega committed Sep 6, 2024
1 parent 6938d78 commit 02c0999
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ def qualifications
[]
end

def employment
[]
end

def identity_confirmation
[]
end

def student_loan_plan
[]
end

private

def verifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,21 @@ def initialize(claim)
delegate :policy, to: :claim

def applicable_task_names
@applicable_task_names ||= Task::NAMES.dup.tap do |task_names|
task_names.delete("employment") if claim.eligibility.teacher_reference_number.blank?

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")

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")
task_names.delete("teaching_hours")
end
end
end
tasks = []

private
tasks << "identity_confirmation"
tasks << "provider_verification"
tasks << "employment" if claim.eligibility.teacher_reference_number.present?
tasks << "student_loan_plan"
tasks << "payroll_details"
tasks << "matching_details" if matching_claims.exists?
tasks << "payroll_gender" if claim.payroll_gender_missing?

def task_names_for_claim
claim.tasks.pluck(:name)
tasks
end

private

def matching_claims
@matching_claims ||= Claim::MatchingAttributeFinder.new(claim).matching_claims
end
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 @@ -181,7 +181,7 @@ def expect_page_to_have_policy_sections(policy)
when Policies::InternationalRelocationPayments
["Identity confirmation", "Visa", "Arrival date", "Employment", "Employment contract", "Employment start", "Subject", "Teaching hours", "Decision"]
when Policies::FurtherEducationPayments
["Identity confirmation", "Provider verification", "Qualifications", "Census subjects taught", "Matching details", "Decision"]
["Identity confirmation", "Provider verification", "Student loan plan", "Payroll details", "Matching details", "Decision"]
else
raise "Unimplemented policy: #{policy}"
end
Expand Down

0 comments on commit 02c0999

Please sign in to comment.