-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3350 from DFE-Digital/ey-rejection-reasons
[LUPEYALPHA-1173][LUPEYALPHA-1176] EY rejection reasons
- Loading branch information
Showing
18 changed files
with
147 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
class ClaimVerifierJob < ApplicationJob | ||
def perform(claim) | ||
if claim.eligibility.respond_to?(:teacher_reference_number) | ||
AutomatedChecks::ClaimVerifier.new( | ||
claim:, | ||
dqt_teacher_status: claim.has_dqt_record? ? Dqt::Teacher.new(claim.dqt_teacher_status) : Dqt::Client.new.teacher.find( | ||
claim.eligibility.teacher_reference_number, | ||
birthdate: claim.date_of_birth.to_s, | ||
nino: claim.national_insurance_number | ||
) | ||
).perform | ||
dqt_teacher_status = if claim.policy == Policies::EarlyYearsPayments | ||
nil | ||
elsif claim.has_dqt_record? | ||
Dqt::Teacher.new(claim.dqt_teacher_status) | ||
else | ||
Dqt::Client.new.teacher.find( | ||
claim.eligibility.teacher_reference_number, | ||
birthdate: claim.date_of_birth.to_s, | ||
nino: claim.national_insurance_number | ||
) | ||
end | ||
|
||
AutomatedChecks::ClaimVerifier.new( | ||
claim:, | ||
dqt_teacher_status: | ||
).perform | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
app/models/policies/early_years_payments/claim_personal_data_scrubber.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Policies | ||
module EarlyYearsPayments | ||
class ClaimPersonalDataScrubber < Policies::ClaimPersonalDataScrubber | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
app/models/policies/early_years_payments/eligibility_admin_answers_presenter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Policies | ||
module EarlyYearsPayments | ||
class EligibilityAdminAnswersPresenter | ||
include Admin::PresenterMethods | ||
include ActionView::Helpers::NumberHelper | ||
|
||
attr_reader :eligibility | ||
|
||
def initialize(eligibility) | ||
@eligibility = eligibility | ||
end | ||
|
||
def answers | ||
[] | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1419,11 +1419,12 @@ en: | |
By submitting this claim you’re confirming that, to the best of your knowledge, the details you’re providing are correct. | ||
btn_text: Accept and send | ||
early_years_payments: | ||
<<: *early_years_payment_provider_authenticated | ||
claim_subject: "Early Years Payment" | ||
policy_acronym: EY | ||
policy_short_name: Early Years | ||
policy_short_name: Early Years Financial Incentive Payments | ||
policy_full_name: Early years financial incentive payment | ||
support_email_address: "[email protected]" | ||
claim_description: for an early years financial incentive payment | ||
govuk_verify_fields: | ||
full_name: Applicant name | ||
admin: | ||
|
@@ -1443,6 +1444,13 @@ en: | |
provider_submitted_at: Provider submitted at | ||
practitioner_started_at: Claimant started at | ||
submitted_at: Claimant submitted at | ||
decision: | ||
rejected_reasons: | ||
claim_cancelled_by_employer: Claim cancelled by employer | ||
six_month_retention_check_failed: 6 month retention check failed | ||
duplicate: Duplicate | ||
no_response: No response | ||
other: Other | ||
early_years_payment_practitioner: | ||
journey_name: Claim an early years financial incentive payment - practitioner | ||
feedback_email: "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
require "rails_helper" | ||
|
||
RSpec.feature "Admin view claim" do | ||
Policies.all.each { |policy| it_behaves_like "Admin View Claim Feature", policy } | ||
Policies.all.excluding(Policies::EarlyYearsPayments, Policies::FurtherEducationPayments).each { |policy| it_behaves_like "Admin View Claim logged in with tid", policy } | ||
Policies | ||
.all | ||
.each { |policy| it_behaves_like "Admin View Claim Feature", policy } | ||
|
||
Policies | ||
.all | ||
.excluding(Policies::EarlyYearsPayments, Policies::FurtherEducationPayments) | ||
.each { |policy| it_behaves_like "Admin View Claim logged in with tid", policy } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe Policies::EarlyYearsPayments do | ||
describe "::VERIFIERS" do | ||
it "does not talk to DQT" do | ||
expect(described_class::VERIFIERS).not_to include(AutomatedChecks::ClaimVerifiers::Identity) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters