Skip to content

Commit

Permalink
Remove JourneySubjectEligibilityChecker
Browse files Browse the repository at this point in the history
This class is no longer needed
  • Loading branch information
rjlynch committed Nov 19, 2024
1 parent 14025eb commit 429884b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 613 deletions.
2 changes: 0 additions & 2 deletions app/helpers/claims/itt_subject_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "journey_subject_eligibility_checker"

module Claims
module IttSubjectHelper
def subjects_to_sentence_for_hint_text(answers)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "journey_subject_eligibility_checker"

module Policies
module LevellingUpPremiumPayments
class DqtRecord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def policy
def indicated_ineligible_itt_subject?
return false if eligible_itt_subject.blank?

args = {claim_year: claim_year, itt_year: itt_academic_year}

if args.values.any?(&:blank?)
if claim_year.blank? || itt_academic_year.blank?
# trainee teacher who won't have given their ITT year
eligible_itt_subject.present? && !eligible_itt_subject.to_sym.in?(policy.fixed_subject_symbols)
eligible_itt_subject.present? && LevellingUpPremiumPayments.fixed_subject_symbols.exclude?(eligible_itt_subject.to_sym)
else
itt_subject_checker = JourneySubjectEligibilityChecker.new(**args)
eligible_itt_subject.present? && !eligible_itt_subject.to_sym.in?(itt_subject_checker.current_subject_symbols(policy))
LevellingUpPremiumPayments.subject_symbols(
claim_year: claim_year,
itt_year: itt_academic_year
).exclude?(eligible_itt_subject.to_sym)
end
end

Expand Down Expand Up @@ -58,14 +58,14 @@ def eligible_itt_subject_or_relevant_degree?
def good_itt_subject?
return false if eligible_itt_subject.blank?

args = {claim_year: claim_year, itt_year: itt_academic_year}

if args.values.any?(&:blank?)
if claim_year.blank? || itt_academic_year.blank?
# trainee teacher who won't have given their ITT year
eligible_itt_subject.present? && eligible_itt_subject.to_sym.in?(Policies::LevellingUpPremiumPayments.fixed_subject_symbols)
else
itt_subject_checker = JourneySubjectEligibilityChecker.new(**args)
eligible_itt_subject.to_sym.in?(itt_subject_checker.current_subject_symbols(policy))
LevellingUpPremiumPayments.current_subject_symbols(
claim_year: claim_year,
itt_year: itt_academic_year
).include?(eligible_itt_subject.to_sym)
end
end

Expand Down
74 changes: 0 additions & 74 deletions lib/journey_subject_eligibility_checker.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ def task_outcome
itt_years = policy.selectable_itt_years_for_claim_year(claim_year)

itt_years.detect do |itt_year|
checker = JourneySubjectEligibilityChecker.new(claim_year: claim_year, itt_year: itt_year)
subject_symbol.in?(checker.current_subject_symbols(policy))
subject_symbol.in?(
policy.current_subject_symbols(
claim_year: claim_year,
itt_year: itt_year
)
)
end
}

Expand Down
Loading

0 comments on commit 429884b

Please sign in to comment.