Browse Source

Rename household needs occurences

pull/2772/head
Kat 1 year ago
parent
commit
cd1694fe69
  1. 2
      app/models/form/sales/sections/household.rb
  2. 4
      app/models/form/sales/subsections/household_needs.rb
  3. 2
      config/locales/forms/2023/sales/household_needs.en.yml
  4. 2
      config/locales/forms/2024/sales/household_needs.en.yml
  5. 2
      config/locales/forms/2025/sales/household_needs.en.yml
  6. 2
      spec/models/form/sales/sections/household_spec.rb
  7. 4
      spec/models/form/sales/subsections/household_needs_spec.rb

2
app/models/form/sales/sections/household.rb

@ -7,7 +7,7 @@ class Form::Sales::Sections::Household < ::Form::Section
@subsections = [
Form::Sales::Subsections::HouseholdCharacteristics.new(nil, nil, self),
Form::Sales::Subsections::HouseholdSituation.new(nil, nil, self),
Form::Sales::Subsections::HouseholdNeeds.new(nil, nil, self),
Form::Sales::Subsections::OtherHouseholdInformation.new(nil, nil, self),
]
end
end

4
app/models/form/sales/subsections/household_needs.rb

@ -1,7 +1,7 @@
class Form::Sales::Subsections::HouseholdNeeds < ::Form::Subsection
class Form::Sales::Subsections::OtherHouseholdInformation < ::Form::Subsection
def initialize(id, hsh, section)
super
@id = "household_needs"
@id = "other_household_information"
@label = "Other household information"
@depends_on = [{ "setup_completed?" => true }]
end

2
config/locales/forms/2023/sales/household_needs.en.yml

@ -2,7 +2,7 @@ en:
forms:
2023:
sales:
household_needs:
other_household_information:
hhregres:
page_header: ""
check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"

2
config/locales/forms/2024/sales/household_needs.en.yml

@ -2,7 +2,7 @@ en:
forms:
2024:
sales:
household_needs:
other_household_information:
hhregres:
page_header: ""
check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"

2
config/locales/forms/2025/sales/household_needs.en.yml

@ -2,7 +2,7 @@ en:
forms:
2025:
sales:
household_needs:
other_household_information:
hhregres:
page_header: ""
check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"

2
spec/models/form/sales/sections/household_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Sections::Household, type: :model do
%w[
household_characteristics
household_situation
household_needs
other_household_information
],
)
end

4
spec/models/form/sales/subsections/household_needs_spec.rb

@ -1,6 +1,6 @@
require "rails_helper"
RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do
RSpec.describe Form::Sales::Subsections::OtherHouseholdInformation, type: :model do
subject(:household_characteristics) { described_class.new(subsection_id, subsection_definition, section) }
let(:subsection_id) { nil }
@ -27,7 +27,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do
end
it "has the correct id" do
expect(household_characteristics.id).to eq("household_needs")
expect(household_characteristics.id).to eq("other_household_information")
end
it "has the correct label" do

Loading…
Cancel
Save