-
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.
- Loading branch information
Showing
14 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
app/forms/journeys/early_years_payment/practitioner/claim_submission_form.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 Journeys | ||
module EarlyYearsPayment | ||
module Practitioner | ||
class ClaimSubmissionForm < ::ClaimSubmissionBaseForm | ||
def main_eligibility | ||
@main_eligibility ||= eligibilities.detect { |e| e.policy == main_policy } | ||
end | ||
|
||
def calculate_award_amount(eligibility) | ||
0 | ||
end | ||
|
||
def main_policy | ||
Policies::EarlyYearsPayments | ||
end | ||
end | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
app/forms/journeys/early_years_payment/practitioner/find_reference_form.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 Practitioner | ||
class FindReferenceForm < Form | ||
end | ||
end | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
app/forms/journeys/early_years_payment/practitioner/session_form.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 Practitioner | ||
class SessionForm < Journeys::SessionForm; 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Practitioner | ||
extend Base | ||
extend self | ||
|
||
ROUTING_NAME = "early-years-payment-practitioner" | ||
VIEW_PATH = "early_years_payment/practitioner" | ||
I18N_NAMESPACE = "early_years_payment_practitioner" | ||
POLICIES = [Policies::EarlyYearsPayments] | ||
FORMS = { | ||
"claims" => { | ||
"find-reference" => FindReferenceForm | ||
} | ||
} | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
app/models/journeys/early_years_payment/practitioner/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 Practitioner | ||
class EligibilityChecker < Journeys::EligibilityChecker | ||
end | ||
end | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
app/models/journeys/early_years_payment/practitioner/session.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,9 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Practitioner | ||
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/practitioner/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 Practitioner | ||
class SessionAnswers < Journeys::SessionAnswers | ||
def policy | ||
nil | ||
end | ||
end | ||
end | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
app/models/journeys/early_years_payment/practitioner/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 Practitioner | ||
class SessionAnswersType < ::Journeys::SessionAnswersType; end | ||
end | ||
end | ||
end |
27 changes: 27 additions & 0 deletions
27
app/models/journeys/early_years_payment/practitioner/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,27 @@ | ||
module Journeys | ||
module EarlyYearsPayment | ||
module Practitioner | ||
class SlugSequence | ||
SLUGS = %w[ | ||
find-reference | ||
].freeze | ||
|
||
def self.start_page_url | ||
Rails.application.routes.url_helpers.landing_page_path("early-years-payment-practitioner") | ||
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 |
1 change: 1 addition & 0 deletions
1
app/views/early_years_payment/practitioner/landing_page.html.erb
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 @@ | ||
landing pages goes here |
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 |
---|---|---|
|
@@ -1399,6 +1399,9 @@ en: | |
early_years_payments: | ||
<<: *early_years_payment_provider_authenticated | ||
claim_subject: "Early Years Payment" | ||
early_years_payment_practitioner: | ||
journey_name: Claim an early years financial incentive payment - practitioner | ||
feedback_email: [email protected] | ||
activerecord: | ||
errors: | ||
models: | ||
|
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