-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove most of JobApplicationStepProcess apart from the step groups
- Loading branch information
Showing
4 changed files
with
25 additions
and
53 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
41 changes: 24 additions & 17 deletions
41
app/services/jobseekers/job_applications/job_application_step_process.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 |
---|---|---|
@@ -1,21 +1,28 @@ | ||
class Jobseekers::JobApplications::JobApplicationStepProcess < StepProcess | ||
attr_reader :job_application | ||
module Jobseekers | ||
module JobApplications | ||
class JobApplicationStepProcess | ||
def initialize(job_application:) | ||
@job_application = job_application | ||
|
||
def initialize(current_step, job_application:) | ||
@job_application = job_application | ||
@step_groups = { | ||
personal_details: %i[personal_details], | ||
professional_status: %i[professional_status], | ||
qualifications: %i[qualifications], | ||
training_and_cpds: %i[training_and_cpds], | ||
employment_history: %i[employment_history], | ||
personal_statement: %i[personal_statement], | ||
references: %i[references], | ||
equal_opportunities: %i[equal_opportunities], | ||
ask_for_support: %i[ask_for_support], | ||
declarations: %i[declarations], | ||
review: %i[review], | ||
} | ||
end | ||
|
||
super(current_step, { | ||
personal_details: %i[personal_details], | ||
professional_status: %i[professional_status], | ||
qualifications: %i[qualifications], | ||
training_and_cpds: %i[training_and_cpds], | ||
employment_history: %i[employment_history], | ||
personal_statement: %i[personal_statement], | ||
references: %i[references], | ||
equal_opportunities: %i[equal_opportunities], | ||
ask_for_support: %i[ask_for_support], | ||
declarations: %i[declarations], | ||
review: %i[review], | ||
}) | ||
# Returns the keys of all individual steps in order | ||
def steps | ||
@step_groups.values.flatten | ||
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
34 changes: 0 additions & 34 deletions
34
spec/services/jobseekers/job_applications/job_application_step_process_spec.rb
This file was deleted.
Oops, something went wrong.