Skip to content

Commit

Permalink
Merge pull request #9470 from DFE-Digital/add-dfe-wizard
Browse files Browse the repository at this point in the history
Remove implementation of wizard to use the dfe-wizard gem
  • Loading branch information
tomas-stefano authored Jun 20, 2024
2 parents 02405c6 + 323c3d2 commit 8e6f66e
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 733 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ gem 'geocoder'

gem 'dfe-reference-data', require: 'dfe/reference_data', github: 'DFE-Digital/dfe-reference-data', tag: 'v3.4.0'
gem 'dfe-autocomplete', require: 'dfe/autocomplete', github: 'DFE-Digital/dfe-autocomplete', tag: 'v0.1.0'
gem 'dfe-wizard', require: 'dfe/wizard', github: 'DFE-Digital/dfe-wizard', tag: 'v0.1.0'

gem 'strip_attributes'

Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ GIT
activesupport
tzinfo

GIT
remote: https://github.com/DFE-Digital/dfe-wizard.git
revision: 2968ba3310680071948df98eca11d3a6dbe49a6c
tag: v0.1.0
specs:
dfe-wizard (0.1.0)
activemodel
activesupport

GIT
remote: https://github.com/DFE-Digital/get-into-teaching-api-ruby-client.git
revision: 9b2ba219f9def41b1547e4cb4f766f30f80364ee
Expand Down Expand Up @@ -876,6 +885,7 @@ DEPENDENCIES
dfe-analytics!
dfe-autocomplete!
dfe-reference-data!
dfe-wizard!
discard
dotenv-rails
erb_lint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class ClosedCourseSelectionStep < DfE::WizardStep
class ClosedCourseSelectionStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id
validates :provider_id, :course_id, presence: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class CourseReviewStep < DfE::WizardStep
class CourseReviewStep < DfE::Wizard::Step
def next_step; end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class CourseSelectionWizard < DfE::Wizard
class CourseSelectionWizard < DfE::Wizard::Base
# application_choice is only used in edit and update
attr_accessor :current_application, :application_choice

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class CourseSiteStep < DfE::WizardStep
class CourseSiteStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id, :study_mode, :course_option_id
validates :course_option_id, presence: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class CourseStudyModeStep < DfE::WizardStep
class CourseStudyModeStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id, :study_mode

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class DoYouKnowTheCourseStep < DfE::WizardStep
class DoYouKnowTheCourseStep < DfE::Wizard::Step
attr_accessor :answer
validates :answer, presence: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class DuplicateCourseSelectionStep < DfE::WizardStep
class DuplicateCourseSelectionStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id
validates :provider_id, :course_id, presence: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class FindCourseSelectionStep < DfE::WizardStep
class FindCourseSelectionStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :course_id, :confirm
validates :course_id, :confirm, presence: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class FullCourseSelectionStep < DfE::WizardStep
class FullCourseSelectionStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id
validates :provider_id, :course_id, presence: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class GoToFindExplanationStep < DfE::WizardStep
class GoToFindExplanationStep < DfE::Wizard::Step
def previous_step
:do_you_know_the_course
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class ProviderSelectionStep < DfE::WizardStep
class ProviderSelectionStep < DfE::Wizard::Step
attr_accessor :provider_id
validates :provider_id, presence: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class ReachedReapplicationLimitStep < DfE::WizardStep
class ReachedReapplicationLimitStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id
validates :provider_id, :course_id, presence: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class WhichCourseAreYouApplyingToStep < DfE::WizardStep
class WhichCourseAreYouApplyingToStep < DfE::Wizard::Step
include Concerns::CourseSelectionStepHelper
attr_accessor :provider_id, :course_id
validates :provider_id, :course_id, presence: true
Expand Down
150 changes: 0 additions & 150 deletions app/lib/dfe/wizard.rb

This file was deleted.

51 changes: 0 additions & 51 deletions app/lib/dfe/wizard_step.rb

This file was deleted.

14 changes: 0 additions & 14 deletions app/lib/dfe/wizard_store.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CandidateInterface
module ContinuousApplications
class CourseSelectionStore < DfE::WizardStore
class CourseSelectionStore < DfE::Wizard::Store
delegate :current_step_name, :current_application, to: :wizard
attr_accessor :application_choice

Expand Down
Loading

0 comments on commit 8e6f66e

Please sign in to comment.