diff --git a/app/forms/journeys/further_education_payments/ineligible_form.rb b/app/forms/journeys/further_education_payments/ineligible_form.rb new file mode 100644 index 0000000000..f5ad3333da --- /dev/null +++ b/app/forms/journeys/further_education_payments/ineligible_form.rb @@ -0,0 +1,9 @@ +module Journeys + module FurtherEducationPayments + class IneligibleForm < Form + def journey_eligibility_checker + @journey_eligibility_checker ||= EligibilityChecker.new(journey_session:) + end + end + end +end diff --git a/app/models/journeys/further_education_payments.rb b/app/models/journeys/further_education_payments.rb index 85089e3acf..6e6351c3a2 100644 --- a/app/models/journeys/further_education_payments.rb +++ b/app/models/journeys/further_education_payments.rb @@ -6,7 +6,7 @@ module FurtherEducationPayments ROUTING_NAME = "further-education-payments" VIEW_PATH = "further_education_payments" I18N_NAMESPACE = "further_education_payments" - POLICIES = [] + POLICIES = [Policies::FurtherEducationPayments] FORMS = { "claims" => { "teaching-responsibilities" => TeachingResponsibilitiesForm, @@ -17,7 +17,8 @@ module FurtherEducationPayments "further-education-teaching-start-year" => FurtherEducationTeachingStartYearForm, "subjects-taught" => SubjectsTaughtForm, "teaching-qualification" => TeachingQualificationForm, - "poor-performance" => PoorPerformanceForm + "poor-performance" => PoorPerformanceForm, + "ineligible" => IneligibleForm } } end diff --git a/app/models/journeys/further_education_payments/eligibility_checker.rb b/app/models/journeys/further_education_payments/eligibility_checker.rb index d30c874ca0..534e017321 100644 --- a/app/models/journeys/further_education_payments/eligibility_checker.rb +++ b/app/models/journeys/further_education_payments/eligibility_checker.rb @@ -1,9 +1,6 @@ module Journeys module FurtherEducationPayments class EligibilityChecker < Journeys::EligibilityChecker - def ineligible? - false - end end end end diff --git a/app/models/policies/further_education_payments/policy_eligibility_checker.rb b/app/models/policies/further_education_payments/policy_eligibility_checker.rb index 08f9abb3e7..b9fd1b46a1 100644 --- a/app/models/policies/further_education_payments/policy_eligibility_checker.rb +++ b/app/models/policies/further_education_payments/policy_eligibility_checker.rb @@ -10,11 +10,19 @@ def initialize(answers:) end def status + return :ineligible if ineligible? + :eligible_now end def ineligible? - false + ineligibility_reason.present? + end + + def ineligibility_reason + if answers.teaching_responsibilities == false + :lack_teaching_responsibilities + end end end end diff --git a/app/views/further_education_payments/claims/_ineligible_lack_teaching_responsibilities.html.erb b/app/views/further_education_payments/claims/_ineligible_lack_teaching_responsibilities.html.erb new file mode 100644 index 0000000000..e22255f18a --- /dev/null +++ b/app/views/further_education_payments/claims/_ineligible_lack_teaching_responsibilities.html.erb @@ -0,0 +1,19 @@ +
+ In order to claim a levelling up premium payment, you must be employed as a member of staff with teaching responsibilities. +
+ ++ For more information, check the eligibility criteria for <%= govuk_link_to "levelling up premium payments for early career further education teachers", "https://www.gov.uk/guidance/levelling-up-premium-payments-for-fe-teachers", new_tab: true %>. +
+ ++ The information entered is not stored. If you are unsure your information is correct, <%= govuk_link_to "start again", claim_path(current_journey_routing_name, "claim") %>. +
+