Skip to content

Commit

Permalink
delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Jan 22, 2025
1 parent 6829f80 commit 0da306e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
13 changes: 2 additions & 11 deletions app/controllers/jobseekers/job_applications/build_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ def form_attributes

case step
when :professional_status
attributes.merge(jobseeker_profile_attributes)
.merge(trn_params)
# when :references
# attributes.merge(references: job_application.references)
attributes.merge(trn_params)
when :employment_history
attributes.merge(unexplained_employment_gaps: job_application.unexplained_employment_gaps)
else
Expand Down Expand Up @@ -108,7 +105,7 @@ def update_params
end

def update_fields
# This version doesn't work with date fields
# This version doesn't work with date fields as they are submitted in 3 parts (hence form_params doesn't contain the right key)
# form_class.storable_fields.select { |f| form_params.key?(f) }.index_with { |field| form.public_send(field) }
form_params.except(*form_class.unstorable_fields)
end
Expand All @@ -121,12 +118,6 @@ def vacancy
@vacancy ||= job_application.vacancy
end

def jobseeker_profile_attributes
{
jobseeker_profile: current_jobseeker.jobseeker_profile,
}
end

def trn_params
{
teacher_reference_number: form_params[:teacher_reference_number] || current_jobseeker&.jobseeker_profile&.teacher_reference_number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ def load_form(model)
end
end

def statutory_induction_complete_options
[
["yes", I18n.t("helpers.label.jobseekers_job_application_professional_status_form.statutory_induction_complete_options.yes")],
["no", I18n.t("helpers.label.jobseekers_job_application_professional_status_form.statutory_induction_complete_options.no")],

]
end

def initialize(attributes = {})
jobseeker_profile = attributes.delete(:jobseeker_profile)
super
Expand Down

0 comments on commit 0da306e

Please sign in to comment.