Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move eligibility calculations from Eligibility model to Checkers #2884

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

kenfodder
Copy link
Contributor

No description provided.

@kenfodder kenfodder marked this pull request as ready for review June 19, 2024 14:08
@kenfodder kenfodder added the deploy Deploy a review app for this PR label Jun 19, 2024
Copy link
Contributor

@rjlynch rjlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice 👍

@@ -116,7 +116,7 @@ def mobile_number_verified?
end

def claim_is_eligible
if main_eligibility.ineligible?
if main_eligibility.policy::PolicyEligibilityChecker.new(answers: answers).ineligible?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@@ -3,12 +3,16 @@ module AdditionalPaymentsForTeaching
class ClaimSubmissionForm < ::ClaimSubmissionBaseForm
def eligible_now_or_later
eligibilities.select do |e|
e.status == :eligible_now || e.status == :eligible_later
eligibility_checker.eligible_now_or_later.include?(e.policy)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kenfodder kenfodder merged commit 3286454 into master Jun 19, 2024
17 checks passed
@kenfodder kenfodder deleted the capt-1723-move-eligibility-calc branch June 19, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy Deploy a review app for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants