-
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.
Namespace journey to EarlyYearsPayment::Provider
Change the journey from EarlyYearsPayment to EarlyYearsPayment::Provider since there will be a second journey relating to the practitioner answers
- Loading branch information
1 parent
07a2b59
commit d9d8256
Showing
31 changed files
with
186 additions
and
166 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
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
app/models/journeys/early_years_payment/eligibility_checker.rb
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
extend Base | ||
extend self | ||
|
||
ROUTING_NAME = "early-years-payment-provider" | ||
VIEW_PATH = "early_years_payment/provider" | ||
I18N_NAMESPACE = "early_years_payment_provider" | ||
POLICIES = [Policies::EarlyYearsPayment::Provider] | ||
FORMS = { | ||
"claims" => {} | ||
} | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
app/models/journeys/early_years_payment/provider/eligibility_checker.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,8 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class EligibilityChecker < Journeys::EligibilityChecker | ||
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class Session < Journeys::Session | ||
attribute :answers, SessionAnswersType.new | ||
end | ||
end | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
app/models/journeys/early_years_payment/provider/session_answers.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,11 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class SessionAnswers < Journeys::SessionAnswers | ||
def policy | ||
Policies::EarlyYearsPayment::Provider | ||
end | ||
end | ||
end | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
app/models/journeys/early_years_payment/provider/session_answers_type.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,7 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class SessionAnswersType < ::Journeys::SessionAnswersType; end | ||
end | ||
end | ||
end |
42 changes: 42 additions & 0 deletions
42
app/models/journeys/early_years_payment/provider/slug_sequence.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,42 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Provider | ||
class SlugSequence | ||
ELIGIBILITY_SLUGS = %w[].freeze | ||
|
||
PERSONAL_DETAILS_SLUGS = %w[].freeze | ||
|
||
PAYMENT_DETAILS_SLUGS = %w[].freeze | ||
|
||
RESULTS_SLUGS = %w[].freeze | ||
|
||
SLUGS = ( | ||
ELIGIBILITY_SLUGS + | ||
PERSONAL_DETAILS_SLUGS + | ||
PAYMENT_DETAILS_SLUGS + | ||
RESULTS_SLUGS | ||
).freeze | ||
|
||
def self.start_page_url | ||
if Rails.env.production? | ||
"https://www.example.com" # TODO: update to correct guidance | ||
else | ||
Rails.application.routes.url_helpers.landing_page_path("early-years-payment-provider") | ||
end | ||
end | ||
|
||
attr_reader :journey_session | ||
|
||
delegate :answers, to: :journey_session | ||
|
||
def initialize(journey_session) | ||
@journey_session = journey_session | ||
end | ||
|
||
def slugs | ||
SLUGS | ||
end | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
app/models/journeys/early_years_payment/session_answers_type.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
app/models/policies/early_years_payment/policy_eligibility_checker.rb
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
module Policies | ||
module EarlyYearsPayment | ||
module Provider | ||
include BasePolicy | ||
extend self | ||
|
||
# Percentage of claims to QA | ||
MIN_QA_THRESHOLD = 10 | ||
|
||
# TODO: This is needed once the reply-to email address has been added to Gov Notify | ||
def notify_reply_to_id | ||
nil | ||
end | ||
end | ||
end | ||
end |
19 changes: 19 additions & 0 deletions
19
app/models/policies/early_years_payment/provider/eligibility.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,19 @@ | ||
module Policies | ||
module EarlyYearsPayment | ||
module Provider | ||
class Eligibility < ApplicationRecord | ||
self.table_name = "early_years_payment_provider_eligibilities" | ||
|
||
has_one :claim, as: :eligibility, inverse_of: :eligibility | ||
|
||
def policy | ||
Policies::EarlyYearsPayment::Provider | ||
end | ||
|
||
def ineligible? | ||
false | ||
end | ||
end | ||
end | ||
end | ||
end |
25 changes: 25 additions & 0 deletions
25
app/models/policies/early_years_payment/provider/policy_eligibility_checker.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,25 @@ | ||
module Policies | ||
module EarlyYearsPayment | ||
module Provider | ||
class PolicyEligibilityChecker | ||
attr_reader :answers | ||
|
||
delegate_missing_to :answers | ||
|
||
def initialize(answers:) | ||
@answers = answers | ||
end | ||
|
||
def status | ||
return :ineligible if ineligible? | ||
|
||
:eligible_now | ||
end | ||
|
||
def ineligible? | ||
false | ||
end | ||
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
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 |
---|---|---|
|
@@ -1019,8 +1019,10 @@ en: | |
By submitting this you are confirming that, to the best of your knowledge, the details you are providing are | ||
correct. | ||
btn_text: Accept and send | ||
early_years_payment: | ||
journey_name: Claim an early years financial incentive payment | ||
early_years_payment_provider: | ||
journey_name: Claim an early years financial incentive payment - provider | ||
landing_page: | ||
title: Claim an early years financial incentive payment | ||
feedback_email: "[email protected]" | ||
activerecord: | ||
errors: | ||
|
7 changes: 0 additions & 7 deletions
7
db/migrate/20240724092519_create_early_years_payment_eligibilities.rb
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
db/migrate/20240724092519_create_early_years_payment_provider_eligibilities.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,7 @@ | ||
class CreateEarlyYearsPaymentProviderEligibilities < ActiveRecord::Migration[7.0] | ||
def change | ||
create_table :early_years_payment_provider_eligibilities, id: :uuid do |t| | ||
t.timestamps | ||
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
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
Oops, something went wrong.